Creating Setup Where Ping can Connect to the Google but not to the Facebook 👨🏼‍💻

Hello Geeks, In this blog, I’m going to customize my system in such a manner that it can be able to ping the Google but not Facebook…

ROUTERS

ROUTING TABLE

Command - route -n :- to check routing table in the system

192.168.42.129 - is the default gateway provided by the router by which can travel to internet world.

Getting IP of Google & Facebook

Commands: → ping www.google.com →ping www.facebook.com

Facebook IP - 157.240.16.35
Google IP - 172.217.160.197

IP ADDRESSES :
Facebook = 157.240.16.35
Google = 172.217.160.196

UNIVERSAL ROUTE RULE (Why we have to delete this ?)

commands -
→ route -n : to get route table information
→ route del -net 0.0.0.0 : removing route rule from table

ADDING GOOGLE IP RULE TO ROUTE TABLE

commands -
→ route add -net 172.217.160.0 netmask 255.255.255.0 gw 192.16842.129 enp0s3

Now Ping to Google and Facebook and see What Happens_?

→ First ping to the Google

ping www.google.com

And now, let’s try to ping to the Facebook

ping www.facebook.com

Thank - You for Reading…