🔰 How to create a Setup so that we can ping google but will not able to ping Facebook from the same system 🔰

Aditya N
2 min readMar 7, 2021


In this article, we will be seeing how to create the above-mentioned setup by using complete Networking principles.


In which we can see the route table present in our VM which will allow or act as a gateway to carry our request over the Internet. we can see it using the command : route -n

we would able to see that our VM is able to ping both google and Facebook with the current working setup.

Now we will Delete the gateway so that the range of IP address that comes in that range will be Unreachable. now when we try to ping either Google or Facebook will be Unreachable.

Here we can confirm that Google is Unreachable.

Now by adding a Rule to our Route Table we can able to Ping Google by using

Command: route add netmask gt enp0s3

where enp0s3 refers to our NIC card a

gt is the Internet gateway

Viola !! Now we will be able to ping to Google but not to Facebook

Thank you 🙂