La idea es justamente ponerlo todo en un script de arranque y que ejecute las reglas segun la IP que asigne, tengo la IP de mi oficina en /etc/interfaces y me estoy pensando volver a probar los softwares de asignacion de IP al arranque que hace un tiempo atras probe y no me gustaron, si encuentro algo elegante lo posteo a ver si a alguien le sirve.
Saludos
(o_ Pablo A. Wolter N. //\ Usuario Registrado #284649 V_/_ Linux Debian Sid Kernel 2.6.8
"Pienso....luego instalo Linux....entonces existo."
Miguel Angel J�lvez wrote:
A ver si esta vez me he enterado bien. El siguiente script recibe como argumento una interfaz de red y saca la ip:
if [ $# != 1 ]; then echo "Usage: $0 <interface>"; exit; else ETHX=$1; fi
IFCONFIG=/sbin/ifconfig; GREP=/bin/grep; AWK=/usr/bin/awk; SED=/bin/sed;
IP=`$IFCONFIG $ETHX | $GREP 'inet addr' | $AWK '{print $2}' | $SED -e
's/.*://'`
if [ "$IP" == "" ]; then echo "Error: la interfaz $ETHX no existe"; exit; fi
**** reglas iptables ****
Se puede pensar mejor y a�adirlo a init.d para q se ejecute despues de iniciar la red haciendo algunas modificaciones para q te pille todo automaticamente y la verdad q ser�a mu elegante :)
Un saludo
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

