linux:linux-as-router
This is an old revision of the document!
Linux as router with iptables
sudo sysctl -w net.ipv4.ip_forward=1 sudo iptables -t nat -A POSTROUTING --out-interface wlan1 -j MASQUERADE sudo iptables -A FORWARD -i wlan1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT sudo iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT
In this case, wlan1 is where all the traffic will be routed to.
linux/linux-as-router.1676206701.txt.gz · Last modified: 2023/02/12 13:58 by els