Monday 12 December 2011

setting up iptables with CentOS

setting up iptables with CentOS

I want to write a quick script that will allow my server to route automatically (I'm testing this on a virtual machine). Would I put this:
Code:

while true
do
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables –A POSTROUTING –t nat –o eth0 –j MASQUERADE
done

in /etc/rc.d to do it automatically?

No comments:

Post a Comment