A set up that could ping google but not facebook from same system

So we’ve gathered here to find how to ping google but not facebook which can also mean to be able to ping only google and block all other IP’s… Let’s get started…
STEP 1:
route -n

this displays your routing table with destination 0.0.0.0 which means you are free to ping any website/any IP. So first step is to delete this entry:
route del -net 0.0.0.0

STEP 2:
Now the next step is to add google IP to our routing table to be able to ping only google and not facebook(/others). So make sure you get your google ip either by using nslookup command or by pinging to google before configuring our route table and then your gateway ip which will be available in your routing table before deleting 0.0.0.0 (in my case which is 192.168.0.1).
route add -net 216.58.196.0/24 gw 192.168.0.1 enp0s3
the above command adds certain range of IP’s along with google IP. We can cross check by using route -n. (enp0s3 — network card name)

STEP 3:
The Last step is to just to review and check.
ping www.google.com

Yes! pinging fine.. Let’s do the same with facebook
ping www.facebook.com


Finally Facebook is not pinging but google!!!
Requirement satisfied!!
Thank you!