Wait ! what ? is it really possible to ping Google but not Facebook at the same time with the same System ??
well it is absolutely doable using firewall setting modify your firewall and then this task is quite simple for the user but i have something new for you….!
i’ll modify my routing file for this task , i am going to use redhat version 8 to accomplish this task.
let’s have a look on routing table
What is Router ?
A Router is a networking device that usually use to connect two or more than two different networks. This is the one which forwards data packet between different devices. For example, a router provides you internet access by connecting your LAN with the Internet.
Whenever a node sends data to another node on the network, it must first know where to send it. If the node is not directly connected, then it sends it via other nodes along a route to the destination node. Each node needs to keep track of way to deliver data, and for this, it uses a routing table.
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.
This route table gives information of Destination IP, Gateway, Interface, Netmask, metrics, etc.
If we remove the first line of the routing table, we aren’t able to connect to the internet. So let me show my demo now…
-> Finding the IP of Google server:
For this, we use nslookup command…
Editing my routing table:
First I delete the row of routing table, which I use to connect to the Interet.
Now If I try to connect to the Internet, It never connects.
So let me add Google IP (which we find in the upper step) in routing table, so that we can connect to Google only.
Check it is pingable or not:
And let me find out the IP of Facebook/any other site and try to ping that…
You can see that it is not pingable…
by using this method you can easily block any website and allow to open in the system.
task completed…..
to know more connect me on linkedin and you can also share your review.. thank you for your attention.