Reverse Proxy connections from every client?

1. The problem I’m having:

I want to setup a simple reverse proxy for within my own network (No domain, no connection from the outside) to get a https connection to the tool “spoolman”, installed in VM.
When checking from localhost, it seams to work, but it didn’t accept connections from other clients.

Tried to run the test with
caddy reverse-proxy --to :7912

and with Caddyfile

localhost

reverse_proxy :7912

2. Error messages and/or full log output:

From localhost it starts with

oliver@spoolman:~$ curl -v https://localhost
*   Trying ::1:443...
* Connected to localhost (::1) 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

From other clients it looks like this

oliver@iobrokervm:~$ curl -v https://192.168.1.31
*   Trying 192.168.1.31:443...
* Connected to 192.168.1.31 (192.168.1.31) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.3 (IN), TLS alert, internal error (592):
* OpenSSL/3.0.11: error:0A000438:SSL routines::tlsv1 alert internal error
* Closing connection 0
curl: (35) OpenSSL/3.0.11: error:0A000438:SSL routines::tlsv1 alert internal error
oliver@iobrokervm:~$

3. Caddy version:

v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=

4. How I installed and ran Caddy:

apt install caddy

caddy reverse-proxy --to :7912
or
caddy run

a. System environment:

debian 11 (within Proxmox Container)

b. Command:

caddy reverse-proxy --to :7912
or
caddy run

c. Service/unit/compose file:

d. My complete Caddy config:

localhost

reverse_proxy :7912

5. Links to relevant resources:

To manage TLS certs, Caddy either needs the names configured ahead of time (so it can issue certs at startup).

Or you can enable On-Demand TLS to have Caddy issue certs as requests come in, but you need to opt-in for that:

https:// {
	tls internal {
		on_demand
	}

	reverse_proxy localhost:7912
}
1 Like

Thanks a lot! It’s working now :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.