Arth-Task-13

Mdkneema
2 min readMar 10, 2021

--

In this task, we have to create a setup that can ping to google but not Facebook.

  1. The first think we need to do is to check our own routing table first. The command for that will be-

command:- route -n

here, 0.0.0.0 means allow all the IP addresses. this means we care able to ping google as well as facebook without any trouble right now.

we need to remove this rule first.

2. To remove the rule, we need to use the following command-

command: route del -net 0.0.0.0/0

after that we cannot ping either google or Facebook.

3. we need to identify the address range of google so that we can allow to connect to google.

command: ping google.com (from command prompt as currently we do not have any rule on our routing table)

command: ping facebook.com

4. we need to add this rule to the routing table. from the ping command we come to know that the ip address range of google.com is from 172.217.0.0/16 (range) and for Facebook, it is from 31.13.0.0/16. Now, we will add the address range of google.com.

command: route add -net 172.0.0.0 genmask 255.0.0.0 enp0s3

command: ping 172.217.174.78 (or any other google ip what starts with 172)

5. check whether we can connect to facebook or not.

command: ping 31.13.79.35 (or any other facebook.com’s ip).

--

--

Mdkneema
Mdkneema

No responses yet