[GUIDE] How to WiFi tether with VPN (DroidVPN)

Search This thread

SmokeyTech1

Senior Member
Oct 10, 2014
105
29
Jalisco
Before anyone says "this has been discussed before" yes it has, but this is the ONLY method that's worked for me, so therefore it may also work for you when others have not.
My carrier is Telcel (Mexico) Its prepaid that I haven't paid for since using the VPN, as it allows me to have free internet, and this method allows me to share it with all my devices, I've used 30GB of data in 2 weeks.
Disclaimer: not responsible for your device in anyway, even though this should not harm anything


STEP 1: You need a rooted device
STEP 2: Make sure you have a VPN app, like OpenVPN or DroidVPN ( I use DroidVPN and its the best)
STEP 3: Download Terminal Emulator
STEP 4: Activate your hotspot and connect to your VPN
STEP 5: launch Terminal emulator and on the first line type "su" (without the quotes) and press enter
STEP 6: Copy and paste this to the Terminal Emulator, MAKE SURE TO PASTE TO A NEW FOLDER USING ROOT BROWSER FIRST, AND COPY TO T.E. IN THE EXACT FORMAT AS SHOWN
Code:
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
STEP 7: That's about it :D
Also be sure to make a folder with Root Browser and paste the code there, as this resets after re-boot.
Please comment if this worked for you, it worked on my LG G3 on android 4.4.2
 
Last edited:

GabrielCool1

Senior Member
Mar 31, 2014
76
2
Basically for me it allows me to bypass my carriers tether restrictions, in example; you have tmobile, your plan has unlimited data but only 5GB of tethering, this will trick it into thinking all traffic is coming from your phone, giving you unlimited data to all your devices

Venga, que no te entiendo lo del tethering, me lo puedes explicar en español? C:
 

miked63017

Senior Member
Jan 30, 2011
899
689
St Louis
FWIW this will be different on different carriers, different devices, and different VPN(Juno's pulse for example). Good info none the less :good:

Sent from my SM-G900P using XDA Free mobile app
 
  • Like
Reactions: BenThegamer

SmokeyTech1

Senior Member
Oct 10, 2014
105
29
Jalisco
FWIW this will be different on different carriers, different devices, and different VPN(Juno's pulse for example). Good info none the less :good:

Sent from my SM-G900P using XDA Free mobile app

This should darn near be universal, as this was code I found was just a copy and paste of the original, don't need to change anything, it should also work with all VPNs, can't confirm though, I've only used this on my AT&T LG G3, I will try on my HTC One
Also the "IP table" part of the code can be found in a few places, the special part of the code is "ip rule" and "ip route"
 
Last edited:
  • Like
Reactions: BenThegamer

miked63017

Senior Member
Jan 30, 2011
899
689
St Louis
This should darn near be universal, as this was code I found was just a copy and paste of the original, don't need to change anything, it should also work with all VPNs, can't confirm though, I've only used this on my AT&T LG G3, I will try on my HTC One
Also the "IP table" part of the code can be found in a few places, the special part of the code is "ip rule" and "ip route"

The iptables should be, but the routing, rules, and lookup tables could vary. Also some carriers you would need extra iptables commands and route commands to work with their tethering data cap security measures.

Like I said its useful knowledge but in some cases may need a little extra massaging to fully work.
 
  • Like
Reactions: BenThegamer

Andro001

New member
Jan 28, 2015
4
0
Before anyone says "this has been discussed before" yes it has, but this is the ONLY method that's worked for me, so therefore it may also work for you when others have not.
My carrier is Telcel (Mexico) Its prepaid that I haven't paid for since using the VPN, as it allows me to have free internet, and this method allows me to share it with all my devices, I've used 30GB of data in 2 weeks.
Disclaimer: not responsible for your device in anyway, even though this should not harm anything


STEP 1: You need a rooted device
STEP 2: Make sure you have a VPN app, like OpenVPN or DroidVPN ( I use DroidVPN and its the best)
STEP 3: Download Terminal Emulator
STEP 4: Activate your hotspot and connect to your VPN
STEP 5: launch Terminal emulator and on the first line type "su" (without the quotes) and press enter
STEP 6: Copy and paste this to the Terminal Emulator, MAKE SURE TO PASTE TO A NEW FOLDER USING ROOT BROWSER FIRST, AND COPY TO T.E. IN THE EXACT FORMAT AS SHOWN
Code:
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
STEP 7: That's about it :D
Also be sure to make a folder with Root Browser and paste the code there, as this resets after re-boot.
Please comment if this worked for you, it worked on my LG G3 on android 4.4.2
Do you have a premium account or a free one on Droid VPN?

Sent from my GT-S7392 using xda app-developers app
 

Andro001

New member
Jan 28, 2015
4
0
Premium, the free account almost never connects, and you only get 100mb daily

I used droid vpn on my sim's internet connection after 100mb it disconnected so I just changed the mobile and with the same account I logged jn droid vpn and it got connected. How was it possible?

Sent from my GT-S7392 using xda app-developers app
 

SmokeyTech1

Senior Member
Oct 10, 2014
105
29
Jalisco
I used droid vpn on my sim's internet connection after 100mb it disconnected so I just changed the mobile and with the same account I logged jn droid vpn and it got connected. How was it possible?

Sent from my GT-S7392 using xda app-developers app

I really don't know, maybe droidvpn monitors each devices data, like you can use 100mb on one 100mb on another,
 

shadowx141

Member
Feb 13, 2013
9
0
does this work on android lollipop version 5.0? im not sure if its safe to write that down in the android terminal
 

doveman

Senior Member
Dec 14, 2012
366
29
London
Is there any way to incorporate this into an AFWall+ profile, so that someone can just switch profile when leaving home and have this automatically setup?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    Before anyone says "this has been discussed before" yes it has, but this is the ONLY method that's worked for me, so therefore it may also work for you when others have not.
    My carrier is Telcel (Mexico) Its prepaid that I haven't paid for since using the VPN, as it allows me to have free internet, and this method allows me to share it with all my devices, I've used 30GB of data in 2 weeks.
    Disclaimer: not responsible for your device in anyway, even though this should not harm anything


    STEP 1: You need a rooted device
    STEP 2: Make sure you have a VPN app, like OpenVPN or DroidVPN ( I use DroidVPN and its the best)
    STEP 3: Download Terminal Emulator
    STEP 4: Activate your hotspot and connect to your VPN
    STEP 5: launch Terminal emulator and on the first line type "su" (without the quotes) and press enter
    STEP 6: Copy and paste this to the Terminal Emulator, MAKE SURE TO PASTE TO A NEW FOLDER USING ROOT BROWSER FIRST, AND COPY TO T.E. IN THE EXACT FORMAT AS SHOWN
    Code:
    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
    STEP 7: That's about it :D
    Also be sure to make a folder with Root Browser and paste the code there, as this resets after re-boot.
    Please comment if this worked for you, it worked on my LG G3 on android 4.4.2
    2
    Code:
    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

    Also be sure to make a folder with Root Browser and paste the code there, as this resets after re-boot.

    Please comment if this worked for you, it worked on my LG G3 on android 4.4.2



    It was not working for me, after some googling I've added two more lines to it

    iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to 156.154.70.1

    iptables --flush


    Now it's working, thanks :)
    1
    FWIW this will be different on different carriers, different devices, and different VPN(Juno's pulse for example). Good info none the less :good:

    Sent from my SM-G900P using XDA Free mobile app
    1
    I also need to port forward udp on port 53, and as my OpenVPN server also is a DNS server, I use

    iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to 192.168.2.1

    This has the added (and for me needed) benefit that I can get to my own internal networks machines via their names rather than only via IP.