How do I tether with VPN on Lollipop?

I have root. I found the following guide, but don't fully understand the instructions. http://forum.xda-developers.com/showpost.php?p=33749904&postcount=10

In particular, 3) route traffic in specific tethering routing table 3a) see table for tethering (in my setup is table '60') yourprompt# ip rule show 3b) add your private address (myne is to the tethering table yourprompt# ip route add dev tun0 table 60

What is my private address? Is this the ip the VPN service gives me or what?

Other guides, which is the right one? http://forum.xda-developers.com/showthread.php?t=2317841 http://forum.xda-developers.com/showthread.php?t=2668999 http://forum.xda-developers.com/showthread.php?t=1993689 http://forum.xda-developers.com/showthread.php?t=1944171

Would really appreciate help on this, thanks. Needs to be wifi tether, because I need to bridge my router to it.

1 Answer 1


The guide you have mentioned is correct. Basically if you are rooted , whenever you wish you tether over a VPN you need to type the code in terminal as su

iptables -t filter -F FORWARD
iptables -t nat -F POSTROUTING
iptables -t filter -A FORWARD -j ACCEPT
iptables -t nat -A POSTROUTING -j MASQUERADE

and to route traffic in specific tethering routing table additionally need:

ip rule add from lookup 61
ip route add default dev tun0 scope link table 61
ip route add dev wlan0 scope link table 61
ip route add broadcast dev wlan0 scope link table 61

basically android tethering interfaces uses a DHCP range 192.168.43.* Notice the change of netmask from (24bit) to (32bit) allowing the re-routing of addresses (192.168.xxx) to tun interface (usually 10.1.xxx)

I use the same re-routing rules smoothly

  • Your private IP address is the android default. Something like 192.168.43.xxx (24 bit netmask), so in this case you don't need to modify it. You can check more details using ip addr show Mar 27, 2017 at 18:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .