9/November/2008

How to configure Linux machine as router?

Here are some simple steps to do it, using Network Address Translation (NAT)
1. Enable packet forwarding . Make it permanent by adding “net.ipv4.ip_forward = 1″ to /etc/sysctl.conf

echo "1" > /proc/sys/net/ipv4/ip_forward

2. Enable iptables to handle NAT. ( eth0 is the public connection )

/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

3. Save iptables settings

service iptables save

4. Done. Check by routing table by verifying “netstat -nr” and iptables rules by “iptables -L”
This is a simple method for Redhat Enterprise Linux. See iptables docs for more detailed info.

Sumber: http://unixfoo.blogspot.com/2008/02/how-to-configure-linux-machine-as.html

Comments »

The URI to TrackBack this entry is: http://mauladi.blogsome.com/2008/11/09/how-to-configure-linux-machine-as-router/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.







E-mail:mauladi at
inbox dot com

[MY PHOTOS]