amazon ec2 - mongodb.conf bind_ip = 127.0.0.1 does not work but 0.0.0.0 works -
i not understand bind_ip
in mongodb is. make remote connection desktop ec2 machine having bind_ip = 0.0.0.0
, not make work bind_ip = 127.0.0.1
.
please explain me bind_ip , why works 0.0.0.0
, not 127.0.0.1
.
for reference mongodb docs:
bind_ip
default: interfaces.
set option configure mongod or mongos process bind , listen connections applications on address. may attach mongod or mongos instances interface; however, if attach process publicly accessible interface, implement proper authentication or firewall restrictions protect integrity of database.
you may concatenate list of comma separated values bind mongod multiple ip addresses.
you can't access machine when bind 127.0.0.1
on ec2. that's not bug, it's reasoned network interface bindings.
127.0.0.1
bind loopback interface (so able access locally), while 0.0.0.0
bind network interfaces available.
that's why can access mongodb on ec2 when bind 0.0.0.0
(as it's available through internet now) , not via 127.0.0.1
.
for local servers (like wamp or local mongodb server) won't different you, case should thing binding 0.0.0.0
local servers might make them available on network interfaces (so might public knows ip, if there no firewall!)
read on similar question on server fault here.
Comments
Post a Comment