Creating a setup →A system can ping to Google but not able to ping to Facebook!
- 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.
- 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.
- 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 18.104.22.168 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!
- We can see that we are able to ping to google but unable to ping to facebook.
Thank you everyone for reading!