gpt4 book ai didi

linux - 如何在 Linux 中从 iptable 检查 PREROUTING 列表?

转载 作者:IT王子 更新时间:2023-10-28 23:57:53 24 4
gpt4 key购买 nike

<分区>

我在我的 iptable 中添加了数据包转发规则
sudo iptables -t nat -A PREROUTING -p tcp --dport 1111 -j DNAT --to-destination 10.0.3.126:80
我可以看到到达端口 1111 的数据包已正确转发到 10.0.3.126:80。但是,如果我列出规则,则看不到我添加的规则。

sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:bootps
ACCEPT udp -- anywhere anywhere udp dpt:bootps

Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

如何查看我添加的规则?提前谢谢你。

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com