how to bind to specific ip address?

Well, title says it all. I've got a host with more than one IP address assigned to it. Is there a way to tell Ejabberd/Erlang+OTP which of them to bind to?

{ip, {192, 168, 1, 1}}

ejabberd guide, 3.1.5 Listened Sockets:

{ip, IPAddress}
    This option specifies which network interface to listen on. 
    For example {ip, {192, 168, 1, 1}}.

This option can be used on ejabberd_c2s, ejabberd_s2s_in, ejabberd_service and ejabberd_http, even if on the current guide it's only described for c2s.

thank you very much, somehow

thank you very much, somehow I must have missed this :/

Win server will not bind to IP

Hi,

My server will not bind to the IP I specified in the config (see below). When I start ejabberd on my windows 2003 server, it binds to all IPs and not to the one I specified in ejabberd.cfg. Also, I do not see any errors when I start it via the "Start Ejabberd" shortcut console.

from my config:

{5222, ejabberd_c2s, [{access, c2s}, {ip, {xxx, xxx, xxx, xxx}},
starttls, {certfile, "./ejabberd.pem"},
{shaper, c2s_shaper}]},

% When using SSL/TLS ssl option is not recommended (it requires patching
% erlang ssl application). Use tls option instead (as shown below).
{5223, ejabberd_c2s, [{access, c2s}, {ip, {xxx, xxx, xxx, xxx}},
tls, {certfile, "./ejabberd.pem"},
{shaper, c2s_shaper}]},

{5269, ejabberd_s2s_in, [{shaper, s2s_shaper}, {ip, {xxx, xxx, xxx, xxx}}]},

% {5555, ejabberd_service, [{access, all},
% {host, "icq.localhost", [{password, "secret"}]}]},

{80, ejabberd_http, [http_poll, web_admin]}
]}.

--
Speckz

Syndicate content