似乎没有关于这个主题的任何信息。
我想了解如何在 Android 中使用 IPTABLES 来阻止应用程序建立连接。
到目前为止,我有:
1) 重新编译 Goldfish 内核并确保 NETFILTERS 已启用。2) 使用新内核启动模拟器。
我创建了一个像这样的链:
/system/bin/iptables -N myChain
检查以确保已添加
/system/bin/iptables -L
万事皆安。
我可以创建如下规则:
iptables -A myChain -s 65.65.65.65 -j DROP
但是我现在如何创建规则来阻止应用程序?
我试过这样的事情:
iptables -A myChain -m owner --uid-owner 100013 -j DROP
但不起作用我收到如下错误:iptables: No chain/target/match by that name。
有谁知道我可以尝试什么?
谢谢