Hi everyone,

I have a Synology NAS and a lot of computers in our network connect to it with its public url and we have had some outages of internet recently which made me think of some things.

Basically what I want is that if the DSM domain https://dsm.example.com isn’t reachable it will resolve its local IP https://192.168.1.200. This should be a rule for the whole network and not only manual change on every computer.

I have a lot of dockers running on the DSM which of course are still directly reachable but for example bitwarden is setup with the public address as it needs to sync everywhere.

Ideally this would be like you put in primary and secondary DNS in the modem. So if one isn’t available the second one is picked.

Any help in the right direction of how this can be done, or how this is called is welcome.

  • GolemancerVekkB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    What’s your DNS resolver for your internal network? Use it to tie that domain name to the private IP you want. The devices that use your internal DNS will always go there – unless they use DNS over HTTPS, like they shipped for default in Firefox recently, in which case you’d have to either disable DoH in Firefox or make an exception for that domain.

    If you use DHCP it may also do DNS (like dnsmasq does) so you may be able to distribute the override to DHCP-using devices while still using an exernal DNS for everything else.

    • Adventurous_Ship_317OPB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      I have Adguard running and setup as primary DNS in the modem. So u/Accomplished-Moose50 just named Adguard already as an option to do “magic” there.

      Aaaah, I think I get it. So in Adguard there is just the rule to always forward any request to example.com to 192.168.1.200 because that is always true.

      Yes that would work! Just have to find out how ^^, I’ll dive into the documentation of adguard.