I followed this guide: https://notthebe.ee/blog/easy-ssl-in-homelab-dns01/
But my Nginx Proxy Manager is running on a VPS that is connected to my local network through a WireGuard tunnel. Could that be an issue? I don’t know why it’s not working?
My NPM is also accessible to the local IP of my homeserver on which WireGuard is running.
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:
Fewer Letters More Letters DNS Domain Name Service/System IP Internet Protocol SSL Secure Sockets Layer, for transparent encryption TLS Transport Layer Security, supersedes SSL VPS Virtual Private Server (opposed to shared hosting)
5 acronyms in this thread; the most compressed thread commented on today has 9 acronyms.
[Thread #311 for this sub, first seen 29th Nov 2023, 17:15] [FAQ] [Full list] [Contact] [Source code]
Can you elaborate more on what is not working? What are you testing to conclude it’s not working?
From my understanding you’re running VPS server. You have tunnel setup to connect to the server. You’re trying to setup N.P.M. with let’s encrypt certs validating via DNS.
To continue troubleshooting you should eliminate all network paths and test from the VPS (ssh to the system). Once you have NPM setup you should be able to test certificate locally connecting to NPM exposed port.
Assuming you exposed port 443
openssl s_client -connect 127.0.0.1:443 -showcerts
If you can validate that NPM is serving endpoint with the correct certificate you can move on to troubleshooting your network path.
I should have added that I am also using Pi-hole and Unbound. This seems to be the issue. I now added the following to my unbound.conf but it’s still not working unfortunately. Where domain.duckdns.org is my domain by DuckDNS and the IP points to the Nginx Proxy Manager.
local-zone: "domain.duckdns.org." static local-data: "domain.duckdns.org. IN A 192.168.178.123"
So I’ve followed the tutorial, added a wildcard certificate and tried to add a proxy host using the DuckDNS domain to point to NPM itself. When I open the mydomain.duckdns.org I get an error that I can’t connect to the site.
Besides that NPM is working and I easily set up my actual domain and it’s resolving to devices in my home network. For example cloud.myactualdomain.com is resolving to my Nextcloud running on a Raspi with a local IP with a valid SSL certificate. So NPM and the WireGuard tunnel are generally working as intended.
On which system should I try the openssl command and what’s the port?
It’s not clear what’s the purpose of NPM in your case. Do you want to serve internal network or expose to Internet. If it’s the latter, you need to see what interface you exposed NPM port on (have to be your public network - VPS IP), your firewall needs to allow incoming connections on that port. Most likely you will be using port 443 and maybe 80 for redirect (checkbox in NPM always use TLS). Use IP address first to eliminate DNS issues. Once IP is valid test DNS with nslookup/dig to see if it resolves to your IP.
OpenSSL command needs to be executed from VPS to eliminate network issues and just validate certificate setup. The IP and port would depend on what port you exposed. 127.0.0.1 should work from that context. Once you see certificate you can execute openssl command from your local and use WireGuard tunnel IP to connect to service. This is for internal network.