Showing results for 
Search instead for 
Did you mean: 

Allow connections on public and private network interfaces

Node Link

Hi there!

I'm trying to get my neo4j instance installed on a VM where the public IP is accessible only over TLS, but also accessible over a private VPC. I've followed the great instructions here for setting up Let's Encrypt. I have no problem connecting to my DB instance via https via the public domain (e.g. I also have no problem using cypher-shell against the public neo4j+s address (e.g. neo4j+s://

This is where the problem starts though. When I try connecting from the instance to itself, or from another VM on the same VPC, I get the following error:

# From another VM on the same VPC:
➜  ~ cypher-shell -a neo4j+s://
Failed to establish secured connection with the server

# From the instance running neo4j:
➜  ~ cypher-shell -a neo4j+s://localhost:7687
Failed to establish secured connection with the server

Per the instructions, found here, with a default listening address, this should bind to all interfaces.

My config looks like:







What am I missing here?


Node Link

Anyone from neo4j who can help here?

Graph Fellow

Without visibility into the network and security, it's really hard to guess at what's going on. You could turn on more detailed logs, or set up a reverse proxy middleman so you can see all the traffic.

IMO, if I had to guess, it might be that your machines behind the VPC can't connect to the cert authority, or the VPC is rerouting certs (many company networks do that to maintain control over secure traffic).

Both machines have full access to the public web and have public IPs. The VPC is there so I can transfer data, etc, without incurring egress fees on the other machine. Also, I should say that there are no firewalls installed within this environment (well, not yet).

Which logs should I turn on to be more detailed?

I'm still guessing, so you might want to contract someone with devops, or web-server admin, experience. My best guess, is that in following those instructions, you created a cert for the domain-name, not a generic TLS certificate. Such a cert will not work for requests to that machine other than one to the domain-name the cert is for. A simple way to verify this, would be to only connect via that domain-name, even when on local.

  • Your machine must have a valid DNS address in order to have a valid SSL certificate. Certificates typically aren’t granted for bare IP addresses because it’s a lot harder to prove that you own/control a bare IP address.

If that's the case, then you still should be able to connect just fine:

➜  ~ cypher-shell -a --debug true neo4j+s://

(you may need to add an entry to your hosts file:

If that's not the case, and your cert is not locked to the domain-name:

Since you're connecting via cypher-shell, I'd try it with --debug true:

➜  ~ cypher-shell -a --debug true neo4j+s://

Next, you'll need to test the TLS handshake:

openssl s_client -crlf -connect