How to use iptables in an Android application

前端 未结 1 1080
情深已故
情深已故 2020-12-14 04:39

How can I use iptables in an Android application? I need this for a firewall-like functionality i.e. packet filtering, blocking sites etc.

I\'m also not sure whether

相关标签:
1条回答
  • 2020-12-14 05:16

    It's definitely possible. You might consider looking at the source code of Droidwall.

    DroidWall - Android Firewall is a front-end application for the powerful iptables Linux firewall. It allows you to restrict which applications are permitted to access your data networks (2G/3G and/or Wi-Fi).

    Check out the iptables API from Droidwall for specific examples.

    Note that when using iptables you need root access to your phone.

    0 讨论(0)
提交回复
热议问题