Creating a network which can ping to A network(Google) but not to B network (Facebook) from same system
I am back with one more article on the network system which can ping to the google but not to the facebook from the same system.
For checking the IP of the system we have command in the redhat linux is “ifconfig”.
To get the IP address of the Google we can just ping to it. Here, 22.214.171.124 is IP one of the google server.
Same as above we can find the IP address of the facebook by pinging to it.
Here, the IP of facebook is 126.96.36.199
Routing table is the table where the all the routing policies is written.
For checking the routing table we have a command in redhat linux is
First we need to add the route of the google server.
For adding the route of the google server we have a command
route add -net 188.8.131.52 netmask 255.255.255.255 gw 192.168.43.157 enp0s3
Here, enp0s3 is the network adaptor name.
And we need to delete the routing policy to access external world except Google.
Here , we can see that it is pingable to the google but it is not reachable to the facebook server.
That’s it we have achieved our network system.
Thank you for spending your valuable time by reading this article.
I hope it helped you.