Français (Désolé pour Google Translate!):
Donc, je suis allé et acheté le gros paquet cher de mon fournisseur de services Internet afin que mon serveur fonctionne mieux. ISP a répondu en m’envoyant un nouveau routeur coûteux que je devais apparemment utiliser, mais ne prend pas en charge le bouclage / épinglage.
Maintenant, je ne suis pas un expert, mais d’après ce qu’on m’a dit, il me semble que je dois mettre en place un service DNS et y indiquer les dns de mon routeur (certains appareils comme mon téléphone ne sont pas enracinés, donc je peux le faire) Il suffit de modifier hosts.conf). Le problème est que tous les tutoriels de configuration DNS que je peux trouver semblent être écrits pour des cas d’utilisation beaucoup plus compliqués que “Je veux que ce nom de domaine pointe vers cette adresse IP”.
Donc, mes questions sont les suivantes:
Y a-t-il une application Yunohost pour installer un service DNS?
Sinon, est-ce que quelqu’un connaît un didacticiel qui montre simplement comment faire en sorte que le service DNS pointe quelques domaines spécifiques vers l’IP interne et obtienne tous les autres domaines du service DNS externe normal?
English:
So, I went and bought the big expensive package from my ISP so my server would run better. ISP responded by sending me a new, expensive router which I apparently have to use, but doesn’t support loopback / hairpinning.
Now, I’m no expert, but from what I’ve been told, it sounds like I need to set up a dns service and point my router’s dns to it (some devices like my phone aren’t rooted, so I can’t just modify hosts.conf). The trouble is, all of the DNS configuration tutorials I can find seem to be written for far more complicated use cases than just “I want this domain name to point to this IP address”.
So my questions are these:
Is there any Yunohost app to install a DNS service?
If not, does anyone know of a tutorial somewhere that shows, simply, how to have the DNS service point a couple of specific domains to the internal IP, and get all other domains from the normal, external DNS service?
Pour le point 2, il y a apriori deja dnsmasq qui est intégré de base dans YunoHost et qui réalise ce genre de fonctionnalité (à voir pour les détails exacts). Normalement tu peux utiliser le dnsmasq de ton instance yunohost en ouvrant le port 53 dans le firewall du serveur (par contre, il n’est pas conseillé d’ouvrir/router le port 53 au niveau de ta box !). Ensuite, tu peux configurer tes autres machines pour utiliser ton serveur comme résolveur DNS, via son IP locale.
So, you have a new router at home and you have a Yunohost selfhosted.
And now, are you looking to configure your yunohost server as a DNS resolver for your machine on your local network. And this only from your local network (not in 4G for example).
That’s it ?
If, yes
You are right, except that as Aleks says, dnsmasq is already installed by yunohost. To convince you: dpkg -l |grep dnsmasq
So,
Add your selfhosted domain names to Yunohost’s /etc/hosts; 192.168.1.100 toto.com for example.
Tell DNSmasq the network connection to listen to
Restart dnsmasq service
Add nameserver @ip_yunohost in /etc/resolvconf.conf on your router.
And it’s ok.
to check dig toto.com on your pc.
PS :
if you want to simplify / have a GUI, use the pi-hole application for yunohost (it’s a Lying DNS for advertising)
Vou will have several questions during the install.
Add your domain name in the file / etc / hosts of your yunohost server.
and execute: pihole restartdns
Perfect! Since I posted that last reply, I realized that yes, DNSmasq is already installed and that I already had the domains set up in /etc/hosts (to save bandwidth and speed up transfers).
So now to experiment with the last two steps. Hope I don’t have any issues with the last one. My router is a closed source box supplied by the ISP, but I think I should be able to just enter the network IP address in it’s DNS lookup config gui…
Sorry, I realized I missed answering some questions, @gannonwoto:
Yes, I have a new router at home with Yunohost selfhosted.
Yes, I’m looking to set DNSmasq up as a DNS resolver on my local network, however…
I want to make it the DNS resolver for the router itself, so when my phone is connected via wifi, that it will still resolve the domain name for my yunohost site correctly.
Currently I did the steps in your bullet points, except I put in the ip adress for my Yunohost box (192.168.1.99) in as the router’s primary DNS. I also added my router’s IP address to dnsmasq.conf ( listen-address=127.0.0.1, 192.168.1.1)
I’ve restarted the router and the yunohost box. Visiting my domain name though still just seems to time out.
Nop, in your yunohost dnsmasq server listen-address=127.0.0.1
dnsmasq will want to listen to an interface of your yunohost server having for address “192.168.1.1”
/etc/hosts has a list of my domain names, all pointing to 192.168.1.99 - I know this is correct, as I can use my websites locally, even when the internet goes down.
What could possibly be changed, so my router gets the correct (internal) IP adress, when a connected device asks for my domain name?
@gannonwoto No problem. It still doesn’t work, though. All sites resolve correctly outside my network. When I use my phone though (using the router’s wifi) self hosted domains time out.
If I point my routers primary and secondary DNS server
IP addresses at my Yunohost internal IP address, then all domains (self hosted and otherwise) time out.
I wonder if DNSmasq is getting the DNS requests from my router?
Edit:
Also, could you paste the content of /etc/dnsmasq.conf, please ? I know you already did it, but that’s a few months ago and I prefer to make sure there is no wrong parameter.
[FR] OK, ça fait un moment, mais je n’ai toujours pas trouvé ça. Voici les informations que vous avez demandées pour @SohKa. J’ai remplacé le nom du domaine par “mydomain”:
[EN] OK, it’s been a while, but I still haven’t figured this out. Here’s the information you asked for @SohKa. I replaced the name of the domain with “mydomain”:
So I created a fresh install of the latest Yunohost. I still have the same hairpinning problem with my router, so here’s the info you asked for @SohKa / @gannonwoto :
So… any suggestions on how to configure DNSmasq to act as a DNS service that directs requests for my domains to my Yunohost server and everything else to a DNS service like openDNS?