Block all connections except one IP
Hello,I'd like to allow my MacBook to connect only with my VPN IP via pf. conf. Block all other connections.What I try to do is.
- Connect with VPN
- Add VPN IP to pf.conf rule
- Enable PF.
I try with multiple tutorials but it seems that I don't get it. Could you please help me write this rule?
EDIT:
I tried with:
block in all
block out all
pass in from <VPN IP address> to any
pass out to <VPN IP address>
It blocks all my internet connection, also VPN.
Posted Jan 7, 2023, 6:51 AM UTC · edited
26