1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-13 22:35:43 +02:00

iptables: clarify usage and add additional common options (#2208)

This commit is contained in:
april j 2018-08-12 10:23:48 -06:00 committed by Agniva De Sarker
parent 4a2d83c6af
commit 827eb62cb3

View file

@ -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}}`