How to route to Specific Route

RAJNISH MISHRA
3 min readFeb 4, 2021

In this article, we are going to discuss how we can connect to a specific route. We will delete the default gateway and make a customized gateway from which we can ping google but not Facebook.

First I will show you by default my system can go to the internet anywhere on the internet because of destination set to 0.0.0.0

Before pinging we need Google and Facebook server IP.

I am taking it by using nslookup command

Now we will be check if we are able to ping the IP of Google and Facebook

As you can see we can go anywhere on the internet. Now let's manipulate our routing table so that we can ping only google and not other systems.

First I will delete destination 0.0.0.0 so that my system can’t go over the internet.

Now the system is not able to ping anything on the internet.

Here I will add the route to the google server only.

Now I can able ping google but not Facebook.

And as you can see we have done our task successfully, yeah…!!!

I hope the article was able to solve your manual configuration issues. If you have any feedback or suggestion, you can comment below.

You can appreciate the article by giving it a like and posting comments about your feedback here or on LinkedIn.

--

--