Prerequisites
- UFW installed and enabled
- Root or sudo privileges
Step 1: Allow IP Address
sudo ufw allow from 192.168.1.100Step 2: Allow IP to Specific Port
sudo ufw allow from 203.0.113.5 to any port 22Step 3: Allow IP Range
sudo ufw allow from 192.168.1.0/24Step 4: Reload and Verify
sudo ufw reload
sudo ufw status numbered