How to remotely connect to MongoDB only from a specific IP address?

If in the settings you change bindIp from 127.0.0.1 to 0.0.0.0, then you can connect to the database from any address, and access is required only through a certain IP address.

1 answer 1

Well, take and replace 0.0.0.0 with the ip address you need.

You can write localhost, your IP to connect locally and from a specific ip.