MongoDB Atlas

Configure MongoDB Atlas for Pritunl

MongoDB Atlas is a managed MongoDB database from MongoDB. This tutorial will explain configure MongoDB Atlas with VPC peering. This creates a reliable and secure MongoDB cluster with backups. The M0, M2 and M5 plans use shared RAM and have low connection limits, these plans should not be used for production systems.

MongoDB Atlas Cluster

From the MongoDB Cloud Manager click Build a New Cluster. Name the cluster and select MongoDB 3.6 with WiredTiger. Choose the same provider and region as your Pritunl cluster.

2494

Next from the Security tab click Add New User. Set the privileges to readWrite and set the database name. Then autogenerate a secure password.

1540

From the Peering tab click New Peering Connection. Fill in the AWS account ID and VPC information.

1534

Once done open the AWS VPC dashboard and right click the VPC and select Edit DNS Resolution. Then select Yes and save.

908

Right click the VPC and select Edit DNS Hostnames. Then select Yes and save.

908

From the VPC dashboard click Peering Connections on the right. Then accept the pending peering connection from MongoDB.

1798

Once done the VPC peering connection should be established.

1798

Click Route Tables on the right and edit the routing table for the VPC. Add the Atlas CIDR block from the steps above as the Destination then select the pcx peering connection as the Target.

1378

From the MongoDB Atlas manager select the cluster and get the MongoDB 3.4 URI. Replace the password with the generated password from earlier and copy this URI to the Pritunl settings.

1364