Creating a setup →A system can ping to Google but not able to ping to Facebook!

KAVIN KRISHNA PRASAD
2 min readDec 21, 2020

--

  • In this, we are going to set up a VM such that it can connect to google but not to Facebook
  • Let’s jump into the scenario
  • First, let’s delete the rule for connection.
route -n
  • Here we have a rule — dest is neutral IP so that our VM from our gateway can go anywhere in the world.
  • Let’s ping google and Facebook and check our connectivity.
ping google.com
ping facebook.com
  • Now delete the rule in our routing table.
route del -net 0.0.0.0
  • Now let’s create a rule such that only we can connect to google but not to Facebook.
route add -net 142.250.77.0 netmask 255.255.255.0 gw 192.168.43.1 enp0s3
  • Now let’s check our connectivity whether we can ping to google or Facebook or both!
ping google.com
ping facebook.com
we can provide any ip of the google server
  • We can see that we are able to ping to google but unable to ping to facebook.

Thank you everyone for reading!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

KAVIN KRISHNA PRASAD
KAVIN KRISHNA PRASAD

Written by KAVIN KRISHNA PRASAD

Associate Software Engineer @Informatica

No responses yet

Write a response