Firewall on Startup

Hi all,

For some reason, I need to reactivate my firewall eachtime I boot up. I’ve tried the ‘enable’ command in the terminal, and am using gufw for the GUI interface, but everytime I turn on the computer, the firewall is turned off. Does anyone know how to get it to switch itself on?



It’s difficult to say - I frankly I have no idea - I have been using firewalld for my purposes.

If you have no preference - I’d recommend disabling ufw service and removing the packages.

Then install the package firewalld instead - the command to enable is

systemctl enable --now firewalld
1 Like

did you follow this guide?

1 Like

Thanks for the help all, it still seems to want to turn itself off on each reboot. Is there a way I can set up a script or something?



run these commands:

sudo systemctl enable ufw.service
sudo ufw enable
sudo systemctl start ufw.service

and it will stay on after a reboot.


Brilliant, that’s solved it! Thanks!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.