Creating a setup such that you can ping to google and not facebook from the same system
Let’s see the routing table using the command:
We see that there is a rule in the routing table for destination 0.0.0.0 which means that your system can reach any other system
So, we are able to ping
www.google.com and www.facebook.com
Lets’s delete that rule from the routing table using the command:
route del -net 0.0.0.0
Now u will NOT be able to ping google and facebook.
It says “Network is unreachable” since there is no rule specified in the routing table
Now create a rule in the routing table to add the destination network address of GOOGLE SERVER
route add -net 18.104.22.168 netmask 255.255.255.0 gw 192.168.0.1
Now you can see that you are able to ping google and not facebook
!! Now we have created a setup such that you can ping to google and not facebook from the same system !!