~~NOTOC~~ ====== Linux NAT ====== This is a short howto for setting up [[wp>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 ===== * Install DHCPD dhcpd selects interfaces from which it will broadcase DHCP offers according to the IP address of the interface. So, add an IP address to the Inner interface before starting dhcpd. {{tag>unix routing}}