In Linux, Iptables is a security wall of the system. In this you will learn how to delete the Iptable rules in Linux system.
The easiest way to delete the rule is by chain and number. Follow this command to remove existing rules.
$ sudo iptables -L --line-numbers
[secondary_output Example Output: Rules with Line Numbers] Chain INPUT (policy DROP) num target prot opt source destination 1 ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED 2 ACCEPT all -- anywhere anywhere 3 DROP all -- anywhere anywhere ctstate INVALID
sudo iptables -D INPUT 2