Hello Guys, Today I am going to share you, How can you make your computer or network such that it can only ping to google. This type of system is very needful for certain use cases where you want to restrict user of your computer to a certain site.
Ok, So lets start implementing the same system.
Step 1: Open the terminal of your device.
Step 2: Check connectivity to google and other sites first.
Now, Currently our system is working fine and connecting to all websites. It’s time to restrict the access.
Step 3: Look for the routes in routing table and delete the default route.
To see route table use: “route -n”
Command to delete Default route :- “ route del -net 0.0.0.0”
Step 4:- Now try ping to any network, you aren’t able to connect to any network.
Step 5: Now add IP of google in routing table.
To add entry in route table use “route add (IP you want to add) gw(your gateway)”
Step 6: Now you are able to connect to IP but not url.
Step 6: To connect to url you have to add a local DNS entry in your system.
Now this system can only connect to www.google.com , Similarly you can restrict a site by adding reject flag in route add command.
Thanks for reading hope you find this tutorial helpful.