IPTables: Difference between revisions

Line 56:
sudo ufw deny proto tcp from 202.54.1.1 to any port 22 # Deny specific IP, port number, and protocol
sudo ufw deny proto tcp from 202.54.1.0/24 to any port 22 # Block Subnet
 
Add a Rule to the Top of the List:
sudo ufw insert 1 deny from 202.54.1.0/24 comment 'Block DoS attack subnet'
 
Delete Specific Rules: