There are two related issues with how magebox handles its pf firewall rules on macOS:
- No automatic install — the two required magebox rules are not added to
/etc/pf.conf during installation. Users must add them manually before the service becomes reachable.
- No boot persistence — after a reboot, the rules are not automatically reloaded. Users must manually run
sudo pfctl -ef /etc/pf.conf each time to restore port forwarding.
Steps to reproduce
- Install magebox on a clean macOS system.
- Attempt to access the service — it is unreachable because the pf rules are missing from
/etc/pf.conf.
- Manually add the two magebox rules to
/etc/pf.conf and run sudo pfctl -ef /etc/pf.conf.
- Confirm the service is now reachable.
- Reboot the machine.
- Attempt to access the service again — it is unreachable until
sudo pfctl -ef /etc/pf.conf is run again manually.
Expected behaviour
The installer should add the required rules to /etc/pf.conf automatically, and a LaunchDaemon should ensure pfctl is reloaded on every boot — no manual steps required.
Actual behaviour
Users must manually add the pf rules before first use, and manually run sudo pfctl -ef /etc/pf.conf after every reboot.
Proposed fix
- Have the installer automatically append the two required rules to
/etc/pf.conf.
- Register a LaunchDaemon plist that runs
sudo pfctl -ef /etc/pf.conf on boot.
Environment
|
|
| OS |
macOS (version 26.4.1) |
| magebox version |
1.15.0 |
There are two related issues with how magebox handles its pf firewall rules on macOS:
/etc/pf.confduring installation. Users must add them manually before the service becomes reachable.sudo pfctl -ef /etc/pf.confeach time to restore port forwarding.Steps to reproduce
/etc/pf.conf./etc/pf.confand runsudo pfctl -ef /etc/pf.conf.sudo pfctl -ef /etc/pf.confis run again manually.Expected behaviour
The installer should add the required rules to
/etc/pf.confautomatically, and a LaunchDaemon should ensurepfctlis reloaded on every boot — no manual steps required.Actual behaviour
Users must manually add the pf rules before first use, and manually run
sudo pfctl -ef /etc/pf.confafter every reboot.Proposed fix
/etc/pf.conf.sudo pfctl -ef /etc/pf.confon boot.Environment
26.4.1)1.15.0