Network topology where you can ping to google but not Facebook

Akhil
3 min readMar 14, 2021

The default way of checking the internet is pinging to www.google.com. If it goes well then you are able to surf the whole internet. But if you have ever been to college, then you might have experienced that you cannot open certain sites. So to say the ban sites.

Lets see what could be simple topology for accessing internet and not certain sites. We are taking an example where one can access google but not facebook.

We are using RHEL 8 : terminal.

#ifconfig // to know what your IP, getway, and NIC(network card): ens0p3

#route //to check the routing table, this will tell you where all you possible connect and in what path (route)

#ping facebook.com #ping google.com

Now look carefully at the route table, the destination is default (IP 0.0.0.0)

Genmask:-used to give network name and help how much IP we can use

route table:-Help to define where to go and where to not

Gateway:- it is a path that changes source IP so that we can go to isp because we can not go to isp using private IP.

Note if you are using the rhel8 cli version then to use the below command you need one software called net-tools you can download that from yum or DNF from the command:-

#yum install net-tools

Delete ‘default’ from the route table using

#route del -net IP (ip[you want to delte from route table])

Now we are going to add an IP range for google using command

#route add -net (ip[change with yours]) (netmask netmask[change with yours]) gw(gateway[change with yours]) network card name

Will tell you why we added IP range, note that the genmask is 255.255.255.0 and the gateway is our system’s(rhel) gateway (known while doing ifconfig)

Now ping again

Yes, google.com is also not reachable, but 8.8.8.8(Google’s one of the many IP) is connected. DNS wont work, but will be only accessed through IP only. Also Facebook wont be accessible at all

This is a small example of netting tools, this is executed at very detailed and deep level to control our urges by the administration and government.

Meet you in the next blog, Till then keep the claps coming.

--

--