Shortest masquerade config

Voici la commande la plus courte et simple afin de faire du masquerading sous Linux

# this will masquerade all packet to ppp0
iptables -F; iptables -t nat -F; iptables -t mangle -F
iptables -t nat -A POSTROUTING -o ppp0-j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward


Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>