
#-----------------------------------------------------------------------
# Copyright (C) 2000-2001, Jean-Sebastien Morisset <jsmoriss@mvlan.net>
#-----------------------------------------------------------------------
# $Id: iana_networks_chains.sh,v 1.4 2001/08/11 17:01:20 jsmoriss Exp $
#-----------------------------------------------------------------------
#  $RCSfile: iana_networks_chains.sh,v $
#   $Author: jsmoriss $
# $Revision: 1.4 $
#     $Date: 2001/08/11 17:01:20 $
#   $Locker:  $ 
#     $Name:  $
#-----------------------------------------------------------------------
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by 
# the Free Software Foundation <http://www.gnu.org/copyleft/gpl.txt>.
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License (LICENSE file in archive) for more details.
#
#-----------------------------------------------------------------------
# README
#-----------------------------------------------------------------------
#
# A bourne shell function used by rcf; a very secure, fast, and complete
# firewall for linux <http://jsmoriss.mvlan.net/linux/rcf.html>.
#
# Special user chain for checking IANA reserved networks.
#
#-----------------------------------------------------------------------
# FUNCTION
#-----------------------------------------------------------------------

Iana_Networks_Chains () {

	if [ "$IANA_RESERVED_NETWORKS" ]
	then
		echo "Creating ianai Chains and Adding Deny Rules"

		ipchains -N ianai
		for reserved_network in $IANA_RESERVED_NETWORKS
		do
		    ipchains -A ianai -j DENY -p all -s $reserved_network -d $ANY -l
		done
		unset reserved_network
		####ipchains -A ianai -j RETURN $LOG
	fi
}

