This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
clearing_iptables [2023/03/08 12:21] – created rs232 | clearing_iptables [2023/05/08 04:48] – -formatting 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 | + | Let's say, as an example, 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**. | + | |
+ | A user might have created custom tables | ||
+ | |||
+ | \\ Here are some rules to remember | ||
+ | |||
+ | * First, | ||
+ | * A table must then be emptied | ||
+ | * Only at this point will you be allowed to remove the table with the command: | ||
+ | |||
+ | \\ | ||