summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2011-02-16 23:53:29 +0100
committerBadlop <badlop@process-one.net>2011-02-16 23:53:29 +0100
commitfe40a9c5f63a1a17235f32d7eaacbc5e1f9cd476 (patch)
tree57d45d5d202503c41c4315647971deb43f484e65
parentNew Indonesian translation (thanks to Irfan Mahfudz Guntur)(EJAB-1407) (diff)
New DIST_USE_INTERFACE to restrict IP where erlang connections are listened (EJAB-1404)
Diffstat (limited to '')
-rw-r--r--doc/guide.tex9
-rw-r--r--src/ejabberdctl.cfg.example11
-rw-r--r--src/ejabberdctl.template4
3 files changed, 24 insertions, 0 deletions
diff --git a/doc/guide.tex b/doc/guide.tex
index d8afbabd..e0bb42e4 100644
--- a/doc/guide.tex
+++ b/doc/guide.tex
@@ -4990,6 +4990,9 @@ The command line parameters:
If using \term{-sname}, specify either this option or \term{ERL\_INETRC}.
\titem{-kernel inet\_dist\_listen\_min 4200 inet\_dist\_listen\_min 4210}
Define the first and last ports that \term{epmd} (section \ref{epmd}) can listen to.
+ \titem{-kernel inet\_dist\_use\_interface "\{ 127,0,0,1 \}"}
+ Define the IP address where this Erlang node listens for other nodes
+ connections (see section \ref{epmd}).
\titem{-detached}
Starts the Erlang system detached from the system console.
Useful for running daemons and backgrounds processes.
@@ -5402,6 +5405,12 @@ The Erlang command-line parameter used internally is, for example:
\begin{verbatim}
erl ... -kernel inet_dist_listen_min 4370 inet_dist_listen_max 4375
\end{verbatim}
+It is also possible to configure in \term{ejabberdctl.cfg}
+the network interface where the Erlang node will listen and accept connections.
+The Erlang command-line parameter used internally is, for example:
+\begin{verbatim}
+erl ... -kernel inet_dist_use_interface "{127,0,0,1}"
+\end{verbatim}
\makesection{cookie}{Erlang Cookie}
diff --git a/src/ejabberdctl.cfg.example b/src/ejabberdctl.cfg.example
index 4a3db1c8..fe703242 100644
--- a/src/ejabberdctl.cfg.example
+++ b/src/ejabberdctl.cfg.example
@@ -51,6 +51,17 @@
#FIREWALL_WINDOW=
#.
+#' INET_DIST_INTERFACE: IP address where this Erlang node listens other nodes
+#
+# This communication is used by ejabberdctl command line tool,
+# and in a cluster of several ejabberd nodes.
+# Notice that the IP address must be specified in the Erlang syntax.
+#
+# Default: {127,0,0,1}
+#
+INET_DIST_INTERFACE={127,0,0,1}
+
+#.
#' ERL_PROCESSES: Maximum number of Erlang processes
#
# Erlang consumes a lot of lightweight processes. If there is a lot of activity
diff --git a/src/ejabberdctl.template b/src/ejabberdctl.template
index a21c6527..f12a1248 100644
--- a/src/ejabberdctl.template
+++ b/src/ejabberdctl.template
@@ -82,6 +82,10 @@ else
KERNEL_OPTS="-kernel inet_dist_listen_min ${FIREWALL_WINDOW%-*} inet_dist_listen_max ${FIREWALL_WINDOW#*-}"
fi
+if [ "$INET_DIST_INTERFACE" != "" ] ; then
+ KERNEL_OPTS+="-kernel inet_dist_use_interface \"${INET_DIST_INTERFACE}\""
+fi
+
ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES $ERL_OPTIONS"
# define additional environment variables