Open
Conversation
these extra arguments are not necessary and can cause unblocking to fail depending on blackholeip used
I have tested using a blackhole IP of 0.0.0.0 on 2008/2008R2/2012/2012R2 and it works in each case to effectively deny network access to the offending IP.
…revents communication with blacklisted IP
Author
|
also just added a whitelist registry entry |
occuring - can't be unblocked without a reboot
- whitelist will now allow basic subnet matching (ie, including 1.2.3 in the whitelist will match IPs from 1.2.3.1-254) - don't block any of the IPs on the local network cards; I have also observed this can sometimes happen in practice and leads to very strange networking issues!
add logging when not blocking system, whitelisted, or NIC IPs
due to Option Explicit script wasn't actually working after yesterday's changes
add options for new settings
Author
|
this script has really been working well so far, can't believe this sort of thing is not built in |
Add Trim() when reading the whitelist, if there is trailing whitespace it will cause all IPs to get whitelisted!
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hi - i made a couple changes which work for me
1 - because i'm disabling advanced f/w i wanted to use route method on newer versions of windows, so i created registry entries to set this as a preference (didn't modify the ADM)
2 - i found that using an IP of 0.0.0.0 as my blackhole IP worked (seems insane of course, but try it yourself and you'll see!) so I made that the default in case it's not defined by the other methods
3 - i changed the route delete command to only refer to the blacklisted IP since this works and the full command doesn't work if I use 0.0.0.0 as my blackhole IP