I know that Windows allow blocking IP addresses through netsh like so:

netsh advfirewall firewall add rule name="Block some stuff" dir=in action=block remoteip=xxx.xxx.xxx.xxx enable=yes

But is there any way to use netsh (or is there any other Windows utility) to block URLs like how ipfw and iptables allows? I know there's wipfw, but I'd like to use something built in if possible.

有帮助吗?

解决方案

Use nslookup to resolve dns/ip of the url and block that ip using netsh. Or, you may add an exception in hosts file in Windows.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top