A setup where you can ping to Google but not to Facebook.

What is Routing?

Routing is a mechanism that allows a system to find the network path to another system. A routing table is a data table stored in a router or a network host that lists the routes to particular network destinations, and in some cases, metrics (distances) associated with those routes.

Switch to the practical part

First, let’s print the routing table in our Linux OS:

route -n

Here (in the image above), you can see that the gateway is configured already and the OS connected to the internet. To check if our OS is connected or not, we can ping to Google.com

ping google.com

In the above image, you can see that our system is working perfectly fine and it is able to ping Google.com. Similarly, let’s ping to facebook.com to see if it can ping to facebook.com or not.

ping facebook.com

Now, everything is fine and working as expected.

Firstly, we’re going to delete the default gateway from the routing table.

Now, one record of the routing table is deleted successfully.

Now, we’ll add one rule in the routing table through which it can ping to google.com only.


We’ve configured our system (Linux OS) such that it can ping to google.com but not facebook.com by doing some modifications in the routing table.

Cheers to reading!

Hey Everone, I am DevOps Practitioner, Cloud Computing, BigData, Machine Learning are my favorite parts. Connect me on LinkedIn to know more about me.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store