Purchase Linux CDs / DVDs / Flash Drives at OSDisc.com

Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd please sign up again. Thanks!

setting up iptables with CentOS

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

  1. red

    red Guest

    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