So maybe I am missing something obvious, but here goes:

I’ve got a small server at home, and I have simply.com pointing various domains to it. Works fine, nginx routs the traffic where it needs to go.

But whenever I am at home and connected to wifi I have to use the internal address and port to reach my server, e.g. 192.168.0.192:8096 for my Jellyfin server. If I use the public URL at home, i hit the login page to my router.

This is annoying when I use apps, as I need to switch between the public URL and the internal address as I come and go from my home…

What are my options for doing something about this? I want to use the public URL at home too…

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    3 months ago

    You may have to set up split zone DNS so names resolve to private IPs when at home but resolve to public addresses when not home.

    • Creat@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 months ago

      Another name, depending on the exact context, is “hairpin NAT”. Should make googling with the specific router OP has easier.

      • CameronDev@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 months ago

        Never heard that term, but its a very obscure concept, so wouldn’t surprise me if it had multiple names. Probably vender specific names?

        Seems quite a few people havent heard of it, hence a lot of the split DNS answers :/

    • EvilCartyen@feddit.dkOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      3 months ago

      Thanks - I have an icotera i4850 router which claims to support NAT loopback, but I can’t figure out where to do it and it seems like the manual is gone from the internet :) Might have to ask my internet provider if they have a PDF somewhere.

      Edit: D’oh, it’s a checkbox in the port forwarding interface! Thanks a bunch, didn’t know what to look for before your reply :)

  • powermaker450@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 months ago

    usually in your router settings you can change local DNS settings. you can set your domains and subdomains to point to your server’s local IP.

  • peregus@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 months ago

    To bypass this problem you can add your domain (with all the third level ones) to your router, pointing to your internal IP

  • Knossos@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 months ago

    On my Fritzbox, I needed to add all my Subdomains to a list under:

    DNS Rebind Protection Your FRITZ!Box suppresses DNS responses that refer to IP addresses in its own home network (DNS rebind protection). Here you can specify exceptions for which DNS rebind protection should not apply. Do this by entering the complete name of the host (domain name including the subdomain) in the list.

    That’s under network settings, advanced. In case you have that.

  • jet@hackertalks.com
    link
    fedilink
    English
    arrow-up
    0
    arrow-down
    1
    ·
    3 months ago

    Ipv6

    Depending on your gateway, you may be able to override the DNS settings for a few domains that you use internally