Create a Setup so that you can ping Google but not Facebook from the same system
To do so, we need to modify the routing table of the System.
Routing Table
A routing table is a set of rules, often viewed in table format, that is used to determine where data packets traveling over an Internet Protocol (IP) network will be directed. All IP-enabled devices, including routers and switches, use routing tables.
- Check if there is network connectivity and you can see the system’s IP Address using ifconfig enp0s3 command.
- Then, to see the route table, use route -n command.
3. Find the IP of Google and Facebook using nslookup <domain name>
4. Delete the universal rule using the command route del -net 0.0.0.0 and then check whether it got deleted or not.
5. Create a rule in the Routing Table to be able to ping to Google.
6. Try to ping to Google using the command ping <IP Address of Google that you got in Step 3 (i)>. You will see that the system is able to ping to the Google’s IP Address.
7. Try to do the same i.e. ping to Facebook using the command ping <IP Address of Facebook that you got in Step 3 (i)>. You will see that the system is not able to ping to the Facebook’s IP Address.
Thank you for reading!
Hope it helped you.😀😄