Can't resolve external domain in-home reddit / selfhosted ---------------------------------------------------------------------- BeowolfSchaefer · 2023-09-30 00:21 I have a .com domain I purchased which points to my home network. I can access my services from outside the home network via the domain name but inside I need to use the IP address. What do I need to do? ---------------------------------------------------------------------- Clarksonator · 2023-09-30 00:51 In my case it is due to some routing issue where you cannot get to your public IP from behind the router. I added my external domains to my internal DNS with internal IPs. ---------------------------------------------------------------------- RuaidhriM · 2023-09-30 00:53 You could set up PiHole as your DNS server. Or add an entry to /etc/hosts ---------------------------------------------------------------------- thekrautboy · 2023-09-30 00:55 This is asked like once a week here, why can apparently nobody simply use the search before asking... ---------------------------------------------------------------------- Don_Mono · 2023-09-30 00:58 Easy way: Edit your host file and point your DOMAIN.COM to YOUR- SERVICE-IP. A slightly more complex solution is to set up a local DNS server and point your DOMAIN.com to YOUR-SERVICE-IP. As you can see, both solutions are essentially the same. The only difference is that if you go the DNS way, you'll be able to access your services from any device within your local network. ---------------------------------------------------------------------- BeowolfSchaefer · 2023-09-30 01:03 That's what I thought. I guess I'll set up my own DNS server. Thanks for confirming. ---------------------------------------------------------------------- No_Dragonfruit_5882 · 2023-09-30 02:11 Calm down bro and drink some beer. Its your fault anyways, why do you still use your brain while 90% of the people dont. ---------------------------------------------------------------------- BeowolfSchaefer · 2023-09-30 03:06 I've been thinking of a PiHole anyway. Thanks ---------------------------------------------------------------------- ButCaptainThatsMYRum · 2023-09-30 03:13 Google "NAT reflection". Its far more likely your terminology is wrong and it IS resolving but being blocked by your firewall rather than not resolving when you have an external domain. ---------------------------------------------------------------------- craig91 · 2023-09-30 04:18 Adguard home another option ---------------------------------------------------------------------- cameos · 2023-09-30 04:23 If your router supports NAT loopback, enable it, otherwise, you'll need to resolve the domain name to your local IP. What is NAT loopback? [https://community.tp- link.com/en/home/stories/detail/1726](https://community.tp- link.com/en/home/stories/detail/1726) ---------------------------------------------------------------------- nik_h_75 · 2023-09-30 04:46 A much simpler solution is to use cytopia-bind. You can define wildcard dns rules and forward all other traffic to regular DNS (like Google). ---------------------------------------------------------------------- kon_dev · 2023-09-30 05:14 Before I used Pihole for my internal DNS, I had that issue before. Check if your router uses a DNS rebind protection, it blocked any request which resolved external DNS entries to local IPs. ---------------------------------------------------------------------- certuna · 2023-09-30 07:39 The issue is with NAT hairpin/loopback: the router basically has to support an internal device going to the external address and then back in again. Solution can be: - use IPv6 (AAAA records), problem doesn’t exist there - if the router has an explicit option for NAT loopback, enable that - local DNS server that instead of the public address, resolves the hostname to the internal address - hardcoded hostnames in the /hosts file ---------------------------------------------------------------------- dereksalem · 2023-09-30 13:29 Some ISPs will call it Hairpin NAT too. Some ISPs actively reject it…which is annoying. ---------------------------------------------------------------------- krriisshh · 2023-10-02 02:01 I too had this same issue it turns out the router provided by ISP is having a DNS management for internal routing. Login to your router config and search for DNS or DNS management and add the domain name and which internal IP it needs to be routed to and it should work. It is annoying to add for all sub domains but this is what that works for me.