ufw not starting on boot
6,791
Solution 1
I found the culprit. It was iredmail. There was a script in /etc/init.d/iptables that loaded iptables. This was conflicting with ufw preventing ufw from being enabled on boot. Once I stopped this script from running on boot my problem was solved. ufw is enabled on boot now.
Solution 2
For me, this was a conflict with firewalld
, and was resolved with:
sudo systemctl disable firewalld
Related videos on Youtube
Author by
Jedi
Updated on September 18, 2022Comments
-
Jedi over 1 year
I am running Ubuntu Server 18.04
When I do:
sudo ufw enable
the output is:
Firewall is active and enabled on system startup
but when I do a reboot and run:
sudo ufw status verbose
the output is:
Status: inactive
I have checked /etc/ufw/ufw.conf:
ENABLED=yes
I have tried:
uninstalling and reinstalling ufw:
sudo ufw logging off update-rc.d ufw defaults sudo systemctl enable ufw
I have gone as far as I can go. Any help would be appreciated.
Edit: Hi steeldriver, thank you for your reply. Output is
systemctl status ufw.service ● ufw.service - Uncomplicated firewall Loaded: loaded (/lib/systemd/system/ufw.service; enabled; vendor preset: enab Active: active (exited) since Tue 2019-02-05 15:01:15 NZDT; 1h 49min ago Docs: man:ufw(8) Process: 456 ExecStart=/lib/ufw/ufw-init start quiet (code=exited, status=0/SU Main PID: 456 (code=exited, status=0/SUCCESS)
-
steeldriver about 5 yearsHave you looked at
systemctl status ufw.service
? -
Jedi about 5 yearsLooks like this may be a bug. bugs.launchpad.net/ubuntu/+source/ufw/+bug/1726856
-
Jedi about 5 yearsIs there any way to check if you have another firewall manager installed?
-
-
Muhammad Ahmad over 4 yearsCan you please guide on how did you removed this conflict. I removed the files "iptables" and "ip6tables" from /etc/init.d/iptables but still UFW gets disables on reboot.