Hostxpeed
Login Get Started →
Security

How to Reset UFW to Default

3 min read
29 views
Jun 11, 2026

Step 1: Reset UFW Rules

sudo ufw reset

This will disable UFW and remove all rules. You will be prompted to confirm.

Step 2: Re-enable with Default Policies

sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw enable

⚠️ Reset will disconnect existing connections. Ensure you have console access or allow SSH before enabling again.

Was this article helpful?