LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Can not share internet connection (https://www.linuxquestions.org/questions/linux-networking-3/can-not-share-internet-connection-577412/)

bradshoults 08-15-2007 08:17 PM

Can not share internet connection
 
I finally got the two ubuntu boxes to talk to each other but I am unable to get internet on the emachine. I used webmin and got it hooked up, kudos to the creators!! I want to share the internet connection with the emachine box but dont know where to start from here. I have ipforwarding, nat, and a firewall -- all setup through webmin, I just understand very little of it, hence I dont know what information to include.

jschiwal 08-15-2007 09:24 PM

You may already have the internet connected computer configured from your description. You may just need to tell the e-machine that the default gateway is the LAN side NIC IP address of the first machine. You should provide more information if this doesn't work.

bradshoults 08-15-2007 09:27 PM

Quote:

Originally Posted by jschiwal (Post 2860383)
You may already have the internet connected computer configured from your description. You may just need to tell the e-machine that the default gateway is the LAN side NIC IP address of the first machine. You should provide more information if this doesn't work.

with dhcp set on the emachine how do I do that, it doesn't give me that option?
the dell has the internet on eth1 and the internal lan on eth0, I have the dhcp server setup and it appears that the emachine is getting its ip correctly. I did the ipforwarding and masquerading of eth1 as I read in a ubuntu fourm.

jschiwal 08-15-2007 10:10 PM

You didn't mention running DHCP in your first message. Run "/sbin/ifconfig" to see if the NIC has an IP address. The DHCP client on the eMachine should update the /etc/resolv.conf file with the gateway address. This is the file that contains the nameserver (DNS) addresses. It may look similar to this:
Code:

nameserver 24.116.209.232
nameserver 24.116.0.202
nameserver 24.116.212.232
search jesnet



There may be a config option for the DHCP client where you indicate whether it can edit the hosts or resolve.conf file.
Enter "/sbin/route" to check if you have a default gateway:
Code:

/sbin/route
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
jesnet          *              255.255.255.128 U    0      0        0 wlan0
link-local      *              255.255.0.0    U    0      0        0 wlan0
loopback        *              255.0.0.0      U    0      0        0 lo
default        router          0.0.0.0        UG    0      0        0 wlan0

In place of the "router", should be the name of your internet connected computer (or IP address). One oddball thing to check, is to make sure you don't have one of the computers named "localhost". If the other computer tries to reach it, it will resolve to itself instead.

I've found in the past that I needed to modprobe the "ip_conntrack" module before IP forwarding would work. Also make sure that you have the ip_nat module loaded (lsmod | grep ip_)


All times are GMT -5. The time now is 01:07 PM.