How can I access a container instance that has a private IP?

Ruud Rotte 20 Reputation points
2025-05-24T14:04:30.09+00:00

Hi!

I have a container instance running an image of a Neo4J database. I don't want expose my Neo4j to public internet, but I want to be able to use the Neo4J browser to verify the data or execute queries on spot. For this I need to be able to make a connection to my private network.

So my problem is as follows:

  • I can not access my container if i dont give my container a public IP
  • If I give my container a public IP it is exposed

Is there a way to set up Azure Bastion or something else to securely access my Neo4j and keep the IP of Neo4J private?

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
757 questions
{count} votes

Accepted answer
  1. Marcin Policht 49,640 Reputation points MVP Volunteer Moderator
    2025-05-25T05:34:48.0666667+00:00

    Yep, your use case is a fairly common scenario - here are a few options that rely on having Azure Container Instance deployed into an Azure VNet:

    Option 1: Azure Bastion + Jump Host

    If you want browser access to Neo4j Browser (which uses HTTP/WebSockets):

    1. Create a VM (Jump Host) inside the same VNet as your container.
    2. Install a lightweight browser or use ssh -L port forwarding from this VM.
    3. Access Neo4j from the VM’s browser locally.

    Option 2: Private endpoint + Azure VPN or ExpressRoute

    If you have an on-prem network or local dev environment and want to access Neo4j from there:

    1. Deploy the ACI in a VNet.
    2. Set up a VPN Gateway or ExpressRoute to your Azure VNet.
    3. Connect to Neo4j’s private IP over the VPN from your local environment.

    Option 3: Use Azure Application Gateway or Azure Firewall with IP Restrictions

    If browser access is a must and you can't set up a VPN or jump host:

    1. Deploy an Application Gateway or Azure Firewall in front of your container.
    2. Restrict access to only your office IP or specific IP ranges.
    3. Expose only necessary ports (7474 for HTTP, 7687 for Bolt if needed).
    4. Use Web Application Firewall (WAF) to add security.

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.