Networking

Networking

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

No alt text provided for this image

Here you can see my IP address , netmask as 255.255.255.0 it means it can connect to 256 IP address to it.

No alt text provided for this image

route -n command is used to see rules inside routing table. Here rule number first that has Destination as 0.0.0.0 and netmask/genmask as 0.0.0.0 it means that it can connect to all the ips in the world. Our aim is to create rule that we are able ping google but not facebook. So we have to delete this rule.

To delete this rule we have command

route del -net 0.0.0.0

No alt text provided for this image

We have deleted the rule.

No alt text provided for this image

To know ip address of facebook and google we can use nslookup command.

We need to create rule to add for range of ip address of google. To create rule syntax

route add -net <network name> netmask <netmask> gw <internet gateway> network card

We can decide network name of google by ie IP by deciding netmask , we select 255.255.255.0 then network name of google is 172.217.27.0. Gateway of my system is 192.168.225.1 and network card is enp0s3. From above information we can create rule to ping google.

No alt text provided for this image

In above image you can see command to create rule and in routing table rule is created.

Now lets see we can ping google or not.

No alt text provided for this image

Here you can see that we are able to ping google.

Now lets can we ping facebook or not.

IP of Facebook is 69.171.250.35.

No alt text provided for this image

You can notice here that we are not able to ping facebook.

So we have achived our goal.

Thank You!!!!


To view or add a comment, sign in

More articles by Sairaj Sarde

  • JENKINS

    What is Jenkins? Jenkins is a free and open source automation server. It helps automate the parts of software…

  • Configuring Httpd Server On Docker Container

    TASK Configure httpd server on docker container Creating container Command: docker run -it --name conatiner_name…

  • Azure Kubernetes Service (AKS)

    What is Microsoft Azure? Azure is a public cloud computing platform—with solutions including Infrastructure as a…

  • What is Kubernetes, its need and case studies

    What is Kubernetes? Kubernetes (also known as k8s or "kube") is an open source container orchestration platform that…

  • Benefits of using Ansible.

    What is Ansible ? Ansible is an open-source software provisioning, configuration management, and application-deployment…

  • CONFIGURING WEBSERVER THROUGH AWS CLI

    TASKS TO BE PERFORMED Webserver configured on EC2 Instance - Document Root(/var/www/html) made persistent by mounting…

  • AWS CLI

    What is AWS CLI? The AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. With just one tool…

  • Benefits of ML

    Have you ever heard the term AI/ML?? These are the most trending words now a days. Everyone is talking about these…

  • BIGDATA

    What is Big Data? Big data usually includes data sets with sizes beyond the ability of commonly used software tools to…

  • Case study of Netflix using AWS cloud platform

    Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud platform, offering over 175 fully…

Others also viewed

Explore content categories