You are not logged in.
Hi,
I thought I'd check to see if my firewall was active, ufw status said it was not. Surprising as I was sure (or so I thought) I configured it to start automatically.
I have ran :
# ufw enable // after first install, but also again when I noticed ufw was inactive
systemctl start ufw // Does activate it but then its inactive after reboot
checked the config file :
# /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
I found a tip to add "After=netfilter-persistent.service" to /lib/systemd/system/ufw.service from https://forums.raspberrypi.com/viewtopic.php?t=131125 , but after reboot the ufw is inactive again. I don't have firewalld or any other firewall running. I do have fail2ban running.
I would rather not script it unless I absolutely have to. Have I missed something obvious?
thanks
Last edited by spinynorman (2024-02-13 18:43:32)
Offline
Just simply run the following command as root or with sudo:
systemctl enable ufw.service
Offline
Ah so I had missed possibly the most obvious thing by confusing start and enable for systemctl. Thank you, it starts on boot now!
Offline
Glad you have it working.
Offline