In OpenRC under which runlevel should UFW service be added, default or boot?
There is a package ufw-openrc which has OpenRC service files for UFW. If we look the file /etc/init.d/ufw then in depends function we see the following.
depend() {
before net
provide firewall
}
before net is the main part. Now net is provided by a service net.lo which provides net. The net.lo service and consequently net service is set to start at boot runlevel.
Further the firewall, which in this case happens to be ufw, has to be started before networkmanager or connman or some other package takes over the control of the network and auto connects. Typically these, i.e. networkmanager or connman and similar are run in the default runlevel.
So in this case should ufw or any other firewall be started at boot runlevel or default runlevel? And can they be started in the boot rulevel?