Created
March 29, 2026 19:25
-
-
Save shotgundebugging/6b98b6c8fc489a2ded92234df998a1ca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo 'block drop out proto tcp to any port 43' | sudo pfctl -Ef - | |
| # does two things: | |
| #echo 'block drop out proto tcp to any port 43' | |
| # - writes a one-line pf firewall rule to stdout | |
| # - the rule means: drop outbound TCP traffic to any destination on port 43 | |
| # | sudo pfctl -Ef - | |
| # - -f - means “load rules from stdin” because - is stdin | |
| # - -E means “enable pf” if it is not already enabled | |
| # Remove the temporary rule and restore the normal config: | |
| # sudo pfctl -f /etc/pf.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment