Expose TCP port to external in a Container Capp

133 views Asked by At

Thanks to the community help (link) I managed to setup a Container App connected to a Virtual Network and configure to open TCP port 25 to be externally accessible.

However I cannot connect to that port from telnet. In Microsoft's documentation, I saw there is a need to create a NAT Gateway.

I created NAT but struggle to connect to the Container App I created. I also read that there is something names Application Gateway for Containers. What should I do to get port 25 accessible publicly?

enter image description here

1

There are 1 answers

6
Mohamed Azarudeen Z On

As i mentioned the outbound to port 25 is only available for EA subscription, if you need to use it, you need to change your subscription type to Enterprise Agreement, You can change SMTP relay services to resolve

https://learn.microsoft.com/en-us/azure/virtual-network/troubleshoot-outbound-smtp-connectivity

the second part of the question-

I think you need to Configure your Container App to listen on a different port (e.g., 1234). In the Azure portal, navigate to your Container App. Under "Settings," click "Networking." Add a new port binding, specifying the private (container) port and the public port (e.g., 1234). Save the configuration. Access your app using the public IP/domain and the mapped port (e.g., http://yourapp.azurewebsites.net:1234).

I suggest you to reach the azure documentation page and search foe this ill give you a link there you may find the step by step guides,

https://learn.microsoft.com/en-us/search/?terms=Azure%20Networking%20documentation.