Linux 实用工具iptables列出主机名,而不是IP地址

Linux 实用工具iptables列出主机名,而不是IP地址,linux,ip,ip-address,firewall,iptables,Linux,Ip,Ip Address,Firewall,Iptables,使用命令 iptables -L 我列出了所有链中的规则,但是这个工具列出了保存的规则的主机名而不是IP地址。这是一种很难的阅读,因为如果我想在列表中快速找到某个IP地址,这是不可能的 有没有一种方法,命令开关或任何简单易用的方法,可以让我用IP地址而不是主机名列出我的iptables规则?使用以下方法: iptables -L -n 从: 那很简单:)谢谢你! -n, --numeric Numeric output. IP addresses and port numbers

使用命令

iptables -L
我列出了所有链中的规则,但是这个工具列出了保存的规则的主机名而不是IP地址。这是一种很难的阅读,因为如果我想在列表中快速找到某个IP地址,这是不可能的

有没有一种方法,命令开关或任何简单易用的方法,可以让我用IP地址而不是主机名列出我的iptables规则?

使用以下方法:

iptables -L -n

从:

那很简单:)谢谢你!
-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).