Skip to content

Commit

Permalink
iptables: clarify usage and add additional common options (#2208)
Browse files Browse the repository at this point in the history
  • Loading branch information
AprilElizabeth authored and agnivade committed Aug 12, 2018
1 parent 4a2d83c commit 827eb62
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pages/linux/iptables.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

This comment has been minimized.

Copy link
@dohsimpson

dohsimpson Oct 31, 2020

Contributor

correction here: should be "for 'filter' table" instead of "for all tables"

This comment has been minimized.

Copy link
@navarroaxel

navarroaxel Oct 31, 2020

Member

@dohsimpson The -t {{table_name}} argument was removed from this example. Is this an invalid command?

This comment has been minimized.

Copy link
@dohsimpson

dohsimpson Nov 1, 2020

Contributor

This is a valid command, and a quite common one. Just the description needs to be corrected. Because this command does not show all the tables, just the filter table.

This comment has been minimized.

Copy link
@navarroaxel

navarroaxel Nov 1, 2020

Member

@dohsimpson can you send a PR or create an issue?

This comment has been minimized.

Copy link
@dohsimpson

dohsimpson Nov 1, 2020

Contributor

@navarroaxel made a PR here: #4922


`sudo iptables -t {{table_name}} -vnL`
`sudo iptables -vnL`

- Set chain policy rule:

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

0 comments on commit 827eb62

Please sign in to comment.