(02-28-2021, 05:42 PM)spaetz Wrote:(02-28-2021, 01:15 AM)theD0cto Wrote: Should be active on startup without having to manually enable it. This fix worked for me, hopefully it works for others - for anyone that also wants to use the ufw
Could you clarify what "fix" you actually have? (besides adapting the systemd unit to start the firewall potentially a little earlier). I installed ufw with "sudo apt install ufw" enabled it with "sudo ufw enable" and it simply gets run on start. So what was the issue before?
"sudo ufw enable" just enables the firewall to be active when you call it. It does not apply to automatically enabling the firewall on system reboot/startup. The ufw.conf was suppose to address this by editing the file to enable it on startup. systemctl enable adds the service to startup, but does not activate the firewall.
This is meant for:
- Adding ufw services to startup and automatically activating the firewall on system reboot so you do not have to "sudo ufw enable" through terminal anytime you had to reboot your phone.
If you google - ufw does not automatically start up on system reboot, you will see numerous instances of it not automatically starting even after editing the ufw.conf and adding it to startup services via systemctl.
So if you restart your phone, and it displays active after you enter "sudo ufw status"(without entering enable), cool, if not, and you want it to startup automatically and be active whenever you reboot your phone then this applies to you.