I’d like to allow connections from only local host and my frontend server so when adding the ip of my front end server, the mongod service fails to start from local host every time.
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2019-10-13 13:51:04 UTC; 7s ago
Process: 5961 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=48)
Main PID: 5961 (code=exited, status=48)
When I remove the second ip address, it works fine.
I noticed a comment on stack overflow that mentioned the following: (for the life of me, though, i don’t see a typo)
One thing I did find is that you can’t bind to an IP that isn’t bound to an interface. The mongod service simply won’t start if you typo the IP. – technicallynick [Oct 25 '18 at 18:19]
Any help is greatly appreciated.