How to enable NAT on a Linux host

  • warning: include(/tmp/fortune.txt): failed to open stream: No such file or directory in /home/mohawksoft/org/www/htdocs/includes/common.inc(1696) : eval()'d code on line 1.
  • warning: include(): Failed opening '/tmp/fortune.txt' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/mohawksoft/org/www/htdocs/includes/common.inc(1696) : eval()'d code on line 1.

(All steps as root)

#First step is to load the NAT driver
modprobe iptable_nat

# Enable forwarding.
echo 1 > /proc/sys/net/ipv4/ip_forward