Hello everyone, I recently installed Yunohost and deployed a couple of services, but still couldn’s solve this problem.
My setup: Yunohost server with a couple of services, available from global network behind router with dynamic ip with DDNS on it. I decided to implement services accesability via forwarding subdomains from router to target ports on server and this works just great, except the Yunohost web administration page.
Problem: after resolving domain name and forwarding it to server, it redirects to the local static ip (192.168.1.5), e.g. I cannot access web admin page from global network. After weeks of searching, my problem is still here, please help…
Also, it would be very helpful, if someone knows how to correctly flush DNS resolutions, as long as nslookup keeps showing me wrong (local) ip from some local service, instead of router’s.
Have you tried using your /etc/hosts file (assuming Linux and maybe Debian) to hard code the yunohost url into your computer. Eg; at the bottom of your hosts file do something like,
There is a better explanation at the bottom of this page. I have this set up on my computers and it works well, I just have to remember to comment it out if I ever leave the house :). Might be a temporary work around if access from outside the lan is fine.
With nslookup you can specify the dns server address as well. Eg;*
I don’t think this solution is what I’m searching for, due to other services (media server on 81 port and docker-based server on 82 port) are working jist fine. The record in the /etc/hosts file will affect some nginx redirection configs, like /etc/nginx/conf.d/default.d/redirect-to-admin, in which redirection looks like: return 301 https://$host/yunohost/admin.
I’m eager to find out, which specific configs conduct this nasty redirect-resolution in yunohost/admin page. Ideally, I want to keen main domain and admin web page access via other’s domain subdomain separated.
My network is pretty straightforward, there is just router with ddns, server with yunohost (all yunohost configs are default) + Plex media server on 81 port and so on. Nothing special, like proxy manager, if it is not pre installed in yunohost.
On the client side I tried other PC, mobile phone and laptop, but regardless of local or global network, resolution and redirection from yunohost web admin page domain name keeps translating into local ip.
About port forwarding and ports mentioned before, I use UPnP, also tried manually opened ports. Even wrote custom iptables hook to open some ports after reboot.
Why? Just used to control Linux via cli)
Diagnosis complains about domain’s external accessibility (as expected). The problem is definitely not in router, internet provider or ddns, I’m 200 percent sure. It is clear, that I miss some sneaky nginx redirection or dnsmasq domain resolution.