How one System can Communicate with Google, but not with Facebook!!

Priyanka Gavali
3 min readFeb 24, 2021

Hello Guys,in this Article am going to set the connection which can connect to Google but Unable to Connect to Facebook

How to do this Set Up??

With the help of Routing,Gateways ,Netmask or Genmask Concepts in Networking World we can do this Task.

What are the Routing Tables??

A Routing Table is a set of rules, often viewed in table format, that is used to determine where data packets traveling over an Internet Protocol (IP) network will be directed.To Create the Network Packets over any specified Destination we have to entry that Destination Into Routing Tables.All IP-enabled devices, including routers and switches, use Routing Tables for Connectivity.

What is Internet Gateway??

A gateway is a node (router) which is the Internet Service Provider that gives you access to the entire Internet.Ex.If we are getting internet connectivity from android hotspot then that device act as router for us.

What is Netmask??

A Netmask is a 32-bit “mask” used to divide an IP address into subnets and specify the network’s available hosts. In a netmask, two bits are always automatically assigned. For example, in 255.255.225.0, “0” is the assigned network address. In 255.255.255.255, “255” is the assigned broadcast address. The 0 and 255 are always assigned which cannot be used for connectivity.

Let,s See How to do this Task…

◼Initially, Check the Connectivity to both Google and Facebook

◼Both are pinging fine !!Check the Routing Table with Command ➡

route -n

◼Now delete the default gateway using ➡

route del -net 0.0.0.0 

◼Check the address of Google Site using command <nslookup> install bind-utils package for this command if it is already not present➡

nslookup www.google.com

◼As shown in above image, ip address of google is “216.58.196.68” add this address of Google to Route Table ➡

route add -net <ip>  netmask <netmask> gw <gateway> <network_card>

◼Now Check Connectivity to the both sites by pinging➡

My System is pinging with Google very fine but Facebook is not able to ping!!

◼Another Way to do this task is to make change in’ /etc/hosts’ file as shown in following image ➡

This will block the “Facebook.com”

So, in both ways we can do this Task !!

Thanks For Reading the Article!!

--

--