Using the Core-Netwoking,Blocking all the site and allowing only the google.com to connect Internet. Not using firewall.
Problem Statement:
Create a Setup so that you can ping google but not able to ping Facebook from the same system
For sloving the problem statement we need to have some knowledge about networking and In the networking specially we need to have knowledge about subnet.
Subnet:
Subnet is nothing but dividing the big network in the small network.by using the netmask.Basically netmask is help us to dividing the big network in the small-small network by using the CIDR.
Logic
The logic behind, for solving the problem statement is allowing the only google ip ranage network in the system and removing the network that help us to connect whole world.
Step1: Removing the Network that help us to connect whole world.
route -n #checking the route rule.
route del -net 0.0.0.0
Here we are removing the network rule from the router that help us to connect whole world.
Step2 :
Adding the new rule in the router. So host can only connect to the google.com
route add -net 172.217.0.0 netmask 255.255.255.0 gw 192.168.60.1
In the rule basically we are giving the one network range for going out . The range is of google.com website. Also we are providing the gate way to go outside.