Last Updated: September 29, 2021
· emilioeduardob

Share VPN through Android WIFI hotspot

After installing DroidVPN to use a free VPN. (or other VPN).
Enable tethering on your phone.

Open a terminal such as connectbot or terminal.(must be rooted)

iptables --flush
iptables -A POSTROUTING -o tun0 -j MASQUERADE -t nat
iptables -A FORWARD -i tun0 -o wlan0 -m state --state RELATED,ESTABLISHED -j RETURN
iptables -A FORWARD -i wlan0 -o tun0 -m state --state INVALID -j DROP
iptables -A FORWARD -i wlan0 -o tun0 -j RETURN