• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

how can I deny access to an ipaddress in windows?

mcveigh

Diamond Member
I thought I could do it in my router (wrt54g) but it seems to only want domain names.
say I want to block all traffic to 192.168.1.2...any ideas?
 
If you want to do it on just one computer, you edit the HOSTS file located at c:\windows\system32\drivers\etc and set 192.168.1.2 to point back to itself.

add a line like this:

192.168.1.2 localhost
 
no luck..i may be wrong but if it's an ip address I am trying to block wont it go directly to the address b/c it has no need of the hosts file or DNS?
 
Do you want to block all traffic TO the internet FROM 192.168.1.2? Or TO 192.168.1.2 FROM the internet? Or TO 192.168.1.2 FROM the rest of the netblock? 😛

Try putting in an IP address where it asks for a domain. It might work. 🙂
 
Do you want to block all traffic TO the internet FROM 192.168.1.2? Or TO 192.168.1.2 FROM the internet? Or TO 192.168.1.2 FROM the rest of the netblock?

I suppose I should have asked that as well. If you want to block both ways, you'll probably have to do it at the router. At least that would be the logical and easiest place. Unless if the router isn't going to cooperate...
 
I would think most entry level routers will only block specific domains for the entire network, not just one IP. Unless you want to install software on that comp this would defiantly need to be set in the router.
 
The best way to do this is to add static routes to your machine. Let's say you want to block access to 100.10.20.30 from your PC.

First, get your local IP address with "ipconfig" from the command line. Let's say it.s 192.168.0.100. You need to pick, at random, another IP address on this network that's not in use. In this case, pick 192.168.0.222.

And the command line, enter:

"ROUTE -P ADD 100.10.20.30 MASK 255.255.255.255 192.168.0.222"

Here's how this decomposes.

ROUTE - The command to view or edit your static routing table
-P - Make it a persistent route that re-loads on reboot
100.10.20.30 - The IP address being blocked
MASK - Says the next number coming is the subnet mask
255.255.255.255 - Subnet mask for an individual IP address instead of a network
192.168.0.222 - The place the traffic for this IP should be sent (called the gateway). In this case, we use a bogus IP address on your local network so that the traffic just dies.

Should do exactly what you want. If you want to remove it, do a "ROUTE DELETE 100.10.20.30"

- G
 
Back
Top