DNS host override local

I have a cloud which is available from external, but in my network, I want to resolve the name locally. I already added the (local) ip and the FQDN in "Local DNS Records", but the name is still resolved to the external IP. What do I have to to to resolve the name to the local IP?
Thanks!

Nobody? Hard to imagine that I'm the only one who needs this config! Maybe more details help:

The cloud in my home net is on 192.168.178.10 and accessible from outside through cloud.mydomain.de, which points to my external IP. If I'm in my homenet, all clients which have the cloud.mydomain.de in their config are routed to my external IP. How can I route the cloud.mydomain.de to the local IP?

Thanks!

192.168.178.10 cloud.mydomain.de

Like I said in the initial post, thats what I already put in the local dns records ....

dig cloud.mydomain.de
-> external IP

dig cloud.mydomain.de @192.168.100.2 (which is my pihole)
-> 192.168.178.10

Were those dig commands issued from a client?

The full output would also be helpful - you could redact sensitive information like your public IP as required before posting it.

Also, how did you define the DNS record pointing to your public IP?

Which DNS server answered the request? Or, please run the following from the client in question and post the full output:

nslookup cloud.mydomain.de

Yes

; <<>> DiG 9.11.3-1ubuntu1.12-Ubuntu <<>> cloud.mydomain.de
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7607
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;cloud.mydomain.de.		IN	A

;; ANSWER SECTION:
cloud.mydomain.de.	3184	IN	CNAME	mydomain.dyndns.tld.
mydomain.dyndns.tld.	28	IN	A	xxx.xxx.xxx.xxx.

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Thu May 28 08:57:13 CEST 2020
;; MSG SIZE  rcvd: 99
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
cloud.mydomain.de	canonical name = mydomain.dyndns.tld.
Name:mydomain.dyndns.tld
Address: xxx.xxx.xxx.xxx

If I do

nmap -sP 192.168.100.0/24

I get

Nmap scan report for cloud.mydomain.de (192.168.100.254)

Your client uses some kind of local DNS resolver/forwarder.

Since forcing a dig through Pi-hole returns the correct local answer, it would seem that your client's local DNS bypasses Pi-hole.
Verify that Pi-hole is used as your client's upstream, or make your client accept DNS options as supplied by DHCP (if you are distributing Pi-hole as DNS server via DHCP).

In my company I have pretty much the same scenario (local cloud accessible locally under the cloud.myotherdomain.de) and a pfsense where I put in a "host override" . On the same PC I'm using in my home the domain is routed locally. I don't think its a matter of the local DNS settings in my client pc. I'm wondering why I can't setup my home network the same way?!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.