Unlike the Linux operating system Windows does not provide a facility to send an IP route to Null.

You can however get a similar result as follows:

Windows XP, Server 2003

From a command prompt (start > run > cmd)

route add X.X.X.X mask Y.Y.Y.Y Z.Z.Z.Z metric 1 -p

Where X.X.X.X and Y.Y.Y.Y is the IP range and subnet mask you wish to Null route and Z.Z.Z.Z is a spare unallocated IP address on your local network. For example, if you wish to Null route the IP address 8.8.8.8 and you have a spare unallocated IP address of 192.168.1.123 on your local area network then you would enter:

route add 8.8.8.8 mask 255.255.255.255 192.168.1.123 metric 1 -p

Windows 7, Server 2008

The best method to Null route is to add a deny statement to the windows firewall for the given IP address range. However, in certain situations you may not be using the Windows Firewall but you can again get a similar result with the following method:

From a command prompt (start > run > cmd)

route add X.X.X.X mask Y.Y.Y.Y Z.Z.Z.Z if 1 -p

Where X.X.X.X and Y.Y.Y.Y is the IP range and subnet mask you wish to Null route and Z.Z.Z.Z is the default gateway of your network card. For example, if you wish to Null route the IP address 8.8.8.8 and your default gateway address is 192.168.1.123 on your local area network then you would enter:

route add 8.8.8.8 mask 255.255.255.255 192.168.1.123 if 1 -p

This works by fooling windows into sending packets via the internal interface, thus when you perform a ping test to the destination IP you have blocked, you will see a “general network failure” message. You cannot use the Windows XP / Server 2003 method as later versions of windows include Dead Gateway Detection that will automatically send traffic via the default gateway when the static route’s gateway is inaccessible. Dead Gateway Detection is similar to an ICMP redirect message but cannot be turned off.

NB: -p instructs windows to make this a persistent static route meaning the routes will be preserved even after a reboot. You can remove a route by using the command route delete IP X.X.X.X where X.X.X.X is the IP address / subnet you wish to delete.