IP Address RoutingLearning Route.exeLet us note that as a result our previous configuration steps our computer now has two IP addresses as shown by the output of ipconfig.exe in the screen below. Similar information can be viewed with winipcfg.exe 0 Ethernet adapter displays our Internet IP address.
Learning how to route... Windows has an MS-DOS executable called route.exe and it's this program that offers us the ability to block direct IP connections with our operating system by adding IP addresses to the routing table. Like the hosts file our route file is also an ASCII text list that can be shared with others. Once a list is made we don't need to enter IP addresses by hand again. The list is portable from one computer to another and all that need be done is use the text editor's search and replace feature to insert the correct IP address. Like the hosts file, the route file we are about to create offers system wide protection and is not program particular. IP routing doesn't require the need to run concurrent software because it's part of Windows networking and operating system. For the purpose of this demonstration we're going to block access to three of my
favorite sites. We are going to create a text file and I'll show you the syntax and procedures necessary for you to create your own text files. For the purpose of this demonstration let's call this file doroute.bat. We will create it with our text editor.
Now for an explanation of the above file.
After you've created and saved your file you can run this batch file at the command prompt or run it by double-clicking on it. After you've run doroute.bat you can verify that the entries were added to the routing table. To view the routing table open an MS-DOS window and type route print at the command prompt. Hit the enter key and MS-DOS will display the routing table for you. Notice in the screen below that the IP addresses we entered in our file are displayed in the routing table.
Now it will be impossible for our computer to establish a connection with www.pyrenean.com, www.grc.com or www.pacificnet.net. Suppose we wish remove these entries from our routing table in order that we can access the above sites. This is as easy as it was to add the entries all we need do is create a batch file to remove the entries. See sample file below.
When we double-click on noroute.bat the entries will be removed
from the Routing Table. Let's go to the MS-DOS prompt and see if it
actually worked.
It worked! As you can see by the routing table the blocks have been removed. We can now access the previously blocked sites. proceed to the Next Chapter |