UFW not enabled on reboot Debian 8

When I reboot my server running Debian 8, UFW is not staying enabled. However, if I do sudo ufw enable and check the status, it's running with the correct defined rules.

I checked /etc/ufw/ufw.conf and it says ENABLED=yes.

1 Reply

If you've already checked that the /etc/ufw/ufw.conf file has the ENABLED=yes line, and yet UFW (Uncomplicated Firewall) is not staying enabled after a server reboot, there might be a few other things you can check and try:

  1. Check Startup Services: Ensure that the UFW service is set to start automatically during boot. You can use the following command to check its status:

    sudo systemctl is-enabled ufw
    

    If the output is disabled, you can enable it using:

    sudo systemctl enable ufw
    
  2. Check UFW Rules: It's possible that you have a rule that conflicts with the startup configuration. Check your UFW rules to ensure they are properly set and not causing any issues. You can list the rules using:

    sudo ufw status numbered
    

    Make sure the rules are correctly defined and aren't causing UFW to fail on startup.

  3. Check for Errors: Check the system logs for any errors related to UFW during startup. You can check the systemd journal using:

    journalctl -xe | grep ufw
    

    Look for any error messages or warnings that might indicate why UFW is failing to start.

  4. Update UFW and System: Ensure that your Debian system and UFW are up to date. Sometimes, issues can be resolved by updating the software to the latest versions:

    sudo apt update
    sudo apt upgrade ufw
    
  5. Check for Other Conflicting Firewalls: Ensure that there are no other firewall solutions or scripts that might interfere with UFW's startup. Conflicting firewalls could prevent UFW from enabling properly.

  6. Permissions and Ownership: Ensure that the ownership and permissions of UFW's configuration files are correct. Incorrect permissions might prevent UFW from starting properly.

  7. Consider Upgrading: Debian 8 (Jessie) is quite old and has reached its end of life. It's generally a good idea to upgrade to a newer version of Debian to benefit from improved features, security updates, and better compatibility with modern software.

After trying these steps, if UFW still doesn't stay enabled after a reboot, you might need to dig deeper into system logs and configuration files to identify the root cause of the issue. If all else fails, consider reaching out to the Debian community or forums for further assistance.

You can also use our Linode Doc for reference to know more about UFW which may also help you to get more details.

If you have any further queries, feel free to reach out to our Support Team, we are available 24/7 to assist you.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct