Problem solve Get help with specific problems with your technologies, process and projects.

Blocking an IP address

What is the best way to block an IP address on the Internet? I am using Windows XP Pro with DSL service. That's...

tough to answer without knowing more about what type of communications you're trying to block and why. Generally, the best way to block traffic is to use a firewall. However, low-end firewalls (such as Internet Connection Firewall) are usually not capable of per-IP filtering.

The poor man's way to block an IP is to adjust the routing tables on your computer. The ROUTE command-line tool can do this. This is not an easy tool to use, and making changes to it without understanding routing can cause your computer to lose its ability to connect to the network. With that said, a command such as the following would block communications for the IP address

route –p add MASK METRIC 1 IF 2

You'll need to change the interface number to match your computer's interface, and the destination IP to something on your local network that doesn't exist. Like I said, there's no easy solution.

This was last published in October 2003

Dig Deeper on Windows Operating System Management

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.