Labels

Arduino (1) Bugs (3) C (1) Install (3) Linux (25) Maths (1) Python (11) Raspberry Pi (4)

Sunday, 17 January 2016

How to enable forwarding on linux

Enabling forwarding on linux allows network packets from one interface (eth0) to another interface (wlan0). The use for this would most commonly be for setting up your box as a hotspot or bridge.
sudo echo 1 > /proc/sys/net/ipv4/ip_forward
 

If you want to store this permanently edit the file /etc/sysctl.conf
Add the line net.ipv4.ip_forward = 1 to the end of the file.