【发布时间】:2014-03-31 19:57:43
【问题描述】:
使用命令
iptables -L
我列出了所有链中的规则,但此工具列出了已保存规则的主机名而不是 IP 地址。这有点难读,因为如果我想在列表中快速找到某个 IP 地址,那是不可能的。
有没有办法,命令开关或任何简单易用的东西,让我列出我的 iptables 规则与 IP 地址而不是主机名?
【问题讨论】:
标签: linux ip ip-address firewall iptables
使用命令
iptables -L
我列出了所有链中的规则,但此工具列出了已保存规则的主机名而不是 IP 地址。这有点难读,因为如果我想在列表中快速找到某个 IP 地址,那是不可能的。
有没有办法,命令开关或任何简单易用的东西,让我列出我的 iptables 规则与 IP 地址而不是主机名?
【问题讨论】:
标签: linux ip ip-address firewall iptables
使用以下内容:
iptables -L -n
来自man page:
-n, --numeric
Numeric output. IP addresses and port numbers will be printed in numeric format.
By default, the program will try to display them as host names, network names,
or services (whenever applicable).
【讨论】: