This is a question related to X509
. I have set up a stand alone server using X509
.
I can start the daemon with:
mongod --tlsMode requireTLS --tlsCertificateKeyFile server.pem --tlsCAFile ca.pem --auth --dbpath /mnt/mongoDB-One/DB_X509 --logpath /mnt/mongoDB-One/DB_X509/mongod.log --fork --bind_ip 127.0.0.1,192.168.1.2
I can also connect with:
mongo --tls --host localhost --tlsCertificateKeyFile client.pem --tlsCAFile ca.pem
But I cannot connect using:
mongo --tls --host 127.0.0.1 --tlsCertificateKeyFile client.pem --tlsCAFile ca.pem
mongo --tls --host 192.168.1.2 --tlsCertificateKeyFile client.pem --tlsCAFile ca.pem
Why is that? I may have to say that I made my own ca.pem, server.pem and client.pem certificate files.