You are not logged in.

#1 2020-10-19 18:41:12

cypherpunks01
Member
Registered: 2020-01-03
Posts: 6

Ejabberd s2s through ssh tunnel

Hello!
I'm trying to setup ejabberd server on my local LAN with port forwarding to external server.
C2S connections works fine, but s2s connections aren't and it gives an error like this

[info] <0.385.0>@ejabberd_listener:accept:238 (<0.525.0>) Accepted connection 127.0.0.1:54656 -> 127.0.0.1:5269
[info] <0.525.0>@ejabberd_s2s_in:process_closed:131 Closing inbound s2s connection 127.0.0.1 -> example.com: Stream closed by local host: not well-formed (invalid token) (not-well-formed)

I create ssh tunnel using those commands:

autossh -M 0 -f -N -T -R \*:5222:localhost:5222 root@example.com -p 22 -o "ProxyCommand=nc -X 5 -x localhost:9050 %h %p" -o ExitOnForwardFailure=yes  -o "ServerAliveInterval 10"
autossh -M 0 -f -N -T -R \*:5223:localhost:5223 root@example.com -p 22 -o "ProxyCommand=nc -X 5 -x localhost:9050 %h %p" -o ExitOnForwardFailure=yes  -o "ServerAliveInterval 10"
autossh -M 0 -f -N -T -R \*:5269:localhost:5269 root@example.com -p 22 -o "ProxyCommand=nc -X 5 -x localhost:9050 %h %p" -o ExitOnForwardFailure=yes  -o "ServerAliveInterval 10"
autossh -M 0 -f -N -T -R \*:5280:localhost:5280 root@example.com -p 22 -o "ProxyCommand=nc -X 5 -x localhost:9050 %h %p" -o ExitOnForwardFailure=yes  -o "ServerAliveInterval 10"

How I can fix it or are there any alternatives which will work like this?

Offline

Board footer

Powered by FluxBB