在Ubuntu 12.04上查看NAT连接记录

aptitude -y install netstat-nat


Login as root user and type the following to display list of all natted connections:
# netstat-nat -n


To display NAT connections with protocol selection, enter:
# netstat-nat -n -p tcp


To display all connection by source IP called 192.168.1.100

# netstat-nat -s 192.168.1.100


To  display all connections by destination IP/hostname called laptop, enter:

# netstat-nat -s laptop


To  display SNAT connections, enter:

# netstat-nat -S


To   display DNAT connections, enter:

# netstat-nat -D


To display only connections to NAT box self i.e. doesn’t show SNAT & DNAT, enter:

# netstat-nat -L


To display help, enter:
$ netstat-nat -h
$ man netstat-nat

你可能感兴趣的:(ubuntu,NAT)