ejabberd - Comments for "howto bind epmd to one ip" https://www.ejabberd.im/node/1272 en Submit your ideas to the proper place https://www.ejabberd.im/node/1272#comment-55861 <p><div class="quote-msg"><div class="quote-author"><em>The Reverse Side of Spamcatcher2</em> wrote:</div>It is unbelievable unsecure to administrate a server machine without a restrictive firewall setup! And it is totaly unacceptable. Requiring to develop in each program, ensure the security/bugs of each program, and configure in each program to bind to a unique IP address to workaround a good firewall setup, seems to show a complete lack of knowledge about this topic. The whole responsibility of this administrator is more than suspitious.</div></p> <p> <div class="quote-msg"><div class="quote-author"><em>spamcatcher2</em> wrote:</div>it is *required* that epmd can be configured to listen only on 127.*.*.* and / or localhost</div></p> <p> EPMD is developed as part of Erlang/OTP, not in ejabberd. You should send your EPMD feature request to the Erlang/OTP developers. You can also write a patch that implements that feature, and propose it. Notice that EPMD is written in the well-known C language, not in the less-known Erlang language.</p> <p> This feature request was already discussed in the Erlang questions mailing list three years ago: <a href="http://www.trapexit.org/forum/viewtopic.php?t=10261&sid=328def1e11f2c484a23a5c3f01e19c0a">Restrict epmd to one IP address?</a>. That discussion didn't find such option in EPMD. In the discussion, I found an interesting comment: <div class="quote-msg"><div class="quote-author"><em>Per Hedeland</em> wrote:</div> And btw, at least on the Unices I have used, binding to an IP address does not bind to an interface - if you bind to an address configured on eth0 and a connection to it happens to arrive on eth1, it will happily be accepted anyway (thus, depending on network topology and perceived threats, <b>binding to a specific address may be a pretty weak protection and no substitute for a firewall</b> - which is not to imply that epmd needs protecting:-). </div> </p> <p> If EPMD included an option to limit the IP address to only 127.0.0.1, the ejabberd developers might use it in the ejabberd start script. But I've checked now, and EPMD still doesn't have such option. </p> <p> In summary, I recommend you to reconsider your feature request. If your initial idea seems still good, send an email to the <a href="http://www.erlang.org/faq.html">erlang-questions mailing list</a>. </p> Sat, 05 Jun 2010 14:34:30 +0000 mfoss comment 55861 at https://www.ejabberd.im It is unbelievable unsecure https://www.ejabberd.im/node/1272#comment-55859 <p>It is unbelievable unsecure to run a daemon on an open port on all available IPs!<br /> And it is totaly unacceptable.</p> <p>Recommending a firewall to work around this, seems to show a complete lack of knowledge about this topic.</p> <p>So, it is *required* that epmd can be configured to listen only on 127.*.*.* and / or localhost and any required port!</p> <p>As i understood this issue, epmd is even required to run ejabberd without database crashes.<br /> This too, is unbelievable ...</p> <p>The whole architecture of this software is more than suspitious.</p> <p>So, i recommend the following:</p> <p>Change ejabberd to listen on a local port for ejabberctl command - for example to shutdown.<br /> BUT, also cleanly shut down that daemon after a regular signal!</p> <p>If epmd is still required for communication between connected nodes, you can still allow to listen on the required IP-adress (only) and *then* use a firewall to channel the communication.</p> <p>This very webpage is is made more secure with all it´s CAPTCHA codes than the ejabberd daemons ...</p> Fri, 04 Jun 2010 23:47:34 +0000 spamcatcher2 comment 55859 at https://www.ejabberd.im A firewall is not a https://www.ejabberd.im/node/1272#comment-53627 <p>A firewall is not a workaround but a tool that should be configured on production machine.<br /> Now, if you insist on not using one, you are not asking on the right place.<br /> Please, post a feature request to <noindex><a href="http://www.erlang.org" title="www.erlang.org" rel="nofollow" >www.erlang.org</a></noindex>.</p> Sat, 04 Oct 2008 14:38:05 +0000 mremond comment 53627 at https://www.ejabberd.im Same here https://www.ejabberd.im/node/1272#comment-53626 <p>Any progress since 2007 ?</p> Sat, 04 Oct 2008 13:09:45 +0000 franck34 comment 53626 at https://www.ejabberd.im Same Problem here. Using a https://www.ejabberd.im/node/1272#comment-25260 <p>Same Problem here. Using a firewall would not fix that problem, it would be at most a workaround. The best way is to bind that port to 127.0.0.1 only, thats exaclty what i want and i guess its that what drscream wants.</p> Mon, 02 Jul 2007 07:08:33 +0000 fish comment 25260 at https://www.ejabberd.im A firewall should normally https://www.ejabberd.im/node/1272#comment-2908 <p>A firewall should normally allow you to block the traffic that you want to prevent.</p> <p>--<br /> Mickaël Rémond<br /> <noindex><a href="http://www.process-one.net/" rel="nofollow" >Process-one</a></noindex></p> Sat, 20 Jan 2007 15:39:39 +0000 mremond comment 2908 at https://www.ejabberd.im Re: howto bind epmd to one ip https://www.ejabberd.im/node/1272#comment-2906 <div class="quote-msg"> <div class="quote-author"><em>drscream</em> wrote:</div> <p>Is there any chance to bind 'epmd' to one ip address? If so, how? </p></div> <p>I have a patch! <noindex><a href="http://gir.usc.edu/erlang/otp_epmd_binding.patch.gz" title="http://gir.usc.edu/erlang/otp_epmd_binding.patch.gz" rel="nofollow" >http://gir.usc.edu/erlang/otp_epmd_binding.patch.gz</a></noindex></p> <p>Set the following environment variables before epmd is started:</p> <p>export ERL_EPMD_DIST_BIND=192.168.254.100<br /> # if you also need to change the default port.<br /> export ERL_EPMD_DIST_PORT=</p> <p>It may break stuff like clustering and remote shell access, but it works for me.</p> <p>I run a simple ejabberd on a shared IRC hosting provider and had to make ejabberd/epmd bind to a single IP address and specific port.</p> <p>If you need further help, I'm on the ejabberd mailing list.</p> Sat, 20 Jan 2007 01:53:19 +0000 zengargoyle comment 2906 at https://www.ejabberd.im Has nobody an idea how to https://www.ejabberd.im/node/1272#comment-2816 <p>Has nobody an idea how to bind 'epmd' to one ip address?<br /> I think this can be a security risk if 'epmd' listen to all ips from the server...</p> Sat, 06 Jan 2007 16:38:31 +0000 drscream comment 2816 at https://www.ejabberd.im Thank you for the https://www.ejabberd.im/node/1272#comment-2798 <p>Thank you for the information.<br /> Now I changed my ejabberd node from "ejabberd@localhost" to "ejabberd@hostname.tld" but this have no result.<br /> The two 'epmd' ports also open on my other ip addresses:<br /> PORT STATE SERVICE<br /> 4369/tcp open unknown<br /> 49675/tcp open unknown (change every time)</p> Tue, 02 Jan 2007 22:47:45 +0000 drscream comment 2798 at https://www.ejabberd.im Search on the web https://www.ejabberd.im/node/1272#comment-2795 <div class="quote-msg"> <div class="quote-author"><em>drscream</em> wrote:</div> <p>(For what is 'epmd' really needed?)</p></div> <p>'The Erlang Port Mapper Daemon epmd is automatically started at every host where an Erlang node is started. It is responsible for mapping the symbolic node names to machine addresses.'</p> <p><noindex><a href="http://www.die.net/doc/linux/man/man1/epmd.1.html" title="http://www.die.net/doc/linux/man/man1/epmd.1.html" rel="nofollow" >http://www.die.net/doc/linux/man/man1/epmd.1.html</a></noindex></p> Tue, 02 Jan 2007 08:28:42 +0000 mfoss comment 2795 at https://www.ejabberd.im Yes, i know, but this is https://www.ejabberd.im/node/1272#comment-2794 <p>Yes, i know, but this is only for ejabberd (i edit my config file ejabberd.cfg). This doesn't work for 'epmd', or 'epmd' doesn't read the config file...(?/!).</p> Mon, 01 Jan 2007 20:52:51 +0000 drscream comment 2794 at https://www.ejabberd.im in ejabberd book https://www.ejabberd.im/node/1272#comment-2793 <p><noindex><a href="http://www.process-one.net/en/projects/ejabberd/docs/guide_en.html#htoc16" title="www.process-one.net/en/projects/ejabberd/docs/guide_en.html#htoc16" rel="nofollow" >www.process-one.net/en/projects/ejabberd/docs/guide_en.html#htoc16</a></noindex></p> <p> 3.3 Listened Sockets:</p> <p>{ip, IPAddress}<br /> This option specifies which network interface to listen for. For example {ip, {192, 168, 1, 1}}.</p> <p>?</p> Mon, 01 Jan 2007 19:50:56 +0000 evadim comment 2793 at https://www.ejabberd.im