You are not logged in.
I have ufw.service enabled through systemd, and it loads on startup fine without any issues. But if I type sudo ufw status, it still says it's disabled. Is this normal behavior? If so, is there a way to check which ports are allows/disabled through ufw without having to start ufw manually?
EDIT: The solution was to stop/disable iptables.service, as clearly stated in the installation.
Last edited by Jphillips (2024-04-02 10:33:08)
Offline
Try "sudo ufw enable" after you're sure that systemctl ufw is running.
Offline
That enables it, but if it's already enabled through systemd, why can't I check on the port status without (re)enabling it through sudo ufw enable?
Last edited by Jphillips (2024-03-22 11:16:15)
Offline
To be more specific, when I restart, here's the output of systemd:
$ sudo systemctl status ufw.service
● ufw.service - CLI Netfilter Manager
Loaded: loaded (/usr/lib/systemd/system/ufw.service; enabled; preset: disabled)
Active: active (exited) since Fri 2024-03-22 11:12:01 GMT; 3min ago
Process: 38840 ExecStart=/usr/lib/ufw/ufw-init start (code=exited, status=0/SUCCESS)
Main PID: 38840 (code=exited, status=0/SUCCESS)
CPU: 240ms
Mar 22 10:02:01 tee systemd[1]: Starting CLI Netfilter Manager...
Mar 22 10:02:01 tee systemd[1]: Finished CLI Netfilter Manager.And here's the output of ufw:
$ sudo ufw status
Status: inactiveSo to manage the ports for ufw I have to re-enable it. But this also makes me think it's not actually loaded at boot, despite what systemd says.
Offline
sudo systemctl enable --now ufw.service
Check with systemctl status ufw. It should show enabled and 'preset' enabled
cat /etc/ufw/ufw.conf to check that it is enabled in that file. If not run sudo ufw enable
Reboot and and all should be OK.
Last edited by NoSavvy (2024-03-22 12:59:14)
Offline
Running "sudo systemctl enable --now ufw.service" still shows the preset as disabled. /etc/ufw/ufw.conf shows ENABLED=yes
Offline
This was stupid on my part -- I didn't disable iptables.service, as states in the first line of the wiki....
Offline