
#-----------------------------------------------------------------------
# README
#-----------------------------------------------------------------------
#
# The ICQ rules opens all of our high ports to any UDP packets coming
# from port 4000.
#
#-----------------------------------------------------------------------
# CHANGES
#-----------------------------------------------------------------------
#
# 2000-10-17  Jean-Sebastien Morisset <jsmoriss@jsm-mv.dyndns.org>
#             Added OUTCHAIN to allow outgoing UDP packets.
# 2000-10-14  Jean-Sebastien Morisset <jsmoriss@jsm-mv.dyndns.org>
#             Initial module written for v5.0.
#
#-----------------------------------------------------------------------
# MODULE CONFIGURATION
#-----------------------------------------------------------------------
#
#N# icq
#A# accept
#T# servers
#   |--------------------------------------------------------------------|
#D# The example network should cover all mirabilis ICQ servers. If you 
#D# want to masquerade ICQ connections from your private (LAN) work-
#D# stations, you'll need to add the icq module to the ip-masq-modules 
#D# option.
#D#
#D# Example:
#D#   accept-eth1-icq-servers="205.188.0.0/16"
#   |--------------------------------------------------------------------|
#
#-----------------------------------------------------------------------
# START OF MODULE CODE
#-----------------------------------------------------------------------


#--------------------------------------------------------------------
# ICQ Client (port 4000)
#--------------------------------------------------------------------

for HOST in `Option_Value ACCEPT $INTERFACE ICQ SERVERS`
do
	echo "Accept $INTERFACE $IPADDR ICQ <- $HOST $LOG_MSG"
	ipchains -A $INCHAIN  -j ACCEPT -p udp -s $HOST 4000 -d $IPADDR $UNPRIVPORTS $LOG
	ipchains -A $OUTCHAIN -j ACCEPT -p udp -s $IPADDR $UNPRIVPORTS -d $HOST 4000 $LOG
done

