Skip to content

Instantly share code, notes, and snippets.

@JirkaChadima
Created November 13, 2019 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JirkaChadima/a28f4cd7cf50f3f53dc004fd95a8d558 to your computer and use it in GitHub Desktop.
Save JirkaChadima/a28f4cd7cf50f3f53dc004fd95a8d558 to your computer and use it in GitHub Desktop.
# navod dle: https://pimylifeup.com/raspberry-pi-wifi-extender/
# This routes wlan0 network to wlan1 which serves as AP
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
sudo iptables -A FORWARD -i wlan0 -o wlan1 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan1 -o wlan0 -j ACCEPT
sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment