Page 1 of 1

Connecting from the internet automatically logs in as admin

Posted: Saturday 25 February 2023 13:40
by friso82
Hi,

Just wanted to check whether I can view my domoticz dashboard from my holiday location.

Created a port forward on my router allowing my holiday IP to connect to port 28080 and then get forwarded to local domoticz instance on 192.168.0.20:8080.

I get to see the dashboard, although I was expecting a logon screen, since the IP of my holiday location is not a trusted network.

Trusted network in domoticz is set to: 127.0.0.*;192.168.0.*;192.168.2.*

In the logfile I can see that domoticz accepts a connection not in the trusted networks.

How does this work? Why don’t I get a logon screen?

Thanks!

Re: Connecting from the internet automatically logs in as admin

Posted: Saturday 25 February 2023 13:52
by kiddigital
I think your router is in the trusted network and it depends on how it forwards the connection.

But I think Domoticz thinks that your remote request is coming from your router itself and therefor automatically logs in as the router is in the trusted network.

If you run Domoticz with debugflags ‘—debuglevel webserver,received’ the log will show what Domoticz sees as the IP-address that is doing the request.

You are right that you should get the login screen when coming from an external location.

Btw. all the above is under the assumption that you are running Stable 2023.1 or a higher Beta.

Re: Connecting from the internet automatically logs in as admin

Posted: Saturday 25 February 2023 13:56
by friso82
Thanks.

That’s also my assumption. Would be a weird way to handle port forwarding in my opinion.

However, it still shows the external IP in the log… so domoticz knows the remote IP.

2023-02-25 13:30:54.957 Status: [web:8080] Incoming connection from: 178.xxx.yyy.zzz

Re: Connecting from the internet automatically logs in as admin

Posted: Saturday 25 February 2023 14:01
by kiddigital
If possible, run with additional debug flags to see more details.

Re: Connecting from the internet automatically logs in as admin

Posted: Saturday 25 February 2023 14:31
by jvdz
Could it be you have the credentials cached on the device you test with?
Could try a different browser/incognito mode to see if that makes any difference.

Re: Connecting from the internet automatically logs in as admin

Posted: Saturday 25 February 2023 14:35
by friso82
Thought of that possibility as well.

Tried the incognito mode and also a different browser, but no difference.