Utility iptables lists host names and not IP addresses

Ωmega

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?

Bob Shannon

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). 

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

validate host names and IP addresses with single regex

From Dev

Multiple IP addresses and Host Names used by Spark Driver and Master

From Dev

How to use host names rather than ip addresses on home network?

From Dev

How to use host names rather than ip addresses on home network?

From Dev

run specific IP addresses or host names through OpenVPN connection

From Dev

Multiple IP addresses through the same interface and iptables

From Dev

iptables - UDP Packets from unknown IP addresses

From Dev

Resolving IP addresses that correspond to multiple domain names

From Dev

How To Resolve IP Addresses To Domain Names?

From Dev

Using fireHOL IP lists, ipset and iptables together

From Dev

Using fireHOL IP lists, ipset and iptables together

From Dev

Automatically block ip addresses with iptables accessing a web page

From Dev

Blocking all ip addresses except one - Ubuntu server 16 - iptables

From Dev

Apache Virtual Host Mix IP and domain names

From Dev

How do you specify IP addresses for TravisCI's host addon?

From Dev

How to Configure owin/Katana to listen on all host ip addresses

From Dev

mDNS/ZeroConf/Avahi and Multiple IP Addresses for the Same Host

From Dev

Is it possible to give two IP addresses for the same host name?

From Dev

Why actual host ip is removed from iptables rule

From Dev

iptables does not block forwarding to another IP of the host itself

From Dev

What are the IP addresses in my iptables chain FORWARD settings in a Dokku/docker setup?

From Dev

Is there any other way to get IPTables to filter IP addresses based on geolocation in Ubuntu 12.0.4.5 (LTS)

From Dev

Dynamically populating ipset list to blacklist ip addresses which match a certain iptables rule

From Dev

Can ping IP address using wireless connection but not host names

From Dev

Unix ping and host commands result in different IP addresses for the same domain name

From Dev

Is there any way to quickly and efficiently get a count of IP host addresses in thousands of CIDR/netmask ranges in Bash?

From Dev

NSExceptionAllowsInsecureHTTPLoads not working for IP addresses

From Dev

ping IP addresses constantly

From Dev

Converting IP Addresses in R

Related Related

  1. 1

    validate host names and IP addresses with single regex

  2. 2

    Multiple IP addresses and Host Names used by Spark Driver and Master

  3. 3

    How to use host names rather than ip addresses on home network?

  4. 4

    How to use host names rather than ip addresses on home network?

  5. 5

    run specific IP addresses or host names through OpenVPN connection

  6. 6

    Multiple IP addresses through the same interface and iptables

  7. 7

    iptables - UDP Packets from unknown IP addresses

  8. 8

    Resolving IP addresses that correspond to multiple domain names

  9. 9

    How To Resolve IP Addresses To Domain Names?

  10. 10

    Using fireHOL IP lists, ipset and iptables together

  11. 11

    Using fireHOL IP lists, ipset and iptables together

  12. 12

    Automatically block ip addresses with iptables accessing a web page

  13. 13

    Blocking all ip addresses except one - Ubuntu server 16 - iptables

  14. 14

    Apache Virtual Host Mix IP and domain names

  15. 15

    How do you specify IP addresses for TravisCI's host addon?

  16. 16

    How to Configure owin/Katana to listen on all host ip addresses

  17. 17

    mDNS/ZeroConf/Avahi and Multiple IP Addresses for the Same Host

  18. 18

    Is it possible to give two IP addresses for the same host name?

  19. 19

    Why actual host ip is removed from iptables rule

  20. 20

    iptables does not block forwarding to another IP of the host itself

  21. 21

    What are the IP addresses in my iptables chain FORWARD settings in a Dokku/docker setup?

  22. 22

    Is there any other way to get IPTables to filter IP addresses based on geolocation in Ubuntu 12.0.4.5 (LTS)

  23. 23

    Dynamically populating ipset list to blacklist ip addresses which match a certain iptables rule

  24. 24

    Can ping IP address using wireless connection but not host names

  25. 25

    Unix ping and host commands result in different IP addresses for the same domain name

  26. 26

    Is there any way to quickly and efficiently get a count of IP host addresses in thousands of CIDR/netmask ranges in Bash?

  27. 27

    NSExceptionAllowsInsecureHTTPLoads not working for IP addresses

  28. 28

    ping IP addresses constantly

  29. 29

    Converting IP Addresses in R

HotTag

Archive