Trying to setup a firewall router using iptables
I'm trying to setup a firewall and router using iptables. My setup is as follows:
eth0 connected to cable modem (dynamic ip)
eth1 internal network static ip address (x.x.x.10)
My iptables settings are as follows: (Based on several howtos)
/sbin/iptables -t nat -F
/sbin/iptables -t mangle -F
/sbin/iptables -P INPUT ACCEPT
/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/sbin/iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
/sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
echo " enabling forwarding.."
echo 1 > /proc/sys/net/ipv4/ip_forward
From my firewall/router Ihave web access and can ping my other computer on the internal network (ip x.x.x.1).
From my internal network computer I can ping the firewall/router however I cant connect to the outside.
I've set the browser to use a proxy server (x.x.x.10:80)
Question I'm I missing something?
Do I need to be running a proxy server or can I just use iptables with masquerading?
p.s. I've spent about 5hours playing with diffrent -i/-o eth1/eth0 settings.