#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Location
    India
    Posts
    192
    Rep Power
    14

    Not able to connect to Internet from Client Machine through Linux 8.0 server


    O.K.
    I have changed IPTables polycies giving permission to all in "IPTables" file in directory "/etc/sysconfig" of Linux 8.0

    My Internet connection is through interface "eth1" IP address "192.168.1.8" (This is given by ISP with default gatway "192.168.1.1" and some DNS setting.)
    My LAN interface is "eth0" IP address "192.168.0.102"
    Each client has been assigned IP addresses ranging between 192.168.0.10-70 with default gatway as "192.168.0.102" set on all clients machines
    IPTables file is as follows :.
    ############

    *filter
    -A INPUT -p ALL -j ACCEPT
    -A FORWARD -p ALL -j ACCEPT
    -A OUTPUT -p ALL -j ACCEPT#
    COMMIT
    #############

    Then I have restarted iptables as follows:
    [root@xxx root] /etc/init.d/iptables restart
    Flushing all current rules and user defined chains: [ OK ]
    Clearing all current rules and user defined chains: [ OK ]
    Applying iptables firewall rules: [ OK ]

    All Clients machines are connected to server by SAMBA(smb) network. SAMBA works fine That means protocal TCP is passing from server to Client and vis-e-versa properly. Then why I am not able to connect to Internet from Client machine.

    I tried to connect to Internet by "IE" from client machine but could not do so.
    I have set connection properties of "IE" on client machine as "Automatically detect settings"
    I getting error in "IE" at client machine as "Page not found". On all clients machine default Gateway is set to 192.168.0.102.
    Do not know what is the problem. Once I can access Internet From Client machine I can fine tune IPTables settings subsequestly.
    Requesting help.

    Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    Unless your provider knows about your internal machines and did some setup for them too, you need to setup your iptables on your gateway to masquerade the internal network. You are only forwarding all traffic from it. ("-A FORWARD -p ALL -j ACCEPT").
    use something similar to:

    -A INPUT -p ALL -j ACCEPT
    -A FORWARD -i eth1 -j MASQ
    -A FORWARD -p ALL -j ACCEPT
    -A OUTPUT -p ALL -j ACCEPT

    Youīll probably need to look up the right syntax yourself. I never used iptables, only ipchains.

    Another question: Did you enable IP forwarding? like:
    echo "1" > /proc/sys/net/ipv4/ip_forward

    Also: look out for the nameserver settings. What nameservers do your clients have? If they used dial-up, they would get the DNS serverīs IP(s) from their provider automatically, but in your case, you need to setup the DNS servers to use manually.

    PS. Samba is not involved in connecting to the internet.

    [edit]
    please donīt cross-post.
    [/edit]
    Last edited by M.Hirsch; May 12th, 2003 at 03:28 PM.

IMN logo majestic logo threadwatch logo seochat tools logo