Port 27017 closed for security reasons

Thanks, but I found out that the node’s IP address may change when something changes on the server, this way I have to ask my hosting providers to outbound IP again and again. And one more thing, do I need to whitelist IPs for outbound only? or inbound whitelisting is also required.