Find the answer to your Linux question:
Results 1 to 5 of 5
I have googled this to death, followed countless tutorials and not had any joy, so here goes: I am trying to set up a router to provide internet access (among ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2008
    Posts
    2

    Internet Connection Sharing Problem


    I have googled this to death, followed countless tutorials and not had any joy, so here goes:

    I am trying to set up a router to provide internet access (among other things, just getting the internet to work for now) to a number of desktops and laptops.

    I have followed a number of different tutorials, all of which seem to insist I need to:
    • Set up a DHCP server
    • Create firewall rules
    • Some say I need to install ipmasq and dnsmasq



    I have set up a working DHCP server.

    /etc/dhcp3/dhcpd.conf

    Code:
    ddns-update-style none;
    
    default-lease-time 600;
    max-lease-time 7200;
    log-facility local7;
    
    subnet 192.168.1.0 netmask 255.255.255.0 {
    	authoritative;
    	range 192.168.1.0 192.168.1.254;
    	option routers 192.168.1.1;
    	option domain-name-servers 192.168.2.1;
    	}
    I have also set up the firewall rules:

    /etc/iptables.up.rules

    Code:
    # Generated by iptables-save v1.3.8 on Wed May  7 15:48:06 2008
    *nat
    :OUTPUT ACCEPT [0:0]
    :PREROUTING ACCEPT [0:0]
    :POSTROUTING ACCEPT [0:0]
    -A POSTROUTING -o wlan0 -j MASQUERADE
    COMMIT
    # Completed on Wed May  7 15:48:06 2008
    # Generated by iptables-save v1.3.8 on Wed May  7 15:48:06 2008
    *mangle
    :PREROUTING ACCEPT [102:15465]
    :INPUT ACCEPT [99:15345]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [75:11388]
    :POSTROUTING ACCEPT [83:12602]
    COMMIT
    # Completed on Wed May  7 15:48:06 2008
    # Generated by iptables-save v1.3.8 on Wed May  7 15:48:06 2008
    *filter
    :FORWARD ACCEPT [0:0]
    :INPUT ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    # Internal Network
    -A INPUT -i eth0 -j ACCEPT
    # Local Loopback
    -A INPUT -i lo -j ACCEPT
    # Existing connections
    -A INPUT -m state -i wlan0 --state ESTABLISHED,RELATED -j ACCEPT
    COMMIT
    # Completed on Wed May  7 15:48:06 2008
    The only line in that that does anything at the moment should be:
    Code:
    -A POSTROUTING -o wlan0 -j MASQUERADE
    I have been using webmin to set these services up, so there should be no problem with the config files.

    The problem:
    The laptop I am using cannot connect to the internet

    Connections:
    Internet
    -->
    Virgin Cable Modem
    -->
    Belkin Wireless Router (basic config)
    192.168.2.1
    --> (Wireless)
    192.168.2.2 (DHCP) (wlan0)
    Ubuntu 8.04 Server
    192.168.1.1 (eth0)
    --> (Wired)
    192.168.1.254 (DHCP) (eth0)
    Laptop

    The situation:
    • Server and laptop both running Ubuntu 8.04 fully updated
    • Laptop can reach wireless router through server (192.168.2.1)
    • Server can reach the internet
    • Laptop cannot reach internet (no ping, or web browsing)


    I currently do not have ipmasq or dnsmasq installed because when I do install them, the server can no longer browse the internet or the router.

    Also, I have checked IP forwarding and it is enabled.

    Hope this is enough information for someone to see what I'm doing wrong.

    Thanks

    Gary

  2. #2
    Linux Newbie athlon_crazy's Avatar
    Join Date
    Sep 2007
    Location
    Malaysia
    Posts
    132
    What nameserver your laptop currently use?

  3. #3
    Just Joined!
    Join Date
    May 2008
    Posts
    2

    Re: Internet ConnectionSharing Problem

    It uses 192.168.2.1. But either way, I thought the DHCP server assigned that?

    Thanks

    Gary

  4. #4
    Linux Newbie athlon_crazy's Avatar
    Join Date
    Sep 2007
    Location
    Malaysia
    Posts
    132
    Yes but probably the server prevent your laptop talking to DNS services port 53. Try open this tcp udp port first..

  5. #5
    Linux User
    Join Date
    May 2008
    Location
    NYC, moved from KS & MO
    Posts
    251
    Gary,
    got a few questions:
    1. How is your laptop connected to the desktop? Is it through a crossover cat5 cable, or a switch or else?
    2. Can your laptop ping the Internet through IP? For example, 64.233.167.99 (one of google's IPs)
    3. I know you mentioned ip forwarding in your post but I would like to know how you determined that ip forwarding is enabled.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •