From 827eb62cb34b13140cc8fb94b01874dede1f4965 Mon Sep 17 00:00:00 2001 From: april j Date: Sun, 12 Aug 2018 10:23:48 -0600 Subject: [PATCH] iptables: clarify usage and add additional common options (#2208) --- pages/linux/iptables.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pages/linux/iptables.md b/pages/linux/iptables.md index c311956314..e65702206d 100644 --- a/pages/linux/iptables.md +++ b/pages/linux/iptables.md @@ -2,9 +2,9 @@ > Program that allows configuration of tables, chains and rules provided by the Linux kernel firewall. -- See chains and rules for specific table: +- View chains, rules, and packet/byte counters for all tables: -`sudo iptables -t {{table_name}} -vnL` +`sudo iptables -vnL` - Set chain policy rule: @@ -22,6 +22,10 @@ `sudo iptables -D {{chain}} {{rule_line_number}}` -- Save iptables configuration: +- Save iptables configuration of a given table to a file: -`sudo iptables-save > {{path/to/iptables_file}}` +`sudo iptables-save -t {{tablename}} > {{path/to/iptables_file}}` + +- Restore iptables configuration from a file: + +`sudo iptables-restore < {{path/to/iptables_file}}`