(20 puntos) Utilizando httpie, hagan una solicitud de HTTP al servidor HTTP/1.1 301 Moved Permanently CF-RAY: 91011482ab0c05ff-IAD Connection: keep-alive Content-Type: text/html Date: Tue, 11 Feb 2025 02:58:57 GMT Location: https://nrywhite.lat/ NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800} Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=IKA8rA5Csb4HrlCujoz8DudMLr7cy3VtA9OrBGHjPEtz2K72Wktj7PvFjfqvcC5SXhKjIyIdbIr7yn2EgHkhaPOBJjq6LU4EMxUYm6qfLJYWgtwcPHVbE4JpQ8yQexM%3D"}],"group":"cf-nel","max_age":604800} Server: cloudflare Transfer-Encoding: chunked alt-svc: h3=":443"; ma=86400 cf-cache-status: DYNAMIC server-timing: cfL4;desc="?proto=TCP&rtt=1740&min_rtt=1740&rtt_var=870&sent=1&recv=3&lost=0&retrans=0&sent_bytes=0&recv_bytes=137&delivery_rate=0&cwnd=250&unsent_bytes=0&cid=0000000000000000&ts=0&x=0" 301 Moved Permanently

301 Moved Permanently


nginx/1.24.0 (Ubuntu)
(10 puntos) Utilizando curl, hagan una solicitud de HTTP al servidor HTTP/2 200 date: Tue, 11 Feb 2025 03:02:58 GMT content-type: text/html last-modified: Tue, 11 Feb 2025 02:43:56 GMT cf-cache-status: DYNAMIC report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=PXXY3%2Bu%2Fncfyw76y6AHy5DTJV%2Bao3qfNYZUru2RSlof2%2F9LrkYUAZ10aptUKyilwcLP%2BOqnRm7xUOSBsTFBIaBHQMJDcJvctWyDa5AN0eXFYq9%2FGTPlhajRXLonR%2B1Q%3D"}],"group":"cf-nel","max_age":604800} nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800} server: cloudflare cf-ray: 91011a650ce4d6d0-IAD alt-svc: h3=":443"; ma=86400 server-timing: cfL4;desc="?proto=TCP&rtt=952&min_rtt=677&rtt_var=404&sent=7&recv=8&lost=0&retrans=0&sent_bytes=3623&recv_bytes=779&delivery_rate=6416543&cwnd=236&unsent_bytes=0&cid=dd6e9cd2ef32df7c&ts=47&x=0" (5 puntos) Que pasa si tratan de hacer una solicitud de HTTP desde el servidor hacia su computadora? ○ → curl https://181.206.178.41/ curl: (28) Failed to connect to 181.209.179.43 port 443 after 133584 ms: Couldn't connect to server (10 puntos) Utilizando tail dentro del servidor, obtengan las últimas 15 líneas del archivo /var/log/nginx/access.log ○ → tail -n 15 /var/log/nginx/access.log 20.171.207.8 - - [11/Feb/2025:04:34:54 +0000] "GET /23525/lab1/assets/Pelo.png HTTP/1.1" 200 11432 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.2; +https://openai.com/gptbot)" 20.171.207.8 - - [11/Feb/2025:04:34:55 +0000] "GET /23525/lab1/assets/Host.png HTTP/1.1" 200 131972 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.2; +https://openai.com/gptbot)" 20.171.207.8 - - [11/Feb/2025:04:34:57 +0000] "GET /23773/lab1/Imagenes/bf.png HTTP/1.1" 200 49636 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.2; +https://openai.com/gptbot)" 20.171.207.8 - - [11/Feb/2025:04:34:58 +0000] "GET /23525/lab1/assets/Vaca.png HTTP/1.1" 200 8289 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.2; +https://openai.com/gptbot)" 20.171.207.8 - - [11/Feb/2025:04:34:59 +0000] "GET /23525/lab1/assets/ascii%20art.png HTTP/1.1" 200 10743 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.2; +https://openai.com/gptbot)" 20.171.207.8 - - [11/Feb/2025:04:35:00 +0000] "GET /23773/lab1/Imagenes/rfc_318.png HTTP/1.1" 200 132337 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.2; +https://openai.com/gptbot)" 20.171.207.8 - - [11/Feb/2025:04:35:01 +0000] "GET /23773/lab1/Imagenes/rfc_1034.png HTTP/1.1" 200 127456 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.2; +https://openai.com/gptbot)" 20.171.207.8 - - [11/Feb/2025:04:35:03 +0000] "GET /23525/lab1/assets/Unset.png HTTP/1.1" 200 197622 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.2; +https://openai.com/gptbot)" 20.171.207.8 - - [11/Feb/2025:04:35:04 +0000] "GET /23218/Elinternetantesdelaweb/El%20internet%20antes%20de%20la%20web.docx HTTP/1.1" 200 1115495 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.2; +https://openai.com/gptbot)" 20.171.207.8 - - [11/Feb/2025:04:35:05 +0000] "GET /assets/index-W3JTDQU_.css HTTP/1.1" 404 134 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.2; +https://openai.com/gptbot)" 172.69.132.133 - - [11/Feb/2025:04:37:59 +0000] "GET / HTTP/1.1" 304 0 "https://23584.nrywhite.lat/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 OPR/116.0.0.0" 172.69.135.64 - - [11/Feb/2025:04:39:43 +0000] "GET /23391/top10/ HTTP/1.1" 200 179 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1" 172.70.55.42 - - [11/Feb/2025:04:41:21 +0000] "GET / HTTP/1.1" 304 0 "https://23584.nrywhite.lat/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 OPR/116.0.0.0" 108.162.210.149 - - [11/Feb/2025:04:48:12 +0000] "GET / HTTP/1.1" 304 0 "https://23584.nrywhite.lat/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 OPR/116.0.0.0" 172.69.23.22 - - [11/Feb/2025:04:49:50 +0000] "GET /23391/Lab2/ HTTP/1.1" 200 177 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1" (10 puntos) Utilizando ps y grep identifiquen qué procesos está corriendo amazon dentro del servidor ○ → ps aux | grep amazon root 126554 0.0 1.4 1759116 14028 ? Ssl Feb10 0:02 /snap/amazon-ssm-agent/9881/amazon-ssm-agent root 126579 0.0 1.9 1850868 19572 ? Sl Feb10 0:07 /snap/amazon-ssm-agent/9881/ssm-agent-worker ubuntu 168465 0.0 0.2 7076 2048 pts/10 S+ 04:56 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn amazon (10 puntos) Utilizando dig dentro del servidor, obtengan la ip que resuelve al hacer un dns lookup uvg.edu.gt ○ → dig uvg.edu.gt +short 45.223.155.41 45.223.56.41 (5 puntos) Cuanta memoria RAM, total usada y libre, tiene el servidor? (su respuesta debe estar en MB) Total: 957 MB Usada: 550 MB Libre: 186 MB (5 puntos) Cuanta espacio de disco, total usado y disponible, tiene el servidor? (su respuesta debe estar en MB) Total: 28,691 MB Usado: 8,234 MB Disponible: 20,441 MB (5 puntos) Utilizando el comando ip obtengan la ip del servidor → ip -4 addr show | grep inet inet 127.0.0.1/8 scope host lo inet 172.31.31.175/20 metric 100 brd 172.31.31.255 scope global dynamic enX0 inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0 (10 puntos) lsof lista los archivos abiertos. Identifiquen los archivos abiertos por el protocolo TCP en el puerto 80 2025-02-11 05:02 ⌚ njs v18.19.1|py |go 9% ip-172-31-31-175 (172.31.31.175) in ~ ○ → lsof -i TCP:80 - NO APARECIÓ NADA (20 puntos) Utilizando netstat, listen los puertos por los que está escuchando el servidor. Deben filtrar usando las siguientes opciones de netstat (esto es un solo comando con estas opciones): tcp: 2025-02-11 05:02 ⌚ njs v18.19.1|py |go 9% ip-172-31-31-175 (172.31.31.175) in ~ ○ → netstat -tulnp -t (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.54:53 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:90 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN - tcp6 0 0 :::10 :::* LISTEN - tcp6 0 0 :::90 :::* LISTEN - tcp6 0 0 :::80 :::* LISTEN - udp 0 0 127.0.0.54:53 0.0.0.0:* - udp 0 0 127.0.0.53:53 0.0.0.0:* - udp 0 0 172.31.31.175:68 0.0.0.0:* - udp 0 0 127.0.0.1:323 0.0.0.0:* - udp6 0 0 ::1:323 :::* - udp: 2025-02-11 05:03 ⌚ njs v18.19.1|py |go 9% ip-172-31-31-175 (172.31.31.175) in ~ ○ → netstat -tulnp -u (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.54:53 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:90 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN - tcp6 0 0 :::10 :::* LISTEN - tcp6 0 0 :::90 :::* LISTEN - tcp6 0 0 :::80 :::* LISTEN - udp 0 0 127.0.0.54:53 0.0.0.0:* - udp 0 0 127.0.0.53:53 0.0.0.0:* - udp 0 0 172.31.31.175:68 0.0.0.0:* - udp 0 0 127.0.0.1:323 0.0.0.0:* - udp6 0 0 ::1:323 :::* - numeric (muestra los puertos por número): 2025-02-11 05:04 ⌚ njs v18.19.1|py |go 9% ip-172-31-31-175 (172.31.31.175) in ~ ○ → netstat -tulnp -n (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.54:53 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:90 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN - tcp6 0 0 :::10 :::* LISTEN - tcp6 0 0 :::90 :::* LISTEN - tcp6 0 0 :::80 :::* LISTEN - udp 0 0 127.0.0.54:53 0.0.0.0:* - udp 0 0 127.0.0.53:53 0.0.0.0:* - udp 0 0 172.31.31.175:68 0.0.0.0:* - udp 0 0 127.0.0.1:323 0.0.0.0:* - udp6 0 0 ::1:323 :::* - program (muestra qué programa es el que está escuchando): ○ → netstat -tulnp -p (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.54:53 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:90 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN - tcp6 0 0 :::10 :::* LISTEN - tcp6 0 0 :::90 :::* LISTEN - tcp6 0 0 :::80 :::* LISTEN - udp 0 0 127.0.0.54:53 0.0.0.0:* - udp 0 0 127.0.0.53:53 0.0.0.0:* - udp 0 0 172.31.31.175:68 0.0.0.0:* - udp 0 0 127.0.0.1:323 0.0.0.0:* - udp6 0 0 ::1:323 :::* - (30 puntos) Utilizando ss, listen los puertos por los que está escuchando el servidor. Deben filtrar usando las siguientes opciones de ss (esto es un solo comando con estas opciones): summary: Total: 247 TCP: 16 (estab 6, closed 2, orphaned 0, timewait 1) tcp: TCP 14 6 8 14 TCP activas conexiones establecidas: 6 conexiones en estado ESTAB ESTAB 0 0 172.31.31.175:53288 67.220.242.23:443 timer:(keepalive,1.050ms,0) ESTAB 0 0 [::ffff:172.31.31.175]:10 [::ffff:181.209.152.170]:63717 timer:(keepalive,57min,0) ESTAB 0 0 [::ffff:172.31.31.175]:10 [::ffff:190.14.11.2]:53220 timer:(keepalive,5min5sec,0) ESTAB 0 0 [::ffff:172.31.31.175]:10 [::ffff:190.14.11.2]:61893 timer:(keepalive,8min14sec,0) ESTAB 0 1488 [::ffff:172.31.31.175]:10 [::ffff:186.151.92.47]:49137 timer:(on,164ms,0) ESTAB 0 0 [::ffff:172.31.31.175]:10 [::ffff:181.174.104.32]:52376 timer:(keepalive,81min,0) resuelvan los puertos numericos: Local Address:Port Peer Address:Port 172.31.31.175:53288 67.220.242.23:443 [::ffff:172.31.31.175]:10 [::ffff:181.209.152.170]:63717 uso de memoria: timer:(keepalive,1.050ms,0) timer:(on,164ms,0) información interna de tcp: timer:(keepalive,1.050ms,0) proceso que usa el socket