LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   About hostname configuration on BIND. (http://www.linuxquestions.org/questions/linux-server-73/about-hostname-configuration-on-bind-779442/)

sparc86 01-02-2010 01:17 PM

About hostname configuration on BIND.
 
Hello LQ community.

I have read a lot of documentation but it is still hard to find a proper answer to my doubts.

About the hostnames in a domain, how is it associate to a determinated port?

like:
Quote:

sparc86.net. IN A XXX.XXX.XXX.XXX
www.sparc86.net. IN A XXX.XXX.XXX.XXX
ftp.sparc86.net. IN A XXX.XXX.XXX.XXX
m.sparc86.net. IN A XXX.XXX.XXX.XXX
localhost.sparc86.net. IN A XXX.XXX.XXX.XXX
webmail.sparc86.net. IN A XXX.XXX.XXX.XXX
admin.sparc86.net. IN A XXX.XXX.XXX.XXX
mail.sparc86.net. IN A XXX.XXX.XXX.XXX
sparc86.net. IN MX 5 mail.sparc86.net.
For example, when I type on the browser webmail.sparc86.net and then I get redirected to the port of 20000 of this same domain. Fine, but how does it work that it knows it should be redirected to the port 20000? From where is this information (the association webmail-port 20000) taken? The apache will manage this, right? But what about other services like ftp?

Another example, If I wrote my own software listening, let's say on the port 40000 and I want to have a domain like "mystuff.sparc86.net" how would I let it be redirected to the port 40000 ?

I hope I am being clear on my question.

Thanks in advance!

janoszen 01-02-2010 03:47 PM

You don't
 
It's simple. You don't. The DNS system does not handle ports (except maybe SRV records which are not supported with web browsing). If you need to redirect a browser to an other port, you need to run a webserver on port 80 and configure it for permanent redirection. The same goes for almost any protocol.


All times are GMT -5. The time now is 08:13 PM.