Trick: WiFi tether over VPN connection in Android

Posted by David Khoirul
In 2013, when I had an unlimited VPN internet trick on my Tri AON, I thought about sharing it with PC. And the only way was USB tether using PdaNet. I downloaded the apps, both for Android and for PC, then installed them. Whoa, its connected! Any VPN apps such as TroidVPN, DroidVPN and OpenVPN successfully passed on their secure connections.

But I wanted to be even more portable, not necessarily bringing laptop and USB everywhere. I wanted my VPN connection to be shared with PC, Android, Windows Mobile, and any device that has a WiFi feature. In short, I wanted it to be a hotspot.

When I tried the default hotspot tether feature on my Cross A7#, it was unsuccessful. The device, which was connected to my hotspot with VPN, received my normal connection over WiFi. It didn’t translate the VPN, so the free internet couldn’t be transmitted.

connect vpn connections over wifi hotspot in android device phone or tablet to pc or laptop


I was frustrated, but I believed there should be a trick to share this VPN connection over WiFi. After googling for solutions, I found this simple cheat using the following commands:

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

How do these commands work?

  • Start your VPN connection
  • Run the script in terminal emulator as su (that means your device needs to be rooted).
  • Start WiFi hotspot.

If you want to make it even simpler, download any script runner in PlayStore—preferably SH Script Runner app. Save the commands as a .sh file. Then in SH Script Runner app, enable root mode, open the .sh file in the folder where you save it, and run.

PS: This trick works in Android running Jelly Beans. If your phones use earlier Android versions, it may not work.

17 comments:

  1. Its very interesting post, good job

    videocon v music
    Now you can listen to your choice of songs wherever you go. Just subscriber to our V Music service and listen to more than 50 thousand songs. Enjoy latest filmy songs, private albums, regional songs and many more. So what are you waiting for, just follow any one step to subscribe.

    ReplyDelete
  2. Thanks mas udah berbagi tricknya.

    ReplyDelete
  3. Thanks for tricks.It works good.Great post about VPN on Android devices.
    http://10webhostingservice.com/

    ReplyDelete
  4. run the script once or every time you connect ?

    ReplyDelete
  5. Maharashtra board will publish the ssc result 2017 soon.

    ReplyDelete
  6. Karnataka board recently announced that sslc result 2017 will be publish soon.

    ReplyDelete
  7. TN SSLC Result will be declare on the 2nd week of May 2017. Students can check the results online.

    ReplyDelete
  8. TN SSLC Result will be declare on the 2nd week of May 2017. Students can check the results online.

    ReplyDelete
  9. KSEEB Board is going to declare Karnataka SSLC Result today. Students can check the results at official website of karresults.nic.in.

    ReplyDelete
  10. KSEEB Board is going to declare Karnataka SSLC Result today. Students can check the results at official website of karresults.nic.in.

    ReplyDelete

  11. Eid Mubarak SMS in Hindi most recent of 2017 which can’t be discovered anyplace on net. You can duplicate these Eid SMS and send to your Parents, Relatives and companions.
    eid mubarak images
    eidimages.com

    ReplyDelete