Hi, I'm trying to write an Online Firewall creator but I have one problem.
This will fix Masq and Forwarding
echo '1'> /proc/sys/net/ipv4/ip_forward
/sbin/iptables --table nat --append POSTROUTING -o eth1 -j MASQUERADE
/sbin/iptables --append FORWARD --in-interface eth0 -j ACCEPT
But problem is that anything from eth1(LAN) will be accepted
out to Internet.
I want to enable Masq and Forwarding AND by default deny everything from eth1.
And then I want to open upp some selected ports, udp and tcp.
I have been reading some docs but can't figure it out
Does anyone have a clue ?
This will fix Masq and Forwarding
echo '1'> /proc/sys/net/ipv4/ip_forward
/sbin/iptables --table nat --append POSTROUTING -o eth1 -j MASQUERADE
/sbin/iptables --append FORWARD --in-interface eth0 -j ACCEPT
But problem is that anything from eth1(LAN) will be accepted
out to Internet.
I want to enable Masq and Forwarding AND by default deny everything from eth1.
And then I want to open upp some selected ports, udp and tcp.
I have been reading some docs but can't figure it out
Does anyone have a clue ?