Thanks a lot @mrmarkuz!
Unfortunately, the result is the same.
What have I found in between:
When I enter the webserver1 module
[root@hur-ns8 admin] /usr/local/bin/runagent -m webserver1
[webserver1@hur-ns8 state]$ curl -v https://nvcti.twr.cz
the connection works (full output below).
But when I further go into the php container, it is not able to connect at all
[webserver1@hur-ns8 state]$ podman exec -ti php8.0-fpm bash
root@webserver:/app# curl -v https://nvcti.twr.cz
* Trying 192.168.111.2:443...
* connect to 192.168.111.2 port 443 failed: Connection refused
* Failed to connect to nvcti.twr.cz port 443: Connection refused
* Closing connection 0
curl: (7) Failed to connect to nvcti.twr.cz port 443: Connection refused
When I pass the public IP to curl, the handshake failure occurs:
root@webserver:/app# curl -v --resolve "nvcti.twr.cz:443:88.146.128.2" https://nvcti.twr.cz/webrest/
* Added nvcti.twr.cz:443:88.146.128.2 to DNS cache
* Hostname nvcti.twr.cz was found in DNS cache
* Trying 88.146.128.2:443...
* Connected to nvcti.twr.cz (88.146.128.2) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS alert, handshake failure (552):
* error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure
* Closing connection 0
curl: (35) error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure
When I try to connect to other server from the php container, it works:
root@webserver:/app# curl -v https://google.com
* Trying 142.251.36.110:443...
* Connected to google.com (142.251.36.110) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
...
As for now I am stuck here and dont know where to move on. Any ideas appreciated.
Thank you!
…
Full output listings of aforementioned commands follows:
Connection from within webserver1 module:
[root@hur-ns8 admin]# /usr/local/bin/runagent -m webserver1
runagent: [INFO] starting bash -l
runagent: [INFO] working directory: /home/webserver1/.config/state
[webserver1@hur-ns8 state]$ curl -v https://nvcti.twr.cz
* Trying 192.168.111.2:443...
* Connected to nvcti.twr.cz (192.168.111.2) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS header, Finished (20):
* TLSv1.2 (IN), TLS header, Unknown (23):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.2 (IN), TLS header, Unknown (23):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS header, Unknown (23):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.2 (IN), TLS header, Unknown (23):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.2 (OUT), TLS header, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS header, Unknown (23):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=hur.twr.cz
* start date: Apr 24 19:44:31 2025 GMT
* expire date: Jul 23 19:44:30 2025 GMT
* subjectAltName: host "nvcti.twr.cz" matched cert's "nvcti.twr.cz"
* issuer: C=US; O=Let's Encrypt; CN=R11
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* TLSv1.2 (OUT), TLS header, Unknown (23):
* TLSv1.2 (OUT), TLS header, Unknown (23):
* TLSv1.2 (OUT), TLS header, Unknown (23):
* Using Stream ID: 1 (easy handle 0x55b948ed8660)
* TLSv1.2 (OUT), TLS header, Unknown (23):
> GET / HTTP/2
> Host: nvcti.twr.cz
> user-agent: curl/7.76.1
> accept: */*
>
* TLSv1.2 (IN), TLS header, Unknown (23):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.2 (IN), TLS header, Unknown (23):
* Connection state changed (MAX_CONCURRENT_STREAMS == 250)!
* TLSv1.2 (OUT), TLS header, Unknown (23):
* TLSv1.2 (IN), TLS header, Unknown (23):
* TLSv1.2 (IN), TLS header, Unknown (23):
< HTTP/2 200
< content-type: text/html; charset=utf-8
< date: Sun, 27 Apr 2025 10:46:32 GMT
< etag: "14os4h3b21420s"
< vary: Accept-Encoding
< x-powered-by: Next.js
<
* TLSv1.2 (IN), TLS header, Unknown (23):
<!DOCTYPE html><html><head><.....
Connection from within php container:
[webserver1@hur-ns8 state]$ podman exec -ti php8.0-fpm bash
root@webserver:/app# curl -v https://nvcti.twr.cz
* Trying 192.168.111.2:443...
* connect to 192.168.111.2 port 443 failed: Connection refused
* Failed to connect to nvcti.twr.cz port 443: Connection refused
* Closing connection 0
curl: (7) Failed to connect to nvcti.twr.cz port 443: Connection refused
root@webserver:/app# curl -v --resolve "nvcti.twr.cz:443:88.146.128.2" https://nvcti.twr.cz/webrest/
* Added nvcti.twr.cz:443:88.146.128.2 to DNS cache
* Hostname nvcti.twr.cz was found in DNS cache
* Trying 88.146.128.2:443...
* Connected to nvcti.twr.cz (88.146.128.2) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS alert, handshake failure (552):
* error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure
* Closing connection 0
curl: (35) error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure
root@webserver:/app# curl -v https://google.com
* Trying 142.251.36.110:443...
* Connected to google.com (142.251.36.110) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=*.google.com
* start date: Mar 31 08:54:37 2025 GMT
* expire date: Jun 23 08:54:36 2025 GMT
* subjectAltName: host "google.com" matched cert's "google.com"
* issuer: C=US; O=Google Trust Services; CN=WE2
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55f32003e540)
> GET / HTTP/2
> Host: google.com
> user-agent: curl/7.74.0
> accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 301
< location: https://www.google.com/
< content-type: text/html; charset=UTF-8
< content-security-policy-report-only: object-src 'none';base-uri 'self';script-src 'nonce-QAalRp8PewI3MZ3iGCx1vA' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp
< date: Sun, 27 Apr 2025 10:49:35 GMT
< expires: Tue, 27 May 2025 10:49:35 GMT
< cache-control: public, max-age=2592000
< server: gws
< content-length: 220
< x-xss-protection: 0
< x-frame-options: SAMEORIGIN
< alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
<
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="https://www.google.com/">here</A>.
</BODY></HTML>
* Connection #0 to host google.com left intact