Admin page domain name to local ip redirect

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 (, 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;*


would cause nslookup to use googles dns server to resolve the address.

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.

Ahhh, that was badly explained. I meant the hosts file on your computer, not on the server.

This changes nothing as my router’s IP is dynamic, and anyway domain name works perfectly for other services. Any other suggestions?

Are any of the other services serving a web page?

Does diagnonsis on yunohost have any hints?

Other ideas, HSTS problem? Eg, the router is passing back the address of your internal network but your cert is tied to your external address?

Port 443 isn’t open but Nginx is set to force https?

Sorry, I am just throwing out random idea at this stage.

Anyone else got some ideas?

Can you explain how is your network built ? Do you have nginx proxy manager in front of yunohost? What other services do you have in your network?

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 did you have to do it? There is a firewall on the webadmin > tools > firewall.
Do you have other customisations?

YunoHost is made to make it simple. Cli is needed from time to time.

Does the diagnosis complain about anything?
How did you forward the ports? Some routers have specific configuration.

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.

What do ping and traceroute give for your domain?

In local network, in global the correct ip.

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