OPNsense Forum

English Forums => Web Proxy Filtering and Caching => Topic started by: fbeye on December 05, 2024, 05:15:10 PM

Title: Caddy+Cockpit - Any success?
Post by: fbeye on December 05, 2024, 05:15:10 PM
Hello

I have 192.168.2.181:9090 running cockpit on one of my Debian boxes and I am trying to make an entry through caddy to access it but no success. It does not error out or timeout, it loads, to a blank screen. I set up about 15 other entries on caddy to various LAN IP's as well as other 192.168.2.181 such as 8080, 9091 etc various apps but it seems something in cockpit is blocking the reverse proxy approach. I have googled some "solutions" but it seems not pertain to me cause they do not work
Title: Re: Caddy+Cockpit - Any success?
Post by: Monviech (Cedrik) on December 05, 2024, 05:17:41 PM
I have cockpit too I'll give it a quick test.
Title: Re: Caddy+Cockpit - Any success?
Post by: Monviech (Cedrik) on December 05, 2024, 05:25:46 PM
Tested it quickly on Debian 12 bookworm:

This was my test Caddyfile


cockpit.example.com {
handle {
reverse_proxy https://172.16.1.113:9090 {
transport http {
tls_insecure_skip_verify
}
}
}
}


For me it worked right away and I could log into cockpit and click around and nothing crashed.
Title: Re: Caddy+Cockpit - Any success?
Post by: fbeye on December 05, 2024, 05:30:12 PM
I will look at mine. I sure hope you modified yours to make it work or else I just have some bad luck ;)
Title: Re: Caddy+Cockpit - Any success?
Post by: fbeye on December 05, 2024, 05:39:12 PM
Wait a second, where are the caddy files kept? I thought they were in /etc/local/etc/caddy but seems not.
Title: Re: Caddy+Cockpit - Any success?
Post by: Monviech (Cedrik) on December 05, 2024, 06:05:33 PM
You dont have to modify it. Just use Diagnostics in the GUI.

You probably missed HTTPS and TLS insecure skip verify in the HTTP Handler.

Or you have UFW on the linux machine that blocks the proxied connection.
Title: Re: Caddy+Cockpit - Any success?
Post by: fbeye on December 05, 2024, 07:02:55 PM
Frickin' A, I did not even know it was an option .

Works, thank you.
Title: Re: Caddy+Cockpit - Any success?
Post by: fbeye on December 06, 2024, 08:28:53 PM
How do I [SOLVED] this?