Android上的iptables 1.4.11 [英] iptables 1.4.11 on Android

查看:1334
本文介绍了Android上的iptables 1.4.11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从 http://source.android.com/下载Android的内核源代码源/建筑k​​ernels.html

我便开始模拟器,并希望与iptable的规则玩,但我得到这个下面的错误。是的iptable包没有完全安装?为什么NA​​T表丢失?

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆