Diferències
Ací es mostren les diferències entre la revisió seleccionada i la versió actual de la pàgina.
| Ambdós costats versió prèvia Revisió prèvia Següent revisió | Revisió prèvia | ||
| info:cursos:pue:lpic2-2021:s9 [02/03/2021 10:37] – [DNS] mate | info:cursos:pue:lpic2-2021:s9 [02/03/2021 12:50] (actual) – [Web Services] mate | ||
|---|---|---|---|
| Línia 8: | Línia 8: | ||
| == Clase | == Clase | ||
| === DNS | === DNS | ||
| - | ==== DNS: Laboratorio | + | ==== DNS: Laboratorio |
| - | ficheros de configuración para el master del servidor DNS | + | continuación |
| + | | ||
| <code; named.conf> | <code; named.conf> | ||
| options { | options { | ||
| Línia 232: | Línia 233: | ||
| * indica en que formato se transfieren las zonas desde el master: text, | * indica en que formato se transfieren las zonas desde el master: text, | ||
| * [[https:// | * [[https:// | ||
| - | * '' | + | * '' |
| * '' | * '' | ||
| * DOC: Manual Certificacion LPIC-2.pdf, pag. 254 | * DOC: Manual Certificacion LPIC-2.pdf, pag. 254 | ||
| Línia 242: | Línia 243: | ||
| masterfile-format text; | masterfile-format text; | ||
| };</ | };</ | ||
| - | * añadir a **named.conf**:< | + | * añadir a **named.conf** |
| options { | options { | ||
| - | | + | |
| | | ||
| | | ||
| Línia 250: | Línia 251: | ||
| 8.8.4.4; | 8.8.4.4; | ||
| }; | }; | ||
| + | </ | ||
| + | |||
| + | ==== DNSSEC | ||
| + | * DOC: (pag. 267), (pag. 17 - laboratorio dns) | ||
| + | * **allow-transfer { acl };** | ||
| + | * **allow-query { acl };** | ||
| + | * **listen-on { acl };** | ||
| + | * **blackhole { acl };** | ||
| + | * **allow-notify { acl };** | ||
| + | * acl:< | ||
| + | acl redlocal { | ||
| + | 192.168.0.150; | ||
| + | 127.0.0.1; | ||
| + | 192.168.2.0/ | ||
| + | }; | ||
| + | </ | ||
| + | * valores predefinidos en la sección acl: | ||
| + | * any | ||
| + | * localhost | ||
| + | * localnets | ||
| + | * none | ||
| + | * ejemplo parcial **named.conf**:< | ||
| + | acl redlocal { | ||
| + | localnets; | ||
| + | }; | ||
| + | |||
| + | acl yomismo { | ||
| + | localhost; | ||
| + | }; | ||
| + | |||
| + | acl parias { | ||
| + | 192.168.2.152; | ||
| + | }; | ||
| + | |||
| + | options { | ||
| + | | ||
| + | | ||
| + | 8.8.8.8; | ||
| + | 8.8.4.4; | ||
| + | |||
| + | }; | ||
| + | | ||
| + | 192.168.2.152; | ||
| + | }; | ||
| + | allow-notify {192.168.2.152; | ||
| + | // | ||
| + | allow-query { yomismo; }; | ||
| + | //blackhole { parias; }; | ||
| + | |||
| + | }; | ||
| + | </ | ||
| + | * yomismo: no permite a un cliente resolver, con un mensage de **REFUSED** | ||
| + | * parias: no responde (ni se logea) a una petición de un cliente | ||
| + | * redlocal: funciona correctamente | ||
| + | * cuenta de servicio: | ||
| + | * usuario propio | ||
| + | * sin shell -> / | ||
| + | * enjaular el proceso | ||
| + | * intercambio seguro entre servidores | ||
| + | * TSIG (Transaction SIGnature) | ||
| + | * DOC: (pag. 270) (pag.9) | ||
| + | * '' | ||
| + | * **-a HMAC-MD5**: único algoritmo de cifrado soportado | ||
| + | * **-b < | ||
| + | * **-n < | ||
| + | * < | ||
| + | ==== laboratorio TSIG | ||
| + | * en el master:< | ||
| + | dnssec-keygen -r /dev/random -a HMAC-MD5 -b 128 -n HOST curso.esp # genera .key y .private | ||
| + | chmod 400 Kcurso.esp* | ||
| + | chown named.named Kcurso.esp* | ||
| + | cat Kcurso*.key # llave pública | ||
| + | </ | ||
| + | * editar **named.conf** y añadir:< | ||
| + | key curso.esp { | ||
| + | algorithm HMAC-MD5; | ||
| + | secret " | ||
| + | }; | ||
| + | </ | ||
| + | * y modificar:< | ||
| + | allow-transfer { key curso.esp; }; | ||
| + | </ | ||
| + | * '' | ||
| + | * en el esclavo, **named.conf**:< | ||
| + | key curso.esp { | ||
| + | algorithm HMAC-MD5; | ||
| + | secret " | ||
| + | }; | ||
| + | server 192.168.1.150 { | ||
| + | keys { curso.esp; }; | ||
| + | }; | ||
| + | </ | ||
| + | * eliminamos las zonas transferidas (para ver que funciona) en el esclavo | ||
| + | * '' | ||
| + | * {{: | ||
| + | |||
| + | <callout type=" | ||
| + | * laboratorio DDNS | ||
| + | * DDoS (pag. 20) | ||
| + | * consultas recursivas: [[https:// | ||
| + | * **allow-recursions** | ||
| + | |||
| + | === Web Services | ||
| + | * DOC: Material Practicas LPIC-2/ | ||
| + | * Manual Certificacion LPIC-2.pdf, pag. 289 | ||
| + | |||
| + | ==== apache | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * levanta :80 :443 <- '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * archivos de configuración | ||
| + | * **/ | ||
| + | * **/ | ||
| + | * **/ | ||
| + | * página bienvenida por defecto: **/ | ||
| + | * document root: | ||
| + | * **/ | ||
| + | * documentos soportados por defecto: | ||
| + | * index.html | ||
| + | * index.htm | ||
| + | * index.php | ||
| + | * ficheros de logs | ||
| + | * **/ | ||
| + | * **/ | ||
| + | * **/ | ||
| + | |||
| + | ==== directivas básicas | ||
| + | * DOC: Material Practicas LPIC-2/ | ||
| + | * **ServerRoot**: | ||
| + | * **Listen 80**: donde queremos que escuche (varios si queremos) | ||
| + | * **Listen < | ||
| + | * **Include conf.modules.d/ | ||
| + | * **User apache** | ||
| + | * sin shell! | ||
| + | * **Group apache** | ||
| + | * **ServerAdmin < | ||
| + | * **ServerName < | ||
| + | * contenedores: | ||
| + | * **Directory**: | ||
| + | * **Files**: afecta a ficheros | ||
| + | * **Location**: | ||
| + | * **AddDefaultCharset UTF-8** | ||
| + | |||
| + | ==== Laboratorio: | ||
| + | * DOC: Material Practicas LPIC-2/ | ||
| + | * '' | ||
| + | * <code; / | ||
| + | NameVirtualHost 192.168.2.5: | ||
| + | NameVirtualHost 192.168.2.5: | ||
| + | |||
| + | < | ||
| + | ServerAdmin admin@server1.curso.esp | ||
| + | DocumentRoot / | ||
| + | ServerName intranet.curso.esp | ||
| + | ServerAlias intranet | ||
| + | DirectoryIndex index.html index.php | ||
| + | ErrorLog logs/ | ||
| + | CustomLog logs/ | ||
| + | </ | ||
| </ | </ | ||