bindIp: CentOS vs Ubuntu

I have two different applications, One running on a CentOS machine and another one on Ubuntu. I am using Internal ip (From VPC network range) to connect to Mongo Server from my local machine (Using different clients like compass, mongo shell, nosql booster).

On Ubuntu, with bind ip as, It allows to connect but on CentOS it doesn’t. (I had to define on CentOS in order to connect from my local machine)

I am not able to understand why this is happening. Is this OS related thing or this is expected to be the same way?

The IP is the localhost and will only be available from the local machine. If you want to access a server from another machine you have to bind with an address that is routed from the machine running the client to the server.


You’re correct @steevej. But my point here is, Even if you don’t binIp with on Ubuntu, It allows you to connect from remote machine. That’s what took my attention when I was trying to connect to this two different servers, one with ubuntu and another with centos. It did work for Ubuntu surprisingly but not for CentOS.

Which IP was specified on Ubuntu when it was not and you could access the server from another machine?

The output of ss -tlnp and ps -aef | grep [m]ongo would be useful when this happen.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.