
#-----------------------------------------------------------------------
# Copyright (C) 2000-2001, Jean-Sebastien Morisset <jsmoriss@mvlan.net>
#-----------------------------------------------------------------------
# $Id: everquest,v 1.4 2001/08/11 17:01:21 jsmoriss Exp $
#-----------------------------------------------------------------------
# README
#-----------------------------------------------------------------------
#
# You'll also need the everquest-hosts file from the groups directory!
#
# After installing the module, the user should execute rc.firewall with
# the --update-config parameter. The necessary options will be added to
# the configuration file.
#
# Patch Application:
# A TCP connection is initiated from the player's PC (arbitrary port>=1024)
# to patch.everquest.com, port 7000.
#
# EverQuest client:
# UDP data-grams are sent to/from the player's PC (arbitrary
# port>=1024) from/to eqlogin1.989studios.com, port 5999.
#
# UDP data-grams are sent to/from the player's PC (arbitrary
# port>=1024) from/to eqchat1.989studios.com, port 5998.
#
# UDP data-grams are sent to/from the player's PC (arbitrary
# port>=1024) from/to one of the EverQuest servers (arbitrary port>=1024).
#
# The EverQuest server IP addresses are on the subnets:
# 63.65.235.* , 64.37.148.* , 64.37.149.* , 64.37.150.* , 64.37.151.* ,
# 192.215.55.* , 192.215.54.*, 192.215.37.* and 192.215.33.*
#
# Please note that EverQuest opens a random data port from the player's PC
# everytime EverQuest is run. Thus, the need to have all ports >= 1024
# available.
#
# (http://everquest.station.sony.com/support/index.shtml)
#
#-----------------------------------------------------------------------
# MODULE CONFIGURATION
#-----------------------------------------------------------------------
#
#m# 123
#a# accept
#n# everquest
#t# servers
#
#   |--------------------------------------------------------------------|
#d# everquest (Ports 1024-65535 UDP) 
#d# The EverQuest server ip addresses are on several subnets. Use the
#d# groups file method to specify them. So if you want to play EverQuest,
#d# the contents of the example should do. (Don't forget to download it!)
#d#
#d# Example:
#d# accept-eth0-everquest-servers = ./everquest-hosts 
#   |--------------------------------------------------------------------|
#
#-----------------------------------------------------------------------
# START OF MODULE CODE
#-----------------------------------------------------------------------

module_name="everquest"     # module name used in options
module_type="servers"       # the module type (clients, servers, etc.)

action_log="$LOG"
action_log_msg="$LOG_MSG"

if [ "`Option_Value accept $INTOPT $module_name $module_type`" ]
then
	Hostports accept remote udp "EverQuest login" eqlogin1.989studios.com 5999
	Hostports accept remote udp "EverQuest chat" eqchat1.989studios.com 5998

	# Only necessary in paranoid mode:
	[ "$MODE" -ge "3" ] \
		&& Hostports accept remote tcp "EverQuest patch" patch.everquest.com 7000
fi

for host in `Option_Value accept $INTOPT $module_name $module_type`
do
	Hostports accept remote udp "EverQuest game server" $host $UNPRIVPORTS 
done

unset module_name module_type
unset action action_log_msg action_log host

