Skip to main content
Topic: In OpenRC under which runlevel should UFW service be added, default or boot? (Read 1725 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

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. 
Code: [Select]
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?

Re: In OpenRC under which runlevel should UFW service be added, default or boot?

Reply #1
dhcp is usually picked up at boot, so you should have your firewall ready as soon as possible

 

Re: In OpenRC under which runlevel should UFW service be added, default or boot?

Reply #2
So typically in Artix the dhcpd and dns services are started in the default runlevel or in the boot runlevel? And yes firewall (i.e. firewalld/ufw/etc) should be started before dhcp and dns service.

Ideally they should be picked up in default runlevel, unless we are looking at network boot or something equivalent.