All of lore.kernel.org
 help / color / mirror / Atom feed
* iptables -n doesn't display numbers in all cases for prot column
@ 2011-11-25  9:17 Marcin Mirosław
  0 siblings, 0 replies; only message in thread
From: Marcin Mirosław @ 2011-11-25  9:17 UTC (permalink / raw)
  To: netfilter

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-25  9:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-25  9:17 iptables -n doesn't display numbers in all cases for prot column Marcin Mirosław

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.