2

I have the 10gb hotspot plan for tmobile but I also have unlimited data when I'm on my phone. Is there a way to bypass the hotspot limit by using the unlimited data from my phone instead? I have the nexus 6 on android version 6.

4

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+.

| improve this answer | |
  • Does this violate T-Mobile's Terms of Service? Does it literally say that you cannot use the phone to provide more than 10GB of hotspot service or does it just say that you can't do more than 10GB of tethering with their app? – Robert Columbia Mar 6 '17 at 23:48
  • i get device cannot find tun0 --- i'm on android 7.0 --- i also tried just tun and it gets the samething. what can you replace tun0 be replaced with? – Patoshi パトシ Apr 25 '17 at 13:50
  • @duckx Instead of tun0 try ppp0 , also double check if all the VPN configurations are correct. Additionally if this fails run netcfg and note your interface names Run netcfg and note your interface names (typically tun0 and wlan0 or ppp0 (ignore m.wlan0 or similar, only take the one with a real mac address) – xavier_fakerat Apr 26 '17 at 11:07
  • 1
    I made an app for these two different solutions (but requires root). You could try it: github.com/Mygod/VPNHotspot – Mygod Apr 4 '18 at 6:40
  • @Mygod, thanks for the update I will also take a look at the app you mention – xavier_fakerat Apr 4 '18 at 17:41
0

To make this work, I had to add the following VPN forward route: 0.0.0.0/0 in my L2TP client on the phone, and from terminal, I only typed this much:

su
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 ppp0 scope link table 61

And it immediately came on line. During the terminal session, I had the PC connected to the phone tethering Hotspot all the time, and for each line typed, I checked the tunnel. As far as I understand, what these commands actually do, is to set up a NAT routing on the phone - correct?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.