Score:1

How to disable ufw on boot?

in flag

Azure Virtual Machine, OS: Ubuntu 20.04 LTS

Every time I restart the VM, ufw status is active. My objective is to prevent this and make ufw inactive on boot.

What I have tried:

sudo ufw disable

However ufw status will still be active on the next reboot. How can I resolve this?

Score:2
cn flag

You can indeed stop the service with your command, but obviously it will be restarted next time. What you need to do, instead, is disable the service that starts ufw during the boot process of the computer.

sudo systemctl disable ufw.service

If you want to restore the service, substitute disable by enable in this command.

If you never want to hear about ufw again on that system, you also can completely remove it from your system: that will remove the systemd service and the program.

sudo apt purge ufw
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.