Solución

Solución

Mi sistema es Win10 con WSL2, ejecuté un gogscontenedor acoplable (desde ubuntu en WSL):

    83b2a8833235   gogs/gogs                    "/app/gogs/docker/st…"   17 minutes ago   Up 17 minutes   0.0.0.0:10022->22/tcp, :::10022->22/tcp, 0.0.0.0:10080->3000/tcp, :::10080->3000/tcp       gogs

Descubrí que puedo enrollarlo, pero no puedo usar el navegador para visitarlo:

    >curl -vvv http://localhost:10080
    * Rebuilt URL to: http://localhost:10080/
    *   Trying ::1...
    * TCP_NODELAY set
    * Connected to localhost (::1) port 10080 (#0)
    > GET / HTTP/1.1
    > Host: localhost:10080
    > User-Agent: curl/7.55.1
    > Accept: */*
    >
    < HTTP/1.1 302 Found
    < Content-Type: text/html; charset=utf-8
    < Location: /install
    < Set-Cookie: lang=en-US; Path=/; Max-Age=2147483647
    < Set-Cookie: i_like_gogs=64602dcbf733a9e0; Path=/; HttpOnly
    < Set-Cookie: _csrf=CEoPJD9KItxBKOThbeQExNAjnDo6MTYyNzQ4MDI3Njg1MDY2NTEwMA; Path=/; Domain=localhost; Expires=Thu, 29 Jul 2021 13:51:16 GMT; HttpOnly
    < X-Content-Type-Options: nosniff
    < X-Frame-Options: DENY
    < Date: Wed, 28 Jul 2021 13:51:16 GMT
    < Content-Length: 31
    <
    <a href="/install">Found</a>.
    
    * Connection #0 to host localhost left intact

Usando netstat -a -opuedo ver la dirección en Active Connections:

TCP    0.0.0.0:10080          xxxxxxx:0          LISTENING       13152

Pero no puedo visitar usando el navegador: No puedo visitar usando el navegador

¿Alguien tiene alguna pista?

Respuesta1

La mayoría de los navegadores restringen 10080 por razones de seguridad en localhost

Solución

  • Cambie el puerto.

Referencias

Google Chrome bloquea el puerto 10080 para detener los ataques de transmisión de Nat Slip
Plataforma Chrome

Información adicional:

Actualmente, Google Chrome también bloquea el acceso FTP, HTTP y HTTPS en los puertos 69, 137, 161, 554, 1719, 1720, 1723, 5060, 5061 y 6566.

información relacionada