Android上的iptables 1.4.11 [英] iptables 1.4.11 on Android
问题描述
我从 http://source.android.com/下载Android的内核源代码源/建筑kernels.html
我便开始模拟器,并希望与iptable的规则玩,但我得到这个下面的错误。是的iptable包没有完全安装?为什么NAT表丢失?
I have then started the emulator and wanted to play with iptable rules but I get this following error. Is the iptable package not fully installed? why is NAT table missing?
起初我已经开始跟随<一个href=\"http://randomizedsort.blogspot.de/2011/03/porting-iptables-1410-to-android.html#comment-form_8482839589527760177\" rel=\"nofollow\">http://randomizedsort.blogspot.de/2011/03/porting-iptables-1410-to-android.html#comment-form_8482839589527760177安装iptables的,但在看到iptablesv1.4.11.1在亚行的shell,我已经放弃了这一想法。有没有人尝试过的新型Android内核源代码?
Initially I had started following http://randomizedsort.blogspot.de/2011/03/porting-iptables-1410-to-android.html#comment-form_8482839589527760177 to install iptables, but having seen iptablesv1.4.11.1 on the adb shell, I had abandoned the idea. Has anybody tried porting iptables on newer android kernel sources??
adb shell
# su root
# iptables -t nat -A OUTPUT -p tcp --dport 8000 -j REDIRECT --to-port 8080
FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:450
iptables v1.4.11.1: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
请指教!
推荐答案
使用协议号( -p 6
),而不是名称( -p TCP
)
Use protocol numbers (-p 6
) instead of names (-p tcp
):
iptables的NAT -t输出-A -p 6 --dport 8000 -j REDIRECT --to-8080端口
看到这个答案的详细信息:
<一href=\"http://stackoverflow.com/questions/10331699/getprotobyname-error-iptables/18385413#18385413\">getprotobyname错误的iptables
See this answer for more info: getprotobyname error iptables
这篇关于Android上的iptables 1.4.11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!