mongodbcompassmongosh

Connection to mongodb remote server from windows


Newbie to mongodb, I'm trying to connect to a remote mongodb from my windows laptop, I have installed compass and mongosh. This is the credentials I've been given :

IP  xx.xx.xxx.xxx
MongoDB (access)    user: "user",pwd: "pwd", roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
MongoDB (Login) mongo -u user -p --authenticationDatabase admin
MongoDB (re7 database)  db
Firewall    ufw => rules => allow IP yy.yy.yyy.yyy

I'm getting a connection timeout while running the following (or trying to connect via compass) : mongosh "mongodb://user:pwd@xx.xx.xxx.xxx:27017/db" --authenticationDatabase admin

Is this something to do with the firewall rule, what am I supposed with it? Thanks for your help


Solution

  • Problem was indeed the firewall !