this post was submitted on 11 Apr 2024
18 points (95.0% liked)

Selfhosted

40296 readers
239 users here now

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!

founded 1 year ago
MODERATORS
 

In my home network, I'm currently hosting a public facing service and a number of private services (on their own subdomain resolved on my local DNS), all behind a reverse proxy acting as a "bouncer" that serves the public service on a subdomain on a port forward.

I am in the process of moving the network behind a hardware firewall and separating the network out and would like to move the reverse proxy into its own VLAN (DMZ). My initial plan was to host reverse proxy + authentication service in a VM in the DMZ, with firewall allow rules only port 80 to the services on my LAN and everything else blocked.

On closer look, this now seems like a single point of failure that could expose private services if something goes wrong with the reverse proxy. Alternatively, I could have a reverse proxy in the DMZ only for the public service and another reverse proxy on the LAN for internal services.

What is everyone doing in this situation? What are best practices? Thanks a bunch, as always!

you are viewing a single comment's thread
view the rest of the comments
[–] markstos@lemmy.world 2 points 7 months ago (1 children)

The comment above is accurate how domain names can be passed to Nginx that would resolve to private IP addresses. But that doesn't mean they need to exposed. Nginx has a listen directive that specifies what IPs are listened on. So If your Reserve Proxy has both a public IP and private IP. then the private services can have a a listen directive like this:

server {
  # Whatever your proxy's private IP is
  listen 10.0.0.1;
  server_name my-private-service;
}

No matter what hostname is passed in, Nginx would only reply to requests that can reach the Nginx host at it's private IP address.

[–] tofubl@discuss.tchncs.de 1 points 7 months ago

This is a good hint, I'm going to take a look at that. Thank you!