Creating a Setup that can ping google but unable to ping Facebook from same system

Creating a Setup that can ping google but unable to ping Facebook from same system

In this article, I'll show you how does we can manipulate routing table of a system so that our system can ping to Google but unable to ping to the FaceBook or anyother website.

In this practicle I'm using RHEL-8 Operating System running on Oracle VirtualBox VM.

  • Lets Find the Gateway ID of the system first.
No alt text provided for this image
  • Now Lets find the IP Address of Google and FaceBook using nslookup command.
No alt text provided for this image
  • Checking up my RHEL-8 OS is pinging to Google and FaceBook.
No alt text provided for this image

Here you can see that we are able to ping to Google and FaceBook both.

No alt text provided for this image
  • Initially route table shows system can access any website in the world as you can see in this picture, which can be defined by destination ip (0.0.0.0)
  • Now we use below command for manipulate the routing table.
route del -net 0.0.0.0   (For Deleting access point or disconnecting system  
                                         from outside world)


route add -net 172.217.166.0  netmask 255.255.255.0 gw 192.168.0.1 enp0s3 
  (Adding access point for the system to access only Google )
No alt text provided for this image
  • As you can see access point to the internet world is deleted by using one of above command.
No alt text provided for this image
  • Access point for Google server is created in routing table by using one the command given above step for adding new new IP.
  • Now Lets's check wheter it is able to ping to Google and FaceBook.
No alt text provided for this image
No alt text provided for this image

By this way we can create a setup so that we can ping google but unable to ping Facebook from same system or operating system.

Thanks For Reading.....

No alt text provided for this image

Linkedin Profile -


要查看或添加评论,请登录

Mohit Singh Tomar的更多文章

社区洞察

其他会员也浏览了