Operating Systems Concepts & Design
Make sure to return to the AWS Learner Lab page (link in Pilot if you forgot to bookmark it) and hit “Start Lab” to turn on your sandbox / AWS instance.
Use ssh to connect to your AWS Ubuntu instance.
Go to the folder that contains your repository (likely named ceg2350-yourgithubusername).
Create a new directory, Lab12.
Create a file named README.md in the Lab12 folder. The Lab 12 Template can be copied from this link:
https://raw.githubusercontent.com/pattonsgirl/CEG2350/refs/heads/main/docs/Labs/Lab12/LabTemplate.mdYou may refer to additional resources outside of the recommended ones provided. Cite any resource that contributes to your understanding in the Citations section of your lab answers, including the site and a summary of its assistance. If generative AI was used, include the system and prompts.
If you make mistakes with commands, note them! Writing down what went wrong and the correction will help your learning. If stuck, this aids TAs in understanding where you may have misunderstood or misconfigured a core step.
The commands below are essential for gathering network information or network testing. Provide a brief statement / summary (not a multi-paragraph copy paste) about what each command does and find an internet resource that provides a basic guide to what the command does and examples of usage.
| Command | Description | Resource |
|---|---|---|
hostname |
||
ipconfig (Powershell) |
||
ifconfig |
||
ip a |
||
route |
||
iptables -L |
||
Invoke-RestMethod ifconfig.me (Powershell) |
||
curl <IP_or_hostname> |
||
curl ifconfig.me OR curl ipinfo.io |
||
ping <IP_or_hostname> |
||
nslookup <IP_or_hostname> |
||
traceroute <IP_or_hostname> |
||
tracert <IP_or_hostname> (Powershell) |
||
netstat -an \| grep ESTABLISHED |
||
nmap -p <IP_or_hostname> |
||
tcpdump -i <networkinterface> -n host <IP_or_hostname> |
Find network information for the following systems using the commands and resources from above:
ifconfigOnly complete this for the internet accessible network the system is connected to:
eth0 for your AWS instanceWireless LAN adapter Wi-Fi for your laptopFor each system:
Use a command to identify the system’s network information. Copy the output into your lab writeup.
Use the network info and other commands to fill in the following table for the system’s network information:
| Setting | Value |
|---|---|
| Hostname of the device | |
| MAC address of the NIC | |
| Private IPv4 address | |
| Subnet mask | |
| Gateway address | |
| DHCP address (if enabled) | |
| DNS server address | |
| Public IPv4 address |
Useful Notes
nslookup to find the DNS server for hostname lookups. At home this may be your ISP DNS server, sometimes it is just the router IP again.ipinfo.io or ifconfig.me. AWS instances have public IPs associated with them.Resources on parsing ipconfig, ifconfig / ip output:
Review the following resource to get an overall feel for the difference between ports, sockets, and URLs:
We have provided tar archives of Java and Python client and server source code that uses the socket library.
Download and extract the tar archive of choice to your GitHub repository folder in Lab12.
host. Commit and push your changes.Resources
Your AWS instance is protected by a firewall via an AWS tool called Security Groups. The default rules created allow broad access (e.g., any IP on any port).
Your instance runs SSH (TCP on port 22) and Apache HTTP Server (TCP on port 80). In Part 3, you’ll play with running a program that listens on another port - 8080.
Know trusted IP ranges:
130.108/32 CIDR block - as in only this IP in allowed / only host IP in the network blockUnderstand other ranges:
0.0.0.0 - 255.255.255.255 - what CIDR block will you need to use?AWS Navigation:
ceg2350-Lab1SecurityGroup.Revise Inbound Rules in Security Group ceg2350-Lab1SecurityGroup:
Describe how you validated your rules are working.
If you break access - can no longer ssh to your instance - take a screenshot of your rules so you can get assistance, “reset” to default rules shown in the Default Security Group Rules image and try again.
The two things we generally ask about servers are: “Is it responding?” and “Is the service available?”.
In this exercise, you will run a test suite of commands against each IP / URL in the table below, document your findings in a results table, and answer reflection questions based on what you discover.
| Server IPs | Domain Names | URLs |
|---|---|---|
8.8.8.8 |
dns.google |
|
5.9.243.187 |
wttr.in |
https://wttr.in |
| Your AWS instance public IP | ||
34.117.59.81 |
ipinfo.io |
https://ipinfo.io |
Run the following commands against each IP / domain name / url as appropriate in the table above.
| Test | Command | What to observe |
|---|---|---|
| ICMP Reachability | ping -c 10 <IP / Domain Name> |
Does the server respond? |
| HTTP Request | curl -v http://<IP / Domain Name> |
Response code, headers, content |
| HTTPS Request | curl -v https://<IP / Domain Name> |
Response code, SSL errors, redirects |
| Forward DNS Lookup | nslookup <Domain Name> |
Does it resolve to one or more IPs? |
| Reverse DNS Lookup | nslookup <IP> |
Does it resolve to a domain name? |
ICMP and Firewalls: Why do some IPs not respond to ping even though they have active services running? What does this tell you about their firewall configuration?
HTTP vs HTTPS: Using wttr.in, compare the results when you curl -v http://<IP / Domain Name> versus curl -v https://<IP / Domain Name> for the same server. What differences did you observe? Why?
Raw Packet Capture: In a new tab, but on the same system you are using to run the curl commands, run a raw packet viewer for wttr.in: sudo tcpdump -i any -nn -A port 80 or port 443 and host <IP / Domain Name>. In another tab, curl using http and https, watching the packet dump after each curl request. Why can you “read” the weather info from the http request but not the https request?
DNS Lookup: When using nslookup, which IPs resolved to domain names and which domain names resolved to IPs? Why might this matter?
Troubleshooting: How would you use these commands if someone reported “the server is down”? What would be your troubleshooting strategy?
Any resource that you use that contributes to your understanding of exercises in this lab should be cited in the Citations / Resources section of your lab answers. You may refer to your own notes (if they are digitized into GitHub), course notes, or external resources / websites.
To add citations / resources, provide the reference / link and a summary of what it assisted you with.
If generative AI was used, include which generative AI system was used, what prompt(s) you fed it, and a summary of what it assisted you with.
Since the networking command table and the socket program already asked for resources, you only need to cite additional resources used in completing the other lab taskings.
auth_logs.csv is a cleaned up version of standard SSH logs, and contains only the username used in the connection attempt and the IPv4 address the attempt came from. Take the provided data and give me 2 reports:
Your reports must contain the set of commands used to create the reports.
auth.log to generate the csv file, you can check out my documentation here - there are likely prettier ways to do it.Verify that your GitHub repo has a Lab12 folder with at minimum:
README.mdIn the Pilot Dropbox, paste the URL to the Lab12 folder in your GitHub repo
Your files should be cleanly presented in your GitHub repository. Citations should be included as needed. Include which generative AI system was used and what prompts were used if generative AI was used.