October 30, 2025

How to Fix Firewall (UFW) Not Starting on Linux

mr rockstar

How to Fix Firewall (UFW) Not Starting on Linux
Cheap Dedicated Server

The Uncomplicated Firewall (UFW) is a powerful yet simple tool for managing iptables-based firewalls on Linux. However, sometimes users encounter an issue where UFW fails to start or enable properly. This guide will help you diagnose and fix the most common causes of the “ufw not starting” problem.


1. Check UFW Status

Before applying any fix, check whether UFW is active or disabled:
    Check UFW Status

sudo ufw status verbose

If you see something like Status: inactive, it means the firewall isn’t running. Try starting it manually:
Enable UFW at Boot

sudo ufw enable

If that fails, move on to the next steps.


2. Restart the UFW Service

Sometimes the issue is just a stuck service. Restart UFW and check its status again:
Restart the UFW Service

sudo systemctl restart ufw
sudo systemctl status ufw

If you see an error such as “failed to start Uncomplicated firewall”, continue troubleshooting.


3. Enable UFW at Boot

Make sure UFW is enabled to start automatically when the system boots:

sudo systemctl enable ufw

Then reboot your system to verify that it starts correctly:

sudo reboot

4. Check for Conflicting Firewall Services

Other firewall services like firewalld or custom iptables rules can interfere with UFW. Disable or remove them:
Check for Conflicting Firewall Services

sudo systemctl stop firewalld
sudo systemctl disable firewalld

Then restart UFW again:

sudo ufw enable

5. Fix Broken or Missing UFW Rules

If the UFW configuration files are corrupted, reset them:
Fix Broken or Missing UFW Rules

sudo ufw reset
sudo ufw enable

This resets all rules but may resolve startup issues caused by invalid configurations.


6. Check Logs for More Information

If UFW still won’t start, check the system logs for error details:

sudo journalctl -xe | grep ufw

Look for missing dependencies, permission errors, or conflicts with other services.


7. Reinstall UFW (Last Resort)

If none of the above steps work, reinstall UFW completely:

sudo apt remove --purge ufw -y
sudo apt install ufw -y
sudo ufw enable

This ensures a clean configuration and fresh dependencies.


Conclusion

When UFW fails to start, the issue is usually due to conflicting services, corrupted rules, or misconfigured startup settings. Following the above steps will help you restore your Linux firewall and secure your system again quickly.


 

How to Fix Firewall (UFW) Not Starting on Linux (F.A.Q)

Why does UFW fail to start automatically?

It might not be enabled at boot or is conflicting with another firewall service.

 

 

How do I know if UFW is running?

Use sudo ufw status verbose to check if it’s active and enforcing rules.

Can UFW and firewalld run together?

No. They manage the same underlying iptables, which can cause conflicts.

Does resetting UFW delete all rules?

Yes. sudo ufw reset clears all firewall rules and starts fresh.

Popular Blog Posts