Routing Table task-13

🔰 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 = 142.250.71.46

Note > ip of facebook server = 69.171.250.35

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 .

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store