adding localhost to mongo atlas whitelist

2019-07-27 22:10发布

I've been using the option allow everyone connection to my atlas cluster by selecting the "Allow Access from Anywhere" button in the group IP whitelist. Is there a way to just add my localhost ip address instead. I tried doing it but I got the following error :

/me/node_modules/mongodb/lib/replset.js:364
          process.nextTick(function() { throw err; })
                                        ^
MongoError: connection 4 to cluster0blbla.net:27017 closed

Anyone know of a way to add localhost connection without opening security up to everyone ?

1条回答
小情绪 Triste *
2楼-- · 2019-07-27 22:52

Yes you can always add your local IP Address by going to:

Security - > IP Whitelist and then add a new IP. There you can click "ADD CURRENT IP ADDRESS" along with any comment:

Atlas Whitelist

查看更多
登录 后发表回答