How to create a Setup so that you can ping Google but not able to ping Facebook from the same system

--

Using Network concept Routing Table

I am using RedHat Enterprise Linux 8 for this setup.

I used nslookup to fetch the IP of Google & Facebook.

nslookup www.google.com
nslookup www.facebook.com

To check the routing table.

route -n

Here I delete the default gateway. Default Gateway allows going anywhere on the internet.

route del -net 0.0.0.0

After deleting the default gateway I gave the customize gateway that only connects 216.58.196.0 Network IP only.

It means we can ping only these network IP i.e Google IP.

route add -net 216.58.196.0 netmask 255.255.255.0 gw 192.168.43.1 enp0s3

Whenever we ping Google it will easily connect.

ping 216.58.196.196

Now, if we ping except the network IP that we have given that it will unreachable.

ping 69.171.250.35

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Neeraj Singh Negi
Neeraj Singh Negi

Written by Neeraj Singh Negi

AWS | Openstack | GCP | Ansible | Redhat 8 Linux | Docker | Jenkins | Kubernetes | Hadoop | Python | Machine Learning

No responses yet

Write a response