Dynamic hostnames

I'm really noob to DNS setup. Pls, be patient :slight_smile:
I just installed Pihole in a raspberry debian 8 and everything works quite well.
Now my doubt / problem:
I use dtdns as dynamic DNS service. My free dynamic hostname is "pepe.4irc.com".
Currently I have redirected port 80 from my router (192.168.0.1) to the fixed IP of my raspberry (192.168.0.4).
In my /etc/hosts I have the entry "192.168.0.4 pepe.4irc.com". The resolution works within my lan, but not from wan.

What or how should I setup Pihole so that my dynamic hostname is available both inside and outside of my lan?
Regards!

This has got very little or nothing to do with Pi-hole.
Usually you need to install some sort of agent software that keeps updating the IP for your public DNS record.

EDIT: http://www.dtdns.com/dtsite/updateclients
Try get support from them if the WAN part isn't working.

Sorry for my bad English (not my native languaje )
My problem is not in the resolution of Dtdns. If I include the line IP-domain in the /etc/hosts, it resolves perfectly from LAN. If exclude, resolve from WAN.
What I would like to get is that it works at the same time, in and out of the LAN.
Is it possible?

I dont exactly understand what you mean ... English is not my native tong either :wink:
I believe you already did the proper thing for LAN resolution by adding that line "192.168.0.4 pepe.4irc.com" with the private IP address.
That will make sure devices on the LAN can connect directly to the web service running on Pi-hole.
The thing thats unclear is, are you running that agent software to update the public IP address of that "pepe.4irc.com" DNS record ?
If you dont have that one running, devices on the internet wont be able to connect to the public IP address of your router that forwards 80 TCP traffic to Pi-hole's private IP address.

EDIT:

C:\>nslookup pepe.4irc.com 8.8.8.8
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

*** google-public-dns-a.google.com can't find pepe.4irc.com: Non-existent domain

EDIT2: Ohw and be patient sometimes as DNS records have a TTL (Time To Live):

C:\>nslookup -qa -debug pi-hole.net 8.8.8.8
------------
Non-authoritative answer:
------------
Got answer:
    .
    .
    .
    ANSWERS:
    ->  pi-hole.net
        AAAA IPv6 address = 2604:a880:400:d0::1071:1
        ttl = 973 (16 mins 13 secs)

------------
Name:    pi-hole.net
Addresses:  2604:a880:400:d0::1071:1
          159.203.180.3

That's the problem.
I already have a script running every hour that updates the public ip of pepe.4irc.com domain in dtdns. It seems, from what you say, that everything is well configured and that the problem can be in that script.
Knowing that I do not have to touch anything in the Pihole configuration, I will review the script and do some more tests.
Thank you!

PS. pepe.4irc.com is a sample domain, not my real domain :stuck_out_tongue: