
#-----------------------------------------------------------------------
# CHANGES
#-----------------------------------------------------------------------
#
# 2001-02-07  Jean-Sebastien Morisset <jsmoriss@mvlan.net>
#             Removed UNPRIVPORTS entry and expanded SSHPORTS range.
# 2000-10-27  Jean-Sebastien Morisset <jsmoriss@jsm-mv.dyndns.org>
#             Removed global allow of incoming packets on SSHPORTS.
# 2000-10-14  Jean-Sebastien Morisset <jsmoriss@jsm-mv.dyndns.org>
#             Initial module written for v5.0.
#
#-----------------------------------------------------------------------
# MODULE CONFIGURATION
#-----------------------------------------------------------------------
#
#m# 123
#a# accept
#i# cluster
#n# ssh
#t# clients
#
#   |--------------------------------------------------------------------|
#d# Although SSH encrypts a session, anyone with a valid user ID and 
#d# password can login. If you've disabled password logins and only permit
#d# public/private key authentication, this might be a little more secure.
#   |--------------------------------------------------------------------|
#
#-----------------------------------------------------------------------
# START OF MODULE CODE
#-----------------------------------------------------------------------

for host in `Option_Value accept $INTOPT ssh clients`
do
	echo "Accept $INTOPT $IPADDR SSH <- $host SSH $LOG_MSG"

	ipchains -A $INCHAIN  -j ACCEPT -p tcp      -s $host   $SSHPORTS -d $IPADDR ssh       $LOG
	ipchains -A $OUTCHAIN -j ACCEPT -p tcp ! -y -s $IPADDR ssh       -d $host   $SSHPORTS $LOG
done
unset host

