How to share a VPN connection through hot-spot tethering. Virtual Proxy Network (VPN) is used to mask our identities and protect ourselves while we surf the Internet. There are other purposes why we would want to use a VPN. This depends on the user.
Once a VPN connection has been enabled on a mobile device, it takes control of all incoming and outgoing connections from the device. It restrict these connections except they satisfy its terms then they get to successfully pass through the VPN
VPN controls all connections to and from the device it is connected to. This makes it difficult to tether your device connection via hot-spot. The truth is connections to a device protected by VPN will not be successful. However, there is a solution to this.
To tether your data connection over a VPN, we would need the following items;
- A rooted device
- Terminal emulator
- File browser (ES file explorer, root browser etc.)
Let get started!!
A ROOTED DEVICE
You will need to root your smart phone to execute this task successfully. If you need to root your device ,I will recommend you download kingroot app and follow the instructions on the app to root your device.
A terminal emulator is used to run command lines as we would do on Linux or windows Operation System.
File browser will play a vital role here as we will be needing it to create file(s). I will recommend ES file explore as this is the one I’ll be using for my explanation(s).
Remember that rooting your fone is at your own risk. Think about it before proceeding. However, if you break your phone in the process, I can teach you how to patch it up.
Ensure you have a rooted phone for this activity else, you’ll not make any progress. I’ll be using screenshots to explain. READ ALL INSTRUCTIONS
- After successfully rooting your phone, start up your VPN service, once it is connected, turn on your hotspot.
- Download terminal emulator from Google Play.
- Install it upon downloading it and open it. You should see a command box with black background. Type su in the command line and click enter/send.
- You will be asked if you want to grant terminal emulator root privilege. Click allow.
- Type netcfg and click enter/send
- You will see a list of items that will come up. You are interested in the ones with up signals. (Note all parameter with up signals as you’d be needing it as we progress)
- Minimize terminal emulator. Download, install and run ES file explorer. When you open ES file explorer you should see something like this.
- Click Internal storage
- Click the “/” mark
- Click system
- Click data
- Create a new file in data and name it tether.sh
- Click on the file you created (tether.sh) to edit it. a pop up should show…select “always” or “this time only” to proceed
- Click on the paper image to edit the content of the file you created
- Follow the instructions in the shots below. You will be needing to save the script below in the file (tether.sh) you created
Copy and paste this script into the file you created.
note this carefully. This script has eight lined codes (all the line begins with “ip… “). Line 7 & 8 differs from phone to phone. Scroll down to continue reading.
iptables –t filter –F FORWARD
iptables –t nat –F POSTROUTING
iptables –t filter –A FORWARD –j ACCEPT
iptables –t nat –A POSTROUTING –j MASQUERADE
ip rule add from 192.168.43./24 lookup 61
ip route add default dev tun0 scope link table 61
ip route add 192.168.43./24 dev ap0 scope link table 61
ip route add broadcast 255.255.255.255 dev ap0 scope link table 61
Some phones will have their script line 7 & 8 edited. After entering netcfg on terminal emulator. Amongst the items that will appear are tun0,ap0,lo,ccmni0 or tun0,wlan0,lo and ccmni0. Depending on which your phone shows, edit line 7 & 8 of the script. change “ap0” to “wlan0” if necessary necessary
So depending on what shows up in your terminal emulator, replace “ap0” in line 7 and 8 with “wlan0”.
- Save the script after copying and pasting it appropriately. Remember to edit script line 7 &8 if necessary.
- Click the box to allow you to run the script as root/admin. remember to always allow root privileges when asked.
- Click the play symbol to run the script.
- Upon successfully executing the script you should see the follow result.
That’s how to tether a VPN connection via hot-spot.
- Now connect your PC or and other device via hot-spot and you will be able to use your smart phone’s data.
- Thats all there is to do. However, each time you restart your phone, you will need to run the script from ES file explorer . Remember to turn on your VPN and Hot-spot before attempting to run the script.
You can also use USB tethering to establish connection to your PC. Bookmark and visit icmaxblog.com to stay Informed.
If you have questions or need help, just use the comment section below. Is there something else you’d like to learn about? Let us know.