AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

Separate certificate & key for GUI login

Open SSJPKXL opened this issue 3 years ago • 5 comments

AdGuard Home uses the same certificate and key for both GUI login and for DoH clients. Login credentials are also protected by BCrypt, but GUI login should be assigned its own certificate and key.

SSJPKXL avatar Jun 15 '22 18:06 SSJPKXL

I admit I was surprised by AGH using the same cert\key for the GUI and DNS encryption but I actually can't find a security issue there. Is there a security-based reason for having different certs\keys?

cyb3rz3us avatar Jun 15 '22 19:06 cyb3rz3us

I think that if you really want to use different certificate and key, maybe you can just use NGINX or something for your Web UI, that's quite simple.

fernvenue avatar Jun 17 '22 18:06 fernvenue

Or AGH can implement an option to use exclusively use HTTPS for Web GUI connection, not DoH. I think this is the best option for a local DNS server that serves only LAN clients and is not meant to allow anyone to connect to it over WAN.

SSJPKXL avatar Jun 20 '22 17:06 SSJPKXL

Or AGH can implement an option to use exclusively use HTTPS for Web GUI connection, not DoH. I think this is the best option for a local DNS server that serves only LAN clients and is not meant to allow anyone to connect to it over WAN.

I hardly think so, this is not AdGuardHome should do, and two different certificates maybe will make the users confuse :(
If you really wanna use two different certificates for LAN/WAN, maybe https://github.com/AdguardTeam/AdGuardHome/discussions/4675#discussioncomment-2973755 will help you.

fernvenue avatar Jun 20 '22 18:06 fernvenue

If NGINX is not an option and encryption must be used exclusively for AGH GUI login (never for DoH address resolution), then how should Encryption Settings in AGH be configured?

I noticed that leaving "Server name" blank in AGH Encryption Settings results in AGH log (var\log\AdGuardHome.err) not saying that AGH is listening on DoH port for DoH requests. If "Server name" is provided (as name or IP), then the same log says that AGH is listening for DoH requests on DoH port. Does that mean that leaving "Server name" blank prevents all DoH resolution on that AGH server, but allows for encrypted login?

SSJPKXL avatar Jul 31 '22 23:07 SSJPKXL