Remote server connection to mongo unsuccessful

To access the MongoDB server, first start the server using the –dbpath command. Then, open a separate command window, set the path to the MongoDB bin, and use the mongo.exe command to access the server. It is important to note that connecting to a remote MongoDB server over a UDP port through a public IP or the internet is not possible.


After encountering issues connecting to a remote mongodb server, I discovered that the problem was with the port I was using. Initially, I had attempted to connect through a port that was only open over UDP. However, upon consulting with my networking team, I was able to change the port to TCP and successfully establish a connection. Specifically, I requested that they make the port 27017 available over TCP, which ultimately resolved the issue.

The bottom line is that it is impossible to access the MSDT server via UDP port using a public IP or the internet.

Frequently Asked Questions