Self Hosting Squidex, how to secure Mongo with vnet?

Scenario : Running a docker version of Squidex in a Linux container on an App Service. Works fine without vnet integration. Squidex is built on .NET Core 3.0
When vnet integration is enabled, the app does not start.

Issue : the following code breaks:

var host = Dns.GetHostName();
// host is now e.g. b6737257279f
Dns.GetHostAddressesAsync(Dns.GetHostName())

This results in an exception “Name or service not known”.

The same code works fine when vnet integration is disabled, it e.g. returns: 172.16.58.3

Hi, I am not an azure expert. I do not use Azure by myself. Where is the Dns.GetHostName() call used?

I think we can just move the code into the MongoDB path: https://github.com/Squidex/squidex/blob/835274396f58f9b9f8f11bab8956639337a97a5b/backend/src/Squidex/Config/Orleans/OrleansServices.cs#L85

Then it should work.

The code breaks at this line: https://github.com/Squidex/squidex/blob/835274396f58f9b9f8f11bab8956639337a97a5b/backend/src/Squidex/Config/Orleans/Helper.cs#L34

What exactly do you mean @Sebastian with your suggestion? I don’t fully understand what this code is trying to achieve, is it trying to retrieve the host’s IP address? For what purpose?

It is for clustering mode. When you have a cluster the instances communicate together to decide which cluster member should do which task. And the code tries to find an IP that it can communicate to the other members.

But when clustering is disabled (aka Development Mode), which is the default now, we do not need the code.