Lastest MongoDb package on debian is bind to 127.0.0.1, this address doesn’t allow the connection by remote hosts, to change it u must set bind to 0.0.0.0 for eg
root@debian:/var/www# nano /etc/mongodb.conf
bind_ip = 0.0.0.0
port = 27017
root@debian:/var/www/lithium# /etc/init.d/mongodb restart
Done! Remember to secure the connection by password in production mode.