我正在尝试添加以下规则:
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
但是我得到的是:
FATAL: Module ip_tables not found. iptables v1.4.7: can't initialize iptables table `nat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.
通过论坛看,我得出结论,iptable_nat模块没有安装/激活。 通过发行
modprobe iptable_nat
我明白了
FATAL: Module iptable_nat not found.
任何想法如何安装/激活这个。
谢谢,阿德里安
以下命令的输出是什么,你是否启用了IP转发?
cat / proc / sys / net / ipv4 / ip_forward
应该是1。
lsmod | grep iptable