🔰 Create a Setup so that you can ping Google but not able to ping Facebook from same system.
In our OS, we have a Routing Table that allows us to access the Internet.
A routing table is a set of rules that is used to determine where data packets traveling over an Internet Protocol (IP) network will be directed.
So, for doing this task, we need to edit the routing table so that we can ping Google but not Facebook.
Firstly, we are using a Redhat Enterprise Linux 8, running on a Virtual Box. Let’s move forward…
📝Checking the Routing Table
As we can see, we have an entry in the table with Destination=0.0.0.0. This says we have access to the public internet through a Gateway=192.168.43.1 which is the IP of our router.
So, we can ping Google.
And, we can also ping Facebook.
📝Deleting this rule from the Routing Table
Now the 0.0.0.0 entry is deleted.
As we can see, now we can’t ping both Google & Facebook.
📝Writing a new rule
The IP of google.com is 188.8.131.52 (one of the IPs). So we need to add it in a rule.
Now, this rule is added in the Routing Table.
📝Checking the Ping
Now, we can ping google.com but cannot ping facebook.com.
This is the end of the demo. Hope this was helpful.
Thanks for reading.