UBUNTU ufw add and delete IP blacklist

The command needs to be executed in root mode.

1. Add blacklist command

ufw insert 1 deny from 192.168.3.99

Among them, insert 1 is to insert the rule into the first one, otherwise it is just added to the end, and ufw matches the rules in order, and if there is a rule matching, it will stop matching; so if there is a rule that is allowed to pass before, then add the rejected one rules would be invalid.

2. Remove the blacklist command

ufw delete deny from 192.168.3.99
————————————————

Original link: https://blog.csdn.net/ypp240124016/article/details/112650322

Guess you like

Origin blog.csdn.net/txl910514/article/details/130254466
ufw
ufw