Linux NAT


This is a short howto for setting up Network Address Translation on a linux system (Debian was used for this howto)


Manually enable forwarding

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

Enable forwarding aumatically at boot time

add the following in /etc/network/options

 ip_forward=yes 

Set up source NAT

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
(replace eth0 by the interface connecting your Debian router to the Internet)

Additional steps



Labels: , Wireless Internet Security Coding Network Monitoring