Add firewalling port range definition

SVN Revision: 1264
This commit is contained in:
Christophe Romain 2008-04-01 09:07:29 +00:00
parent dcc00bca6d
commit 273c076ef6
3 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-04-01 Christophe Romain <christophe.romain@process-one.net>
* src/ejabberdctl.template: Add firewalling port range definition
* src/ejabberdctl.cfg.example: Likewise
2008-03-31 Badlop <badlop@process-one.net>
* src/ejabberd_listener.erl: Remove code of the unused listening

View File

@ -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

View File

@ -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