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.
Asked
Active
Viewed 7.2k times
2 Answers
5
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+.

xavier_fakerat
- 10,065
- 6
- 41
- 101
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?

Viking
- 1
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) – xavier_fakerat Apr 26 '17 at 11:07