Creating a setup such that you can ping to google and not facebook from the same system

Vijaya Madhuri T A
2 min readMar 15, 2021

Let’s see the routing table using the command:

route -n

We see that there is a rule in the routing table for destination 0.0.0.0 which means that your system can reach any other system

So, we are able to ping

www.google.com and www.facebook.com

Lets’s delete that rule from the routing table using the command:

route del -net 0.0.0.0

Now u will NOT be able to ping google and facebook.

It says “Network is unreachable” since there is no rule specified in the routing table

Now create a rule in the routing table to add the destination network address of GOOGLE SERVER

route add -net 142.250.67.0 netmask 255.255.255.0 gw 192.168.0.1

Now you can see that you are able to ping google and not facebook

!! Now we have created a setup such that you can ping to google and not facebook from the same system !!

--

--