Outline ·
[ Estándar ] ·
Lineal+
Instalar Firewall "Arno-iptables-firewall" en Debi
| K3RN3L P4N1C |
Sep 16 2007, 02:31 PM
|
/home/ericlinux
    
Grupo: Members
Mensajes: 247
Registrado: 11-September 07
Desde: Linux.
Miembro nº: 211.319

|
Hola. Hoy mostraré como instalar el cortafuegos "Arno's IPTABLES firewall script". Es muy sencillo de configurar e instalar y apenas necesitaréis conocimientos sobre IPTABLES para hacerlo funcionar.
La página del autor es ésta: http://rocky.eld.leidenuniv.nl/
NOTA: - Éste script deberíamos instalarlo una vez haya finalizado la instalación base de nuestra Debian Etch. - Para seguir estos pasos debes tener conexión a internet medianter un router/modem.
1. Nos logueamos en una terminal gráfica o texto (CTRL+ALT+F1...F6) como usuario root e instalamos el paquete "arno-iptables-firewall": $ su - password:
# aptitude install arno-iptables-firewall Leyendo lista de paquetes... Hecho Creando árbol de dependencias... Hecho Leyendo la información de estado extendido Inicializando el estado de los paquetes... Hecho Leyendo las descripciones de las tareas... Hecho Construir la base de datos de etiquetas... Hecho Se instalarán automáticamente los siguientes paquetes NUEVOS: gawk Se instalarán los siguiente paquetes NUEVOS: arno-iptables-firewall gawk 0 paquetes actualizados, 2 nuevos instalados, 0 para eliminar y 0 sin actualizar. Necesito descargar 792kB de ficheros. Después de desempaquetar se usarán 2511kB. ¿Quiere continuar? [Y/n/?] y escribiendo información de estado extendido... Hecho Des:1 http://ftp.rediris.es etch/main gawk 1:3.1.5.dfsg-4 [694kB] Des:2 http://ftp.rediris.es etch/main arno-iptables-firewall 1.8.8.c-1 [97,7kB] Descargados 792kB en 44s (17,8kB/s).
2. Una vez instalado, nos aparecerá la siguiente ventana que nos pregunta si queremos configurar el paquete mediante debconf.
RESPUESTA: yes [ENTER]
3. En la siguiente ventana debemos especificar la interfaz de red por la que salimos a internet. Como me conecto a través de un modem/router y sólo tengo una tarjeta de red, la interface es "eth0".
RESPUESTA: eth0 [ENTER]
4. Ahora debemos especificar que puertos TCP necesitamos tener abiertos en nuestro firewall. EJEMPLO: - Amule: Abrir los puertos 4661 TCP, 4664 UDP - Servidor SSH: abrir el puerto 22
NOTA: El firewall de nuestro router debe tener abiertos también éstos puertos.
RESPUESTA: 4661 22 [ENTER]
5. Nos pedirá que puertos UDP queremos abrir:
RESPUESTA: 4664 [ENTER]
6. La ventana siguiente sólo deberemos configurarla en el caso de que tengamos varias tarjetas de red (eth0, eth1...) y una de ellas, esté configurada hacia nuestra red local a la cual queremos permitirle cualquier conexión a nuestro equipo.
RESPUESTA: dejar_en_blanco [ENTER]
7. Finalmente iniciamos nuestro firewall.
RESPUESTA: yes [ENTER]
Escribiendo información de estado extendido... Hecho Preconfigurando paquetes ... Seleccionando el paquete arno-iptables-firewall previamente no seleccionado. (Leyendo la base de datos ... 88957 ficheros y directorios instalados actualmente.) Desempaquetando arno-iptables-firewall (de .../arno-iptables-firewall_1.8.8.c-1_all.deb) ... Configurando arno-iptables-firewall (1.8.8.c-1) ...
Arno's Iptables Firewall Script v1.8.8c ------------------------------------------------------------------------------- Sanity checks passed...OK Detected IPTABLES module... Loading additional IPTABLES modules: All IPTABLES modules loaded! Configuring /proc/.... settings: Enabling anti-spoof with rp_filter Enabling SYN-flood protection via SYN-cookies Disabling the logging of martians Disabling the acception of ICMP-redirect messages Setting the max. amount of simultaneous connections to 16384 Enabling protection against source routed packets Setting default conntrack timeouts Enabling reduction of the DoS'ing ability Setting Default TTL=64 Disabling ECN (Explicit Congestion Notification) Enabling support for dynamic IP's Flushing route table /proc/ setup done... Flushing rules in the filter table Setting default (secure) policies Using loglevel "info" for syslogd
Setting up firewall rules: ------------------------------------------------------------------------------- Accepting packets from the local loopback device Enabling setting the maximum packet size via MSS Enabling mangling TOS Logging of stealth scans (nmap probes etc.) enabled Logging of packets with bad TCP-flags enabled Logging of INVALID packets disabled Logging of fragmented packets enabled Logging of access from reserved addresses enabled Setting up anti-spoof rules Reading custom IPTABLES rules from /etc/arno-iptables-firewall/custom-rules Loading (user) plugins Setting up INPUT policy for the external net (INET): Enabling support for a DHCP assigned IP on external interface(s): eth0 Logging of explicitly blocked hosts enabled Logging of denied local output connections enabled Packets will NOT be checked for private source addresses Allowing the whole world to connect to TCP port(s): 4661 22 Allowing the whole world to connect to UDP port(s): 4664 Denying the whole world to send ICMP-requests(ping) Logging of dropped ICMP-request(ping) packets enabled Logging of dropped other ICMP packets enabled Logging of possible stealth scans enabled Logging of (other) connection attempts to PRIVILEGED TCP ports enabled Logging of (other) connection attempts to PRIVILEGED UDP ports enabled Logging of (other) connection attempts to UNPRIVILEGED TCP ports enabled Logging of (other) connection attempts to UNPRIVILEGED UDP ports enabled Logging of other IP protocols (non TCP/UDP/ICMP) connection attempts enabled Logging of ICMP flooding enabled Applying INET policy to external (INET) interface: eth0 (without an external subnet specified) Security is ENFORCED for external interface(s) in the FORWARD chain
Apr 02 23:36:20 All firewall rules applied.
Ya tendremos nuestro firewall configurado.
Podemos volver a ejecutar la configuración del firewall con el siguiente comando: # dpkg-reconfigure arno-iptables-firewall
Si lo que queremos es deshabilitar temporalmente el cortafuegos: # /etc/init.d/arno-iptables-firewall stop
Para habilitarlo de nuevo: # /etc/init.d/arno-iptables-firewall start
FUENTE: http://ericlinux.blogspot.com/
K3RN3L P4N1C.
|
|
|
|
|