How to route dynamically reddit / selfhosted ---------------------------------------------------------------------- Ok_Maintenance_1946 · 2023-11-06 12:38 I don't know if the tittle is set correctly. But the point is: I have configured an DNS ([www.some-domain.com](https://www.some- domain.com)) with cloudfare that allows me to enter my NAS over internet. But how to route to my local IP instead of passing through cloudfare if I'm connected to my router? Because it still routing me through cloudfare even when I'm in the local network. It's a Mi AloT Router AC2350, Can I do somenthing there to do that? ---------------------------------------------------------------------- sebampueromori · 2023-11-06 12:44 You would need a local dns server and set that as primary dns server in your local network ---------------------------------------------------------------------- autogyrophilia · 2023-11-06 12:52 This is not dynamic routing. That's a different network concept. This is called split DNS. Depending on what you want to do, you will also need to setup a reverse proxy for HTTPs with a local CA. ---------------------------------------------------------------------- ElevenNotes · 2023-11-06 12:54 Lookup split DNS. ---------------------------------------------------------------------- Ok_Maintenance_1946 · 2023-11-06 12:56 So, I guess I can run a docker DNS server where all my local services are there and tell the clients that if they are in the local network client can route directly? And set my router DNS to that service, right? ---------------------------------------------------------------------- Ok_Maintenance_1946 · 2023-11-06 12:57 I’ll take a look to that Split DNS, thanks for clarifying. Can I change the title? ---------------------------------------------------------------------- sebampueromori · 2023-11-06 14:11 Yes, it will work depending on how your services handle https ---------------------------------------------------------------------- HearthCore · 2023-11-06 21:32 Depending on what type of NAS you own you can also run a DNS Server like Pi-Hole or AdGuard on it, then let the DHCP let DNS point to your NAS as a primary DNS provider. All DNS requests then get send to your local DNS provider, where you set Redirection entries to local IP Adresses. Depending on if you want to have the "same" experience, i.e. not having to give a port number or encrypted transmission through SSL - you'd those subdomain DNS entries in your local DNS Provider to a Reverse Proxy, and have that one sent the traffic internally. \-- Since you're already using Cloudflare, you could very well send all cloudflare traffic to a local ReverseProxy via Wildcard and send traffic from cloudflare and your redirection to a single Ingress / Gateway for your selfhosted services. ---------------------------------------------------------------------- EriksonEnterprises · 2023-11-07 11:12 The domain is resolved through cloudflare as your nameservers are setup with cloudflare. You can either route everything through cloudflare or everything direct without cloudflare, but not one or the other... To direct traffic direct, just turn off the Proxy in DNS settings of cloudflare (DNS tab, then edit the A record that has your IP, and turn off the proxy switch) Hope this helps