Skip to content

Instantly share code, notes, and snippets.

@ratacibernetica
Created April 25, 2019 15:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ratacibernetica/efb80e27e92ea0fa64fe8bb9438bf4af to your computer and use it in GitHub Desktop.
Save ratacibernetica/efb80e27e92ea0fa64fe8bb9438bf4af to your computer and use it in GitHub Desktop.
Bypass Hotspot Tethering Limit by using the phone's unlimited plan

You could make your phone to act as a VPN Gateway

Requirements:

  • root
  • vpn server (can obtain any free openVPN from playstore)
  • Using a VPN gateway will make tethered traffic to go through the VPN.

Steps

Turn on portable hotspot

Open terminal as root and enter the following codes (you can paste them)
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

Edit

If you are not rooted you can use PdaNet+.

https://android.stackexchange.com/a/170532

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment