Connect to subdomain hosted on a different machine from Yunohost

Hello,

I have my Yunohost machine hosted at home on the domain xxx.me and everything is fine. I set up a backup server with a RaspberryPi and have it answer on back.xxx.me. The two machines are on different IP addresses and my DNS records are correct. I can connect to the back.xxx.me domain without any issue from my laptop, but the yunohost machine cannot find the correct IP address and tries to connect to itself.
How can I force Yunohost/Debian to actually look up for the IP address of back.xxx.me when xxx.me is already known?

Thansk

That doesn’t exactly answer the question (that won’t trigger a DNS lookup) but you can still tweak the /etc/hosts of your server, adding a line like 11.22.33.44 back.xxx.me to force the resolution of back.xxx.me to a known ip.

Thanks, I thought about that but the back.xxx.me is on a dynamic IP so it won’t work (unless I do a cron performing the lookup and updating the /etc/hosts manually, but that’s a bit convoluted…). I will continue looking for that, I have a feeling I do not have the correct naming of what I want to do.

In the DNS registar, I have mydomain.fr with the public IP of my yunohost server and blog.mydomain.fr with the public IP of another server who host my blog. And Yunohost can see my blog. But it’s because the subdomain and the domain are resolved by the DNS registar, not by my Yunohost server.

In your case, you need to define an IP for back.xxx.me but the associated machine has not a fixed IP… It’s tricky. I think doing something like "it creating an “A” entry to the no-ip.org address for that particular subdomain. And no-ip.org will resolved back.xxx.me as DNS registar. It’s way to explore.

The DNS records are fine. The problem is that the main machine is not performing an external DNS query since back.xxx.me is part of the domain xxx.me for which the machine is the host.

For the moment, the workaround is to use the IP address that I collect using (yes, Google DNS is bad but that is a quick workaround)
dig +short @8.8.8.8 back.xxx.me