I have some subdomains that go to my home address (I know I should put it through a VPS first but I’ll get to that when I have time).

If I connect to example.domain.tld and DNS records point back to my own IP, where does that data go to reach back to my device?

Edit: thanks for the responses everyone

  • jws_shadotak@sh.itjust.worksOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 months ago

    I have a reverse proxy set up already. The path from the outside goes:

    DNS -> my IP -> reverse proxy -> server

    I’m just wondering what happens when my own devices on the same network go to the domain.

    • floquant@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      2
      ·
      4 months ago

      You already have a bunch of NAT-level suggestions, so I wanted to mention there’s an alternative solution: split-horizon DNS, or simply split DNS. Basically, you run a DNS server in your LAN (like pi-hole) which resolves to the private IP, so resolving externally and internally give different results. This way packets don’t hit the router at all. You can also do a wildcard like *.something.lan to avoid having to add a record for every service, and only configure your reverse proxy.