Heya, I just wanted to post here before doing something that puts my stuff out on the internet for anyone to see 😅
So I have a basic, still in-configuration homelab network going on. It’s Modem --> OPNsense router --> Ubiquiti switch --> Openwrt AP. DNS and DHCP (via Dnsmasq) are working right now, each VLAN (Home Devices, IoT, and Guest) can access the internet. But I’m still tinkering and doing firewall stuff, so sometimes I reactivate the ISP router and switch back to that until I have everything perfect enough to not bother my family
I have a Proxmox homelab that I’ve been running services like Jellyfin and Immich in a Docker Debian VM for a few months now, but I was getting tired of typing out IPs and remembering port nums, especially after bouncing between my router and the original ISP router whenever I’m having network issues. So I wanted to finally map those IPs to human-friendly domains. So like, 192.168.10.247:8096 --> jellyfin.example.com, 192.168.10.247:2283 --> immich.example.com, etc.
I quickly learned that DNS services like Unbound and Dnsmasq do what they say on the tin, DNS only, so I can’t do a override to map ports to a domain, as they can only do IPs. My research led me to reverse proxies, and people said Caddy was simple on OPNsense, so I installed that and followed the official guide/documentation. But then I ran into the issue of needing the domain to be externally resolveable. Which then led me to realizing I need to use some sort of CA.
I know Let’s Encrypt does it for free, plus the guide mentions them as a default so why not? Except I still need an actual external domain so… Cloudflare? DuckDNS? Someone else? I’m so lost…
The biggest concern of mine right now is, if I set up a reverse proxy, does that mean my services are externally accessible? I was using Tailscale so I could avoid that, especially since I know services like Jellyfin have had serious vulnerabilities, and everyone says it’s a good rule of thumb to just not expose services. But how do I map ip + port #s to a domain on OPNsense?
- Unbound can override custom domain names if you want.
- I migrated from Nginx to Angie’s to get more features for free. And also has builtin let’s encrypt support.
- If the services are public configure fail2ban and something like Angie Guardian see: https://angieguardian.org/ to reduce ddos and bots.
Not sure if it fits in your setup, but I’m accomplishing what you’re looking for (myservice.mydomain.com) with self-hosted AdGuard and DNS rewrites (send URL X to IP Y), and then just point the router to AdGuard DNS.
The few services I need to access from outside my home LAN run through Tailscale on my laptop or phone, so no services are publicly exposed.
Hmmm… there’s a few different things going on here.
As others have already said you don’t need a cert if you’re just messing around internally, you can use an internal TLD -
.localis reserved for mdns, Avahi, etc. so that’s fine… personally, I use.homeI use pfSense, but I presume that OPNSense has the same function in DHCP to provide the Domain Name in there, so any static mappings will respond to
thing.homeI also have HAProxy to resolve external httpS://IP:Port to an internal http://thing.home (note: no S internally)… this simplifies my setup, and I presume it could work internally too, but I’ve not set it up as DHCP solves that for me.
I don’t use containers, instead each thing is it’s own VM, or physical machine, so I don’t know whether NAT (on proxmox) would resolve your issues with everything’s on 1 VM…?
You dont need to map ip+port, most selfhosted services let you change their port to the default http port
If this is for internal only you can setup OpnSense to do DNS records either through static IPs or add hostnames to the DNS records via DHCP. If you want this externally that’s a whole other ball of wax.
Neither require you to purchase a domain name. Just use whatever you want .internal While you can use other things like .lan, .internal is the only one that is actually reserved for LAN use.
*I’m pretty sure you can add firewall rules in OpnSense as well to redirect from port 80 or 443 to whatever port you’re actually using but that may cause more problems than it’s worth. If you can’t change the port in the app itself then, honestly just bookmark it with the actual port so you don’t have to remember it.
No need to have an external domain. And you can set up an internal DNS to route any domain name to any IP address. Just be sure not to point anything to your external IP address from your ISP or any globally addressable IPv6 addresses.
Issue is that it might confuse your devices that jump between internal access and external access like your phone if you use a domain name that’s owned by someone else, like example.com. I have two domains, one for my VPSs and one for internal stuff. So when my devices are outside the network they can’t resolve any of the DNS addresses that are set up inside and can’t access any of the IP addresses. That is unless I connect with vpn. I also have pangolin for a few things that are accessible externally, but that’s rare since apps can’t use those kinds of authentication systems, just web front ends.
You don’t need an external domain. Use .internal as your tld and you can use whatever domain your want. jellyfin.homelab.internal, for example.
I own a domain and run my internal stuff under internal records. Part of the reason for doing it this way is I can use the DNS challenge for issuing LE certs to the internal services automatically.
And no a reverse proxy will not expose anything to the Internet, unless you also open the port in your firewall (and forward it in NAT if it’s on the lan and you use NAT).
If you don’t mind the warning “Woah, I don’t trust this website”, you don’t need to buy any domains. Just use local certificates.
Sample caddyfile that I use
#------------- general options { local_certs } #------------- services service.server.lan { reverse_proxy <INTERNAL SERVER IP>:<INTERNAL SERVER PORT> }However, you need to have a DNS entry which points
*.server.lanto the correct server. You can now visithttps://service.server.lan/which should point correctly.Best of luck!
I’ve been thinking about this lately as i was intending to build a 3 node cluster with proxmox. I still need to understand what happens when one node fails and how tbe othes handle exposing services. If the ip changes, bookmarks wont work. So i thought an inter al domain would be the sol ution?
I also still want a 3 node setup for high availability as well! With the recent ram prices etc. I postponed it.
However the idea is simple. You setup a ceph cluster so the vm storage etc is shared across the cluster or your nodes. Then you can configure for each vm where it should start and where it can fallover to. Eg. Start a vm on node 1, but also allow it to start on either node 2 or 3 in case node 1 is down. Ceph cluster takes care of the rest.





