I need one help.I am unable to connect access mongodb remotely from localhost of my system using PHP. I am running mongoDB in ubuntu server using this 10.10.5.80 and i am trying to connect from my system localhost for that i used the following code.
$con=new MongoClient("mongodb://10.10.5.80:27017");
But unable to connect.I have already checked the whether that post is listening or not and its running in my ubuntu server.When i am pushing all my code to that particular ip(10.10.5.80) its working fine.Here i need to connect that remote mongoDB server from localhost.Please help me to resolve this issue.
netstat -ntlup | grep LISTEN.its also running.Here i am tring to connect from my system's localhost.sudo iptable -Lbut did not find any port like27017there how to add here.