Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Latest commit

 

History

History
73 lines (52 loc) · 3.12 KB

ex_05.md

File metadata and controls

73 lines (52 loc) · 3.12 KB

Exercise 05

Part A

Choose a website that you visit often (e.g., Facebook.com or Amazon.com). Analyze the routing toward such servers, e.g., by using tracert (on Windows) or traceroute (on Mac) from a Bash shell. Look at some of the IP addresses on the router path, and check their owners and locations by using websites like www.iplocation.net.

Part B

Have a computer connected to the internet (e.g., via WiFi). Find out the local IPv4 address for such machine, which will be something like 10.32.0.1. You can either do it via the GUI in your OS, or by running on Bash shell ipconfig (on Windows) or ifconfig | grep inet on Mac.

Install WireShark on your machine. Start analyzing the traffic on your network card. In particular, use a filter like ip.src == 10.31.0.1 && tcp (replace with your actual IP) to check the outgoing TCP messages. Look at the destination IP addresses of some of the outgoing messages, and check them with www.iplocation.net.

Part C

For this exercise you need two machines (e.g., two laptops) and a smart-phone (eg, iPhone or Android) that can connect to internet without need of WiFi. This exercise is best to be done in group. You also need to be able to connect all these devices to the same WiFi.

On the first machine, which we will call A, have WireShark installed, and run the web application from previous exercise via Docker. Verify you can access such web page via a browser by using either localhost or 127.0.0.1 as URL.

Find out the IP address of A, which we identify here in this exercise text as ip(A), e.g., ip(A) = 10.31.0.1.

By using docker ps, make sure that your running image is binding to 0.0.0.0:80 -> 80/tcp. Verify that you can access such web page even when you type ip(A) in the URL.

If you have a firewall on your machine (e.g., likely Windows will have Windows Defender Firewall on by default), then disable it. However, remember to ENABLE it back once you are done with this exercise.

On the second machine which we call B, do a ping from Bash shell toward the IP address ip(A). Make sure of course that both A and B are connected to the same WiFi. If everything is correct (i.e., you are using the right IP addresses and no firewall is interfering), then the ping should be successful. Also ping B from A.

On B, in the browser connect to ip(A). You should be able to see the web page served by A.

On A, with WireShark, verify that you can see the messages incoming from B. You can use a filter (e.g., ip.dst == ip(A) && ip.src == ip(B) && tcp) to focus only on those messages.

Use a mobile (let's call it M), and connect to the same WiFi in which A and B are connected. Find out the IP address of M (this will depend on the model, so you will need to google it). From either A or B, do ping ip(M) (this should work for most mobiles).

From the browser in M, do connect to ip(A) to get that web page. Now, disconnect from the WiFi. Verify you can still use the mobile to browse internet, but the page at ip(A) is not longer accessible. Make sure you can explain why this is the case.