Setting up the System so that it can ping to Google but not to Facebook from same.

🔘Goal for this blog:

🔅Create a Setup so that you can ping google but not able to ping facebook from same system

We can do it by using firewall or security group but here we are going to use the firewall instead we make use of route table so lets directly move to the practical part.

firstly we delete the route information of the internet from system using following command

#route del -net

checking IP of the system using following command


now find the ip of google using nslookup command


let’s check if we can ping to google or not

So we can see we don’t have the connectivity to the internet, now let add routing path for the google so that we can ping to same

To add the routing path use following command:

now we can ping to google

Finally we achieved the task that we can ping to google but not to facebook




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store