Visualizza le regole inserite nella tabella NAT, pił precisamente delle seguenti Chain:
- POSTROUTING
- PREROUTING
- OUTPUT
Indicando inoltre le statistiche delle singole rule.
[root@GIOVE root]# iptables -t nat -L -nv
Rule relative alla catena di Prerouting
Chain PREROUTING (policy ACCEPT 71106 packets, 8718K bytes)
pkts bytes target prot opt in out source destination
25 1236 DNAT tcp -- * * 0.0.0.0/0 10.0.0.1 tcp dpt:1111 to:10.0.0.170:1723
17 968 DNAT tcp -- eth1 * 0.0.0.0/0 10.0.0.2 to:10.0.0.170
Rule relative alla catena di Postrouting
Chain POSTROUTING (policy ACCEPT 77 packets, 4597 bytes)
pkts bytes target prot opt in out source destination
41015 3171K MASQUERADE all -- * eth1 10.0.0.0/24 0.0.0.0/0
Rule relative alla catena di Output
Chain OUTPUT (policy ACCEPT 35 packets, 2393 bytes)
pkts bytes target prot opt in out source destination
Overview, gestione, utilizzo di iptables su Linux per packet filtering