Advertisement
101Grapes

Route VPN Through Android Hotspot With Root

Jun 27th, 2020 (edited)
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. make your phone to act as a VPN Gateway
  2. Requirements:
  3.  
  4. root
  5.  
  6. vpn server (can obtain any free openVPN from playstore)
  7.  
  8. Using a VPN gateway will make tethered traffic to go through the VPN.
  9. Steps
  10.  
  11. Turn on portable hotspot
  12.  
  13. Open terminal as root and enter the following codes (you can paste them)
  14. iptables -t filter -F FORWARD iptables -t nat -F POSTROUTING iptables -t filter -I FORWARD -j ACCEPT iptables -t nat -I POSTROUTING -j MASQUERADE ip rule add from 192.168.43.0/24 lookup 61 ip route add default dev tun0 scope link table 61 ip route add 192.168.43.0/24 dev wlan0 scope link table 61 ip route add broadcast 255.255.255.255 dev wlan0 scope link table 61
  15.  
  16. Edit
  17. If you are not rooted you can use PdaNet+.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement