For starters, IP Forwarding must be enabled:
Code:
root@d530001:~# cat /proc/sys/net/ipv4/ip_forward
0
0 = no IP forwarding, 1 = IP forwarding.
To enable it:
Code:
sysctl -w net.ipv4.ip_forward=1
To make sure your routing is active when rebooting, edit /etc/sysctl.conf
look for and replace:
Code:
net.ipv4.ip_forward = 1
I believe you may have forgotten the following rules:
Code:
iptables --append FORWARD --in-interface eth0 -j ACCEPT
iptables --append FORWARD --in-interface eth1 -j ACCEPT
And you may want to read up on iptables...
INPUT is for any inbound traffic on the interface
OUTPUT is for any outbound traffic on the interface
FORWARD if for any traffic routed by the machine
So your INPUT statement is only for traffic on the machine itself.
Have a look at this page: http://www.howtoforge.com/nat_iptables
Will.
Bookmarks