Configuring auth_realm for Multiple Vhosts in ejabberd with TURN/STUN #4290
-
Hi everyone! I'm running multiple vhosts on my ejabberd server, and I'm getting a warning that I should set auth_realm for the TURN/STUN listen options. I understand that I need to specify auth_realm for each vhost, but I’m a bit confused about the port configuration. Do I need to assign a unique listening port for each vhost with its respective auth_realm domain, or is it possible to have all the vhosts share the same port? Thanks in advance for any guidance! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
That log message made sense back in the days when static (plain-text) credentials were used for TURN authentication. I guess you're using I removed the message now. |
Beta Was this translation helpful? Give feedback.
-
Thanks! In the same subject regarding stun/turn I have more a couple of questions if you don't mind, please. I have this example from process-one blog -
port: 3478
transport: udp
module: ejabberd_stun
use_turn: true
turn_min_port: 49152
turn_max_port: 65535
## The server's public IPv4 address:
turn_ip: 0.0.0.0
-
port: 5349
transport: tcp
module: ejabberd_stun
use_turn: true
tls: true
turn_min_port: 49152
turn_max_port: 65535
ip: 0.0.0.0
turn_ip: 0.0.0.0 The example from ejjaberd repo -
port: 3478
ip: "::"
transport: udp
module: ejabberd_stun
use_turn: true
## The server's public IPv4 address:
# turn_ipv4_address: "203.0.113.3"
## The server's public IPv6 address:
# turn_ipv6_address: "2001:db8::3" And this one from joinjaber -
port: 3478
transport: udp
module: ejabberd_stun
use_turn: true
turn_min_port: 49152
turn_max_port: 65535
# The server's public IPv4 address:
turn_ipv4_address: 0.0.0.0
-
port: 5349
transport: tcp
module: ejabberd_stun
use_turn: true
tls: true Also some of those options are not in the documentation. My questions are: listen:
-
port: 3478
transport: udp
module: ejabberd_stun
-
port: 3478
module: ejabberd_stun The ejabberd example have max and min ports are recommended to setup only for large servers or are they good practice for everyone? If positive, I could add the same range in the tcp + tls as in the udp? Sorry if my questions are somewhat dumb. I really appreciate your help already. |
Beta Was this translation helpful? Give feedback.
-
Wow! Thank you so much for your answer! I am gonna read your link now, I've tried the XEPs yesterday but still was confusing for me.
And then it proceeds for the specifics. Ah OK, now I get it. The Listen Options: port, ip, transport and module are valid for all cases. I was thinking it would be listed under "General listen options supported". Sorry. Again, I really appreciate your answers! You made it a lot easier for me, thank you very much. |
Beta Was this translation helpful? Give feedback.
That log message made sense back in the days when static (plain-text) credentials were used for TURN authentication. I guess you're using
mod_stun_disco
instead, in which case the TURN realm is irrelevant. Our example configuration should work just fine with multiple domains.I removed the message now.