#!/bin/sh
#	antispoofppp-up 0.01
#
#	Copyright (C) 2000:	Manel Marin <manel3@apdo.com>
#	Licence:		GNU GPL version >= 2
#
#	Aade al cortafuegos regla antispoof a la IP dinamica asignada por
#	el ISP a la conexin PPP y registrar en el log la conexin
#

exec 2>&1	# Enviar errores a stdout ( Gracias a Luis Colorado ;)


IFACE_INET=$PPP_IFACE
IP_DINAMICA=$PPP_LOCAL


# MENSAJE DE CONEXION
echo "`date '+%b %d %H:%M:%S'` antispoofppp-up:\
  Aadiendo regla antispoof a IP $IP_DINAMICA asignada a $IFACE_INET"


# LANZAR EL SCRIPT ADECUADO AL KERNEL
runfwscript antispoofppp-up	# Esto lanza X-ipchains, etc...


# LOG DE CONEXION
logger -p daemon.warn -t pppd -- "--<>------Conectados: $PPP_IFACE IP:$PPP_LOCAL"
