I found asome information about, that consists inof adding iptables rules by commandline tousing command-line in your rooted device. I
I tested it on my androidAndroid 4.4 on Blu studio and it works fine.
Quoted text originally written by SmokeyTech1 of XDA-Developers Quote from xda-developers:here:
- 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 SHOWNMake 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
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
- 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. Please comment if this worked for you, itIt worked on my LG G3 on android 4.4.2
(Note: Quoted text has been edited to fit the site's formatting style.)
ATTENTION: Part of the rules where it says wlan0
, this is interface that corresponds to where you want send the connection.
To send it to the WiFi hotspot, replace it with ap0
The tun0
is the VPN tunnel that you receive from the remote server.
You can list all the interfaces typing netcfg
the root terminal
ToAs for terminal emulator i, I use ConnectBotConnectBot:
ConnectBot allows a terminal emulator on your device for connections ssh, telnet and localhost.