Open main menu

CDOT Wiki β

Changes

OPS345 Lab 3

718 bytes added, 03:58, 2 January 2022
Port forwarding for HTTP
== Port forwarding for HTTP ==
 
The links application is useful for basic testing but it's not how you want people to access your websites. You want them to use a proper web browser like Firefox. But in order for that to work: your web server needs to be accessible from the internet, so let's make it accessible via your router's IP address, using port forwarding (same idea as your SSH setup, but for port 80).
 
* On the router VM add a new iptables rule to forward incomping TCP packets for port 80 to www:
<source>iptables -t nat -I PREROUTING -p tcp --dport 80 -j DNAT --to 10.3.45.11:80</source>
* Don't forget to save the new set of iptables rules.
Remember that there are also security groups with rules that block access to ports.
* Edit
* On router: iptables -t nat -I PREROUTING -p tcp --dport 80 -j DNAT --to 10.3.45.11:80