Hi @benoit_pont,

By default the mongod process only binds to the localhost (127.0.0.1) loopback IP address which limits connections to those originating from the same host. The net.bindIP configuration value enables the process to bind to one or more local network interfaces.

Your real world use case is adding the 19.0.18.100 address to allow non-localhost connections.

You cannot bind to the external 19.0.18.101 IP address; this will result in a startup error for mongod similar to:

Failed to set up listener: SocketException: Can’t assign requested address

The only valid bind IPs are addresses for local network interfaces. For example:

$ ifconfig | grep "inet "
	inet 127.0.0.1 netmask 0xff000000
	inet 192.168.1.100 netmask 0xffffff00 broadcast 192.168.1.255

Listening to 19.0.18.100 allows any client with an open route to this IP address and port combination to connect.

As @steevej noted, you need to configure a firewall to restrict remote access based on client IPs.

I strongly recommend configuring (and testing) role-based access control and network encryption before opening your deployment to broader network exposure. For more information on available security measures, please review the MongoDB Security Checklist.

Regards,
Stennie