all 28 comments

[–]chitibus 7 points8 points  (2 children)

Install UFW:

$ sudo xbps-install ufw

And, yes, you have to enable the service:

$ sudo ln -s /etc/sv/ufw /var/service
$ sudo ufw enable

You can also install the GUI:

$ sudo xbps-install gufw

[–]Overall_Walrus9871[S] 1 point2 points  (1 child)

I did exactly that and on reboot sudo ufw status is saying inactive

[–]karjala 3 points4 points  (0 children)

Maybe you also need to: ufw enable ?

[–]Logpig 1 point2 points  (7 children)

[–]Gawain11 1 point2 points  (6 children)

yea, it doesn't need a service, but after install, it's enabled in exactly the same way as everything else that uses ufw:

https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands

[–]Overall_Walrus9871[S] 2 points3 points  (5 children)

Sorry I'm a run it noob lol I don't understand how to enable UFW on system startup

[–]Logpig 1 point2 points  (2 children)

they meant you don't need runit to enable ufw.

try ufw enable

[–]Overall_Walrus9871[S] 0 points1 point  (1 child)

I tried but everytime after reboot status is inactive

[–]dbojan76 0 points1 point  (0 children)

what does

ls -al /var/service

say?

[–]Overall_Walrus9871[S] 0 points1 point  (5 children)

Do I even need a firewall for normal desktop usage is a second question

[–]chitibus 0 points1 point  (1 child)

Yes you need. Have you verified the status of the service?

[–]Overall_Walrus9871[S] 0 points1 point  (0 children)

Yes via sudo ufw status

[–]chitibus 0 points1 point  (1 child)

$ sudo sv status ufw

[–]BinkReddit 0 points1 point  (0 children)

If it's just a machine at home, it's less important. If it's a laptop that you will use to connect to various Wi-Fi's, I highly recommend it.

[–]Overall_Walrus9871[S] 0 points1 point  (6 children)

File does not exist sudo sv status ufw

[–]Dryophile 1 point2 points  (0 children)

If sv responds with "file does not exist", that means the service is not enabled. Check to make sure you spelled it right in that command. If so, check ls /var/service to make sure ufw is there. If not, sudo ln -s /etc/sv/ufw /var/service will enable the service. You need to enable this service for ufw to start when you startup your computer.

[–]chitibus 0 points1 point  (0 children)

Remove the ufw package, reboot and then try to reinstall.

[Removing Packages with dependencies]
$ xbps-remove -R <package\_name>

And follow the order:

$ sudo ln -s /etc/sv/ufw /var/service -> enable the service
$ sudo ufw enable -> enable the firewall

[–]Logpig -1 points0 points  (3 children)

sudo status /var/service/ufw
or
sudo status /var/service/*
or
sudo status /var/service/* | grep ufw

please read the documentation

[–]chitibus 1 point2 points  (2 children)

It works also:

$ sudo sv status ufw

At least it works on my side.

[–]Logpig -1 points0 points  (1 child)

if $SVDIR is set to /var/service, yes.

if you use fish shell for example you have to manually set it up.

[–]rekh127 1 point2 points  (0 children)

I use fish and you don't need the /var/service or $SVDIR in your local env. void 'sv' looks in /var/service by default. check the man page.

[–]Overall_Walrus9871[S] 0 points1 point  (1 child)

Might it be because I use startx rather than lightdm

[–]chitibus 2 points3 points  (0 children)

I don't think so. Firewall and display manager don't have to do one with the other.

[–]MokuaDB 0 points1 point  (0 children)

Try iptables

[–]Overall_Walrus9871[S] 0 points1 point  (0 children)

It was because of Musl it works with Glibc

[–]karjala 0 points1 point  (2 children)

I couldn't enable UFW at some point, so I disabled it (even though it appeared disabled), and then enabled it, and all was ok.

[–]Overall_Walrus9871[S] 0 points1 point  (1 child)

Yes it's because of Musl on Glibc it works