CentOS 5.x Linux with MongoDB 2.0.1 (tried main and legacy-static)
MongoDB is running:
root 31664 1.5 1.4 81848 11148 ? Sl 18:40 0:
Open the file /etc/mongod.conf and add the ip of the machine from where you are connecting, to bind_ip
bind_ip = 127.0.0.1,your Remote Machine Ip Address Here
Ex:-
bind_ip = 127.0.0.1,192.168.1.5
Restart mongodb service:
sudo service mongod restart
Make sure mongodb port is opened in the firewall.
You can also comment the line, if you are not worried about security.