Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

241
Views
Mongo DB - net.bindIp for local and network access

I want the mongod instance to be accessible both from the localhost and other servers on the network.

If I set the net.bindIp value to 127.0.0.1 then mongod doesn't listen to external connections and nmap -p 27017 <server> reports that the port is closed. The same occurs if I comment out the net.bindIp line in mongod.conf.

If I set the net.bindIp value to the local IP address - 192.168.0.10 - then mongod listens for network connections on port 27017, but it doesn't allow me to connect to the mongod instance from the local host using the mongo command.

What value do I need to set net.bindIp to, to ensure I can connect both locally and over the network to the mongod instance.

I am running Ubuntu Server 14.04.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Include both the localhost and network IP address as comma separated values.

net:
    port: 27017
    bindIp: 127.0.0.1,192.168.0.10

and restart the service

sudo service mongod restart
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!