An Interesting Network setup which will be able to ping GOOGLE but not FACEBOOK over same system
Ever thought that is it possible from same system at the same time to connect to GOOGLE but not to FACEBOOK ?
In today’s fast-growing changing world, the definition of computer networks has changed a lot. It is not only an interconnection. It is beyond that.
By using simple networking concepts, we can achieve a lot in today’s fast-growing changing world.
In this article, We are going to create a Setup so that you can ping google but not able to ping Facebook from the same system
A few terms to be known for achieving the goal :
- Routing table — It contains the information necessary to forward a packet along the best path toward its destination. Each packet contains information about its origin and destination. It provides the device with instructions for sending the packet to the next hop on its route across the network.
- Netmask — a 32-bit “mask” used to divide an IP address into subnets and specify the network’s available hosts. In a netmask, two bits are always automatically assigned.
For example, in 255.255. 225.0, “0” is the assigned network address.
- Default gateway — It is the path used to pass information when the device doesn’t know where the destination is. More directly, a default gateway is a router that connects your host to remote network segments.
It’s the exit point for all the packets in your network that have destinations outside your network.
The Step-by-Step Procedure:
Step-1: Firstly, We consider a system having private IP 192.168.43.134. To check the IP of our system, we use “ifconfig” command. And if we want to check the public IP of our router, head over to google.com and search “what is my ip ?”. The netmask 255.255.255.0 tells us that 256 IPs can come under this network range and our IP is in this range.
Step-2: Now we will check the pinging status of GOOGLE and FACEBOOK by their dns names as well as by their IP’s.
Step-3: Now we will check the routing table. Here we can see a default gateway is present which allowed us to ping to both the sites.
Step-4: Now we will delete the default gateway and check whether the sites are pingable or not.
Step-5: Now we will add new rule in the route table with the IP of Google and provide a netmask and a gateway so that we are able to ping to GOOGLE and not FACEBOOK.
Step-6: Now we will check whether we are able to ping Google.
Step-7: At last, we have to check is Facebook or not.
Woohoo! It’s not pinging. Finally we achieved our goal.
Thank You!!