🔰 Create a Setup so that you can ping google
but not able to ping Facebook from same system..
In the first step we check connectivity that our system in pinging to google and Facebook .
With the help this command .
ping www.google.com
We can ping to google successfully .
Now we check connectivity for facebook.
with the help this command .
ping www.facebook.com
we can ping to Facebook
we can connect to Google and Facebook due to one rule that is written in the routing table of our system .
In this rule ,IP of both facebook and google are come in this range .
that’s why we can ping to both google and facebook .
Now we remove or delete this rule from routing table and again check that we can able to ping or not .
we delete this rule with the help of this command .
route del -net 0.0.0.0
Now we manually add the rule in the routing table so that we ping to google not to Facebook
For adding rule in the routing table we use this command.
route add -net 172.217.161.0 netmask 255.255.255.0 gw 192.168.43.1
we added rule successfully in the routing table now we check we can able to ping to google or not
yes we can successfully able to ping to google
we can’t able to ping to Facebook because we don’t any rule about the Facebook IP.