[JDEV] [jadmin] Firewall/NAT --> where must be put the <alias/> ?

Riviere Stéphane Stephane.SR.Riviere at atosorigin.com
Fri Jun 22 04:22:29 CDT 2001


I tried the <alias/> trick on my 1.4.1 Jabber Server, but the tag is not
recognized.

I put it in the <c2s/> section but it doesn't work :-(

I saw old messages about a <name/> section containing <default> and <alias>
directives, 
but this section doesn't exist in my jabber.xml file...

So, where do I put the <alias> directive ? ;-)


Stéphane RIVIERE

 
-----Message d'origine-----
De : DJ Adams [mailto:dj.adams at pobox.com]
Envoyé : vendredi 22 juin 2001 09:33
À : jadmin at jabber.org
Cc : Jabber Dev
Objet : [JDEV] Re: [jadmin] Firewall/NAT in front of jabber server


On Thu, Jun 21, 2001 at 08:58:31PM -0700, Steven P. Donegan wrote:
> I have just built the jabber server, tested it locally, and see that
> connections from the client to the server appear to require a match of
> IP/DNS - ie the server is 192.168.1.15 (internal), it's dns is X and if I
> attempt to connect via IP it refuses the connection. This is with a
vanilla

Hi 

I'm not quite sure I've understood your question (because one answer would
be to run a local (internal) DNS), but if the question is "how do I run a
Jabber server so that people can connect using an IP address or a hostname",

then I'll have a go at answering:

Status Quo
----------
What normally happens is that when given a (physical) address to connect
to, whether that be a hostname or IP address, a client will use that to
determine the socket to connect to, and also specify it in the opening
XML stream root tag:

In the case of an IP address specified, it'd look like this:

<stream:stream xmlns='jabber:client'
               xmlns:stream='http://etherx.jabber.org/streams' 
               to='192.168.0.21'>



Possible Solution
-----------------
You can use the <alias/> directive in the c2s configuration like this:

<alias to='hostname.com'>192.168.0.21</alias>

to say "when 192.168.0.21 is given in the to='', it's really hostname.com"

or even

<alias to='hostname.com'/>

to say "whatever is specified in the to='', make it hostname.com".

With the latter alias config, the jabber server will return this in 
response to the stream header tag above:

<stream:stream xmlns:stream='http://etherx.jabber.org/streams'
               id='3B32E988'
               xmlns='jabber:client'
               from='hostname.com'>

If you've set the <host/> to hostname.com in your sessions instance, then
all should be well, and you can give 'hostname.com' to the client, or 
'192.168.0.21' to the client, and all should be fine. This is because the
client should look at the from='' attrib in the returned stream header and
use that in forming any JIDs for that Jabber server host.

Gotcha
------
I'm not sure that all clients make use of this feature, not least because
I don't think it's that well known.


Hope that helps
dj

p.s. I'm sending this to the jdev list too to see if there any further
comments on this <alias/> directive.


_______________________________________________
jdev mailing list
jdev at jabber.org
http://mailman.jabber.org/listinfo/jdev



More information about the JDev mailing list