Reputation: 43673
Using command
iptables -L
I list the rules in a all chains, but this tool lists host names instead of IP addresses for the rules that are saved. This is kind of hard reading, as in case I want to quickly find some IP address in the list, it is impossible.
Is there a way, the command switch or anything simple to use, that would let me list my iptables rules with IP addresses and not host names?
Upvotes: 7
Views: 9270
Reputation: 648
Use the following:
iptables -L -n
From the 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).
Upvotes: 11