we had a conversation about the theme in the title of this post in the past.
There was no real solution, but if we entered the 2FA code and opened a new browser window we could log in to dash.
in a nutshell:
-the webmin dash is accessed via Cloudflare tunnel, the miniserv listening on localhost
-these were the original topics for this question
2. no - there is no rproxy only the CF tunnel, which is the proxy itself
3. access webmin via Cloudflare tunnel - running cloudflared.service on the server which connects the server to the CF edge via a tunnel
so this setting used to work fine, I had to open two browser windows because the first one wouldn’t go to the login screen, but now it doesn’t work either
Ahh! I see now! It’s a completely different type of tunnel! I have never used it myself, so I cannot provide you with an exact solution, until I have a closer look at it.
It’s also not clear what the actual error is. I don’t think you shared any errors from the browser’s console?
Anyway, if you go to “Webmin ⇾ Webmin Configuration: IP Access Control” and try different “Trust levels for proxy headers,” does it change anything?
If not, what exact error message do you see in the browser’s console?
For Cloudflare Tunnel to properly work with Webmin, ensure that:
Your Webmin config /etc/webmin/config has to have referers=your.domain.tld line
Your Cloudflare Webmin config file on your Linux box should have httpHostHeader: your.domain.tld set under originRequest:. The whole config that works for me is:
It’s just adding so many more variables, and so many potential points of failure and vector of attack. I dunno. I just like fewer moving parts, where I can understand and read the source for all of them.
I understand that you think so, but CF is just one thing…there is much worse than them -especially because of the recent changes in the US, so we will probably move as well, - may be to OVH or wherever, - just EU company should be at the end of the stop…
(note we have been using CFs infrastructure for 15 years - so this move will not be just two days)
We operate nearly 60 radio stations in Central Europe and everything is connected by CF Zero trust, we don’t use VPN solutions, which is why we are tied to CF for the time being…
Our web infrastructure is only a small part of this.
“cloudflared” is not as nasty as it sounds…
Anyway, I appreciate your opinion, even if I don’t agree with it on all points.
I couldn’t get it to work on our existing CF tunnels, we have remote mgmt. tunnels and in that state there is no local “credentials-file” , -but I put the suggested config in the remote config, but it still didn’t work.
So I created a test server on EC2 with HAProxy in front of everything… -exactly the same behaviour.
At first I thought it was the tunnel’s specialty, but HAProxy also causes this…
I made a video of this test system and here are the Webmin specific confs:
(I don’t hide sensitive data, because it’s just a test environment and in a few days it won’t be)
I’m not sure what’s not working on your end, but we documented it in the Webmin FAQ. When @Jamie updates webmin.com, it will go live. In the meantime, you can use those instructions from the link above, and I’m pretty sure they will work for you.