Herramientas de usuario

Herramientas del sitio


informatica:certificaciones:lpic:lpic-2:205_network_configuration:205.3

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
informatica:certificaciones:lpic:lpic-2:205_network_configuration:205.3 [2021/04/08 12:34] – [dig] tempwininformatica:certificaciones:lpic:lpic-2:205_network_configuration:205.3 [2021/06/22 13:42] (actual) tempwin
Línea 183: Línea 183:
 </WRAP> </WRAP>
  
 +<code bash>
 +dig google.es
 +</code>
 +
 +<code>
 +
 +; <<>> DiG 9.11.5-P4-5.1+deb10u3-Debian <<>> google.es
 +;; global options: +cmd
 +;; Got answer:
 +;; ->>HEADER<<- opcode: QUERY, status: FORMERR, id: 55359
 +;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
 +;; WARNING: recursion requested but not available
 +
 +;; OPT PSEUDOSECTION:
 +; EDNS: version: 0, flags:; udp: 4096
 +; COOKIE: b1a8a025bbd00c57 (echoed)
 +;; QUESTION SECTION:
 +;google.es.                     IN      A
 +
 +;; Query time: 15 msec
 +;; SERVER: 10.0.2.3#53(10.0.2.3)
 +;; WHEN: Thu Apr 08 12:35:01 CEST 2021
 +;; MSG SIZE  rcvd: 50
 +</code>
 +
 +Podemos hacer consultas al servidor DNS pidiendo ciertos tipos de entradas. Por ejemplo, servidores de correo:
 +
 +<code bash>
 +dig MX google.es
 +</code>
 +
 +Si queremos que nos dé la información principal:
 +
 +<code bash>
 +dig ANY google.es
 +</code>
 +
 +===== TCP wrappers =====
 +
 +Permite el bloqueo de determinados servicios a través de la red.
 +
 +Utiliza la librería ''libwrap'' que permite monitorizar y controlar las conexiones TCP entrantes.
 +
 +Los ficheros de configuración son:
 +
 +  * ''/etc/hosts.allow''
 +  * ''/etc/hosts.deny''
 +
 +Durante la comprobación de reglas **primero** se verifica el ''/etc/hosts.allow'' y después ''/etc/hosts.deny''.
 +
 +''tcpd'' es el demonio que lee los ficheros de configuración.
 +
 +Si en una máquina añadimos hosts al fichero ''/etc/hosts.deny'' estaríamos bloqueando el acceso de esos hosts a dicha máquina.
 +
 +Formato de los ficheros:
 +
 +<code>
 +servicio: clientes
 +</code>
 +
 +  * **servicio**: servicio a comprobar (ALL para todos)
 +  * **clientes**: clientes autorizados o prohibidos (según sea fichero ''hosts.allow'' o ''hosts.deny'').
 +
 +Ejemplo ''/etc/hosts.allow'':
  
 <code> <code>
-dig factorhumanoformacion.com 
-205.3 Solución de Problemas de Red (4) 
-TCP WRAPPERS 
-• Permite el bloqueo de determinados servicios a través 
-de la red 
-• Utiliza la librería libwrap. 
-• Los ficheros de configuración son: 
-/etc/hosts.allow 
-/etc/hosts.deny 
-•Durante la comprobación de reglas primero se verifica el 
-/etc/hosts.allowy después /etc/hosts.deny 
-• tcpd: demonio que lee los ficheros de configuración. 
-205.3 Solución de Problemas de Red (4) 
-TCP WRAPPERS 
-Formato: servicio: clientes 
-servicio: servicio a comprobar (ALL para todos) 
-clientes: clientes autorizados o prohibidos. 
-ALL: Todos los hosts. 
-LOCAL: Todos los host de la red local. 
-UNKNOWN: Host con nombre sin resolver. 
-KNOWN: Host con nombre conocido. 
-EXCEPT: Permite la exclusion de hosts. 
-205.3 Solución de Problemas de Red (4) 
-TCP WRAPPERS 
-/etc/hosts.allow 
 vsftpd: 192.168.2.5 vsftpd: 192.168.2.5
 telnet: ALL telnet: ALL
-/etc/hosts.deny+</code> 
 + 
 +Quiere decir que al servicio ''vsftdp'' solo podrá acceder el host ''129.168.2.5'', pero a ''telnet'' podrán todos. 
 + 
 +Ejemplo ''/etc/hosts.deny'': 
 + 
 +<code>
 ALL: .baddomain.org EXCEPT trusted.baddomain.org ALL: .baddomain.org EXCEPT trusted.baddomain.org
-205.3 Solución de Problemas de Red (4) +</code> 
-PREGUNTA DE EXAMEN+ 
-A DNS server has the IP address 192.168.0.1. Which TWO of the +Quiere decir que los hosts que pertenzcan a ''.baddomain.org'' no podrán acceder a nada, salvo los hosts de trusted.baddomain.org. 
-following need to be done on a client machine to use this DNS + 
-server? +  * ''ALL'': Todos los hosts. 
-A. Add nameserver 192.168.0.1 to /etc/resolv.conf +  * ''LOCAL'': Todos los host de la red local. 
-B. Run route add nameserver 192.168.0.1 +  * ''UNKNOWN''Host con nombre sin resolver. 
-C. Run ifconfig eth0 nameserver 192.168.0.1 +  * ''KNOWN'': Host con nombre conocido. 
-D. Ensure that the dns service is listed in the hosts entry +  * ''EXCEPT'': Permite la exclusion de hosts. 
-in the /etc/nsswitch.conf file +===== Tests ===== 
-E. Run bind add nameserver 192.168.0.1 + 
-205.3 Solución de Problemas de Red (4) +**A DNS server has the IP address 192.168.0.1. Which TWO of the following need to be done on a client machine to use this DNS server?** 
-PREGUNTA DE EXAMEN: + 
-Considering the following kernel IP routing table now, which of the following +  * Add ''nameserver 192.168.0.1'' to ''/etc/resolv.conf'' (**Solución**) 
-commands must be remove the route to the network 10.10.1.0/24?+  Run ''route add nameserver 192.168.0.1'' 
 +  Run ''ifconfig eth0 nameserver 192.168.0.1'' 
 +  Ensure that the dns service is listed in the hosts entry in the ''/etc/nsswitch.conf'' file (**Solución**) 
 +  Run ''bind add nameserver 192.168.0.1'' 
 + 
 +En el fichero ''/etc/nsswitch.conf'' se especifica qué resuelve antes, si los archivos como ''/etc/hosts'' o el DNS
 + 
 +**Considering the following kernel IP routing table now, which of the following commands must be remove the route to the network 10.10.1.0/24?** 
 +<code>
 Kernel IP routing table Kernel IP routing table
-Destination Gateway Genmask Flags Metric Ref Use Iface +Destination        Gateway          Genmask          Flags Metric Ref Use Iface 
-200.207.199.162 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 +200.207.199.162    0.0.0.0          255.255.255.255  UH 0 0 0 ppp0 
-172.16.87.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 +172.16.87.0        0.0.0.0          255.255.255.0    U 0 0 0 eth0 
-192.168.246.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 +192.168.246.0      0.0.0.0          255.255.255.0    U 0 0 0 eth1 
-10.10.1.0 192.168.246.11 255.255.255.0 UG 0 0 0 eth1 +10.10.1.0          192.168.246.11   255.255.255.0    UG 0 0 0 eth1 
-127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo +127.0.0.0          0.0.0.0          255.0.0.0        U 0 0 0 lo 
-0.0.0.0 200.207.199.162 0.0.0.0 UG 0 0 0 ppp0 +0.0.0.0            200.207.199.162  0.0.0.0          UG 0 0 0 ppp0
-A.route del 10.10.1.0 +
-B.route del 10.10.1.0/24 +
-C.route del -net 10.10.1.0/24 +
-D.route del 10.10.1.0/24 gw 192.168.246.11 +
-E.route del -net 10.10.1.0+
 </code> </code>
 +
 +  * ''route del 10.10.1.0''
 +  * ''route del 10.10.1.0/24''
 +  * ''route del -net 10.10.1.0/24'' (**Solución**)
 +  * ''route del 10.10.1.0/24 gw 192.168.246.11''
 +  * ''route del -net 10.10.1.0''
 +
 +
informatica/certificaciones/lpic/lpic-2/205_network_configuration/205.3.1617878066.txt.gz · Última modificación: por tempwin