IIS ports, DNS, and firewalls

Michael Mastro II 51 Reputation points
2022-09-26T02:08:15.777+00:00

Good evening. I have been having an issue with IIS and Sophos UTM trying to access a site correctly. So the issue is I have multiple sites on the same IIS server, with two different sets of bindings. Site A is on 443, and Site B is on 444. When they communicate with each other the port bindings have been set within the appsettings.json so it would explicitly call SiteB:444 from SiteA. No problem, works fine internally.
I began to set up Sophos UTM to access SiteA and SiteB, it knows via DNS that they both share the same IP. I set up two real servers, pointing to the same host with different ports. I then set up the virtual servers via the SSL Certificates, and point them respectively to ports 443 and 444. Issue after issue, SiteB could not communicate with anything external to the UTM. Finally I was able see something in the logs, that had me make a change to the virtual server for SiteB and make that port 443. So now I have two Virtual Servers that both point to port 443 and each are bound to the name on the SSL certificate, and two Real Servers that have different ports both with the same host. I was then able to directly access SiteB.
So I now know I can access SiteA from external to the firewall, and SiteB external to the firewall (as long as I directly access SiteB). It was noticed that when SiteA made the call to SiteB it used the port 444 which started the firewall from working correctly again, since it could not distinguish SiteB:444 as a valid DNS name.
So I tried removing the port from the appsettings.json, cycled IIS and tried to access the sites internally. It all failed miserably when SiteA went to access SiteB without the port. Since it was failing internally, it still failed externally from the firewall. I know I am missing something within IIS to allow me to have SiteA call up SiteB when needed without having to explicitly put the port number in there.

So what can I do within IIS to another site look at the plain address SiteB.domain.com/* and make it SiteB.domain.com:444/*? I am sure this would make things work internally without having to explicitly put the port number in the browser address so that the Sophos UTM can find the correct IP address when it sees SiteB, since SiteB:444 does not register as a correct DNS entry.

Internet Information Services
{count} votes