Seguridad IPTABLES Realizado: Kepa Bengoetxea

Slides:



Advertisements
Presentaciones similares
Carlos Armas Roundtrip Networks Hervey Allen NSRC.
Advertisements

© 2006 Microsoft Corporation. All rights reserved.
1 1.Prepare and Install 1.1 You have to know before installation 1.2 Hardware Installation 2. How to use Bluetooth Printer Adapter’s Services 2.1 Connect.
¿Qué hora es? What time is it?. ¿Qué hora es? It’s 1:00 Es la una (notice we do not say uno for time but una) 1:00 is the ONLY time where we say “Es la…”
Stem-changing verbs.
PRUEBA DE UBICACION PARA HISPANOHABLANTES
El Subjuntivo Expressing uncertainty …or… I wish I were a millionaire!
Spanish –er and –ir verbs. Verbs in General English and Spanish both conjugate verbs. They can be organized as 1rst, 2 nd, and 3 rd person. If you need.
66.69 Criptografía y Seguridad Informática FIREWALL.
Verbs Like Gustar GUSTAR Y VERBOS SIMILARES. Hoy vamos a hablar sobre los intereses, las preferencias y las actividades en la vida de… Señor Mock.
Telling Time.
What time is it? DLT: I can tell time in Spanish..
Mi tema es la amistad By: Paulina Agenor.
Filtrado de paquetes y NAT. Aprendizajes esperados Contenidos: Filtrado de paquetes NAT.
Costar and numbers to one millon. Use the verb costar (which means to cost) to talk about what something costs. Costar is only used in the third person,
25/6/2014 Esto probablemente debe grabarlo en el espejo del baño Donde lo pueda leer todos los días. Usted no puede darse cuenta de ello, pero es 100%
Objective: I can recognize and accurately use gender agreement. Do Now: Match the following Spanish and English words: 1. Pelirroja a. Good-looking 2.
IRREGULAR VERBS. Remember how regular verbs are formed? You drop the –ar, -er, or –ir and add the appropriate ending.
Objetivo: Which form of the verb should we use? Are we pronouncing the vocabulary correctly? Hagan Ahora: El papel de APT P. 69, Actividad 2.
-AR Verbs In Spanish, there are three classes (or conjugations) of verbs: those that end in –AR, those that end in –ER, and those that end in –IR. This.
TCP/IP Error Message Módulo 8 Semestre 2 CCNA. Capítulo 9, TCP/IP Forouzan.
Pronombre Relativo QUEQUIEN QUEQUIEN CUYO CUYO LO QUE LO QUE CUYO LO QUE EL QUE EL QUEEL QUEEL QUE.
What has to be done today? It can be done in any order. Make a new ALC form Do the ALC Get two popsicle sticks Get 16 feet of yarn. That is 4 arms width.
FIREWALL SOBRE GNU/LINUX Políticas de Acceso Expositores Alex Llumiquinga Paulo Oñate Ana Ramos.
Hace + Time Expressions
El uso del artículo como sustantivo
ALC #7 Do the math problems and write the answer in Spanish.
First Grade – High Frequency Word Reading Competition Classroom Competition Created by: Malene Golding School Improvement Officer: Kimberly Fonteno.
Unit 2A: Lesson 2 How to Talk About Your Schedule Gramática- Present tense of –ar verbs.
Español 1 Hoy es lunes el 10 de marzo de La Campana Escribe dónde, a tu familía, le gusta ir en español. Ejemplo: A mi primo le gusta ir a la biblioteca.
At the Amusement Park ¡Qué divertido! ¡Qué miedo! la montaña rusa los autitos chocadores el boleto tener miedo la vuelta al mundo UNIDAD 7 Lección 2 Table.
Mayo 2015 ¿Cómo es tu casa? LO: To be able to describe the type of house you live in, say where it is located and give an opinion on it.
WWW. WIRELESS WIFI Wireless-Fidelity Es un mecanismo de conexión de dispositivos electrónicos de forma inalámbrica.
¿Qué haces en la escuela? Question words, objects, yo-go’s.
Water Conservation: water conservation is very important to the world, not only because we waste it when we don’t need it, but because were wasting water.
Lunes 15 de septiembre Máx. : 23° Mín. : 19° Hazlo ahora 3 min.
Introducción Nivel 4. Modelo OSI Propiedades Nivel 4 Entrega de mensajes garantizada. Entrega de mensajes en el mismo orden en el que fueron enviados.
TOPICS: SABER/CONOCER AND YO-GO VERBS Essential questions: How do I say whom and what I know? How do I use some other irregular verbs?
Time Telling time is rather easy. You only need to know the numbers up to 59 to be able to tell the time.
SPANISH 8 TH GRADE With Señorita Hall Classes #1-5 – August- September 2013 Capítulo 1: Lectura 1 ● El cuento del gato Warm-Up In your carpeta fill out.
Spanish Sentence Structure How can we make better sentences?
Hacer with expressions of time When you are talking about how long something has been happening or how long ago it happened, you will use the verb hacer.
En el cibercafé Unidad 7, Leccion 1 Esp. 2. La tecnología Vocabulario Nuevo.
CONJUGATION.
Ing. Michael Puma Huanca
Iptables Introduccion Comandos Basicos Ejemplos.
HOW LONG AGO: HACER WITH EXPRESSIONS OF TIME. Para el fin de esta leccíon, se puede:  Comprender los usos de “hacer” con expresiónes de tiempo.  Comprender.
Associative, Commutative, and Distributive Properties of Addition and Multiplication August 18th Students only need to copy the writing in purple. Students.
JUEVES, EL 10 DE SEPTIEMBRE LT: I WILL RECOGNIZE SOME NEW VOCABULARY WORDS. Go over tests & retake procedures Interpretive Assessment: numbers & alphabet.
 “La persistencia de la memoria” (1931), Salvador Dalí.
Essential ?: How do I use these irregular verbs? How are they different than the verbs I already know?
REFLEXIVE VERBS IN SPANISH Pregunta esencial: How do I use relfexive verbs with their pronouns to talk about what people do for themselves.
Benemérita Universidad Autónoma de Puebla Comandos Unix Ivan Rosas Torre.
Put your body projects/papers on the table in the back.
Double Object Pronouns What happens when we have both direct and indirect object pronouns in the same sentence? What goes where? Information for this lesson.
How would you spell the following word out loud in Spanish? Abuelito.
Please sit in your assigned seat. Take out your homework from last class (decode the message). Silently complete the “warm up” section of your paper.
Un juego de adivinanzas: ¿Dónde está el tesoro? A1B1C1D1E1F1 A4B4C4D4E4F4 A2B2C2D2E2F2 A5B5C5D5E5F5 A3B3C3D3E3F3 A6B6C6D6E6F6 Inténtalo de nuevo Inténtalo.
Antes de empezar – ¿Cómo se llaman estos quehaceres? (Necesito la tarea.)
LOS VERBOS REFLEXIVOS. WRITE: What is a reflexive verb? A reflexive verb describes when a person doing an action is also receiving the action.
¡Bienvenidos a clase! lunes, el 6 de abril. ¿Que vamos a hacer hoy? 1.tener + que + infinitive 2.hace + time expressions 3.adverbios.
UT7. SEGURIDAD PERIMETRAL
¡BIENVENIDOS! ALPHABET, COGNATES.. DO NOW Take five minutes to Silently and Independently fill out the calendar on your desk. Every Calendar should have:
  Jugó=he/she played  Use the preterite tense for past actions that are viewed as over and are not being connected to the present. ¿Te acuerdas?
100 Book Challenge Desafío de leer 100 libros. Cada niño tendrán: Una bolsa de libros Una carpeta 2 libros para leer cada noche Un informe de lectura.
Esponja 1.Nosotros _____ despertamos temprano. 2.Tu _____levantas tarde. 3.Yo _____ me lavo los dientes todos los dias. 4.Por lo general, Chuy no _____.
Spanish III Honors Week 31. Para Empezar 20 de abril In English, what is happening in this comic?
AQA Unit 2 Speaking Los medios La televisión La publicidad Las tecnologías de la comunicación La cultura de todos los días El cine La música La moda La.
“Firewalls”. Firewall Dispositivo que interconecta dos redes Dispositivo de red que regula el acceso a una red interna Programas que protegen los recursos.
Asking Questions P. 184 Realidades 1.
Transcripción de la presentación:

Seguridad IPTABLES Realizado: Kepa Bengoetxea

Iptables Referencia:

Iptables Iptables filtra los paquetes de red. Un fichero antes de ser enviado por la red se descompone en paquetes red que se reensamblarán de nuevo en el ordenador destino. Un paquete de red es una colección de datos en diferentes tamaños y formatos. El paquete puede decirle a los ordenadores a lo largo del camino, así como al ordenador destino, de dónde viene, a dónde va, qué tipo de paquete es, y otras muchas cosas más.

Iptables.Tablas El filtro de red del kernel tiene tres tablas:  Filter :La tabla por defecto para el manejo de paquetes de red. Ejm:Filtrar paquetes que proceden de un puerto, etc...  Nat(Network Address Translation) : se puede utilizar para modificar las direcciones de origen y destino grabadas en un paquete. Ejm: que varios ordenadores de una misma red compartan una sola dirección ip pública, y todos puedan usar internet simultáneamente.  Mangle: Usada por tipos específicos de alteración de paquetes. Ejm:para que todo paquete cuya dirección MAC que no coincida con el IP asignado por el DHCP sea omitido. Estas tablas tienen asociados un grupo de cadenas internas. A cada cadena interna se le asocia un conjunto de reglas.

Iptables.Filter.Cadenas La tabla filter tiene predefinidas las siguientes cadenas internas: INPUT: iptables envia el paquete a esta cadena si el destino del paquete de red es el sistema local. OUTPUT:iptables envia el paquete a esta cadena si el sistema local es el que genera el paquete de red. FOWARD: iptables envia el paquete a esta cadena si el paquete procede de una máquina origen y destino diferente al sistema local.  Para más información ver el dibujo siguiente que ha sido recogido de: hn/iptables-intro.htm#_Toc

Tabla.Cadena.Reglas-Objetivo A cada cadena interna se le asocia un conjunto de reglas Si se cumple el conjunto de reglas o regla se realiza el objetivo (target) Tipos de objetivos:(simil cartero)  ACCEPT: Acepta el paquete, y va a su aplicación destino  DROP: Niega el paquete, no se avisa de ello  REJECT: Niega el paquete, pero se le avisa con un error al origen.

Tabla.Cadena.Reglas-Objetivo Podemos ver la reglas: iptables -L (Por defecto no hay ninguna regla) Por cada paquete que entra va pasando por todas las reglas *filter-input # Todas las conexiones establecidas son aceptadas sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT

Tabla.Cadena.Reglas-Objetivo Añadir reglas para filtrar paquetes de red: -Se ACEPTA todos los paquetes que vienen por la INTERFACE loopback:( (La interfaz loopback' es un tipo especial de interfaz que le permite hacer conexiones consigo mismo. Por ejemplo, puede que desee probar algún tipo de programa sin interferir con alguien más en su red. Por convención, la dirección de red IP ha sido asignada específicamente para el dispositivo de pruebas) sudo iptables -I INPUT -i lo -j ACCEPT -Se ACEPTA todos los paquetes que entran por el PUERTO 80: sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT

Iptables.Configuración #internet control message protocol (Se utiliza para indicar condiciones de error, usado en el protocolo ip) sudo iptables -A INPUT -p icmp --icmp-type any -j ACCEPT #dns sudo iptables -A INPUT -p udp --dport d j ACCEPT sudo iptables -A INPUT -p udp --dport d j ACCEPT sudo iptables -A INPUT -p udp --dport d j ACCEPT #ipp(internet printer protocol)-impresora conectada en red con cups sudo iptables -A INPUT -p tcp -m tcp --dport 631 -j ACCEPT

Iptables.Configuración #EVITANDO INTENTOS DE SSH #creamos una cadena SSH y SSHSCAN sudo iptables -t filter -N SSH sudo iptables -t filter -N SSHSCAN #todos los paquetes que tienen como destino el puerto 22 son enviados a la cadena SSH sudo iptables -A INPUT -p tcp --dport 22 -j SSH #si provienen de la mismo origen y se producen 6 intentos #en menos de 1 minuto son tratadas por SSHSCAN sudo iptables -A SSH -m state --state NEW -m recent --name SSH -- rsource --update --seconds 60 --hitcount 6 -j SSHSCAN

Iptables.Configuración #se acepta todo lo que no se supone escaneo sudo iptables -A SSH -m state --state NEW -m recent --name SSH -- rsource --set -j ACCEPT #los escaneos se logean con una indicación clara de DEMASIADOS SSH sudo iptables -A SSHSCAN -m limit --limit 1/minute --limit-burst 2 -j LOG --log-prefix "OJO, HAY DEMASIADOS SSH: " #se descartan a modo que no pasan del firewall y no saturan nuestro equipo sudo iptables -A SSHSCAN -j DROP

Iptables.Configuración # Se RECHAZAN TODOS los paquetes que no han sido aceptados hasta ahora, NOTIFICANDO AL ORIGEN un mensaje de icmp-host-prohibited: sudo iptables -A INPUT -j REJECT --reject-with icmp-host- prohibited -Se RECHAZAN TODOS sin notificación: sudo iptables -A INPUT -j DROP

Iptables. Guardando Ver el resultado obtenido: $sudo iptables -L -v Si apagas la máquina todas las reglas que has generado desaparecen, para salvar la reglas usa: iptables-save y iptables-restore. sudo bash -c "iptables-save > /etc/iptables.rules" Nota: Si quieres utilizar iptables, desinstala firestarter Desabilitar el firewall temporalmente vaciando las reglas del iptables: sudo iptables -F

Iptables. Guardando Y para que se guarden después de apagar la red o apliquen antes arrancar la red de manera automática: sudo gedit /etc/network/if-pre-up.d/iptablesload #!/bin/sh iptables-restore < /etc/iptables.rules exit 0 sudo gedit /etc/network/if-post-down.d/iptablessave #!/bin/sh iptables-save -c > /etc/iptables.rules if [ -f /etc/iptables.downrules ]; then iptables-restore < /etc/iptables.downrules fi exit 0 Then be sure to give both scripts execute permissions: sudo chmod +x /etc/network/if-post-down.d/iptablessave sudo chmod +x /etc/network/if-pre-up.d/iptablesload

-A - Append this rule to a rule chain. Valid chains for what we're doing are INPUT, FORWARD and OUTPUT, but we mostly deal with INPUT in this tutorial, which affects only incoming traffic. -L - List the current filter rules. -m conntrack - Allow filter rules to match based on connection state. Permits the use of the --ctstate option. --ctstate - Define the list of states for the rule to match on. Valid states are: NEW - The connection has not yet been seen. RELATED - The connection is new, but is related to another connection already permitted. ESTABLISHED - The connection is already established. INVALID - The traffic couldn't be identified for some reason. -m limit - Require the rule to match only a limited number of times. Allows the use of the --limit option. Useful for limiting logging rules. --limit - The maximum matching rate, given as a number followed by "/second", "/minute", "/hour", or "/day" depending on how often you want the rule to match. If this option is not used and -m limit is used, the default is "3/hour". -p - The connection protocol used. --dport - The destination port(s) required for this rule. A single port may be given, or a range may be given as start:end, which will match all ports from start to end, inclusive.

-j - Jump to the specified target. By default, iptables allows four targets: ACCEPT - Accept the packet and stop processing rules in this chain. REJECT - Reject the packet and notify the sender that we did so, and stop processing rules in this chain. DROP - Silently ignore the packet, and stop processing rules in this chain. LOG - Log the packet, and continue processing more rules in this chain. Allows the use of the --log-prefix and --log-level options. --log-prefix - When logging, put this text before the log message. Use double quotes around the text to use. --log-level - Log using the specified syslog level. 7 is a good choice unless you specifically need something else. -i - Only match if the packet is coming in on the specified interface. -I - Inserts a rule. Takes two options, the chain to insert the rule into, and the rule number it should be. -I INPUT 5 would insert the rule into the INPUT chain and make it the 5th rule in the list. -v - Display more information in the output. Useful for if you have rules that look similar without using -v. -s --source - address[/mask] source specification -d --destination - address[/mask] destination specification -o --out-interface - output name[+] network interface name ([+] for wildcard)