-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCD8oQBRp2MQEyNrURAgquAKCnaLmlwp2OfhlzDCt3z50WhoYOnwCgzkin Ii8rJxIPD/ps56Qcwl6+gWw= =TPMi -----END PGP SIGNATURE-----
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

