Open main menu

CDOT Wiki β

Changes

OPS705 Lab 4

551 bytes added, 18:06, 13 February 2023
Part 2: Editing Your IIS Website
# Navigate to: '''/var/www/html'''
# List all files in this directory. There are none; this is expected.
# Open Elevate to root privileges and open a new vim session for '''index.html''' in this location.
# Using HTML, give it a title of: '''OPS705 Linux Server - Winter 2022'''.
# Using HTML, add to the body: '''Name: yourname'''
# In the new window in the ''Connections'' menu column on the left, expand the '''Sites''' folder and click on '''Default Web Site'''.
# In the ''Actions'' menu column on the right, click '''Explore'''. This will open a new folder where your IIS web pages are stored.
# Right-click anywhere in that window, click '''New > Text Document'''. Name it '''index.html'''.Save it with double-quotes to make sure it's saved as an HTML file, not text. <code>"index.html"</code>
# Open the text file, and write the same HTML code as Investigation 1, changing the title tag to: ''OPS705 IIS Web Server - Winter 2022''.
# Refresh your browser page from ''Part 21''. : <code>http://localhost</code> You should see your new code.
# On your host computer, open a browser and navigate to the URL you used to remotely connect to your Windows Server VM. Unlike the Linux Server in Lab 3, the web page you created does not appear. We still have some work to do.
== Part 1: Enabling System-Level Forwarding on Your Linux Server ==
[[Image:Ops705_lab4_ip_forwarding.png|thumb|right|300px|Figure 6: The ''/etc/sysctl.conf'' file with IP forwarding added.]]
# Remote SSH into your Linux Server VM.
# Elevate to root.
== Part 2: Port Forwarding Using NAT ==
[[Image:Ops705_lab4_port_forwarding.png|thumb|right|500px|Figure 7: View of the NAT tables with our port forwarding rules added.]]
# Remote into your Windows Server VM, open Command Prompt, and run <code>ipconfig</code> Write down the 10.x.x.x IP address displayed.
# Remote SSH into your Linux Server VM, and elevate to root.
== Part 3: Adding Forwarding Firewall Rule Exceptions ==
[[Image:Ops705_lab4_forward_rules.png|thumb|right|500px|Figure 8: View of the default tables with our IP forwarding rules added.]]
# Create a firewall rule to allow forwarded traffic destined for TCP port 80: <code>iptables -A FORWARD -p tcp --dport 80 -j ACCEPT</code>
# Create a firewall rule to allow forwarded traffic sent from TCP port 80: <code>iptables -A FORWARD -p tcp --sport 80 -j ACCEPT</code>