Packet Forwarding

From Ubuntuwiki.net

(Redirected from Gateway)
Jump to: navigation, search
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding

To set it up to happen on boot, you can edit /etc/sysctl.conf and uncomment the lines:

#net.ipv4.conf.default.forwarding
#net.ipv6.conf.default.forwarding

That should turn on packet forwarding, assuming that all the interfaces are set up correctly.

If you want to do packet filtering you need iptables, but for simple forwarding that is all you need.

If it doesn't work, do check 'iptables -L' to make sure the FORWARD chain has the default policy set to ACCEPT.

Personal tools