Closed mwmcode closed 3 years ago
Hi @mcha-dev if you use the app:
killswitch -e
Returns the error ?
hi @nbari the app was working fine. I wanted to switch to doing it manually to have it run on system start.
Try to use the temp rules (/tmp/killswitch.pf.conf
) , after running killswitch -e
, just keep in mind that you need first the VPN up
When I run killswitch -e
the last rule in the output is this:
pass on ipsec0 all flags S/SA keep state
when I change the script to match that ☝️ rule, I keep getting the same syntax error!
after running killswitch -e
what is the output of:
$ sudo pfctl -sr
No ALTQ support in kernel
ALTQ related functions disabled
block drop all
block drop out quick inet6 all
pass inet proto udp from any to 224.0.0.0/4 keep state
pass inet proto udp from 224.0.0.0/4 to any keep state
pass inet from any to 255.255.255.255 flags S/SA keep state
pass inet from 255.255.255.255 to any flags S/SA keep state
pass on en0 proto udp from any port 67:68 to any port 67:68 keep state
pass on en0 inet proto tcp from any to [VPN_ADDRESS] flags S/SA keep state
pass on en0 inet proto udp from any to [VPN_ADDRESS] keep state
pass on en7 proto udp from any port 67:68 to any port 67:68 keep state
pass on en7 inet proto tcp from any to [VPN_ADDRESS] flags S/SA keep state
pass on en7 inet proto udp from any to [VPN_ADDRESS] keep state
pass on ipsec0 all flags S/SA keep state
I tried using the temp configs, no luck
killswitch -e
is loading pass on ipsec0 all flags S/SA keep state
After your VPN is up and running this should be working:
sudo pfctl -Fa -f /tmp/killswitch.pf.conf
Thanks for your reply @nbari
But if it requires VPN to be established then will it still work on system boot up? (I ran into some other technical issues -- not related -- will try your last suggestion and update the ticket).
If you think this is not an issue with the script, should I close this? (feel free to close it yourself if you see fit)
The killswitch
works as expected what you need/want is different:
You always need first the VPN to apply the killswitch not the other way around, I am closing this, for now, feel free to re-open it if requierd.
Hello,
I'm following https://vpn-kill-switch.com/post/pf/ and when I try to load
conf
keep gettingkillswitch.pf.conf:31: syntax error
the last line(31) ispass on $vpn_utun1 all
(removing it solves the issue)full output below:
I'm only changing the initial variables
macOS Big Sur 11.0.1