小编Cal*_*phi的帖子

iptables 错误:未知选项 --dport

在定义规则时,命令 iptables 不再识别最常用的选项之一:--dport.

我收到此错误:

[root@dragonweyr /home/calyodelphi]# iptables -A INPUT --dport 7777 -j ACCEPT_TCP_UDP
iptables v1.4.7: unknown option `--dport'
Try `iptables -h' or 'iptables --help' for more information.
Run Code Online (Sandbox Code Playgroud)

上面的添加规则命令只是启用 Terraria 连接的一个示例。

这是我目前拥有的准系统 iptables 配置(listiptables别名为iptables -L -v --line-numbers),很明显,--dport它在过去有效:

root@dragonweyr /home/calyodelphi]# listiptables 
Chain INPUT (policy DROP 0 packets, 0 bytes)
num   pkts bytes target     prot opt in     out     source               destination         
1       39  4368 ACCEPT     all  --  lo     any     anywhere             anywhere            
2      114 10257 ACCEPT     all …
Run Code Online (Sandbox Code Playgroud)

networking linux firewall iptables

27
推荐指数
4
解决办法
7万
查看次数

标签 统计

firewall ×1

iptables ×1

linux ×1

networking ×1