# How to bypass yunohost/admin accessing through direct public IP

**URL:** <https://forum.yunohost.org/t/how-to-bypass-yunohost-admin-accessing-through-direct-public-ip/30942>\
**Category:** Advanced use case\
**Tags:** ip, config, english\
**Created:** [August 29, 2024, 9:21pm UTC](https://forum.yunohost.org/t/how-to-bypass-yunohost-admin-accessing-through-direct-public-ip/30942 "2024-08-29T21:21:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![efcsn](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/e/f0a364/32.png) [@efcsn](https://forum.yunohost.org/u/efcsn)\
**Post date:** [August 29, 2024, 9:21pm UTC](https://forum.yunohost.org/t/how-to-bypass-yunohost-admin-accessing-through-direct-public-ip/30942/1 "2024-08-29T21:21:40Z")

</div>

Hello everyone.

_(Update at the bottom)_

I’m trying to make it so that when accessing my Yunohost domains through their public IP, it completely skips the /yunohost/admin page and there’s no way around it.

I have two domains mounted with a webpage each: `“example1.duckdns.org”` and `“example.duckdns.org”`, both of which are accessible and functioning correctly when accessed. I also have two additional domains, `“standard1.com”` and `“standard2.com”`, whose ANAME and CNAME point to \*.duckdns.org, but the problem lies in that the .com domains directly link to the public IP, causing only the admin page to appear.

I’ve managed to get as far as modifying the file “/etc/nginx/conf.d/default.d/redirect\_to\_admin.conf” by changing it to (thanks to help of IA, by the way):

`if (http_x_forwarded_proto = "http") { return 302 https://host$request_uri; }`

However, what happens with this code (and any other options I’ve seen in the forum) is that despite removing $host/yunohost/admin;, I always end up with an unresolvable redirect error.

With this specific code, I’ve managed to skip the admin page, but it redirects me to a default installation page of Nginx instead.

I’ve tried all and every option I’ve come across on the forum except for installing an SSL certificate linked to the domains \*.com (which I’ll try to fix tomorrow, if I can). I have even upgraded to the beta test 12 with no luck.

Could someone help me out? Many thanks!

P.S. Sorry for writing such a long post.

**Update** : I’ve more or less bypassed my problem creating two new domains in yunohost. I’ve created `example1.com` and `example2.com`, redirecting everything to them in yunohost configuration.

It works! The duckdns dinamic service is working and everithing is working, for the moment.

I still have to deal with SSL certificates that for the time being cannot register with let’s encrypt (I hate certificates and bureaucrazy).

I think it’s not _the solution_ because is a bit messy but it’s a _kind of solution_.

---

<div class="post-metadata">

**Author:** ![wbk](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/w/e0b2c6/32.png) [@wbk](https://forum.yunohost.org/u/wbk)\
**Post date:** [August 30, 2024, 8:22pm UTC](https://forum.yunohost.org/t/how-to-bypass-yunohost-admin-accessing-through-direct-public-ip/30942/2 "2024-08-30T20:22:32Z")

</div>

Hi efcsn,

Welcome to the forums 🙂

Great that you found a solution to your problem!

> [@efcsn](#):
>
> I think it’s not _the solution_ because is a bit messy but it’s a _kind of solution_.

While reading (and still…) it’s not quite clear to me what the situation is, but my suggestion would have been in the same direction as your solution. The system will only answer to requests for domains that are actually managed by the system.

> [@efcsn](#):
>
> I still have to deal with SSL certificates that for the time being cannot register with let’s encrypt (I hate certificates and bureaucrazy).

They should work more or less automatically. If it keeps being unable to get a certificate from Letsencrypt, consider opening a new thread!

---

<div class="post-metadata">

**Author:** ![efcsn](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/e/f0a364/32.png) [@efcsn](https://forum.yunohost.org/u/efcsn)\
**Post date:** [August 30, 2024, 11:15pm UTC](https://forum.yunohost.org/t/how-to-bypass-yunohost-admin-accessing-through-direct-public-ip/30942/3 "2024-08-30T23:15:06Z")

</div>

I just wanted to do one redirecton to a dynamic DNS and then redirect to a “proper” domain but even though I didn’t have any problems with the dynamic DNS, the “official” domain redirected me to the direct IP and, because of how yunohost is configured, it detected it as admin access and that’s what I wanted to avoid, admin access through the direct IP.

The solution I found was simpler, and as you say, it’s the correct one. I’m still learning how all this web stuff works 😉

---

<div class="post-metadata">

**Author:** ![marcusj](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/a587f6/32.png) [@marcusj](https://forum.yunohost.org/u/marcusj)\
**Post date:** [August 31, 2024, 12:07pm UTC](https://forum.yunohost.org/t/how-to-bypass-yunohost-admin-accessing-through-direct-public-ip/30942/4 "2024-08-31T12:07:37Z")

</div>

> [@efcsn](#):
>
> d my proble

Have created one new domain in yunohost and wanted to install a noster service, how can i bypass the one new domain to not go to the “yuno admin page”?

---

<div class="post-metadata">

**Author:** ![marcusj](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/a587f6/32.png) [@marcusj](https://forum.yunohost.org/u/marcusj)\
**Post date:** [August 31, 2024, 12:29pm UTC](https://forum.yunohost.org/t/how-to-bypass-yunohost-admin-accessing-through-direct-public-ip/30942/6 "2024-08-31T12:29:30Z")

</div>

> [@efcsn](#):
>
> redirecting everything to them in yunohost configuration.

How do i add that to my config? How does your config look like so can i try to do the same.

---

<div class="post-metadata">

**Author:** ![efcsn](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/e/f0a364/32.png) [@efcsn](https://forum.yunohost.org/u/efcsn)\
**Post date:** [August 31, 2024, 6:33pm UTC](https://forum.yunohost.org/t/how-to-bypass-yunohost-admin-accessing-through-direct-public-ip/30942/7 "2024-08-31T18:33:35Z")

</div>

Since you have installed a protocol I really don’t know how to do that. I’m learning on the go.

What have you installed?

---

<div class="post-metadata">

**Author:** ![marcusj](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/a587f6/32.png) [@marcusj](https://forum.yunohost.org/u/marcusj)\
**Post date:** [August 31, 2024, 6:43pm UTC](https://forum.yunohost.org/t/how-to-bypass-yunohost-admin-accessing-through-direct-public-ip/30942/8 "2024-08-31T18:43:56Z")

</div>

Did install Ditto/nostr service.
