~alpine/users

1

ufw

Patrick Useldinger <pat@disroot.org>
Details
Message ID
<4CEFB62D-9188-4E21-A37B-12F7FD90575E@disroot.org>
DKIM signature
missing
Download raw message
Greetings,
I’m very new to Alpine Linux, running it under qemu as a DHCP and PiHole (docker) server currently.
Being familiar with Debian I installed ufw for packet filtering and it’s working well.
However, there’s a problematic behaviour - when starting the OS instance, ufw start fails with

- - - - - -
* Starting ufw …
Another app is currently holding the xtables lock. Perhaps you want to use the -w option?
ip6tables-restore: line 2 failed
Problem running ‘/etc/ufw/before6.rules’
* Failed to start ufw.
* ERROR: ufw failed to start
- - - - - -

The rest appears to be working correctly, although I seem to be unable to ssh into the instance unless I wait 
around 2 minutes after the startup, and without any action from my side (possibly unrelated).

To correct the problem, I console in into the instance and start ufw manually, and it works without a hitch.
So I suspect a dependency problem at startup.
I am not familiar with OpenRC but all symptoms seem to disappear when, in /etc/init.d/ufw, I change
“before net” -> “after net”.

My question is:
- what is the correct dependency for the ufw init script?

Regards,
-Patrick
Details
Message ID
<9d2ca4b5-5c76-76d3-e3d3-e5f78a4d413d@disroot.org>
In-Reply-To
<4CEFB62D-9188-4E21-A37B-12F7FD90575E@disroot.org> (view parent)
DKIM signature
missing
Download raw message
On 24/12/2021 11:19, Patrick Useldinger wrote:
> My question is:
> - what is the correct dependency for the ufw init script?

Plot twist: a better config seems to be

depend() {
	before net
	after iptables ip6tables
	provide firewall
}

Regards,
-Patrick
Reply to thread Export thread (mbox)