Networking Task: ping google
but not ping facebook from the same system

Arjun Singh
3 min readMar 14, 2021

In this blog, I have shown how to create a Setup so that you can ping google
but not able to ping Facebook from the same system.

Photo by Tech Daily on Unsplash

In this task, I have used RedHat Enterprise Linux 8 Operating System Virtual Machine with Bridged Adapter network settings as shown below.

First, I am finding the IP address of google.com and facebook.com using the Linux command:

nslookup

Hence, IP addresses are as follows:

www.google.com → 172.217.167.4

www.facebook.com → 69.171.250.35

Our aim is to create such a setup where pinging Google is possible but not pinging Facebook.

For this, we take the help of the Routing table of the system. We have heard that there is a Routing Table in routers, but in reality, every system (OS) has a routing table. So, we would do manipulations on the routing table of our VM and create the setup.

Let’s first check if we can ping Google and Facebook or not using their IP addresses.

Now let’s check our routing table with command route -n

Here, to connect to the outside world, we have a Gateway (which actually is my Mobile Hotspot acting as the router) with IP 192.168.43.1

If we remove this routing table, then we won’t be able to reach the outside world, and connectivity to both Google and Facebook will be lost.

Now if we ping google and facebook, both the IP addresses become unreachable.

Now, for our aim, we can add the route for google’s IP address

Now what we wanted, we have achieved. We can ping Google, but not Facebook.

This is how we can simply create the setup using the power of the Routing Table.

Thank You…

#vimaldaga #righteducation #educationredefine #rightmentor #worldrecordholder #linuxworld #makingindiafutureready #righeudcation #arthbylw #netmask #routetable #gateway

--

--