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

Setting Route Table using network concepts where Google is Pinging but not Facebook

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

Setup

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 0.0.0.0 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 172.217.163.68 netmask 255.255.255.0 gt 192.168.43.112 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