0
votes

This is the PC client, it has good connection to our ubuntu server, we can ping it and use filezilla and remote control it and everything, but we cannot connect to the mongod running on the ubuntu server

This is the PC client, it has good connection to our ubuntu server, we can ping it and use filezilla and remote control it and everything, but we cannot connect to mongod running on the ubuntu server

First we thought it was the firewall (read on stackoverflow that you had to add mongods port to the firewall, so we did).

enter image description here

We tried everything - reinstalling - bind_ip = 10.5.50.16 port = 27017 and bind_ip = 0.0.0.0 port 27017 etc etc...

This is a completely fresh installation - what are we missing?

1

1 Answers

0
votes

We found the solution. In order to access mongodb from another machine, you must add 0.0.0.0 to the ip table of the server: "add port mongo". I hope this can help others who have similar problem with connecting.

https://docs.mongodb.com/manual/tutorial/configure-linux-iptables-firewall/