shows how to turn an raspberry pi into a VPN hotspot.
I find the iptable configs at step 7 and 11 confusing, in that:
why was things done in step 7 undone in 11? To reroute the traffic through openVPN?
Can you please tell me what these 3 lines do? my guess:
sudo iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
Seems to be telling the OS to do something after traffic came out of tun0, which is the VPN process I suppose.
sudo iptables -A FORWARD -i tun0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
Tell the OS to accept any traffic coming from tun0 and forward it to wlan 0
sudo iptables -A FORWARD -i wlan0 -o tun0 -j ACCEPT
Tell the OS to accept any traffic coming from wlan0 and forward it to tun0.
- Theoretically the traffic should be flowing from wlan0 to tun0 then eth0 (I could be totally, totally wrong), but I saw the part where it addressed wlan0 to tun0 but not tun0 to eth0? Or is it not necessary as eth0 is seen as the default ethernet/internet outlet interface?
Sorry for the imposition brought about by such a complicated and comprehensive question!