Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 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.

add comment

1 Answer 1

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 -- https://www.namecheap.com/support/knowledgebase/article.aspx/545/51/how-do-i-set-up-url-forwarding-when-i-use-your-free-dns-service

share|improve this answer
add comment

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