First need open file with sudo nano /etc/mongod.conf
And edit
# network interfaces
net:
port: 27017
bindIp: 0.0.0.0 #<--- Change 127.0.0.1 to 0.0.0.0
security: #<---- Uncomment this line
authorization: 'enabled' #<--- Add this lineFirst need open file with sudo nano /etc/mongod.conf
And edit
# network interfaces
net:
port: 27017
bindIp: 0.0.0.0 #<--- Change 127.0.0.1 to 0.0.0.0
security: #<---- Uncomment this line
authorization: 'enabled' #<--- Add this line