aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ejabberdctl.cfg.example11
-rw-r--r--src/ejabberdctl.template8
2 files changed, 18 insertions, 1 deletions
diff --git a/src/ejabberdctl.cfg.example b/src/ejabberdctl.cfg.example
index 91f50346d..661d8ce77 100644
--- a/src/ejabberdctl.cfg.example
+++ b/src/ejabberdctl.cfg.example
@@ -36,6 +36,17 @@
#
#ERL_MAX_PORTS=32000
+# FIREWALL_WINDOW: Range of allowed ports to pass through a firewall
+#
+# If Ejabberd is configured to run in cluster, and a firewall is blocking ports,
+# it's possible to make Erlang use a defined range of port (instead of dynamic ports)
+# for node communication.
+#
+# Default: not defined
+# Example: 4200-4210
+#
+#FIREWALL_WINDOW=
+
# 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 f50b98580..0ff23bc09 100644
--- a/src/ejabberdctl.template
+++ b/src/ejabberdctl.template
@@ -39,7 +39,13 @@ done
NAME=-name
[ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] && NAME=-sname
-ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES"
+if [ "$FIREWALL_WINDOW" = "" ] ; then
+ KERNEL_OPTS=""
+else
+ KERNEL_OPTS="-kernel inet_dist_listen_min ${FIREWALL_WINDOW%-*} net_dist_listen_max ${FIREWALL_WINDOW#*-}"
+fi
+
+ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES $KERNEL_OPTS"
# define additional environment variables
EJABBERD_EBIN=$ROOTDIR/var/lib/ejabberd/ebin