[英]IPTABLES error “iptables: No chain/target/match by that name”
iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080
When I try to run this command, I run into the error: 当我尝试运行此命令时,遇到了以下错误:
iptables: No chain/target/match by that name
My iptables version is v1.4.14. 我的iptables版本是v1.4.14。 Running debain on linux kernel 3.8.11.
在Linux内核3.8.11上运行debain。
iptables -L outputs: iptables -L输出:
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 udp dpt:mdns
NFQUEUE udp -- anywhere anywhere NFQUEUE num 10000
Chain FORWARD (policy DROP)
target prot opt source destination
Chain OUTPUT (policy DROP)
target prot opt source destination
NFQUEUE udp -- anywhere 239.255.255.250 udp dpt:1900 NFQUEUE num 10001
ACCEPT all -- anywhere anywhere ctstate NEW,RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
iptables -t nat -L output: iptables -t nat -L输出:
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
I have no clue what the problem is, and I looked and nobody else has had this error with this setup. 我不知道问题是什么,我看了看,没有其他人对此设置有此错误。
The error means that you are missing the iptables REDIRECT module in the kernel. 该错误表明您缺少内核中的iptables REDIRECT模块。
Perhaps you compiled the kernel yourself? 也许您自己编译了内核? Then you need to enable/set the option
然后您需要启用/设置选项
CONFIG_IP_NF_TARGET_REDIRECT=m
in your kernel config and then 在您的内核配置中,然后
make modules
make modules_install
depmod -ae
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.