2023-09-18 05:57:51 +02:00
|
|
|
# iptables-save
|
|
|
|
|
|
|
|
> Save the `iptables` IPv4 configuration.
|
2024-03-16 06:25:46 +01:00
|
|
|
> Use `ip6tables-save` to do the same for IPv6.
|
2023-09-18 05:57:51 +02:00
|
|
|
> More information: <https://manned.org/iptables-save>.
|
|
|
|
|
|
|
|
- Print the `iptables` configuration:
|
|
|
|
|
|
|
|
`sudo iptables-save`
|
|
|
|
|
2025-03-27 16:42:21 +02:00
|
|
|
- Print the `iptables` configuration of a specific table:
|
2023-09-18 05:57:51 +02:00
|
|
|
|
2025-03-27 16:42:21 +02:00
|
|
|
`sudo iptables-save {{[-t|--table]}} {{table}}`
|
2023-09-18 05:57:51 +02:00
|
|
|
|
2025-03-27 16:42:21 +02:00
|
|
|
- Save the `iptables` configuration to a file:
|
2023-09-18 05:57:51 +02:00
|
|
|
|
2025-03-27 16:42:21 +02:00
|
|
|
`sudo iptables-save {{[-f|--file]}} {{path/to/file}}`
|