r/PFSENSE•
keramxd

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.

  1. Connect with VPN
  2. Add VPN IP to pf.conf rule
  3. 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
Loading comments…