Objective: By the end of this lesson, you will learn how to configure IIS (Internet Information Services) to listen on a new HTTPS port (7199) and forward all traffic to an HTTP service running on port 5199.
Prerequisites:
- Basic understanding of IIS configuration.
- Access to IIS Manager.
- An active HTTP service running on port 5199.
Lesson Content:
- Introduction to Port Forwarding and IIS Configuration:
- Explore the concept of port forwarding and its relevance.
- An overview of IIS as a web server.
- Step 1: Add a New Website in IIS for Port 7199:
- Open IIS Manager.
- Right-click on “Sites” in the connections pane and choose “Add Website”.
- In the Add Website dialog:
- Set “Site name” to a descriptive name for your new site.
- Set “Physical path” to the directory that contains your site’s files.
- Set “Type” to
https, “IP address” toAll Unassigned, and “Port” to7199. - Click “Select” next to the SSL certificate field and choose your SSL certificate for the site.
- Click “OK” to create the site.
- Step 2: Configure HTTP Redirect or URL Rewrite:
- Select the newly created website in the IIS Manager.
- Double-click on “URL Rewrite”.
- In the Actions pane, click “Add Rule(s)”.
- Choose “Reverse Proxy”.
- In the “Add Reverse Proxy Rules” dialog, set “Inbound Rules” to forward to your HTTP service running on port 5199, typically
http://localhost:5199. - Click “OK” to apply the rule.
- Step 3: Test the Configuration:
- Open a web browser and navigate to
https://www.yourdomain.com:7199. - Verify that the content served is being proxied from the HTTP service running on port 5199.
- Open a web browser and navigate to
- Step 4: Firewall and Network Adjustments (If Necessary):
- Ensure your server’s firewall allows traffic on port 7199.
- Verify network settings to ensure port 7199 is open and accessible.
- Conclusion and Troubleshooting Tips:
- Recap the steps taken to set up port forwarding in IIS.
- Offer troubleshooting tips for common issues, such as IIS not serving on the new port or SSL certificate errors.
Assignment:
- Implement the described port forwarding setup on your IIS server.
- Test the setup by accessing
https://www.yourdomain.com:7199and ensure it proxies to the service on port 5199. - Document any challenges and how you overcame them.
Additional Resources:
- IIS Documentation: IIS Official Documentation
- URL Rewrite Module: [Using the URL Rewrite Module](https://docs.microsoft.com/en-us/iis/extensions
/url-rewrite-module/using-the-url-rewrite-module)
Feedback and Support:
- For further queries or troubleshooting, consult Microsoft’s official IIS documentation or seek assistance from a network administrator or a community forum specializing in IIS.
Through this lesson, you will enhance your understanding of IIS’s capabilities in managing web traffic and gain practical experience in configuring port forwarding and reverse proxy setups. This knowledge is crucial for managing advanced web server configurations and ensuring secure and efficient web service delivery.
