Reboot Disables ufw, But Works OK After 'ufw enable'

Dear Friends

I was using ufw for quite some time with absolutely no problem. Now, after I installed ufw on EOS, I followed exactly all the steps from the AL Wiki (https://wiki.archlinux.org/title/Uncomplicated_Firewall) just like the last time I used in AL.

But every reboot is disabling ufw, thought systemctl is showing both ufw.service and iptables.service as active. Once I run ‘sudo ufw enable’ it gets enabled and reports that it will be active after reboot, but it is not happening.

Once I run ‘ufw enable’, it works fine, exactly it should. But, again, getting disabled on reboot.

Am I doing something stupid? Please bear with me if I am.

1 Like

Did you enable iptables manually? It’s disabled on my system (fresh install from a couple of days ago). Don’t really need to have (2) firewalls active.

2 Likes

How I Install a Firewall on EndeavourOS:

sudo pacman -S gufw

sudo systemctl start ufw.service

sudo systemctl enable ufw.service

^MUST RUN THIS, allows ufw to auto-start on reboots

My guess is you’re not using sudo when you issue the command :wink:

Run sudo systemctl status ufw after a reboot to see if it worked also if you want.

3 Likes

@ajgringo619
You said: Did you enable iptables manually? It’s disabled on my system (fresh install from a couple of days ago). Don’t really need to have (2) firewalls active.

Yeah, I found out my mistake. The AL Wiki said:
Start and efw.service to make it available at boot. Note that this will not work if iptables.service is also enabled (and same for its ipv6 counterpart).

I misread it that I have to enable and start both ufw and iptables both. And that is why it was not working.

@Scotty_Trees
I think i did the other things rightly. Anyway, now I am going to stop and disable iptables. And I will discover if I have done any more mistake.

Thanks to both of you. And I will write it here if it does not work.

1 Like

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