Changes

Jump to: navigation, search

OPS705 Lab 4 (2207)

39 bytes added, 23:51, 11 January 2021
m
Chris.johnson moved page OPS705 Lab 4 to OPS705 Lab 4 (2207) without leaving a redirect: Old version, archived.
= LAB PREPARATION =
=== Purpose / Objectives of Lab 5 4 ===
In this lab, you will learn how to install rpm packages, manage services, and set up a basic Apache web server. We will also conduct some light HTML editing, and get our first look at the Linux iptables firewall.
 
Remember: While you are working through this lab, it is highly recommended that you write notes down in your OPS705 Lab Logbook.
If you encounter technical issues, please contact your professor via e-mail or in your section's Microsoft Teams group.
# Read through the Week 5 slides, and have them handy as a reference for concepts
# Your Azure-based Linux VM
# Your [[File:OPS705_Lab_Logbook | OPS705 Lab Logbook]]
= INVESTIGATION 1: Setting Up A Web Server =
== Part 1: Replacing ''firewalld'' with ''iptables'' ==
[[Image:Ops705_lab4_fig1.png|thumb|right|500px|Figure 1. Default iptables firewall rules.]]
The default firewall for CentOS, ''firewalld'' is more complex than we need. We'll be reverting to the easier to use ''iptables'' standard. '''Make sure you follow these instructions in order. If you don't, you may be locked out of your Linux VM forever.''' If you encounter errors on any step, stop and ask for help. Do not continue!
# Stop the ''firewalld'' service and start the ''iptables'' service in a single, chained command: <code> systemctl stop firewalld; systemctl start iptables</code>
# Check the status of the firewalld service. It should tell you it's stopped.
# Check the status of the iptables service. It should tell you it's '''active (running)'''.
# View your current iptables firewall rules: <code>iptables -L -vn --line-numbers</code>
# Refer to ''Figure 1''. If your rules at this stage look different, stop and contact your professor for help.
# Set your default policy for the INPUT chain to DROP: <code>iptables -P INPUT DROP</code>
# Remove the reject rule from the INPUT chain to hide our server from scans: <code> iptables -D INPUT 5</code>
# Set your default policy for the FORWARD chain to DROP: <code>iptables -P FORWARD DROP</code># Remove the reject rule from the FORWARD chain to hide it from scans.: <code>iptables -D FORWARD 1</code>
# To verify your work, log out of SSH and log back in. If you don't encounter any login issues, you're good to go.
# '''Assuming the step above works''', in your Linux VM, save your rule changes: <code>service iptables save</code>
# List all files in this directory. There are none; this is expected.
# Open a new vim session for index.html: <code>vim index.html</code>
# Using HTML, give it a title of : '''OPS705 Linux Server - Fall 2020'''.
# Using HTML, add to the body: '''Name: yourname'''
# Using HTML, add to the body as a new line: '''Student Number: yourstudentnumber'''
= Lab Submission =
Take a screenshot Submit to Blackboard full-desktop screenshots (PNG/JPG) of your newly created page and include the full browser following: # Browser window showing the Linux Apache page (URL and allon your computer, not displayed on your VM). Submit the screenshot as a JPG/PNG to Blackboard# SSH session window with your iptables rules listed.  Your professor will review your page directly; the screenshot is screenshots are a backup in case of catastrophic issues.  '''Your professor will not check your lab until the screenshot has been submitted. ''' Make sure to shut down your virtual machines when you're done!
[[Category:OPS705]]
[[Category:Digital Classroom]]
[[Category:Fall 2020]]
[[Category:Draft]]

Navigation menu