
#-----------------------------------------------------------------------
# MODULE CONFIGURATION
#-----------------------------------------------------------------------
#
#m# 123
#a# accept
#i# cluster novirtual
#n# printer
#t# servers
#
#   |--------------------------------------------------------------------|
#d# In strict mode, printing to remote (public) servers is denied. You can
#d# enter the host names of specific servers where you send print jobs. 
#d# All other destinations will be blocked in strict mode.
#   |--------------------------------------------------------------------|
#
#-----------------------------------------------------------------------
# START OF MODULE CODE
#-----------------------------------------------------------------------

for host in `Option_Value accept $INTOPT printer servers`
do
	echo "Accept $INTOPT $IPADDR -> $host PRINTER $LOG_MSG"
	if [ "$CLUSTER_NAME" ]
	then
		ipchains -A $OUTCHAIN -j ACCEPT -p tcp ! -y -s $host   printer    -d $IPADDR $PRIVPORTS $LOG
		ipchains -A $INCHAIN  -j ACCEPT -p tcp      -s $IPADDR $PRIVPORTS -d $host   printer    $LOG
	else
		ipchains -A $INCHAIN  -j ACCEPT -p tcp ! -y -s $host   printer    -d $IPADDR $PRIVPORTS $LOG
		ipchains -A $OUTCHAIN -j ACCEPT -p tcp      -s $IPADDR $PRIVPORTS -d $host   printer    $LOG
	fi
done
unset host

