Access to mongo is controlled with iptables for Linux based OS.
Make sure in your /etc/mongodb.conf file you have the following line,
Add iptables rules to control the incoming and outgoing traffic for mongo. Here is a sample command if you have the default ports for mongo.
Here 198.61.168.XXX and 166.78.113.XX are the IP from where you want to access the mongodb.