ejabberd - Comments for "Specify ipv6 address to listen on to" https://www.ejabberd.im/node/3145 en IP can only be specified as tuple, not string https://www.ejabberd.im/node/3145#comment-53428 <div class="quote-msg"> <div class="quote-author"><em>evadim</em> wrote:</div> <p>but bug/feature request "Allow to specify IP address in string format in the Listen section" still present: </p></div> <p>Right, the two feature requests that I mentioned are still present in ejabberd, that's why I mentioned them.<br /> Right now the only way to specify an IP address is providing the tuple.</p> Mon, 14 Jul 2008 08:03:22 +0000 mfoss comment 53428 at https://www.ejabberd.im mmm... seems correcectly, https://www.ejabberd.im/node/3145#comment-53427 <p>mmm... seems correcectly, ejabberd listens only in that IPv6:</p> <div class="codeblock"><code>netstat -apn | grep beam<br />____________cut__________________<br />tcp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 2001:470:1f0b:243::6222 :::*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LISTEN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2612/beam</code></div> <p>but bug/feature request "Allow to specify IP address in string format in the Listen section" still present:</p> <div class="codeblock"><code>=CRASH REPORT==== 14-Jul-2008::09:10:13 ===<br />&nbsp; crasher:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp; pid: &lt;0.267.0&gt;<br />&nbsp;&nbsp;&nbsp; registered_name: ejabberd_listeners<br />&nbsp;&nbsp;&nbsp; exception exit: {start_spec,{duplicate_child_name,5222}}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in function&nbsp; gen_server:init_it/6<br />&nbsp;&nbsp;&nbsp; initial call: gen:init_it(gen_server,&lt;0.239.0&gt;,&lt;0.239.0&gt;,<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p;&nbsp; links: [&lt;0.239.0&gt;]<br />&nbsp;&nbsp;&nbsp; dictionary: []<br />&nbsp;&nbsp;&nbsp; trap_exit: true<br />&nbsp;&nbsp;&nbsp; status: running<br />&nbsp;&nbsp;&nbsp; heap_size: 987<br />&nbsp;&nbsp;&nbsp; stack_size: 23<br />&nbsp;&nbsp;&nbsp; reductions: 196<br />&nbsp; neighbours:<br />&nbsp;&nbsp;&nbsp; <br />=SUPERVISOR REPORT==== 14-Jul-2008::09:10:13 ===<br />&nbsp;&nbsp;&nbsp;&nbsp; Supervisor: {local,ejabberd_sup}<br />&nbsp;&nbsp;&nbsp;&nbsp; Context:&nbsp;&nbsp;&nbsp; start_error<br />&nbsp;&nbsp;&nbsp;&nbsp; Reason:&nbsp;&nbsp;&nbsp;&nbsp; {start_spec,{duplicate_child_name,5222}}<br />&nbsp;&nbsp;&nbsp;&nbsp; Offender:&nbsp;&nbsp; [{pid,undefined},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {name,ejabberd_listener},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {mfa,{ejabberd_listener,start_link,[]}},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {restart_type,permanent},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {shutdown,infinity},<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {child_type,supervisor}]</code></div> <p>&amp; any ipv6 XMPP-client ?</p> Mon, 14 Jul 2008 05:29:25 +0000 evadim comment 53427 at https://www.ejabberd.im Try setting the IPv6 address in tuple form https://www.ejabberd.im/node/3145#comment-53419 <p>Let's say I want c2s of port 5222 to listen only in the IPv6 address: ::ffff:127.0.0.1</p> <p>To configure ejabberd, you need to express that IPv6 address in tuple form. How to know the correct value? This way:</p> <pre> $ erl Erlang (BEAM) emulator version 5.6.3 [source] [smp:2] [async-threads:0] [kernel-poll:false] Eshell V5.6.3 (abort with ^G) 1&gt; inet_parse:address("::ffff:127.0.0.1"). {ok,{0,0,0,0,0,65535,32512,1}} </pre><p> Now that you know the correct value, edit ejabberd.cfg and specify the IP address as a tuple:</p> <pre> {listen, [ {5222, ejabberd_c2s, [ inet6, {ip, {0,0,0,0,0,65535,32512,1}}, {certfile, "/etc/ejabberd/ssl.pem"}, starttls, {access, c2s}, {shaper, c2s_shaper}, {max_stanza_size, 65536} ]}, ... </pre><p> When I login with my Jabber client, I see in ejabberd.log:</p> <pre> =INFO REPORT==== 12-Jul-2008::12:15:37 === I(&lt;0.265.0&gt;:ejabberd_listener:114) : (#Port&lt;0.439&gt;) Accepted connection {{0,0,0,0,0,65535,32512,1},48887} -&gt; {{0,0,0,0,0,65535,32512,1},5222} </pre><p> If you try this, can you pease report that it works correctly? I mean that ejabberd only listens in that IPv6 address, and clients can connect correctly, etc. Thanks</p> <p>Related feature request:</p> <ul> <li><noindex><a href="https://support.process-one.net/browse/EJAB-388" rel="nofollow" >Allow to specify IP address in string format in the Listen section</a></noindex> </li><li><noindex><a href="https://support.process-one.net/browse/EJAB-389" rel="nofollow" >Impossible to bind the same port to multiple interfaces</a></noindex> </li></ul> Sat, 12 Jul 2008 11:01:30 +0000 mfoss comment 53419 at https://www.ejabberd.im