0
0
MongoDBquery~10 mins

Network security and bind IP in MongoDB - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the bind IP address in the MongoDB configuration.

MongoDB
net:
  bindIp: [1]
Drag options to blanks, or click blank then click option'
A"0.0.0.0"
B"255.255.255.0"
C"127.0.0.1"
D"192.168.1.1"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0.0.0.0 allows connections from any IP, which is insecure by default.
Using a subnet mask like 255.255.255.0 is invalid here.
2fill in blank
medium

Complete the command to restart MongoDB after changing the bind IP.

MongoDB
sudo systemctl [1] mongod
Drag options to blanks, or click blank then click option'
Arestart
Bstop
Cstart
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' when the service is already running won't apply changes.
Using 'stop' alone will stop the service but not start it again.
3fill in blank
hard

Fix the error in the bind IP configuration line to allow connections only from localhost.

MongoDB
net:
  bindIp: [1]
Drag options to blanks, or click blank then click option'
A"localhost"
B"0.0.0.0"
C"::"
D"127.0.0.1"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'localhost' string instead of IP address causes config errors.
Using 0.0.0.0 allows all IPs, which is insecure.
4fill in blank
hard

Fill both blanks to configure MongoDB to bind to localhost and a specific IP address.

MongoDB
net:
  bindIp: [1],[2]
Drag options to blanks, or click blank then click option'
A"127.0.0.1"
B"192.168.0.100"
C"0.0.0.0"
D"localhost"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'localhost' string instead of IP address.
Using 0.0.0.0 which opens to all IPs.
5fill in blank
hard

Fill all three blanks to create a MongoDB configuration snippet that binds to localhost, disables authorization, and sets the port to 27017.

MongoDB
net:
  bindIp: [1]
security:
  authorization: [2]
  keyFile: [3]
Drag options to blanks, or click blank then click option'
A"127.0.0.1"
B"disabled"
Cnull
D"enabled"
Attempts:
3 left
💡 Hint
Common Mistakes
Setting authorization to 'enabled' without a keyFile causes errors.
Using a string 'null' instead of null value.