So I'm new to Ubuntu forums and networking in general. I've asked a few questions on AskUbuntu.com on this topic but for some reason, none of my questions have attracted any responses. This is pretty much a duplicate of my askubuntu question found here.
So here's my problem:
I have 11 computers running Ubuntu 12.04. One computer (I'll refer to this one as prefect), which has two network cards configured, is connected to the internet. The other 10 are connected in a LAN which is connected to the prefect. Currently, the 10 computers in a LAN cannot ping an external IP's but I can ping prefect or any other computer in the LAN. To share the internet through prefect to the LAN clients, I decided to configure a dhcp server on prefect. I've tried a number of different approaches but nothing to seems to work.
This is what I've done so far.
I've edited my /etc/network/interfaces
Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
Edited my rc.local
Code:
/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables --table nat -A POSTROUTING -o eth0 -j MASQUERADE
exit 0
and edited my /etc/dhcp/dhcpd.conf
Code:
ddns-update-style none;
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 86400;
max-lease-time 604800;
authoritative;
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.1 192.168.1.10;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.100;
}
Some helpful information.
prefect IP: 128.2.218.180
Client IP's: 192.168.1.1-10
ifconfig
Code:
eth0 Link encap:Ethernet HWaddr ...
inet addr:128.2.218.180 Bcast:128.2.219.255 Mask:255.255.254.0
inet6 addr: ...
eth1 Link encap:Ethernet HWaddr ...
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: ...
ip route show
Code:
128.2.218.0/23 dev eth0 proto kernel scope link src 128.2.218.180
169.254.0.0/16 dev eth1 scope link metric 1000
192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.100
After doing all of this, I am still can't get the clients to ping any IP's outside of the LAN. Have I overlooked something? Are there any typo's I overlooked? I aslo don't have a good grasp on the different configuration settings for the dhcpd.conf file, is everything correct there?
Any suggestions are more than appreciated and please feel free to ask for more information if needed.
Thanks in advance!
Bookmarks