Configure Routing Table In Such a Way So That We Can Ping Only Google IP Not FaceBook Ip

Himanshi Kabra
3 min readDec 18, 2020

--

ARTH — Task 13 👨🏻‍💻

Task Description📄

🔰 Create a Setup so that you can ping google but not able to ping Facebook from same system

For this task I have a Virtual Machine at my local system , which has IP — 192.168.1.5

# ifconfig enp0s3

Check Route Table rule -

# route -n

In my route table rule first rule is whenever we need to go public world then system will use “192.168.1.5”. But we want that our system only connect to Google not Facebook IP.

* Check Googe is pingable or not — ( It is pingable)

# ping www.google.com

* Check FaceBook is pingable or not — (It is also pingable)

# ping www.facebook.com

Now we have to configure Routing Table Rules -

(A) Delete “0.0.0.0” destination routing table rule -

# route del -net 0.0.0.0 enp0s3

(B) Find Google Server Ips Ranges -

> To know google uses which IP ranges then you can visit this link -

© Add Routing Table Rule For Google IPs -

  • In my case I will only configure rule for one IP Range (“172.217.0.0–172.217.174.255”)
# route add -net 172.217.0.0 netmask 255.255.0.0 gw 192.168.1.254 enp0s3

“192.168.1.254” is my Router or gateway

Now ping to these Google Ip Range Server -

# ping 172.217,174.228

Now ping FaceBook Server Ips -

> To know facebook server Ips visit this link -

I will ping One facebook server “www.facebook.com”-

# ping www.facebook.com

We see our system is not able to ping facebook server ip

Now we have configured routing table In Such a Way So That We Can Ping Only Google IP Not FaceBook Ip

Now our task is successfully done .

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

--

--

Himanshi Kabra
Himanshi Kabra

No responses yet

Write a response