Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I'm using bind9

I have a zone file setup with a few subdomain A records. I'm wondering if I can create a subdomain record that points to an ip address on a specific port.

I'm currently updating the zonefile dynamically. I'd need some service with an API that can handle an infinite amount of subdomains. Also need to map udp and non http tcp ports.

I think I might need to use ip tables?

share|improve this question

marked as duplicate by Iain, Ward, Katherine Villyard, TheCleaner, Ladadadada Feb 11 '14 at 11:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 3 down vote accepted

No, DNS only takes care of name resolution to an IP address. It does not offer the capability to map to a port. This question has a more detailed explanation -- How to use DNS/Hostnames or Other ways to resolve to a specific IP:Port

Some DNS services allow URL forwarding, which I think should do what you are looking for. For eg NameCheap offers this feature --

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.