-1

I have 2 machines in LAN with internet. Hosted 2 websites on 1st server on Port 80 and Port 81. I am able to access both the websites in LAN using Private IP, but Not able to open site on port 81 using Virtual IP. I use the URL as http://VirtualIP:81/test.html.

I get the device or resource is not setup to accept connections on port hosts2-ns error. Site on port 80 works fine though (using URL http://VirtualIP).

My Rule for URL Rewrite is:

<rule name="ipaddress for 81" stopProcessing="false">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="VIP Here:81*" />
</conditions>
<action type="Rewrite" url="http://192.168.1.3:81/{R:0}" appendQueryString="false" />
</rule>

I have created inbound rule to open port 80 and 81 on 1st server. Also disabled windows firewall. But not able to get it work.

Mahen
  • 3
  • 5
  • You have to draw a clear diagram to illustrate further what servers/devices are involved. Merely the information above is far from enough. – Lex Li Jul 29 '20 at 22:28
  • What error message did you get when you access from VirtualIP:81? Could you find the request in IIS log? If not, then it must be a network issue more than IIS issue. Secondly, port number is not included in {HTTP_HOST}. If you need to match port number, please add another condition {SERVER_PORT}. – Jokies Ding Jul 30 '20 at 02:36
  • Thanks Lex and Jokies for suggestions. The issue is resolved now. It was port issue in my router. – Mahen Jul 30 '20 at 07:23

1 Answers1

0

The issue is resolved now. After lot of troubleshooting, i found out that the problem was in the router. I had to do port forwarding for port 81 in my router settings. Then it started working.

Mahen
  • 3
  • 5