I finally decided that I wanted to be able to externally access some of my Docker containers from outside of my local network. I don’t want to deal with the security hassle of exposing ports on my router, so I decided to go with Tailscale.
All of my container web services are run through traefik and are accessed using hostnames I set up on my DNS server. How would I go about accessing the different web services externally since the hostnames don’t resolve?
https://tailscale.com/kb/1054/dns#nameservers
and
https://tailscale.com/kb/1114/pi-hole#step-3-set-your-raspberry-pi-as-your-dns-server
Set tailscale to use your dns server to resolve your services (or all traffic if you prefer). Assuming your dns server is on 100.x.x.1:53, then put 100.x.x.1 as a nameserver.
I set that up, but the issue now is that my DNS server is replying back with the private IP, which is not accessible from tailscale.
EDIT: Figured this one out. Need to advertise the routes from one of my machines. Set that up and I am good to go now. Thanks!
I use wireguard and nginx but I set my WG DNS as the server ip. I have adguardhome running on the server and have added the external domains to map to their LAN address so theyre resolved locally when using the vpn or the LAN. A similar setup should work for you.
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 HA Home Assistant automation software ~ High Availability HTTP Hypertext Transfer Protocol, the Web IP Internet Protocol PiHole Network-wide ad-blocker (DNS sinkhole) SSL Secure Sockets Layer, for transparent encryption nginx Popular HTTP server
[Thread #463 for this sub, first seen 29th Jan 2024, 16:15] [FAQ] [Full list] [Contact] [Source code]
Get yourself a domain name. It doesn’t cost a whole lot and also allows you to complete DNS-01 challenges for SSL certs. It’s also, like, your own. That’s also a requirement for owning your email address.
(If you really don’t want to pay and don’t care about email, you can also use a shared domain DNS such as dedyn.io.)You then simply set records to the Tailscale IP addresses of the hosts and you’re good to go. Alternatively, you can also set them to the hosts’ LAN subnet addresses and forward your subnet via a single subnet router; that’s how I do it.
I own 3 different domains and just today set up SSL services for them using Traefik (made another post for an issue I’m having with that).
I ended up doing a subnet router and that got me what I was looking for.
New Lemmy Post: How to access traefik hostnames from tailscale clients (https://lemmy.world/post/11331541)
Tagging: #SelfHosted(Replying in the OP of this thread (NOT THIS BOT!) will appear as a comment in the lemmy discussion.)
I am a FOSS bot. Check my README: https://github.com/db0/lemmy-tagginator/blob/main/README.md