Had enabled auto-restart for ufw, was working fine before, but I am not able to understand what went wrong...
use case:
when I check sudo ufw status
it shows -> Status: inactive
Then I enable it sudo ufw enable
it shows -> Command may disrupt existing ssh connections. Proceed with operation (y|n)?
I hit -> y
it shows -> Firewall is active and enabled on system startup
Then I reboot it sudo reboot
and after reboot when i check the ufw status again, it shows inactive.
Tried the following things:
In file
lib/systemd/system/uwf.service
added lineAfter=netfilter-persistent.service
In file
etc/rc.local
added following lines:ufw enable
exit 0
In file
etc/ufw/ufw.conf
was already enabledENABLED=yes
Did anyone face similar issue before?