Wednesday, March 26, 2014

WiFi hotspot through VPN

I had been using Bluetooth and USB DUN on my Miix, because WiFi hotspot could not go through a VPN connection on the phone. Well, this problem has been solved, thanking to this XDA post! Here I summarize the process:

thantos_mehak also posted his source code that makes above last step a simple click. I edited the code with above commands, compiled it and it worked fine. Note：

Your phone must be root.

You don't need to run VPN on other devices that are tethered to the phone.

If other devices still cannot connect, but ping 8.8.8.8 is successful, then change their DNS servers to, say, 8.8.8.8 and 8.8.4.4. Or add another commands:

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

PS: WiFi Tether Router by Fabio Grasso works through VPN on its own (i.e. no need of above iptables commands). It is also the most featured among such apps I've seen. The only missing feature is auto WiFi channel. It works fine on my Galaxy S4 (root stock 4.3 ROM) but does not on my Pantech Burst.