2025-03-14 21:59:59 -06:00
|
|
|
# iptables-save
|
|
|
|
|
|
|
|
|
|
> Save the `iptables` IPv4 configuration.
|
|
|
|
|
> Use `ip6tables-save` to do the same for IPv6.
|
|
|
|
|
> More information: <https://manned.org/iptables-save>.
|
|
|
|
|
|
|
|
|
|
- Print the `iptables` configuration:
|
|
|
|
|
|
|
|
|
|
`sudo iptables-save`
|
|
|
|
|
|
2025-04-03 20:36:56 -06:00
|
|
|
- Print the `iptables` configuration of a specific table:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2025-04-03 20:36:56 -06:00
|
|
|
`sudo iptables-save {{[-t|--table]}} {{table}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2025-04-03 20:36:56 -06:00
|
|
|
- Save the `iptables` configuration to a file:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2025-04-03 20:36:56 -06:00
|
|
|
`sudo iptables-save {{[-f|--file]}} {{path/to/file}}`
|