Mongodb and mongos allowlist


Is it possible to have only certain ip addresses or hostnames only talk to mongos and mongodb (actually all mongo components). In the source code I see a comment in the restriction_environment.h stating:

" // Returns the source address of the client.
// This value is useful for filering clients by their address, or network block. Note that
// clients on some networks can spoof this address."

But I can not see a way to configure this.