Lately, I've noticed that UFW is inactive until I activate it manually.
ufw enable multiple times, checked that
ufw.service is active, but it still does not start on boot.
systemctl list-unit-files | grep -i ufw
ufw.service enabled enabled
systemctl status ufw
Loaded: loaded (/lib/systemd/system/ufw.service; enabled; vendor preset: enabled) Active: active (exited) since Sat 2022-09-24 12:15:01 +03; 1min 26s ago Docs: man:ufw(8) Process: 388 ExecStart=/lib/ufw/ufw-init start quiet (code=exited, status=0/SUCCESS) Main PID: 388 (code=exited, status=0/SUCCESS) Sep 24 12:15:01 alienus-server systemd: Finished Uncomplicated firewall. Warning: journal has been rotated since unit was started, output may be incomplete.
I've tried re-enabling
ufw.service and it did not work:
Removed /etc/systemd/system/multi-user.target.wants/ufw.service. Created symlink /etc/systemd/system/multi-user.target.wants/ufw.service → /lib/systemd/system/ufw.service.
Outputs of everything right after a boot:
Additional info: After purging and reinstalling UFW, both with copying old configurations and manually reconfiguring, it is still not working as intended. And even though it was active when it booted, a couple of hours later it got deactivated again. So in order to keep it active, I've added a cronjob to reactivate it every 30 minutes.
Where else can I check for the reason that it does not start automatically? What is
Warning: journal has been rotated since unit was started, output may be incomplete.?
systemctl enable ufw- have you tried this?