#-----------------------------------------------------------------------
# Copyright (C) 2000-2001, Jean-Sebastien Morisset <jsmoriss@mvlan.net>
#-----------------------------------------------------------------------
# $Id: halflife,v 1.6 2001/12/27 22:45:38 dholmes Exp $
#-----------------------------------------------------------------------
# README
#-----------------------------------------------------------------------
#
# These rules were mostly based on <http://lmhansen.tzo.com/HalfLife/
# proxy1.html>.
#
#-----------------------------------------------------------------------
# MODULE CONFIGURATION
#-----------------------------------------------------------------------
#
#m# 123
#n# halflife
#a# accept
#t# hosts
#i# cluster novirtual
#
#   |--------------------------------------------------------------------|
#d# Half-Life
#d# 
#d# Example:
#d#   accept-eth1-halflife-hosts = any/0
#   |--------------------------------------------------------------------|
#
#-----------------------------------------------------------------------
# START OF MODULE CODE
#-----------------------------------------------------------------------

remote_tcp_ports="6003:6004 7002:7003"
remote_udp_ports="27009:27012 27015"
local_tcp_ports=""
local_udp_ports=""

for host in `Option_Value accept $INTOPT halflife hosts`
do
	Hostports accept local tcp "Half-Life" $host $local_tcp_ports
	Hostports accept local udp "Half-Life" $host $local_udp_ports

	Hostports accept remote tcp "Half-Life" $host $remote_tcp_ports
	Hostports accept remote udp "Half-Life" $host $remote_udp_ports
done
unset remote_tcp_ports remote_udp_ports local_tcp_ports local_udp_ports host

