Prerequisites
- UFW installed and enabled
- Root/sudo access
Step 1: Deny IP Address
sudo ufw deny from 203.0.113.45Step 2: Deny IP to Specific Port
sudo ufw deny from 203.0.113.45 to any port 22Step 3: Delete Existing Rule
sudo ufw status numbered
sudo ufw delete [number]Step 4: Reload UFW
sudo ufw reload