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

Routing Table: In computer networking a routing table, or routing information base (RIB), is a data table stored in a router or a network host that lists the routes to particular network destinations, and in some cases, metrics (distances) associated with those routes. The routing table contains information about the topology of the network immediately around it.

The construction of routing tables is the primary goal of routing protocols. Static routes are entries made in a routing table by non-automatic means and which are fixed rather than being the result of routing protocols and associated network topology discovery procedures.

A routing table is analogous to a distribution map in package delivery. Whenever a node needs to send data to another node on a network, it must first know where to send it. If the node cannot directly connect to the destination node, it has to send it via other nodes along a route to the destination node. Each node needs to keep track of which way to deliver various packages of data, and for this it uses a routing table. A routing table is a database that keeps track of paths, like a map, and uses these to determine which way to forward traffic. A routing table is a data file in RAM that is used to store route information about directly connected and remote networks. Nodes can also share the contents of their routing table with other nodes.

The primary function of a router is to forward a packet toward its destination network, which is the destination IP address of the packet. To do this, a router needs to search the routing information stored in its routing table. The routing table contains network/next hop associations. These associations tell a router that a particular destination can be optimally reached by sending the packet to a specific router that represents the next hop on the way to the final destination. The next hop association can also be the outgoing or exit interface to the final destination.

So for creating a setup that will ping Google but will not ping Facebook the key tool is Routing Table. We can modify the route table to make it to ping Google but not ping Facebook. Let’s see how:

STEP 1 ) Check whether both Google and Facebook servers are ping-able

Lets check IP address and routing table of our machine.

Now we have to check whether we are able to ping to and

Now our machine is able to connect to Google and Facebook server.

STEP 2 ) Restrict local machine from connecting to internet.

Delete route which is responsible for connecting local machine to internet

Now check connectivity

Both the destination is unreachable.

STEP 3 ) Allow local machine to connect with google server

check connectivity

Now connectivity with Google server is working fine. Lets check it with Facebook server.

As we can see the ping command fails while pinging the Facebook server.

This is how we can create a network setup in a system which can block network access to a particular website.

#vimaldaga hashtag#righteducation hashtag#educationredefine hashtag#rightmentor hashtag#worldrecordholder hashtag#linuxworld hashtag#makingindiafutureready hashtag#righeudcation hashtag#arthbylw hashtag#netmask hashtag#routetable hashtag#gateway hashtag#task13

If you find this insightful, please upvote this.

Connect with me on LinkedIn | GitHub




Lifelong learning technologies

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

The Supermassive Black hole at the heart of Agile development

Uncovering the Differences Between VMware ESXi (Free) and VMware vSphere Essentials — Part 1

Daily Devotion Web Scraping Using Python

Autonomous Driving using ROS for Beginners

My experience as GSSoC’21 Participant

How We Can Run GUI Container on the Docker ?

Bi-Weekly Report #5 — Tatag Aziz Prawiro

Microservices APIs

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Arnab Saha

Arnab Saha

Lifelong learning technologies

More from Medium

CIS Controls v8 Overview- Control 04

How to create a Twitter bot in just 10 lines of code

Intel Chips

Things Everyone Needs to Know about Quantum Technology?