Skip to content

Instantly share code, notes, and snippets.

@NguyenKhong
Last active December 20, 2022 18:03
Show Gist options
  • Save NguyenKhong/00e360b513aa1efc037acfc72b9f14db to your computer and use it in GitHub Desktop.
Save NguyenKhong/00e360b513aa1efc037acfc72b9f14db to your computer and use it in GitHub Desktop.
make wifi hostpost tunnel to vpn
#!/data/data/com.termux/files/usr/bin/sh
/system/bin/iptables -I FORWARD -i wlan0 -o tun0 -j ACCEPT
/system/bin/iptables -I FORWARD -i tun0 -o wlan0 -j ACCEPT
/system/bin/iptables -t nat -I PREROUTING -i wlan0 -p udp --dport 53 -j DNAT --to 1.1.1.1:53
ip rule add pref 500 fwmark 0x0/0x10000 lookup local_network
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment