Configure RavenDB traffic to run over internal network

146 views Asked by At

I'm having some configuration problems with traffic routed over the wrong network.

I have:

  • RavenDB (version 4.2) installed on one server
  • Web site (installed on IIS) installed on another server

Both servers are on the same network.

The problem we are facing is that all traffic between db and web runs over the Internet/external network, not via the internal network. This is obvious a problem and would like the traffic to run over the internal network.

Unfortunately we haven’t figured out how to configure this properly.

RavenDB settings.json:

{
  "DataDir": "RavenData",
  "License.Eula.Accepted": true,
  "Security.Certificate.LetsEncrypt.Email": "[email protected]",
  "Setup.Mode": "LetsEncrypt",
  "Security.Certificate.Path": "certificate.pfx",
  "ServerUrl": "https://0.0.0.0:8080",
  "ServerUrl.Tcp": "tcp://0.0.0.0:38888",
  "ExternalIp": "109.0.0.0",
  "PublicServerUrl": "https://public_domain:8080",
  "PublicServerUrl.Tcp": "tcp://public_domain:38888"
}

(Some data above is obscured. The “ExternalIp”-setting above are are hidden but set to the external IP which is the same as the one pointing to PublicServerUrl-domain)

Web site db settings:

<add key="Raven.Url" value="https://public_domain:8080" />
<add key="Raven.File.Url" value="https://public_domain:8080" />

What I have tried:

  • Changed the ServerUrl value in settings.json to internal IP of RavenDB.
  • Changed the db app settings (Raven.Url) to internal IP. This results exception:
Raven.Client.Exceptions.Security.CertificateNameMismatchException: You are trying to contact host *internal ip inserted here* but the hostname must match one of the CN or SAN properties of the server certificate

How can I force the traffic to go over internal IP/network instead over external IP/Internet?

0

There are 0 answers