0

I bind with my VPS public IP address. I figurate with help of my mistake that my localhost apps connect with success with my remote server.

Allow MongoDB remote access only for specific IP? Any options.

I added :

security:
  clusterIpSourceWhitelist:
    - IPADDRESS
  authorization: enabled

I use centos 8.3 .

But still i can connect from my computer without username and password for mongodb!

I run it like :

mongod --config /etc/mongod.conf
Nikola Lukic
  • 101
  • 6
  • 1
    In general you configure a firewall to add IP-address based access controls to your server and services. Your VPS provider may offer you a firewall from their management console, or you can configure a host based firewall on the VPS itself with firewalld. See: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/using-and-configuring-firewalld_configuring-and-managing-networking The recommended configuration is: block everything by default, then grant access to specific services to specific IP-addresses or the internet at large. – Bob Jan 23 '21 at 16:59
  • "authenticationRestrictions" option has been added, as MongoDb 3.6. You can set the source ip. – Adil Jan 23 '21 at 17:03
  • HermanB yes i will do it 100% but i need in first place on mongo level make secure situation. – Nikola Lukic Jan 23 '21 at 19:23

0 Answers0