Created
April 27, 2022 23:32
-
-
Save tomkimberlin/c7e4f1b60428967238ff8f2903367204 to your computer and use it in GitHub Desktop.
Simple batch script to block an IP address in Windows Firewall
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
| set ip=%1 | |
| netsh advfirewall firewall add rule name="BLOCK IP ADDRESS - %ip%" dir=in action=block remoteip=%ip% | |
| netsh advfirewall firewall add rule name="BLOCK IP ADDRESS - %ip%" dir=out action=block remoteip=%ip% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment