setting up iptables with CentOS

Discussion in 'General Linux' started by red, Dec 11, 2011.

  1. red

    red New Member

    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    0
    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?

Share This Page