-
-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows deny file #576
Comments
Do you know if this is possible on home/pro as well or only in the server versions? |
I tested this on both Home and Pro using the powershell version and it works. Using the old netsh doesn't work since it doesn't support variables. There is a caveat though and that is the text file lines have to be in CIDR format, 192.168.0.0/22 etc and only works as admin. $IP = get-content c:\temp\ip.txt |
Cool, have you tested it with IPv6 too? This would require yet another output format.... |
I can test that tonight.
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
…________________________________
From: spirillen <[email protected]>
Sent: Tuesday, May 5, 2020 1:34:14 PM
To: mitchellkrogza/Ultimate.Hosts.Blacklist <[email protected]>
Cc: xbbdc <[email protected]>; Assign <[email protected]>
Subject: Re: [mitchellkrogza/Ultimate.Hosts.Blacklist] Windows deny file (#576)
Cool, have you tested it with IPv6 too?
This would require yet another output format....
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub<#576 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOIJZQG4RG2BUGP4WO22Y43RQBS3NANCNFSM4MJATDRA>.
|
Would be great 👍 |
Hey there sorry for the delay. It would be the same command and you can use the same text file, it just has to be in one of these formats: https://docs.microsoft.com/en-us/powershell/module/netsecurity/new-netfirewallrule?view=win10-ps#parameters If I put these in a text file and changing one example of the subnet by network mask: 1.2.3.4 I can run this command: $IP = get-content c:\temp\ip.txt I get the following output showing me they've all been added: $FormatEnumerationLimit =-1 LocalAddress : Any
|
Hey @xbbdc would you be up for writing a little wiki or blog(howto) on this at my site? wiki |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Thanks @stalebot but I want to keep this open for information! |
Hey, i have made a PowerShell script that does exactly that. It can take the enormous list file from Ultimate.Hosts.Blacklist IPs. |
Do it also cleanup old records on each run? |
Yes , there is an "Update" option. As long as you provide it with the correct firewall rule name. |
You can use powershell to import and create a rule to block the IPs.
https://portal.databasemart.com/kb/a327/how-to-block-ip-in-windows-firewall.aspx
The text was updated successfully, but these errors were encountered: