All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marcin Mirosław" <marcin@mejor.pl>
To: netfilter@vger.kernel.org
Subject: iptables -n doesn't display numbers in all cases for prot column
Date: Fri, 25 Nov 2011 10:17:28 +0100	[thread overview]
Message-ID: <4ECF5D28.8080703@mejor.pl> (raw)

Hello!
I'd like to ask you about such situation. When i display rules without 
using "-n" i'm getting:
# iptables -L -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
  pkts bytes target     prot opt in     out     source 
destination
     0     0 ACCEPT     ipencap--  any    any     anywhere 
anywhere
     0     0 ACCEPT     ipv6 --  any    any     anywhere 
anywhere
     1    88 ACCEPT     icmp --  any    any     anywhere 
anywhere
    94 13850 ACCEPT     udp  --  any    any     anywhere 
anywhere
   801  632K ACCEPT     tcp  --  any    any     anywhere 
anywhere

It's ok. When i add "-n" switch i'm getting:
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
  pkts bytes target     prot opt in     out     source 
destination
     0     0 ACCEPT     4    --  *      *       0.0.0.0/0 
0.0.0.0/0
     0     0 ACCEPT     41   --  *      *       0.0.0.0/0 
0.0.0.0/0
     1    88 ACCEPT     icmp --  *      *       0.0.0.0/0 
0.0.0.0/0
   101 14402 ACCEPT     udp  --  *      *       0.0.0.0/0 
0.0.0.0/0
   905  651K ACCEPT     tcp  --  *      *       0.0.0.0/0 
0.0.0.0/0

As we can see protocols "ipencap","ipv6" are shown as number but 
icmp/tcp/udp wasn't displayed as number of protocol.
$ grep "tcp\|udp\|icmp" /etc/protocols
icmp    1       ICMP            # internet control message protocol
tcp     6       TCP             # transmission control protocol
udp     17      UDP             # user datagram protocol

# iptables -V
iptables v1.4.12.1

My question is: why some protocols are always displayed as protocol name 
even i use "-n" switch?
Thanks for help.
Marcin

                 reply	other threads:[~2011-11-25  9:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ECF5D28.8080703@mejor.pl \
    --to=marcin@mejor.pl \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.