mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +01:00
New DIST_USE_INTERFACE to restrict IP where erlang connections are listened (EJAB-1404)
This commit is contained in:
parent
7060791e4e
commit
60d83f937d
@ -5033,6 +5033,9 @@ The command line parameters:
|
|||||||
If using \term{-sname}, specify either this option or \term{ERL\_INETRC}.
|
If using \term{-sname}, specify either this option or \term{ERL\_INETRC}.
|
||||||
\titem{-kernel inet\_dist\_listen\_min 4200 inet\_dist\_listen\_min 4210}
|
\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.
|
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}
|
\titem{-detached}
|
||||||
Starts the Erlang system detached from the system console.
|
Starts the Erlang system detached from the system console.
|
||||||
Useful for running daemons and backgrounds processes.
|
Useful for running daemons and backgrounds processes.
|
||||||
@ -5445,6 +5448,12 @@ The Erlang command-line parameter used internally is, for example:
|
|||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
erl ... -kernel inet_dist_listen_min 4370 inet_dist_listen_max 4375
|
erl ... -kernel inet_dist_listen_min 4370 inet_dist_listen_max 4375
|
||||||
\end{verbatim}
|
\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}
|
\makesection{cookie}{Erlang Cookie}
|
||||||
|
@ -50,6 +50,17 @@
|
|||||||
#
|
#
|
||||||
#FIREWALL_WINDOW=
|
#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
|
#' ERL_PROCESSES: Maximum number of Erlang processes
|
||||||
#
|
#
|
||||||
|
@ -89,6 +89,10 @@ if [ "$DIST_INTERFACE" != "" ] ; then
|
|||||||
KERNEL_OPTS="${KERNEL_OPTS} -kernel inet_dist_use_interface \"${DIST_INTERFACE}\""
|
KERNEL_OPTS="${KERNEL_OPTS} -kernel inet_dist_use_interface \"${DIST_INTERFACE}\""
|
||||||
fi
|
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"
|
ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES $ERL_OPTIONS"
|
||||||
|
|
||||||
# define additional environment variables
|
# define additional environment variables
|
||||||
|
Loading…
Reference in New Issue
Block a user