Ask the Expert

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.

Requires Free Membership to View

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 first published in October 2003

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: