64studio / plegger

PiDeck Bootlegger
http://pideck.com/
1 stars 0 forks source link

Enable forwarding between wireless networks #2

Open danielhjames opened 7 years ago

danielhjames commented 7 years ago

In /etc/sysctl.conf file: # Uncomment the next line to enable packet forwarding for IPv4 net.ipv4.ip_forward=1

Then update while running: echo 1 > /proc/sys/net/ipv4/ip_forward

Add a route to wlan1 on the upstream Internet side iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE

obbardc commented 7 years ago

See file webapp/wifi-nat-forwarding-notes.txt for other forwarding for ethernet/wan forwarding

danielhjames commented 7 years ago

Thanks @obbardc ! Also I see we can use sysctl -w net.ipv4.ip_forward=1

obbardc commented 7 years ago

@danielhjames Right, but that only enables it for the current session. Editing the sysctl.conf file saves the setting every boot. I think there is a sysctl.conf.d folder, somewhere?