Add www.site.com to windows firewall with a click?

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,716
47
Albuquerque, NM
prospero.unm.edu
#5
Here's a cheap and easy approach:

Code:
C:\>ping www.site.com

Pinging www.site.com [204.74.99.100] with 64 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 204.74.99.100:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)

C:\>echo 127.0.0.1     www.site.com >>! "%systemroot\system32\drivers\etc\hosts"

C:\>nbtstat -R
    Successful purge and preload of the NBT Remote Cache Name Table.

C:\>ping www.site.com

Pinging www.site.com [127.0.0.1] with 64 bytes of data:

Reply from 127.0.0.1: bytes=64 time<1ms TTL=128
Reply from 127.0.0.1: bytes=64 time<1ms TTL=128
Reply from 127.0.0.1: bytes=64 time<1ms TTL=128
Reply from 127.0.0.1: bytes=64 time<1ms TTL=128

Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
Approximate round trip times in milliseconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\>
I'm pretty sure you need to be running as admin to do this.