About djbdns server


New Member

Messages: 18

Dear all,
First of all I want to say sorry about my not good English.
My purpose is building a system include: chat + mail + web web service like Yahoo.com

I have DNS server using djbdns with domain abc.com IP is
a. Chat server – I use ejabberd – with domain xmpp.abc.com and IP is
b. Mail server: domain mail.abc.com, IP
c. Web server domain http://www.abc.com, IP

What I want is
Client with account xyz@abc.com can use all service chat, web and email
When client log to chat server (port 5222) abc.com will point to xmpp.abc.com; mail server -> mail.abc.com and web -> http://www.abc.com

I read documents and I found out that we should use SRV record but can anybody help me to solve this porblem

Thank you all!


Staff member

Reaction score: 12,274
Messages: 38,775

What problem? Looks like you already have things working as they should.


New Member

Messages: 18

Thank ohauer, I did what you showed me but when I test by telnet abc.com with port 5222, it makes connection to abc.com with IP not to xmpp.abc.com - IP

#telnet abc.com 5222
telnet: connect to address Connection refused
telnet: Unable to connect to remote host

Can you make it clearer because I'm newbie with FreeBSD.



Active Member

Reaction score: 17
Messages: 127

I will try to make it clearer ...

The DNS SRV record describes on which machine and port a special service is available.
For normal client connections to your server you do not need DNS SRV records since clients thy can direct use the hostname and port in there configuration.
If you jabber server allows s2s (server to server) communication (for example from jabber.org) you need DNS SRV records.
Say your domain is example.com and someone from another domain wants to chat with you, then the remote jabber server will look for those SRV records to find your jabber server
  • _jabber._tcp.example.com
  • _xmpp-server._tcp.example.com
  • _xmpp-client._tcp.example.com

If those entries are set then the remote server can find your jabber machine.
The remote server does something like
$ dig _jabber._tcp.example.com any +short
and get this back
10 0 5269 host.example.com.
Now the remote server will try to make a connection to host.example.com. on port 5269.

Without SRV records the remote server has no idea on which machine and port your jabber server is running.

Your telnet client is a simple TCP client which does not understand this records for telnet those records are the same like Chinese for me ;)

Maybe some better explanations and how to build this records.


New Member

Messages: 18

First of all, I want to thank ohauer so much.
Your explanation is very clear for me. My problem is solved.