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

In this article we will try to find the solution to the above mentioned problem statement without using the firewall and just simply by applying some constraints in our routing table.

So first of all let us have a look at our routing table

And see whether we can ping both Google and Facebook

We can see the IP Address and other details of and using the command nslookup

Now we can delete the destination rule of due to which we can ping any IP on internet and just add the Google IP which we got using nslookup command.

Now the current setup will help you to only ping Google from your system and no other IP including Facebook

As we can the ping Google’s IP address while the network is unreachable for Facebook, we have successfully accomplished the task.

That’s all folks. Thanks for reading :)

Devops Enthusiast