Skip to content
RU

Port 6379: Redis — Complete Guide

TL;DR:

Redis key-value store. Open Redis on the internet = instant compromise (CVEs). Loopback only. Standard TCP port, used by the Redis service.

Check your host & ports →

What is port 6379

Port 6379 is reserved by IANA for the Redis service. Redis key-value store. Open Redis on the internet = instant compromise (CVEs). Loopback only.

Check if the port is open online

To find out if port 6379 is open on your host (or a third-party's — for diagnostics), use our port checker. Enter a domain and a port number — results arrive in 1-2 seconds.

Check port 6379 →

Security

An open port is a potential attack vector. General rules:

  • Close everything you don't use (firewall default-deny)
  • For admin ports (22 SSH, 3389 RDP, 3306 MySQL) — IP whitelist or VPN
  • Base cases: 80+443 open for web; 22 — from work/VPN only; DB ports — loopback only
  • Use fail2ban for SSH/admin panels

Understanding Redis and Its Default Configuration

Redis, an open-source, in-memory data structure store, is primarily used as a database, cache, and message broker. By default, Redis operates over TCP port 6379. This standard port is configured to facilitate communication between the Redis server and client applications. However, it is crucial to understand that exposing Redis to the internet can lead to severe security vulnerabilities, including unauthorized access and data breaches.

By default, Redis is configured to allow connections from any IP address, which is not advisable for production environments. The bind directive in the Redis configuration file (redis.conf) specifies which IP addresses the Redis server will listen to. For enhanced security, it is recommended to modify this setting to allow connections only from trusted hosts.

  • bind 127.0.0.1 - This configuration restricts Redis to accept connections only from the local machine.
  • protected-mode yes - This setting enables protected mode, which blocks external connections if the server is not configured with a password.

Implementing these configurations is vital to mitigate potential security risks associated with Redis.

How to Check Redis Server Status and Port Availability

To ensure that your Redis server is running and accessible on port 6379, you can utilize various command-line tools. Here are the steps to check the status of your Redis server:

  • Using Redis CLI: The Redis command-line interface (CLI) allows you to interact with your Redis instance. You can check if the server is responding by executing the following command:
redis-cli ping

If the server is running, you should receive a PONG response.

  • Using Netstat: You can also check if the Redis service is listening on port 6379 by using the netstat command:
netstat -tuln | grep 6379

This command will display any active connections and listening services on port 6379. If Redis is running, you should see an entry indicating that the port is in the LISTEN state.

  • Using Telnet: Another way to verify if Redis is accessible is by using the telnet command:
telnet localhost 6379

If the connection is successful, you will see a blank screen. If not, the connection will be refused. These commands are essential for monitoring the status and availability of your Redis instance effectively.

Securing Your Redis Instance on Port 6379

Securing your Redis instance is crucial to prevent unauthorized access and potential data loss. Here are best practices for securing your Redis server running on port 6379:

  • Configure a Password: One of the simplest ways to secure Redis is by setting a password. You can do this by editing the redis.conf file and adding the following line:
requirepass your_secure_password

With this configuration, clients must authenticate using the password before executing any commands.

  • Limit Access to Trusted IPs: As mentioned previously, use the bind directive to restrict access to specific IP addresses. For example:
bind 192.168.1.100

This configuration allows only the specified IP to connect to the Redis server.

  • Enable Firewall Rules: Implement firewall rules to block incoming connections to port 6379 from untrusted networks. For example, using iptables:
iptables -A INPUT -p tcp --dport 6379 -s 192.168.1.0/24 -j ACCEPT

This rule allows traffic only from the 192.168.1.0/24 subnet. All other incoming traffic to port 6379 will be denied.

By following these security measures, you can significantly reduce the risk of exposing your Redis instance to potential threats.

Learn more

Sources

Frequently Asked Questions

Why close port 6379?

Every open port is an attacker's entry point. If the service is not used (or uses a different port), close it to minimise attack surface.

How to check port 6379 without Enterno.io?

From a local machine: nc -zv hostname 6379 or telnet hostname 6379. The online checker is simpler — from different IPs, one click.

Try the live tool that powered this guide

Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.