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 resources provided.
Any resource that you use that contributes to your understanding of exercises in this lab should be cited in the Citations section of your lab answers. To add citations, provide the site and a summary of what it assisted you with. If generative AI was used, include which generative AI system was used and what prompt(s) you fed it.
If you make mistakes with commands in the lab, note them! Writing down what went wrong and what the correction was will significantly help your learning journey. If you cannot find a correction, it will help the TAs or myself understand what point you reached and determine some potential solutions.
The commands below are all Linux commands to show or modify network information. 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. You’ll be using these commands in other parts of this lab.
| 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> |
||
nmap -p <IP_or_hostname> |
||
tcpdump -i <networkinterface> -n host <IP_or_hostname> |
Find the following network information for the following systems / networks:
You may utilize a mix of command line utilities and GUI applications to discover the networking information requested. You should not need download any additional tools to find this information - you may need to install some network utilities, like ifconfig or nmap.
Useful Commands
hostname, ipconfig /all, route PRINT, Invoke-RequestMethodhostname, ip a, ifconfig, route, nslookup, curlFor each system and network the system is connected to:
Find and copy into your lab a summary of the device’s network settings for a minimum of the network it is connected to.
Identify specifically the values of the following fields for the device and network connection to:
| Setting | Value |
|---|---|
| Hostname of the device | |
| MAC address of the NIC | |
| Private IPv4 address | |
| Subnet mask | |
| Gateway address | |
| DHCP enabled? (y/n) | |
| DHCP address (if yes) | |
| DNS server address | |
| Public IPv4 address |
nslookup will tell you the DNS server used to lookup the hostname’s IP addressPublic IPv4 address, look up your public IP (typically from your ISP) - you can literally ask Google what is your IP and / or try out the queries to sites like ipinfo.io or ifconfig.me. Since your AWS service needs to be singuarly addressable from external devices (clients), it is leasing a public IP address.Resources
Your AWS instance is protected by a firewall - the AWS service to configure this firewall is called a Security Group. When you created this stack, it came with a configured Security Group similar to the one in the screenshot below:
Rule 1 is an Inbound / Ingress rule that states as long as the source IP starts with 10.0.0, accept all protocols of communication on any port.
Rule 2 is an Inbound / Ingress rule that states any source IP can communicate with the TCP protocol on any port.
If you break your access to your AWS instance in the exercise below, you can “reset” using this screenshot of rules.
Your instance is running two services (assuming you completed Lab 11) - SSH and Apache HTTP Server.
SSH is a protocol and service that enables secure and encrypted communication between two points. By default, the ssh service listens on port 22. By sshing to your instance, you gain access to a shell where you can run commands, or can securely transfer files with sftp, or securely copy files with scp. Your firewall should only allow ssh connections from trusted IP sources.
Apache HTTP server listens on port 80 (by default) for incoming HTTP requests. After receiving a request, it send the client back the requested resource, if available. The client then assembles and “displays” the result in an application, such as curl or a browser. Websites (and specifically the servers that serve them) are assumed to be publicly viewable - as long as a client knows the IP or hostname, it can make an HTTP request to the server.
All software, such as SSH and Apache HTTP Server, has vulnerabilities. For all software we track Common Vulnerabilities and Exposures (CVEs).
It is a combination of credentials (identity) and network rules that keep systems safe, and allow people to only access and interact with what they need.
Your task is to revise the Inbound / Ingress Security Group Rules for your instance and replace them with rules that
Assuming you have hit “Start Lab” and have opened your console via the “AWS” link after the lab has started (timer is counting down), this link will quick drop you to your Security Groups. Find the Security Group named ceg2350-Lab1SecurityGroup (or similar). Click the checkbox next to that entry or the link in the “Security Group ID” column to focus on only this Security Group. Only edit the Inbound Rules
If the link doesn’t work, the full set of things to click is: go to the the Learner Lab Module -> Click Start Lab -> once started, Click the AWS link (green circle will be next to it). Click EC2 -> Click Instances Running -> click checkbox next to instance -> in the menu below, click Security, scroll down a little, click the link under Security Groups to hot drop to your rules that go with your instance. inbound Rules are where you’ll be focusing for the lab.
Review the following resource to get an overall feel for the difference between ports, sockets, and URLs:
For this part you’ll need two source code files - we have provided Java and Python client and server source code that uses the socket library.
Download the source code to your GitHub repository folder - add it for tracking and commit it.
Create a branch - push this branch to GitHub. Do not delete the branch after merging
On this branch:
main branch. Do not delete the branch where you were editing your code.Resources
Figuring out how to tell if a server is on is one of those MFUS (Most Frequently Used Skills). Sites like Down Detector are highly informative, but sometimes you need to have other utilities in hand. The two things we generally ask about servers are: “Is it responding?” and “Is the web page available?”.
In this exercise, you will get a set of IPs to test the useful commands on, then a series of questions to guide what I’d like you to understand about them. You may use external resources, including ChatGPT, to help with your understanding, but you must cite your sources, or in the case of generative AI, the prompt used. You should summarize from resources, not plagiarize. Your responses should prove how you can validate your answer by testing against the IPs referred to and the commands recommended.
ping, traceroute, nslookup, curlServer IPs / Domain Names / URLs
8.8.8.85.9.243.187 -> wttr.in -> https://wttr.in34.117.59.81 -> ipinfo.io -> https://ipinfo.ioping tell you if a server is “working”?ping use? What does this mean about the server firewalls?ping work if you specify https:// before the domain name?http request is made to a server with https enabled?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.