Single domain with multiple IP addresses

I have a server that I want to be able to be able to access only locally or on tailscale VPN using a HTTPS subdomain. The internal IP that it points to changes whether I’m connecting directly on LAN or through the VPN. Can I make two A records for the same domain, one pointing to my server directly and one using the Tailscale VPN? I tried doing this and it didn’t seem to work

Yes, but…

Not likely. That’s because Tailscale’s VPN likely assigns a private IP which would not be publicly routable. (UPDATE: yep, it seems they’re in the 100.64.0.0/10 CGNAT shared address space by default)

Consider using Cloudflare Tunnel for this:

2 Likes

I’m not looking for it to be publicly accessible though, only from my LAN and tailscale VPN. So the two IP addresses I want my subdomain to point to are both private (tailscale: 100.64.. and internal IP: 192.168..). Is this possible?

You could use a tunnel so that you can make the server available. You then could limit access to your VPN with an Access Policy.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.