Configuring Routing Table to Ping Google but not Facebook

Objective:

🔰 Create a Setup so that you can ping Google but not able to ping Facebook from same system.

Introduction

In our OS, we have a Routing Table that allows us to access the Internet.

A routing table is a set of rules that is used to determine where data packets traveling over an Internet Protocol (IP) network will be directed.

So, for doing this task, we need to edit the routing table so that we can ping Google but not Facebook.

Procedure

Firstly, we are using a Redhat Enterprise Linux 8, running on a Virtual Box. Let’s move forward…

As we can see, we have an entry in the table with Destination=0.0.0.0. This says we have access to the public internet through a Gateway=192.168.43.1 which is the IP of our router.

So, we can ping Google.

And, we can also ping Facebook.

Now the 0.0.0.0 entry is deleted.

As we can see, now we can’t ping both Google & Facebook.

The IP of google.com is 142.250.67.46 (one of the IPs). So we need to add it in a rule.

Now, this rule is added in the Routing Table.

Now, we can ping google.com but cannot ping facebook.com.

This is the end of the demo. Hope this was helpful.

Thanks for reading.

A final year engineering undergrad with a curious mind and filled with positivity. Always open-minded, ready to learn new skills and explore new domains.

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