To Create a setup so that you can ping google but not able to ping Facebook from same system
Pinging an address or IP is nothing but to check Connectivity between the two nodes
To perform this setup,Let us delete 0.0.0.0/0 that is predefined rule to connect all the systems
- Delete the rule in the routing table(0.0.0.0/0)
Now you can’t receive any packets from other systems locally or through Internet
2. To ping Google website,Get the IP address using “nslookup” command
Now you can see the IP address of “www.google.com”
IP address of www.google.com is 172.217.166.100
If u ping the obtained network address, the network is unreachable
3. Add the rule in routing table with the dest IP, netmask and provide the Internet Gateway of your router
You can see the rule is attached to the routing table
4. Ping the IP obtained from www.google.com(i.e: 172.17.0.0)
We are able to see the packets received and network connectivity is stable
6. Get the network IP of facebook using same nslookup command
We can see that network is unreachable when you ping Facebook and hence we practically proved that, You can ping google but can’t ping Facebook from the same system