Shell/Bash: remove iptables rule Example

By

Shell/Bash Example: This is the "remove iptables rule" Example. compiled from many sources on the internet by SimpleTutorials.org

remove iptables rule

#find line number of rule
$ sudo iptables -L INPUT --line-numbers
## delete rule by number
$ sudo iptables -D INPUT 1
. . .

remove port iptables

# flag -D for delete
sudo iptables -D INPUT -i eth0 -p tcp --dport 22 -j ACCEPT

remove all iptables rules

sudo iptables -F


* Summary: This "remove iptables rule" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!

Others