A Network Setup, Ping ONE but not the OTHER

Hello Everyone, In this Article, we will setup a network such that it will ping to Google servers, but it will not ping to Facebook servers.

For the Above mentioned setup we will be using Linux(RHEL Distro).

At First, we need to check our routing table. For that the command is:

  • "route -n"
No alt text provided for this image

After having checked the routing table, we will also check and note the IPs of Google and Facebook Servers. For this we will simple use the nslookup program as:

  • nslookup google.com
  • nslookup facebook.com
No alt text provided for this image
No alt text provided for this image

We'll also check if both of them are now ping-able or not,

  • Google Server
No alt text provided for this image
  • Facebook Server
No alt text provided for this image

For disabling the connectivity to outside world, we will first remove the default gateway, i.e. 0.0.0.0 from the routing table. NOTE: After removing the default gateway the system will not be able to connect to the outside world.

Command for removing default gateway:

  • route del -net 0.0.0.0
No alt text provided for this image

we will now add google server's IP to the routing table with the command:

  • route add -net 172.217.150.0/24 gw 192.168.100.1
No alt text provided for this image

Now Ping Google with its IP address:

No alt text provided for this image

As you can see, it's successful, We can ping Google Server.

Now try pinging the Facebook Server, it will give an error like this:

No alt text provided for this image

The Setup is successfully completed where we can ping 1 IP but cannot ping the OTHER IP. Thanks for reading this article.

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

Charan V.的更多文章

  • K Means Clustering UseCases in Security Domain

    K Means Clustering UseCases in Security Domain

    Introduction K Means Clustering is an Unsupervised Machine Learning. It is one of the simplest and popular unsupervised…

  • Deploying a ML model inside Docker

    Deploying a ML model inside Docker

    In this blog, we'll be talking about deploying a trained Machine Learning Model inside a Docker Container. So, for…

    2 条评论
  • Integrating LVM with Hadoop

    Integrating LVM with Hadoop

    Hey Everyone, in this article we will learn how we can provide elasticity to our datanode's storage. First of all, we…

  • 1: Configuring the Webserver On a Docker Container

    1: Configuring the Webserver On a Docker Container

    In this article, we will be discussing about how to install and configure HTTPD WebServer on a Docker Container Image…

  • AWS CLI Infrastructure and Using CMD to launch and manage Instances

    AWS CLI Infrastructure and Using CMD to launch and manage Instances

    Here, in this post, I'll let you know how to use aws-cli to launch and manage AWS services with very ease. Today, I…

  • What is BigData in Layman's Language

    What is BigData in Layman's Language

    BigData Problem Hey Everyone.! So I've just started a research on data like how much data does same company works per…

社区洞察

其他会员也浏览了