1

I have two web sites on IIS that has a private IP address in a small home LAN.

I want some people to have access from the outside internet. I have only one domain for both websites.

The user will access like this: http://thisisthedomain.net:6565 for the first site, for another one like this: http://thisisthedomain.net:4545

I will do port forwarding on the router and direct packets to a web server.

My question is: When I do port forwarding to my web server, eg. for the first web site lets say it has public ip like this http://48.456.45.67:6565 can I create a specific binding port on IIS for each web site so port forwarding rule can be like this:

*all traffic with 6565 port direct to the web server's private ip address and port 1432 (if site's binding is 1432)

Should my binding port on the IIS site be equal to destination port in port forwarding? What about IIS's default port 80?

Please help.

Thanks.

1 Answer 1

0

Hi hopefully this will help.

  1. In IIS bindings set the port you wish to use for each site enter image description here
  1. On the IIS server/computer firewall ensure that you have allowed incoming traffic on the ports you wish to use, i.e. the ports you've specified in the bindings in IIS.

  2. Router port fowarding, really depends on your router, but basically you need to set the following:

Site 1

Source IP: any

Source port: The port used for site 1

Target IP: the IP address of your IIS server/computer

Target port: The port used for site 1

Site 2

Source IP: any

Source port: The port used for site 2

Target IP: the IP address of your IIS server/computer

Target port: The port used for site 2

The target port in your port forwarding needs to be the port used in the IIS binding.

The default port 80 is just that, a default, and can be changed to whichever port you wish. But you need to check that there are not any other services using the ports you use. If you are just running a couple of web sites I would suggest ports 81 and 82 or 8081 and 8082

Make sure you have updated the DNS A records for your domain, usually at your login on you domain registration company's website, so that (taking the example you have provided)

Record Type: A Host: blank or @ IP Address/Target: 48.456.45.67

You will also need to ensure you public IP address is static, check with your broadband provider.

I hope the above helps, all the best.

1
  • Steve, this is the best answer I have ever received somewhere online. Thanks a bunch. It was totally helpful.
    – Marco
    Oct 9, 2020 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.