This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| clearing_iptables [2023/03/08 12:21] – created rs232 | clearing_iptables [2024/10/31 21:09] (current) – hogwild | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Clearing iptables custom commands prior to re-applying new ones ===== | + | ===== Clearing iptables custom commands prior to applying new ones ===== |
| - | Assuming the user want so use some custom iptables commands in e.g. script/firewall (but this applies | + | As an example, let's say that you wanted to use some custom iptables commands in a script, such as the firewall |
| + | \\ You can remove previously-added iptables directives using a simple approach: | ||
| + | |||
| + | \\ | ||
| '' | '' | ||
| - | This command here below will check what iptables -A (append) or -I (insert) have been used in the current Script/ | + | \\ |
| - | * you need to un-reference | + | |
| - | * a table needs to be empties | + | The commands |
| - | * only at this point you will be allowed to remove the table with a **iptables -X $TABLE_NAME**. | + | |
| + | You might have created custom tables | ||
| + | |||
| + | \\ Here are a few rules to remember | ||
| + | |||
| + | \\ | ||
| + | |||
| + | * First, | ||
| + | * A table must then be emptied | ||
| + | * Only then will you be allowed to remove the table by using the command: \\ "**iptables -X $TABLE_NAME"**. | ||
| + | |||
| + | \\ | ||