I have followed several guides on installing and configuring mongodb. None are working, but I think I’m close… I’ve have managed to get to a point that I can connect to the db server from the local server using the following command:
mongo -u user my_url/admin
However, I’m not able to connect to the server using the above command from a remote machine.
I’ve tried both with authentication enabled and disabled, and I’ve tried setting the bindIP to 0.0.0.0, or adding the remote url after a comma, or commenting out the line but nothing worked. I also created the firewall rules for port 127 with the following commands:
sudo iptables -A INPUT -p tcp --destination-port 27017 -m state --state NEW,ESTABLISHED -j ACCEPT
sudo iptables -A OUTPUT -p tcp --source-port 27017 -m state --state ESTABLISHED -j ACCEPT
What am I doing wrong? I am a beginner and it might be some stupid error