If you are sure that the problem is caused by the firewall rules, post them here so that everyone can have a look:
Code:
iptables -L -nv
iptables -L -nv -t nat
If you have other working firewall rules which you don't want to loose, take a backup before you flush the rules:
Code:
iptables-save > rules
To restore the saved rules:
Code:
iptables-restore < rules
And after flushing the rules remember to add some required rules back. Otherwise internet access from LAN will fail. I forgot to mention this in my earlier post.
Code:
#flushing the existing rules
iptables -F
iptables -F -t nat
#Allow packets from eth1 destined to the server. Required for DHCP.
iptables -A INPUT -i eth1 -j ACCEPT
#Allow forwarding
iptables -A FORWARD -j ACCEPT
#Add the NAT rule
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
With these rules in place you should be able to ping an IP address on the internet from a machine on LAN behind your server:
If that is working, then we can discuss building your firewall.
Bookmarks