New to Tailscale. Can I use it along with my own DNS and NPM to access my services externally using my existing internal custom domain?
from chazwhiz@lemmy.world to selfhosted@lemmy.world on 23 Jan 17:15
https://lemmy.world/post/42054795

I’ve not done much with external access in the past, but I’m playing with Tailscale and it’s pretty neat. Wondering if I can configure it to work like my local access does:

  1. I use Nginx Proxy Manager to set easy subdomains for my services, I.e. service.mydomain.com
  2. I use AdGuard Home and have a redirect for *.mydomain to that NPM
  3. This works great internally, which is all I’ve really used it for.
  4. I’ve got tailscale working and I can go externally to server.wackyname.ts.net:serviceport.
  5. what I’d like to do is have tailscale somehow use the same internal dns/npm info so when I’m on my tailnet service.mydomain.com still works.
  6. But no other external access, said subdomains do nothing off tailnet.
  7. Mydomain.com is an actual domain I own. General DNS is at Cloudflare right now (main domain was pointed at a hosted site previously, but that’s not needed anymore)

Any way to pull this off without a ton of complexity?

#selfhosted

threaded - newest

iamthetot@piefed.ca on 23 Jan 17:23 next collapse

I’m not an expert, take this with a very big grain of salt.

But I think what you want here is for your home server tailscale to act as an exit node for your remote connection.

This will mean that your phone for example will route traffic through your home server, using its AdGuard DNS.

You can even set it up to conditionally use it as an exit mode, iirc.

chazwhiz@lemmy.world on 23 Jan 19:03 next collapse

Interesting. I saw the exit node feature but didn’t look into it closely. I’ll check it out. Thanks!

dieTasse@feddit.org on 23 Jan 21:32 collapse

Also use advertise-routes to get access to the network as opposed to just the node. Like e.g.

--advertise-routes=192.168.1.0/24
[deleted] on 23 Jan 21:32 collapse

.

rnDoug@hometech.social on 23 Jan 17:30 next collapse

@chazwhiz yes you can. Setup a subnet and just tell Tailscale to use your dns. I’m guessing you already have your dns pointing to NPM?

chazwhiz@lemmy.world on 23 Jan 20:39 collapse

Can you be more specific?

rnDoug@hometech.social on 24 Jan 02:42 collapse

@chazwhiz

Look at subnets below. App Connectors might also work for what you're trying to accomplish.

https://tailscale.com/kb/1351/route

Blaster_M@lemmy.world on 23 Jan 17:34 next collapse

Yes, also Tailscale already provides hostname dns for every device on your tailscale net.

chazwhiz@lemmy.world on 23 Jan 20:40 collapse

I know it gives me their magicdns, like server.wackyname.ts.net, I’m talking about using my own domain.

Blaster_M@lemmy.world on 23 Jan 21:47 next collapse

slap the tailscale ips into your dns entries then. I do that.

GeneralCricket@lemmy.zip on 24 Jan 03:09 collapse

Same. Works great

oktoberpaard@feddit.nl on 24 Jan 08:55 collapse

By default Tailscale devices prefer the local DNS server for any hostname that’s not part of your Tailscale network, unless you’ve configured a global DNS server. There’s also the option to configure split DNS and have a different DNS server for certain domains (for example your own domain). You can also add search domains to allow short hostnames to be resolved to FQDNs of your choice.

stratself@lemdro.id on 23 Jan 19:28 next collapse

Do a DNS rewrite at AGH, but instead of the LAN IP make it the Tailscale IP of your NPM machine. Then configure AGH’s IP address as one of the global nameservers on your Tailscale admin panel

Delete all A/AAAA records on Cloudflare, only use it for registrar purposes and the occassional certs authentication.

chazwhiz@lemmy.world on 23 Jan 20:38 collapse

Do a DNS rewrite at AGH, but instead of the LAN IP make it the Tailscale IP of your NPM machine

Wouldn’t that prevent any devices that don’t have tailscale from using it even locally?

stratself@lemdro.id on 24 Jan 04:33 collapse

Yes.

If you want to access your NPM stuff on both Tailscale and LAN, either:

  • Advertise a subnet route for your LAN range, configure Tailscale devices to use it, and use your LAN IP on the AGH rewrite, or
  • Split Horizon: Have your DNS respond with a Tailnet IP when it’s queried from the Tailnet range, and respond with a LAN IP when queried from LAN. AGH cannot do this, but other software like Technitium can
[deleted] on 23 Jan 19:46 next collapse

.

MacManDeluxe@infosec.pub on 23 Jan 23:24 next collapse

Tailscale has a NextDNS integration, so I use that to point my made-up internal domain to the Tailscale ip of my NAS. Works well with subdomains. When I’m on my local network (and not connected to Tailscale), my pihole directs the same url to the local ip.

To clarify, when you’re external or on the tailnet, you want the Tailscale ip. On the local network, you want the local ip.

Decronym@lemmy.decronym.xyz on 23 Jan 23:55 collapse

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
NAS Network-Attached Storage

3 acronyms in this thread; the most compressed thread commented on today has 5 acronyms.

[Thread #1016 for this comm, first seen 23rd Jan 2026, 23:55] [FAQ] [Full list] [Contact] [Source code]