Linux: Iptables List and Show All NAT Tables Rules Command
/sbin/iptables command for IPv4 packet filtering and NAT. Network address translation (NAT) imodifyies IP address information in IP packet headers while in transit across a routing device.
To see NAT rules type:
iptables -t nat -L
iptables -t nat -L -n -v | grep 'something'
iptables -t nat -L -n -v
iptables -t nat -L -n -v | grep 'something'
iptables -t nat -L -n -v
Sample outputs:
Chain PREROUTING (policy ACCEPT 867 packets, 146K bytes) pkts bytes target prot opt in out source destination 0 0 DROP all -- vlan2 * 0.0.0.0/0 192.168.1.0/24 Chain POSTROUTING (policy ACCEPT 99 packets, 6875 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- * vlan2 0.0.0.0/0 0.0.0.0/0 Chain OUTPUT (policy ACCEPT 99 packets, 6875 bytes) pkts bytes target prot opt in out source destination Chain WANPREROUTING (0 references) pkts bytes target prot opt in out source destination root@tswitch:/tmp/home/root#
Say hello netstat-nat
The netstat-nat command display the natted connections on a Linux iptable firewall:
To display SNAT connections, run:
To display DNAT connections, type:
# netstat-nat -n
To display SNAT connections, run:
# netstat-nat -S
To display DNAT connections, type:
# netstat-nat -D
No hay comentarios:
Publicar un comentario