0
0
Redisquery~20 mins

Port and bind address in Redis - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Redis Port and Bind Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding Redis default port and bind address

What is the default port Redis listens on, and what is the default bind address if none is specified?

APort 8080 and bind address ::1
BPort 3306 and bind address 0.0.0.0
CPort 5432 and bind address 192.168.1.1
DPort 6379 and bind address 127.0.0.1
Attempts:
2 left
💡 Hint

Redis uses a common port number for its service and by default listens only on localhost.

query_result
intermediate
1:30remaining
Result of Redis bind configuration

Given the Redis configuration line bind 0.0.0.0, what is the effect on Redis server accessibility?

ARedis accepts connections from any IP address
BRedis only accepts connections from localhost
CRedis refuses all connections
DRedis accepts connections only from 127.0.0.1 and ::1
Attempts:
2 left
💡 Hint

0.0.0.0 means all IPv4 addresses.

📝 Syntax
advanced
2:00remaining
Identify the correct Redis configuration to listen on port 6380 and bind only to localhost

Which configuration snippet correctly sets Redis to listen on port 6380 and bind only to localhost?

A
port 6380
bind 127.0.0.1
B
bind 0.0.0.0
port 6380
C
port 6379
bind 127.0.0.1
D
port 6380
bind ::1
Attempts:
2 left
💡 Hint

Check both port number and bind address carefully.

optimization
advanced
2:00remaining
Optimizing Redis bind settings for security and accessibility

You want Redis to be accessible only from two specific IP addresses: 192.168.1.10 and 10.0.0.5. Which bind configuration is correct?

Abind 127.0.0.1
Bbind 0.0.0.0
Cbind 192.168.1.10 10.0.0.5
Dbind 192.168.1.10
Attempts:
2 left
💡 Hint

Redis supports multiple IP addresses in bind directive separated by spaces.

🔧 Debug
expert
2:30remaining
Debugging Redis bind and port configuration error

After changing Redis config to port 70000 and bind 256.256.256.256, Redis fails to start. What is the cause?

APort number 70000 is valid but IP address 256.256.256.256 is invalid
BPort number 70000 is invalid and IP address 256.256.256.256 is invalid
CPort number 70000 is invalid but IP address 256.256.256.256 is valid
DBoth port and IP address are valid but Redis needs restart
Attempts:
2 left
💡 Hint

Check valid ranges for port numbers and IP addresses.