You are not logged in.

#1 2022-06-20 20:54:19

alpage2
Member
Registered: 2022-05-31
Posts: 3

[SOLVED] ufw not enabled on startup

I am having a problem with the ufw firewall. When I enable it, as the root user:

ufw enable
Firewall is active and enabled at system startup

So far, so good. At this point the contents of /etc/ufw/ufw.conf are:

# /etc/ufw/ufw.conf
#

# Set to yes to start on boot. If setting this remotely, be sure to add a rule
# to allow your remote connection before starting ufw. Eg: 'ufw allow 22/tcp'
ENABLED=yes

# Please use the 'ufw' command to set the loglevel. Eg: 'ufw logging medium'.
# See 'man ufw' for details.
LOGLEVEL=low

No obvious problem there.

However, after a reboot, or a cold start:

ufw status
Status: inactive

This was not expected. On any other distro I have used, the firewall remained active after a reboot.

Is there anything else I need to add to ufw.conf? Or anything else to configure to make the firewall start automatically on system startup?

Last edited by alpage2 (2022-06-21 07:21:12)

Offline

#2 2022-06-20 23:37:56

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 1,197

Re: [SOLVED] ufw not enabled on startup

The archwiki has a fairly comprehensive page on ufw.

It says for example that you need to systemctl start ufw.service to expect it to be started by systemd at boot.


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

#3 2022-06-21 07:20:11

alpage2
Member
Registered: 2022-05-31
Posts: 3

Re: [SOLVED] ufw not enabled on startup

levi - many thanks for that - it got me there.

systemctl start ufw.service

started the firewall, but after a reboot, it was again inactive.
I then gave it:

systemctl enable ufw

to enable it at boot time, and now it starts at boot time, as intended.

Offline

#4 2022-06-21 07:58:57

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 1,197

Re: [SOLVED] ufw not enabled on startup

Sorry, yes, my typo.  systemctl enable is what you want for anything starting at boot.  Luckily the wiki page is already correct.


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

Board footer

Powered by FluxBB