]> granicus.if.org Git - ejabberd/commitdiff
New DIST_USE_INTERFACE to restrict IP where erlang connections are listened (EJAB...
authorBadlop <badlop@process-one.net>
Wed, 16 Feb 2011 22:53:29 +0000 (23:53 +0100)
committerBadlop <badlop@process-one.net>
Wed, 16 Feb 2011 22:53:40 +0000 (23:53 +0100)
doc/guide.tex
src/ejabberdctl.cfg.example
src/ejabberdctl.template

index 5077630ba2999a7c9d925e826a7f153e747640b0..814273d93b977bfd660ca6b16ee1a5b6b4adb6cf 100644 (file)
@@ -5033,6 +5033,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.
@@ -5445,6 +5448,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}
index 4a3db1c8beb14e0efdb02ed78e208a3351b52632..fe703242e25df15b1eff9a7069911658c39fab7d 100644 (file)
 #
 #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
 #
index 8ffdf9251a6103864820a989cf5100160f62a303..007921b83a839e95c68b67f7cdb647cef03f78ac 100644 (file)
@@ -89,6 +89,10 @@ if [ "$DIST_INTERFACE" != "" ] ; then
     KERNEL_OPTS="${KERNEL_OPTS} -kernel inet_dist_use_interface \"${DIST_INTERFACE}\""
 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