Inbound port based routing

John McCulloch 0 Reputation points
2024-02-01T14:19:57.6433333+00:00

Hi,
I have an issue where I require end users accessing the same public DNS name using different ports to be redirected to different public endpoints. For example -
users accessing domain.com over port 80 get directed to the public IP of an application gateway. users accessing domain.com over port 21 get directed to the public IP of an Azure firewall. I have looked at different options with traffic manager and application gateway configurations but can't figure out the best way to achieve this. Or if this is even possible.
Any advice / guidance would be appreciated.

Azure Traffic Manager
Azure Traffic Manager
An Azure service that is used to route incoming network traffic for high performance and availability.
127 questions
Azure Firewall
Azure Firewall
An Azure network security service that is used to protect Azure Virtual Network resources.
681 questions
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,081 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 26,216 Reputation points Microsoft Employee
    2024-02-02T03:07:49.3333333+00:00

    @John McCulloch Thank you for reaching out.

    Based on your question above

    For example -
    users accessing domain.com over port 80 get directed to the public IP of an application gateway. users accessing domain.com over port 21 get directed to the public IP of an Azure firewall. I have looked at different options with traffic manager and application gateway configurations but can't figure out the best way to achieve this. Or if this is even possible.

    I do not think it will be possible to implement the scenario described above because DNS translates domain names to IP addresses only and there is no port mapping possible. So, in your example above domain.com:80 and domain.com:21 will translate to the same IP address.

    For such scenario you will have to add different domain for web / ftp server. For example ftp.domain.com

    Hope this helps! Please let me know if you have any additional questions or need any information. Thank you!

    ---​​Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.