Problema con IPTABLES

Quisiera ver si me puedes hechar una mano con esto, lo que sucede es que, tengo este script, en fedora core 8 para iptables. Y me da una lista de errores, que se encuentra mas abajo.
#CONFIGURACION DE SEGURIDAD
#PARAR EL SERVICIO DE IPTABLES
/sbin/service iptables stop
#MODULOS
/sbin/modprobe ip_nat_ftp
/sbin/modprobe ip_conntrack_ftp
#VARIABLES USADAS
eth0=192.168.5.144
eth1=10.5.1.1
subred=10.5.0.0/16
database=192.168.1.8
#POLITICAS POR DEFECTO
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
#CONSULTAS LOCALES
iptables -A FORWARD -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT
iptables -A INPUT -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT
#CAMINOS
Iptables -N WAN-FIR
Iptables -N LAN-FIR
Iptables -N LAN-WAN
Iptables -N WAN-LAN
#DEFINICION DE CAMINIOS
Iptables -A INPUT -d $eth0 -i eth0 -j WAN-FIR
iptables -A INPUT -s $subred -i eth1 -d $eth1 -j LAN-FIR
iptables -A FORWARD -s $subred -i eth1 -j LAN-WAN
iptables -A FORWARD -d $subred -i eth0 -j WAN-LAN
#REGLAS de NAT
iptables -t nat -A POSTROUTING -s $subred -j SNAT --to $eth0
#REGLAS WAN-FIR
Iptables -A WAN-FIR -p tcp --dport 22 -j ACCEPT
iptables -A WAN-FIR -p tcp --dport 80 -j ACCEPT
iptables -A WAN-FIR -p tcp --dport 3128 -j ACCEPT
iptables -A WAN-FIR -m state --state ESTABLISHED, RELATED -j ACCEPT
iptables -A WAN-FIR -p icmp -j ACCEPT
iptables -A WAN-FIR -j DROP
#REGLAS LAN-FIR
Iptables -A LAN-FIR -p tcp --dport 3128 -j ACCEPT
iptables -A LAN-FIR -p tcp --dport 80 -j ACCEPT
iptables -A LAN-FIR -p icmp -j ACCEPT
iptables -A LAN-FIR -j DROP
#REGLAS LAN-WAN
Iptables -A LAN-WAN -p tcp -d $database --dport 1521 -j ACCEPT
iptables -A LAN-WAN -p udp --dport 20:21 -j ACCEPT
iptables -A LAN-WAN -p tcp --dport 20:21 -j ACCEPT
iptables -A LAN-WAN -p tcp --dport 80 -j DROP
iptables -A LAN-WAN -p tcp --dport 3128 -j DROP
iptables -A LAN-WAN -p tcp --dport 135:139 -j DROP
iptables -A LAN-WAN -p udp --dport 135:139 -j DROP
iptables -A LAN-WAN -p tcp --dport 445 -j DROP
iptables -A LAN-WAN -p udp --dport 445 -j DROP
iptables -A LAN-WAN -p tcp --dport 22 -j DROP
iptables -A LAN-WAN -p tcp --dport 53 -j DROP
iptables -A LAN-WAN -p udp --dport 53 -j DROP
iptables -A LAN-WAN -p tcp --dport 3189 -j DROP
iptables -A LAN-WAN -p icmp -j ACCEPT
iptables -A LAN-WAN -j ACCEPT
# REGLAS WAN-LAN
Iptables -A WAN-LAN -s $database -j ACCEPT
iptables -A WAN-LAN -m state --state ESTABLISHED, RELATED -j ACCEPT
iptables -A WAN-LAN -p icmp -j ACCEPT
iptables -A WAN-LAN -j DROP
#SALVAR LOS CAMBIOS
/sbin/service iptables save
error
[root@serprox ~]#./crea
: command not found
Usage: iptables {start|stop|restart|condrestart|status|panic|save}
: command not found
not found.le ip_nat_ftp
not found.le ip_conntrack_ftp
: command not found
: command not found
iptables: Bad policy name
iptables: Bad policy name
iptables: Bad policy name
: command not found
'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
: command not found
iptables: Chain already exists
iptables: Chain already exists
iptables: Chain already exists
iptables: Chain already exists
: command not found
'ptables v1.3.8: Invalid target name `WAN-FIR
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `LAN-FIR
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `LAN-WAN
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `WAN-LAN
Try `iptables -h' or 'iptables --help' for more information.
: command not found
'ptables v1.3.8: Bad IP address `192.168.5.144
Try `iptables -h' or 'iptables --help' for more information.
: command not found
'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
: command not found
'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
: command not found
'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `ACCEPT
Try `iptables -h' or 'iptables --help' for more information.
'ptables v1.3.8: Invalid target name `DROP
Try `iptables -h' or 'iptables --help' for more information.
: command not found
Usage: iptables {start|stop|restart|condrestart|status|panic|save}

1 respuesta

Respuesta
1
Bueno vamos ver poco a poco
Primero lo que te dice es que no ejecutes:
#./crea
te recomienda algo asi como:
#/etc/init.d/iptables start
revisa en el init.d si lo tienes
Despues, bueno te dice que no tienes los modulos instalados
not found.le ip_nat_ftp
not found.le ip_conntrack_ftp
y bueno lo demas, ¿Cómo te dice son algunos problemas con tu configuracion de firewall
has probrado shorewall?
es mas sencillo que el iptable y es muy poderoso...
http://www.fedora-ve.org/gomix/shorewall/Documentation.htm#Hosts
o
http://www.grulic.org.ar/eventos/charlas/shorewall-2005-09.html
o tienes
Firewall Builder - http://www.fwbuilder.org
Herramienta grafica de configuracion de Netfilter. Permite describir firewalls complicados a la vez que permite al usuario promedio una seguridad aceptable con muy pocos conocimientos de Netfilter. No es tan flexible como Shorewall y requiere X-Window (¿y Qt?).,
hay una amplia gama... pero si quieres seguir con iptables, que en lo personal no recomiendo, pues avisame y trabajaremos en ello.
me encataria aprender otro tipo de firewall pero por regla de la empresa me exigen trabajar con iptables.
como puedo instalar los modulos que faltan. ??
Bueno con respecto a los otros firewall, entonces podrias usa fwbuilder, el cual te compilaria en iptables, pero bien:
Ejecuta en el bash
#modprobe
y luego
#lsmod | grep
Y verifica que se instalo,
Y de todos modos, no se si fedora cuenta con el archivo /etc/modules, de ser asi, alli es donde uno escribe los modulos que uno quiere que se monten cuando arranca el equipo...
Y si quieres enviame tu msn por el privado, para que interactuelmos mejor.

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas