Guest User

Untitled

a guest
Aug 21st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #
  2. # Blocks list of IP addresses using macOS/BSD PF firewall.
  3. #
  4. # Enable: sudo pfctl -ef ./pf_block.conf
  5. #
  6. # Disable: sudo pfctl -d (completely disable firewall)
  7. # sudo pfctl -f /etc/pf.conf (reset rules)
  8. #
  9.  
  10. blocked_ips = "{ \
  11. 1.2.3.4 \
  12. 5.6.7.8 \
  13. }"
  14.  
  15. set block-policy return
  16. block out proto tcp to { $blocked_ips } port { 80, 443 }
Add Comment
Please, Sign In to add comment