#!/bin/sh
#	antispoofppp-up 0.02
#
#	Copyright (C) 2000:	Manel Marin <manel3@wanadoo.es>
#	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 ;)
PATH=/usr/lib/firewall-easy:/sbin:/usr/sbin:/bin:/usr/bin


IFACE_INET=$PPP_IFACE
IP_DINAMICA=$PPP_LOCAL


# MENSAJE DE CONEXION
echo "`date '+%b %d %H:%M:%S'` antispoofppp-up:\
  Adding antispoof rule to IP $IP_DINAMICA asigned to $IFACE_INET"


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


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