

Iptables has two commands to manage backup and restoration of current/existing rules. Num pkts bytes target prot opt in out source destination How to save current iptables rules to a text file? Num pkts bytes target prot opt in out source destinationġ 0 0 ACCEPT tcp - * * xx.xx.xx.xx 0.0.0.0/0 tcp dpt:22Ģ 0 0 ACCEPT tcp - * * xx.xx.xx.xx 0.0.0.0/0 tcp dpt:25ģ 0 0 ACCEPT tcp - * * xx.xx.xx.xx 0.0.0.0/0 tcp dpt:80Ĥ 0 0 ACCEPT tcp - * * xx.xx.xx.xx 0.0.0.0/0 tcp dpt:110ĥ 0 0 ACCEPT tcp - * * xx.xx.xx.xx 0.0.0.0/0 tcp dpt:143Ĭhain FORWARD (policy ACCEPT 0 packets, 0 bytes)Ĭhain OUTPUT (policy ACCEPT 60 packets, 10834 bytes) line-number -> List rules with rule number Example ]# iptables -L -nv -line-number Chain INPUT (policy ACCEPT 80 packets, 5562 bytes)
