Ejabberd enable s2s Port 5269


(Tony Boston) #1

NethServer Version: 7 Final
Module: ejabberd

Hi there,

since I can not connect to other jabber servers, I need to enable s2s and the Port 5269 in ejabberd. How would I do that, since I should not edit config files?


Ejabberd 18.06 bug or issue
Ejabberd doesn't communicate with other XMPP (Jabber) servers
(Giacomo Sanchietti) #2

You need to enable it manually.

Create a template-custom

mkdir /etc/e-smith/templates-custom/etc/ejabberd/ejabberd.cfg/

Put this content inside /etc/e-smith/templates-custom/etc/ejabberd/ejabberd.cfg/80Ports20s2S

,{5269, ejabberd_s2s_in, [{shaper, s2s_shaper}, {max_stanza_size, 131072}]}

Open the port inside the firewall:

config setprop ejabberd TCPPorts 5222,5223,5280,5269

Apply the configuration:

signal-event ejabberd-update
signal-event firewall-adjust

If something doesn’t work as expected, check the syntax of generated ejabberd configuration file.

Ejabber does not want to talk with external
(Tony Boston) #3

Thanks so much. As you can probably can imagine, its kind of hard to get into this templating stuff.


(Tony Boston) #4

guess you mean this

mkdir -p /etc/e-smith/templates-custom/etc/ejabberd/ejabberd.cfg/
vi /etc/e-smith/templates-custom/etc/ejabberd/ejabberd.cfg/80Ports20s2S


signal-event nethserver-ejabberd-update

but whats wrong here?

Problem loading ejabberd config file /etc/ejabberd/ejabberd.cfg : 99: unterminated atom starting with ';\n\t %% Remove t'

(Giacomo Sanchietti) #5

I fixed the commands, but probably you should adapt the content of the template-custom.

Please, paste the whole file in a pstebin, since I don’t have a machine to test it right now.

(Tony Boston) #6

There we go


(Giacomo Sanchietti) #7

Sorry for the late response, put these lines inside /etc/e-smith/templates-custom/etc/ejabberd/ejabberd.cfg/80Ports20s2S

    $OUT .= "\n";
    $OUT .= '     ,{5269, ejabberd_s2s_in,  [{shaper, s2s_shaper}, {max_stanza_size, 131072}]}';
    $OUT .= "\n";

Then execute:

signal-event nethserver-ejabberd-update

I tested it on a dev machine.

(Tony Boston) #8

Thanks @giacomo that works.

The only problem left is that it still seems not to be possible to connect via TLS. Can I activate that in the same file?

(Giacomo Sanchietti) closed #9