linux as router/gateway unable to route LAN to WAN
I could really use some help in setting up Ubuntu as a router/gateway. I've read all relevant material I can find in LQ and the Ubuntu forums but am still running into problems. I'm a relative linux noob.
Setup: WAN hardwired to Ubuntu and getting ip by DHCP on the router/modem; Ubuntu running DHCP hardwired to another (Linksys WRT120N) router that is acting as a switch. Other computer connected to the Linksys is running Linux Mint 13.
Details:
-Ubuntu machine
eth0 is the WAN ip 192.168.1.100 set by DHCP from my ATT router/modem
eht1 is the LAN ip statically set to 10.14.82.1
DHCP is on eht1 LAN
-Linksys router
set to DHCP and here's what it got:
ip 10.14.82.56 subnet 255.255.255.0
default gateway 10.14.82.1 (the Ubuntu static ip)
DNS1 8.8.8.8 DNS2 8.8.4.4 (I set these)
-Linux Mint machine
ip 10.14.82.50 mask 255.255.255.0
gateway 10.14.82.1
-Firewall ip FILTER tables set to
INPUT rules:
ACCEPT INPUT eth1
ACCEPT INPUT eth0 for ESTABLISHED, RELATED
FORWARD rules:
ACCEPT INPUT eth1 to OUTPUT eth0
ACCEPT INPUT eth0 to OUTPUT eth1 for ESTABLISHED, RELATED
DEFAULT action:
drop for INPUT and FORWARD
accept for all others including NAT and mangle
-DHCP entry:
subnet 10.14.82.0 netmask 255.255.255.0 {
range 10.14.82.45 10.14.82.100;
option subnet-mask 255.255.255.0;
option broadcast-address 10.14.82.255;
option domain-name-servers 8.8.8.8, 8.8.4.4;
option routers 10.14.82.1;
}
Problems:
1. On the Linux Mint machine I can ping 10.14.82.1 and 10.14.82.2 but nothing on any other network and I can't browse the Internet if I connect the wire from eth1 on Ubuntu to WAN port on Linksys. However, when I connect both Ubunut and Mint machines to LAN ports on the Linksys I can ping 192.168.1.100, eth0 on Ubuntu, but I can't ping anything beyond that. I assume that the best way to use the Linksys is as a switch and connect only to LAN ports but seem to have trouble crossing from eth1 to eth0 on the Unbutu machine if it is connected to the WAN port.
2. I'm using Webmin to do my settings and set the firewall there. Output from iptables -L shows INPUT and FORWARD rules for a network 192.168.122.0/24 and shows no entries for 10.14.82.0 or 192.168.1.0 networks despite reboot several times and clicking the "Apply Configuration" button on Webmin. I'm suspicious that this is the root of my problem but am unable to figure out how to correct it.
3. Another problem about which I'm suspicious is DNS but I think it should work using Google's public DNS set on the DHCP as above.
I would greatly appreciate anyone's help in how to debug and/or solve these problems or any other information that you have.
|