this post was submitted on 17 Oct 2023
1 points (100.0% liked)

Self-Hosted Main

521 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 2 years ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] Adventurous_Ship_317@alien.top 1 points 1 year ago (1 children)

I want this to be the default behaviour! :D

I have adguard installed in docker as DNS blocker. Can you please elaborate how I would set this up?

[–] brainscanXP@alien.top 1 points 1 year ago (1 children)

It´s easy in AdGuard:

- Go to Filter -> DNS Rewrites

- Add a new DNS-Rewrite

- Domain: dsm.example.com

- IP: 192.168.1.200

Now every client in LAN or Wifi connects directly to 192.18.1.200 while opening dsm.example.com. Outside the local network they will connected to the public IP.

Thank you so much, this is exactly what I was looking for!

Also credits to u/Accomplished-Moose50 and u/GolemancerVekk <3