The flush iptables rules are necessary for all resetting tasks in the Linux servers. The general command for flushing the iptables rules across all chains is written in the standard format:
iptables -F
Similar to the list iptables rules, the user can replace 'INPUT' with the name of the chain they want to flush:
iptables -F INPUT
To delete all user-defined chains in the system, the user can employ the tactic given below. However, it is advised to use this command with caution since this command can also remove custom-built user chains.
iptables -X