linux - Linux 内核 3.4.103 上的 iptables --to-port

标签 linux redirect embedded firewall iptables

我的嵌入式系统使用的是 Linux 内核 3.4。

我尝试了设置 iptable 规则的命令:

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080

但是我收到了这条消息:

iptables v1.4.10: unknown option `--to-port'
Try `iptables -h' or 'iptables --help' for more information.

在 Linux 内核 3.4 上是否可以使用 --to-port 选项? 还有其他选择或解决方案吗?

最佳答案

您必须安装软件包iptables-mod-nat-extraiptables extensions for extra NAT targets. Includes: - REDIRECT

看看HERE

关于linux - Linux 内核 3.4.103 上的 iptables --to-port,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33141879/

相关文章:

linux - 检查静态链接的可执行文件中的文本段

linux - 包含 for...in 循环的 Bash 脚本

php - Yii2 - 重定向后 flash 不可见

asp.net - response.redirect 总是一个 http GET 响应吗?

c - 如何检测/防止计数器溢出

c++ - 嵌入式应用程序写入寄存器时出现段错误

c - sprintf 损坏 IAR 微 Controller 中的数组

linux - 是否可以为字符串设置别名?

javascript - 301 重定向用于(而不是)js 脚本

linux - 我怎样才能让 perf 在我的程序中找到符号