For some days now I have been trying to setup remote access for mongodb server which i am running in our 64gb ram azure machine. I tried using docker, docker-compose and using nginx as reverse proxy for mongodb, but this didnt work. Basically i found out that :
- I am unable to bind the host (server-public-ip-address) to the nginx proxy running.
So I switched over to not using docker instead running them as services and still configuring nginx as reverse proxy, I still noticed that while I was able to see the nginx default home page when i access the server public ip address (or dns which i have set up in azure) but I am still not able to connect to my mongodb using compass or mongosh using the public ip address which nginx is running on.
Now, I am no longer using nginx and I am still not able to configure remote access to mongodb by adding the 0.0.0.0 access anywhere ipaddress in the bindIp parameter. Also i have added a rule in the firewall to allow any ip address to access the port 27017 for mongodb. So i dont know what really is happening with mongodb, Isnt it possible to access mongodb remotely ?