For instance how can I use my *.domain.com SSL certs and NPM to route containers to a subdomain without exposing them? The main domain is exposed.

7 points

You need a DNS service that works with Let’s encrypt

permalink
report
reply
1 point

NPM is in my post…

permalink
report
parent
reply
5 points
*

I don’t get it. Npm is a package manager. It doesn’t handle certificates.

You need a DNS service like route 53 (AWS) or similar where let’s encrypt connects via an API and creates the DNS token.

permalink
report
parent
reply
2 points

OP isn’t referring to the package manager. They’re talking about Nginx Proxy Manager

permalink
report
parent
reply
1 point

Then you’re all set, issue certs over DNS-01 challenge in NPM, and create records in your local DNS server that point to the NPM IP for each domain you want to use.

permalink
report
parent
reply
16 points

Split DNS on your LAN?

Only records permitted to be access on your LAN are responded by a local DNS server. While public DNS still available for your public facing services.

Your wildcard cert will work for both situations as the browser only cares the sni matches the Url in your address bar.

permalink
report
reply
2 points

I’m using this right now but I’m switching to having all my services under one domain and blocking non internal ips. Technically someone can access your site by providing the host manually, althought it’s unlikely since they would need to know it

permalink
report
parent
reply
2 points

Would you expanding in this concern? I’m not sure I understand but I’d like to.

permalink
report
parent
reply
14 points
*

You can use the DNS verification method. Either using nsupdate with bind or what ever protocol your DNS provider and favorite ACME (certbot, acme, lego, etc) utility supports. As long as your DNS server is publically reachable that will work, even if the subdomain itself doesn’t exist publically.

permalink
report
reply
5 points

This is what I do as well. I have a public DNS record for my internal reverse proxy IP (no need to expose my public IP and associate it with my domain). I let NPM reach out to the DNS provider to complete verification challenge using an account token, NPM can then get a valid cert from Let’s Encrypt and nothing is exposed. All inbound traffic on 80/443 remains blocked as normal.

permalink
report
parent
reply
2 points

This is the way.

Vastly superior to local dns.

permalink
report
parent
reply
2 points

This is specifically info about LetsEncrypt, not general SSL.

permalink
report
parent
reply
5 points
*

Yes my answer is for use with Let’s Encrypt.

permalink
report
parent
reply

I don’t really understand what you’re getting at. The answer to OPs question is to use letsencrypt like everyone else.

permalink
report
parent
reply
3 points

They literally didn’t mention LE at all.

SSL is not LetsEncrypt, if you didn’t know.

permalink
report
parent
reply
6 points
1 point

OP is asking for cases where you don’t want to allow the service (or reverse proxy) to be accessible via the web.

permalink
report
parent
reply
2 points

As I understand it, OP just wants to hide (=remove) the subdomains from the public URLs.

permalink
report
parent
reply
1 point

public domain for internal services

I guess they need a CA then

https://smallstep.com/docs/step-ca/

permalink
report
parent
reply
0 points

They do not. See my other reply about DNS verification.

permalink
report
parent
reply
5 points

I have that setup, my domain is hosted by OVh and they have an API that you can use to get a wildcard certificate with.

At home I run pihole and that has some sites in as local IPs, but if you look the same site up from OVH you would get an internet IP

permalink
report
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 3.6K

    Monthly active users

  • 2K

    Posts

  • 23K

    Comments