android中的iptables错误:iptables-save和iptables-restore无效
我已经为Android模拟器编译了Linux,并启用了完整的netfilter功能。从源代码构建android之后获得了iptables二进制文件。
当我把这个二进制文件推送到模拟器
我可以成功执行下面的命令。
iptables -L
iptables -F
iptables -A INPUT -s www.google.com -j DROP
有这个错误:
# # iptables -L
getsockopt for multiport failed strangely: No such file or directory
getsockopt for multiport failed strangely: No such file or directory
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
#
和
# iptables -A INPUT -s www.google.com -j DROP
getsockopt for multiport failed strangely: No such file or directory
getsockopt for multiport failed strangely: No such file or directory
FIX ME! implement getgrnam() bionic/libc/bionic/stubs.c:344
但至少他们上面的命令工作!
但是当我尝试
iptables-save or
iptables-restore
我得到错误说
iptables-save: not found
在我的配置文件中
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
问题是什么..??如何在android中启用完整的iptables功能,或者如何安全地保存当前活动的iptables规则并在下次重启时重新加载它们。
请帮忙。谢谢!
没有找到相关结果
已邀请:
2 个回复
摊揉售
磨标烫徽啪
和
二进制文件不是由默认的Android系统makefile构建的。 你需要在
中为
文件添加规则来构建它们。源文件
和
已经在该目录中。 未经测试,但要建立
,在
的末尾添加这样的东西。冲洗并重复
: