UFW (uncomplicated firewall) Start On Boot - Mobian (working)
#1
Hey Ya'll,

Not entirely sure if others are wanting this, but thought I'd share my fix on this workaround if you been trying to get this firewall to start on system startup on mobian (fix will be similar to almost any Distro actually).

This is for anyone that wanted to use the UFW - uncomplicated firewall service vs iptables. 

Useful background knowledge:
https://www.freedesktop.org/wiki/Softwar...orkTarget/

Assuming you have already installed ufw:

edit the /lib/systemd/system/ufw.service
Code:
sudo nano /lib/systemd/system/ufw.service

Comment or delete out any existing BEFORE and/or AFTER lines under [unit] and add the new conditions - should look similar to this:
Code:
[Unit]
Description=Uncomplicated firewall
Documentation=man:ufw(8)
DefaultDependencies=no
#Before=network.target
Before=network-pre.target
Wants=network-pre.target

............

Make sure you write out, save, and exit. What this does is makes sure the firewall starts BEFORE any network configuration. Which is the point of a firewall Smile

Add ufw.service to system startup

Code:
sudo systemctl enable ufw.service

Now also make sure ufw.conf has start on boot enabled (enabling just this without the above had no affect on startup). Edit the ufw.conf

Code:
sudo nano /etc/ufw/ufw.conf

Code:
ENABLED=yes

Write out and save and exit.

Reboot your phone. Once it is rebooted, head to terminal and check the firewall status:

Code:
sudo ufw status


Should be active on startup without having to manually enable it. This fix worked for me, hopefully it works for others - for anyone that also wants to use the ufw
  Reply


Messages In This Thread
UFW (uncomplicated firewall) Start On Boot - Mobian (working) - by theD0ctor - 02-28-2021, 01:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  New Install, apps start but don't show up on screen?! RT3 2 58 07-18-2025, 07:56 PM
Last Post: Kevin Kofler
  boot gets stuck shortly after disk decryption vortex 10 7,934 07-16-2025, 10:50 AM
Last Post: demetemre
  bookworm vs trixie discussion for mobian in pinephone regular. zetabeta 65 23,326 07-12-2025, 07:46 AM
Last Post: anonymous
  cryptocurrency on mobian/pinephone biketool 33 50,234 06-30-2025, 02:57 PM
Last Post: biketool
  XLibre for Mobian Hiraghm 1 258 06-30-2025, 01:38 AM
Last Post: Haroldkent
  Axolotl on PinePhone / Mobian arno_nuehm 223 243,141 06-25-2025, 01:19 PM
Last Post: anonymous
  VoIP account on mobian dialer j_s 0 176 06-15-2025, 04:19 PM
Last Post: j_s
  Mobian Pinephone Notification LED biketool 2 358 06-07-2025, 03:19 PM
Last Post: KC9UDX
  Vivaldi Web browser nearly native for Mobian biketool 3 731 05-06-2025, 02:19 AM
Last Post: biketool
  mobian calamares fail merom 2 800 04-29-2025, 02:10 PM
Last Post: mdk

Forum Jump:


Users browsing this thread: 1 Guest(s)