6

Is it possible to map or forward an external port x to port 80 in a Web App on Azure with any of the tools provides by Azure (e. g. Traffic Manager etc.). I'm not talking about VMs, I'm talking about the more abstract App Service.

Given is the following example:

We run a windows service on many devices which connect to an API on Port 314XX. We now run this Asp.Net Web Api on Azure in a Web App, which is fine, but it is not possible to update all devices, so some of them will still be connecting to port 314XX instead of 80. Is it possible to configure a Web App in Azure to listen on multiple port or is it possible to use any of these traffic tools to create such a port mapping? As of today, I haven't found any way to do this.

Thanks for your help.

stay2be
  • 63
  • 1
  • 1
  • 3

2 Answers2

6

Unlike Cloud Services (web/worker roles) and Virtual Machines, Web Apps don't have a port-mapping feature. That is... the only ports open for Web Apps are 80 and 443.

Traffic Manager does not provide port-mapping. You'd need to run your own proxy for handling this.

David Makogon
  • 2,768
  • 1
  • 20
  • 29
  • Thank's for your answer. I managed to get this work via nginx proxy_pass in AWS. – stay2be Jan 26 '16 at 09:18
  • @stay2be can you please elaborate on what you did? – Kirill Yunussov Jan 16 '17 at 23:24
  • @KirillYunussov - this comment area isn't the place to elaborate (you can easily look up nginx on google to read up) - the OP's solution has nothing to do with Web Apps - they went in another direction. If you have a specific nginx question, just post a new question. – David Makogon Jan 17 '17 at 01:34
  • @Kirill Yunussov I think David Makogon is right. If you need a starting point, you can try it here: https://www.nginx.com/resources/admin-guide/reverse-proxy/ – stay2be Jan 18 '17 at 09:11
  • No longer accurate for today, as custom ports are now allowed, https://docs.microsoft.com/en-us/azure/app-service/containers/configure-custom-container#configure-port-number – Lex Li Jun 08 '20 at 13:04
  • @LexLi - Good clarification (and it's almost impossible to keep older answers up-to-date - I posted this ~4 1/2 years ago). You may want to post a new answer specific to containers. Also, note that port-mapping is available *only* with containers. Not with standard App Service, which still has the same 80/443 limitation. Also note that, at the time of this question (and answer), Linux wasn't a supported target environment. – David Makogon Jun 08 '20 at 13:12
-1

For Azure, you should look at Azure App Service Environments. These provide you with a fully isolated and dedicated environment from which you can control vlan and network resource. Because of this they are significantly more expensive that virtual machines but will give you the full PaaS/SaaS experience.

Azure App Service Environments