Search the Community
Showing results for tags 'os x'.
Found 1 result
This hack will create PF firewall rules on mac that will only allow in/out traffic to single IP (TG's VPN server in this case). When disconnect happens, you won't be able to surf, and only pinging that IP works. 1) Open Temrinal and type thisâ€¨ sudo nano /etc/pf.conf Enter your admin password after that, and PF file will open 2) Scroll to the bottom, and add the following at the bottom --------- block out on en0 from 192.168.0.0/16 to any block out on en3 from 192.168.0.0/16 to any pass out quick on en0 from 192.168.0.0/16 to 126.96.36.199 pass out quick on en3 from 192.168.0.0/16 to 188.8.131.52 pass out quick on utun0 from any to any --------- These rules will block traffic on ethernet and on wifi, unless that traffic is going towards 184.108.40.206 (IP of TG's for example) or unless VPN is connected (last line), then traffic is allowed. Here utun0 is name of our virtual VPN adapter, and en0 and en3 are names of ethernet and wifi. You can find out those names by running â€œifconfigâ€ in terminal.â€¨ 3) Enable PF, by running in termial: sudo pfctl -e 4) Load the rules sudo pfctl -f /etc/pf.conf Now if VPN gets disconnected, you won't have access to internet, not counting the IP address specified before 5) To regain Internet access, disable PF in terminal sudo pfctl -d