VPN route exclusion for KITKAT for Android

It is known that excluding IP traffic is nearly impossible with the Android VPN API on a NON ROOTED device.

But I have a rooted device. So I connect VPN (openvpn) first. After from ADB ROOT SHELL - run the following command

./route add -net <> netmask 255.255.255.255 gw 192.168.1.1

For example, if I run the following command

./route add -net 141.101.120.15 netmask 255.255.255.255 gw 192.168.1.1

All traffic to whoismyip [DOT] com goes directly (does not go through the VPN) Hence whatismyip.com reports my local ISP IP address on its home page.

This way I could exclude the IPs from the VPN path. This works great in ICS and Jelly without any problem.

But the same procedure does not work in KITKAT. I tested in both 4.4.2 and 4.4.4

If I change the route, the traffic still goes through the VPN path. Whatismyip.com, which displays the IP address of the VPN server on its home page.

My KITKAT routing table shows the following results: ICS and jelly. The command succeeds in the routing table. But it just doesn't work.

Can anyone please point out what changes I need to make to the KITKAT.

**Fresh Routing Table**



ip route
default via 192.168.1.1 dev wlan0
default via 192.168.1.1 dev wlan0  metric 324
192.168.1.0/24 dev wlan0  scope link
192.168.1.0/24 dev wlan0  proto kernel  scope link  src 192.168.1.2  metric 324

192.168.1.1 dev wlan0  scope link


 **After VPN Connected**


ip route
default via 192.168.1.1 dev wlan0
default via 192.168.1.1 dev wlan0  metric 324
172.22.1.4/30 dev tun0  proto kernel  scope link  src 172.22.1.6
192.168.1.0/24 dev wlan0  scope link
192.168.1.0/24 dev wlan0  proto kernel  scope link  src 192.168.1.2  metric 324

192.168.1.1 dev wlan0  scope link



**After whatismyip.com [141.101.120.15]  exclusion**



ip route
default via 192.168.1.1 dev wlan0
default via 192.168.1.1 dev wlan0  metric 324

**141.101.120.15 via 192.168.1.1 dev wlan0**

172.22.1.4/30 dev tun1  proto kernel  scope link  src 172.22.1.6
192.168.1.0/24 dev wlan0  scope link
192.168.1.0/24 dev wlan0  proto kernel  scope link  src 192.168.1.2  metric 324
192.168.1.1 dev wlan0  scope link

      

thank

+3
android android-4.4-kitkat


source to share


No one has answered this question yet

Check out similar questions:

3606
Close / hide Android soft keyboard
3295
Why is the Android emulator so slow? How can we speed up the development of an Android emulator?
3288
Correct use cases for Android UserManager.isUserAGoat ()?
2609
Is there a unique identifier for an Android device?
2510
How to persist android activity state by persisting instance state?
2097
Is there a way to run Python on Android?
1858
"Debug certificate expired" error in Android Eclipse plugins
1844
What is "Context" on Android?
1296
Reloading activity on android rotation
1152
Difference between gravity and layout_gravity on Android



All Articles
Loading...
X
Show
Funny
Dev
Pics