Recently, I was confused by-F and-X when I was learning iptables. I searched the internet to find out test: 1. iptables initialization 2. iptables-X (first time) error cause: Custom linked list (test) is not empty 3, iptables-F4, iptables & nbs
Recently, I was confused by-F and-X when I was learning iptables. I found it on the Internet.
Test:
1. iptables initialization
2. iptables-X (first time)
The error occurs because the custom linked list (test) is not empty.
3. iptables-F
4. iptables-X
OK. the experiment is over.
Lab report:
-F is used to clear all the rule settings in a specified chains. For example, iptables-F-t filter clears all INPUT/OUTPUT/FORWARD chain rules in the filter table.
-X is used to delete user-defined table items. generally, after you use iptables-N xxx to add a custom chain, you can use iptables-X xxx to delete it.