How to sharing Android VPN with Linux?
0
votes
2
answers
7368
views
I have a rooted galaxy note5 with Android 7, and an Asus laptop with Ubuntu 16.04. I like to share my phone VPN connection with my laptop.
I tried some apps like VPNTether,DF tethering fix, TetherNet, Pdanet+, etc. but they didn't work!
I think I could use the VPNTheter on windows 10 and it worked, but they don't work on Ubuntu!
Also I tested two Wi-Fi and USB cable methods.
Also I found this method but couldn't understand what it says in numbers 6 and 7 ?
1. You need a rooted device
2. Make sure you have a VPN app, like OpenVPN or DroidVPN ( I use DroidVPN and its the best)
3. Download Terminal Emulator
4. Activate your hotspot and connect to your VPN
5. Launch Terminal emulator and on the first line type "su" (without the quotes) and press enter
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 below:
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
7. That's about it. Also, be sure to make a folder with Root Browser and paste the code there, as this resets after re-boot. It worked on my LG G3 on android 4.4.2
Asked by user3486308
(609 rep)
Apr 19, 2017, 04:13 AM
Last activity: Jun 5, 2023, 05:03 AM
Last activity: Jun 5, 2023, 05:03 AM