Create a setup so that you can ping google but not able to ping Facebook from same system Task13
This article is to explain how we can create an interesting networking setup in which only we can reach to google but we cannot reach to facebook.
before start building setup first we need to understand some key points related to this task
What is router
A router is a networking device that forwards data packets between computer networks. Routers perform the traffic directing functions on the Internet. Data sent through the internet, such as a web page or email, is in the form of data packets.
as we are going to use redhat 8 operating system so to handle the router we have "route" command.
what is nslookup
nslookup is a network administration command-line tool for querying the Domain Name System (DNS) to obtain domain name or IP address mapping, or other DNS records.
by using this command we can find IP address using domain name.
what is gateway
A gateway is a piece of networking hardware used in telecommunications for telecommunications networks that allows data to flow from one discrete network to another.
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 and cannot be used.
Task-Description:
??Create a Setup so that you can ping google but not able to ping Facebook from same system.
Let’s begin…?.
Step-1: first check the routing table
In this routing table by default universal Route Rule is created to allow all IP-addresses of any range. that's why we can ping to all the ip address.tep 2: Check Google IP Address using nslookup command. and Ping to google IP.
Google IP address: 172.217.167.46
Step 3 : check the facebook ip and ping to facebook IP.
facebook ip : 157.240.16.35
step 4 : Delete universal Route Rule(0.0.0.0) to allow all IP-addresses of any range, so that system can't ping to any ip address.
step 5: Try to ping google IP address and facebook IP address.
step 6 : Add Route rule in Routing table to allow Google IP Address range, so that we can ping to google.
Now, if you again check and ping facebook and google then, you will be able to ping only google but not facebook because here , we have only allowed facebook ip address range.