Background: Several phones, different firmwares

Elephone p7000, Android 5.0 based rom

Xiaomi redmi note 2, three different roms (5.1 based Cyaonogen, 5.0 based AOSP derivative)


Installed a VPN app (Shadowsocks, OpenVPN, reproduces on both)

Now added an iptables rule like that

iptables -t filter -A OUTPUT ! -o tun0 -p all -m owner --uid-owner [uid of an app] -j REJECT

1) On elephone p7000 (android 5.0) and Redmi Note 2 (Cyanogen, A 5.1) the app now works only if VPN is connected

2) On Redmi Note 2 (AOSP 5.0 based ROM) app no longer works whether VPN connected or not.


a) where does android VPN service's policy based routing stuff "normally" happen relative to netfilter packet flow ?

b) Which one of the aforementioned behaviors is the "normal" android behavior?

c) Is there a way (a clever ip rule trick, perhaps) to re-implement behavior 1 on systems exhibiting behavior 2?

Hope I was clear (not native speaker)

Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.