How to ping Google but not Facebook from the same system?

Ishita Mittal
3 min readMar 15, 2021

Step by step walkthrough:

  1. Open the routing table to check the rules available using the command “route -n”.

=> A routing table contains the information necessary to forward a packet along the best path toward its destination.

2. Delete the rule to go anywhere over the internet using the command “route del -net 0.0.0.0”.

=> We can notice from the routing table that the rule to go anywhere over the internet has been successfully deleted.

3. Check the network name for Google and Facebook using the command “nslookup domain_name”.

4. Check the connection using ping command.

=> We can see that both the websites are currently unreachable.

5. Add a rule in the routing table to connect to Google.

=> We can see from the routing table that the rule to connect to google has been successfully added.

6. Check the connectivity to Google.

=> We can notice that after adding the rule in the routing table, we can now successfully ping google.

7. Check the connectivity to Facebook.

=> Since there is no rule to connect to facebook in the routing table , we can’t ping facebook.

Therefore, we were successfully able to create a setup in which we were able to ping Google but not Facebook from the same system.

I hope this article helped you to learn some interesting concepts of networking.

THANK YOU!!

--

--