UFW not enabled on reboot Debian 8
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:
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
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.
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.
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
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.
Permissions and Ownership: Ensure that the ownership and permissions of UFW's configuration files are correct. Incorrect permissions might prevent UFW from starting properly.
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.