Open main menu

CDOT Wiki β

Changes

OPS705 Lab 6 (2211)

218 bytes added, 14:20, 18 February 2021
Part 3: Port Forwarding Using NAT
# Remote SSH into your Linux Server VM, and elevate to root.
# Confirm you can access the web server on your Windows VM by running: <code>curl '''IP-address-from-step-1'''</code> If you see plain HTML code displayed, move to the next step.
# We're going to be working with the NAT table. Let's look at the NAT rules listing with the following command: <code>iptables -t nat -nvL --line</code>
# Set up a port forwarding rule so all requests to your Linux VM on port 8080 get sent to your Windows VM on port 80. Run the following: <code>iptables -t nat -A PREROUTING -p tcp --dport 8080 -j DNAT --to-destination ''windows-server-ip-from-step-1'':80</code>
# Set up NAT for all forwarded traffic: <code>iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE</code>
# Confirm your new NAT table rules with the command from Step 4.
== Part 4: Adding Forwarding Firewall Rule Exceptions ==