Whitelist IP address problem

hello!

i actually stuck at this for a day or two, because i have no clue what to do

i’ve tried put them into array, wrap them into string, nothing works
i kept getting Cannot request assigned address error thing

pseudo/fake ip
image

i dont know if i missed something

Build Info: {
    "version": "5.0.6",
    "gitVersion": "212a8dbb47f07427dae194a9c75baec1d81d9259",
    "openSSLVersion": "OpenSSL 1.1.1f  31 Mar 2020",
    "modules": [],
    "allocator": "tcmalloc",
    "environment": {
        "distmod": "ubuntu2004",
        "distarch": "x86_64",
        "target_arch": "x86_64"
    }
}

It is simply because your host does not have the pseudo/fake IP address 1.1.1.1.

hmm, is there any way to whitelist access from IP address, the way they did on atlas?

bindIp is not a whitelist of IPs that are allowed to connect, this is assigning the IP address that the mongo process will run on, and other hosts will use to connect. Which should be the IP of the server.

Allowing all hosts to connect to your mongodb on a linux server requires you to open the FW for the port (27017) on the server.

1 Like

@tapiocaPENGUIN Does it means that we can’t whitelist an IP through bindIP property? If not, then how to achieve that?

In MongoDB Atlas, it is fully managed by Network Access option. But in Community Server (hosted on ec2), how to achieve that. Could you please assist on it?