🔰 Create a Setup so that you can ping google
but not able to ping Facebook from same system
Using route table rules to control networking in linux , using route tables and creating rules such that we can ping google but not facebook .
Lets start ,
In the above ss we can see that we can ping to google and facebook easily .
Note > ip of google server = 126.96.36.199
Note > ip of facebook server = 188.8.131.52
To see the route table rules use these cmd here we can see 1 rule for 0.0.0.0 its for our computer to reach all the ip’s in the world .
Deleting 0.0.0.0 default rule of route table now we cant connect to any ip .
Google facebook etc cant be reached now .
Also adding route rule for ip of google along with netmask and gateway ip and NIC card .
We can see the rule added for ip of google server
Now we have connectivity to google server and not for facebook server .
Thank you .