iptables

Administration tool for IPv4/IPv6 packet filtering and NAT.

Help

iptables -h
Usage: iptables -[ACD] chain rule-specification [options]
        iptables -I chain [rulenum] rule-specification [options]
        iptables -R chain rulenum rule-specification [options]
        iptables -D chain rulenum [options]
        iptables -[LS] [chain [rulenum]] [options]
        iptables -[FZ] [chain] [options]
        iptables -[NX] chain
        iptables -E old-chain-name new-chain-name
        iptables -P chain target [options]
        iptables -h (print this help information)

Monitor bandwidth used

Create rules

IP=x.x.x.x
sudo iptables -I INPUT 1 -s $IP -j ACCEPT
sudo iptables -I OUTPUT 1 -d $IP -j ACCEPT

Zero the packet and byte counters in all chains

sudo iptables -Z

Run the scan

# Run scan here to monitor bandwidth used

List all rules in the selected chain

❗ Listing firewall rules require root privileges.

sudo iptables -vn -L
sudo iptables -t nat -n -L