Shell Script to start pf with Murus Configuration?

Murus
Post Reply
sathomasga
Posts: 2
Joined: Thu Apr 09, 2015 12:03 pm

Shell Script to start pf with Murus Configuration?

Post by sathomasga » Thu Apr 09, 2015 12:15 pm

Ran across Murus recently and it looks very handy. I'm wondering if there's a shell script that could be used to enable the firewall (using the rules defined in Murus) without actually launching the Murus UI? If so, I could set up my login script to only start the firewall if I wasn't connected to my home WiFi network. Thanks

hany
Posts: 482
Joined: Wed Dec 10, 2014 5:20 pm

Re: Shell Script to start pf with Murus Configuration?

Post by hany » Thu Apr 09, 2015 3:26 pm

You don't need to keep Murus open in order to run PF.
Murus provides a way to install its own boot scripts.
Everything is documented in the manual.

sathomasga
Posts: 2
Joined: Thu Apr 09, 2015 12:03 pm

Re: Shell Script to start pf with Murus Configuration?

Post by sathomasga » Thu Apr 09, 2015 6:02 pm

@hany: Yes, I know about the boot scripts, but those don't address my particular use case.

I don't want to always start PF on boot. I only want PF to start if I'm not on my home WiFi network. The boot scripts, AFAIK, don't have an option to start PF or not based on network connectivity.

hany
Posts: 482
Joined: Wed Dec 10, 2014 5:20 pm

Re: Shell Script to start pf with Murus Configuration?

Post by hany » Thu Apr 09, 2015 7:01 pm

sorry for misunderstanding,
yes you can do it tweaking the murus shell script but don't ask me how :) I've never tried it!
Probably you should check your current location using /usr/sbin/networksetup and parsing the result you can tell pf to start or not.
However "Location awareness" will be added in a next murus release.

Post Reply