Skip to content

Using iptables for Network Stats

root@penguin:~# iptables -Z INPUT
root@penguin:~# nmap target.local &>/dev/null
root@penguin:~# iptables -vnL INPUT
Chain INPUT (policy ACCEPT 22 packets, 2345 bytes)
 pkts bytes target     prot opt in     out     source               destination
 2045  153K ts-input   0    --  *      *       0.0.0.0/0            0.0.0.0/0

The bytes column with 153K is the total traffic generated by the nmap command, plus any other packets that may have been generated between clearing the counters and displaying them.