NavigationContentFooter
Jump toSuggest an edit
Was this page helpful?

Managed MongoDB® FAQ

Reviewed on 29 January 2025

How can I connect to a Database Instance in a Private Network using Public Gateways?Link to this anchor

Note

Managed MongoDB® is currently not compatible with the Static NAT feature of Scaleway Public Gateways. Instead, you can use Public Gateways' SSH bastion feature and perform port forwarding. Follow the steps below to connect using SSH bastion.

If you want to connect locally to a Database Instance that is not accessible via the public internet, you can use SSH Bastion and connect it to the same Private Network the Database Instance is connected to.

  1. Open an SSH tunnel with port forwarding:

    ssh -L local_port:instance_id.network_id.internal:27017 bastion@gatewayIP -p 61000 -N
  2. Connect using mongosh:

    mongosh --host localhost --port local_port --username "username"
Was this page helpful?
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2025 – Scaleway