The officially official Devuan Forum!

You are not logged in.

#1 2021-10-17 08:10:28

RIA77
Member
Registered: 2019-03-12
Posts: 28  

[SOLVED] Devuan, runit and Firewalld

Hello and thank you for this distribution.
Fresh install of XFCE Chimaera, how to make Firewalld running ?
Sucessfuly linked firewalld service, but it appears that no firewalld is running.
Thank you.

Offline

#2 2021-10-17 08:50:52

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] Devuan, runit and Firewalld

RIA77 wrote:

Sucessfuly linked firewalld service

What does that mean, exactly? Did you write your own service script? Looks like firewalld only supplies a systemd unit file.


Brianna Ghey — Rest In Power

Offline

#3 2021-10-17 08:59:22

RIA77
Member
Registered: 2019-03-12
Posts: 28  

Re: [SOLVED] Devuan, runit and Firewalld

Firewalld has been running on Artix linux, and it has been installed without gui on Devuan.
Linked means
ln -s /etc/sv/<service> /etc/runit/runsvdir/default/

Offline

#4 2021-10-17 09:25:49

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] Devuan, runit and Firewalld

So can we see the service file then? Is it from Artix? Have you checked the logs?


Brianna Ghey — Rest In Power

Offline

#5 2021-10-17 09:32:48

RIA77
Member
Registered: 2019-03-12
Posts: 28  

Re: [SOLVED] Devuan, runit and Firewalld

apt-get install firewalld
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
firewalld is already the newest version (0.9.3-2).

I also installed firewall-applet and firewall-config

firewall-cmd --state
running

Sorry, I have probably installed some dependencies that I forgot to mention. It works.

Offline

#6 2023-08-12 20:44:20

yeahbike
Member
Registered: 2023-08-12
Posts: 2  

Re: [SOLVED] Devuan, runit and Firewalld

Hi all,

I'm having a problem with the logging on this. Initially I was getting this over and over:
2023-08-12 12:21:45 FATAL ERROR: Not starting FirewallD, already running.

So I altered my service run file to check to see if the application was running before executing:
/etc/service/firewalld/run:
#!/bin/bash
if ! pgrep -x "firewalld" > /dev/null
then
  exec /usr/sbin/firewalld
fi

After this I'm not getting anything in the logs at all, /var/log/firewalld is empty, as is /var/log/runit/firewalld/current.

Here's my service run file for the log:
/etc/service/firewalld/log/run:
#!/bin/sh
exec chpst -ulog svlogd -tt /var/log/firewalld

Any help would be much appreciated!

Offline

#7 2023-08-13 17:52:41

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,425  

Re: [SOLVED] Devuan, runit and Firewalld

already running

I guess your test works. Since it's already running, runit doesn't have to start it or log it. Find out why/how it's running already.

Offline

#8 2023-08-14 20:13:41

yeahbike
Member
Registered: 2023-08-12
Posts: 2  

Re: [SOLVED] Devuan, runit and Firewalld

Hey thanks for your response,

Actually this is the crux of the problem. Runit IS starting firewalld. I've got the service directory linked like so: /etc/sv/firewalld/ ---> /etc/service/firewalld/. When I remove that link and reboot, firewalld doesn't run. When I relink it and reboot, voila it runs.

Using the original runnit service run file like so(/etc/sv/firewalld/run):
     

#!/bin/bash
     exec /usr/sbin/firewall

Results in the aforementioned lines in the log about firewalld already running:

     /var/log/firewalld:
     2023-08-14 15:04:31 FATAL ERROR: Not starting FirewallD, already running.
     2023-08-14 15:04:32 FATAL ERROR: Not starting FirewallD, already running.
     2023-08-14 15:04:33 FATAL ERROR: Not starting FirewallD, already running.
     2023-08-14 15:04:34 FATAL ERROR: Not starting FirewallD, already running.

While putting the if/then statement in to see if it's already running results in nothing logged.

Here's another piece of this annoying puzzle: In both cases running sv status firewalld shows it as "down" when it is running:

     # sv status firewalld
     run: firewalld: (pid 27290) 1s; down: log: 1s, normally up, want up
     # firewall-cmd --state
     running

Reloading the service, stopping/starting, restarting, all don't affect anything except the error messages in the log.
Using

     # sv stop firewalld
     ok: down: firewalld: 1s, normally up

Results in the error messages no longer being written.

I think I failed to mention I'm on Chimaera.
Thanks,
YB

P.S. I frickin love Devuan: any help is much appreciated and I hope to pay it forward once I get my bearings.

Offline

Board footer