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.
2 Answers
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+.
-
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? Commented Mar 6, 2017 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? Commented Apr 25, 2017 at 13:50
-
@duckx Instead of
tun0
tryppp0
, also double check if all the VPN configurations are correct. Additionally if this fails runnetcfg
and note your interface names Runnetcfg
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) Commented Apr 26, 2017 at 11:07 -
1I made an app for these two different solutions (but requires root). You could try it: github.com/Mygod/VPNHotspot– MygodCommented Apr 4, 2018 at 6:40
-
@Mygod, thanks for the update I will also take a look at the app you mention Commented Apr 4, 2018 at 17:41
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?