iptables: insert a rule at a specific line number








# list the rules with line numbers
iptables -nL --line-numbers
# insert a rule at line 5
iptables -I INPUT 5 -p tcp -m state --state NEW -m tcp --dport 4000 -j ACCEPT



No comments:

Post a Comment