Linux busybox 上的 iptables
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10202979/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
iptables on busybox
提问by user1108249
I have busybox installed as a 'starter' package on my embedded linux board and I also need to use iptables to configure some firewall rules.
我在嵌入式 linux 板上安装了 busybox 作为“入门”包,我还需要使用 iptables 来配置一些防火墙规则。
Is there a way to get access to iptables from the busybox shell?
有没有办法从busybox shell 访问iptables?
Otherwise, how can I exit busybox shell to get to the iptables command?
否则,我如何退出 busybox shell 以访问 iptables 命令?
Thank you.
谢谢你。
回答by wuliang
(1)First you need to how to modify the kernel, install modules and applications in Busybox environment.
(1)首先需要了解如何在Busybox环境下修改内核、安装模块和应用程序。
(2)Then you can config the kernel to support Iptables (most in menu of network/netfilter),you can build those kernel modules as ko modules or part of kernel image.
(2)然后你可以配置内核支持Iptables(最在network/netfilter的菜单中),你可以将这些内核模块构建为ko模块或内核映像的一部分。
(3)go to homepage to netfilter to get application souce code. Build and install.
(3)到netfilter主页获取应用源代码。构建和安装。
(4)modprobe the ko (for example)
(4)modprobe ko(例如)
modprobe iptable_filter
modprobe ip_tables
(5)try your IPTABLES....If meet problem, you may goto step 2 to make some change.
(5)试试你的IPTABLES....如果遇到问题,你可以转到第2步进行一些更改。