Localhost : Private Ip

Mayank Malhotra 1 Reputation point
2021-12-24T11:03:13.003+00:00

I have installed redis enterprise on Linux VM;Its urlis localhost :8447 How can i access it from internet or from my local computer,
Application is not able to open via Public ip

Azure Cache for Redis
Azure Cache for Redis
An Azure service that provides access to a secure, dedicated Redis cache, managed by Microsoft.
251 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andriy Bilous 11,421 Reputation points MVP
    2021-12-24T13:41:17.173+00:00

    Hello @Mayank Malhotra

    By default, Redis is only accessible from localhost. However, if you installed and not configured Redis /etc/redis/redis.conf to allow connections from anywhere use following steps:
    Open the Redis configuration file for editing:

    sudo nano /etc/redis/redis.conf  
    

    Locate this line and make sure it is uncommented (remove the # if it exists):
    /etc/redis/redis.conf

    bind 127.0.0.1 ::1  
    

    Save and close the file when finished.
    Then, restart the service to ensure that systemd reads your changes:

    sudo systemctl restart redis  
    

    To check that this change has gone into effect, run the following netstat command:

    sudo netstat -lnp | grep redis  
    
    Output  
    tcp        0      0 127.0.0.1:8447          0.0.0.0:*               LISTEN      14222/redis-server    
    tcp6       0      0 ::1:8447                :::*                    LISTEN      14222/redis-server    
    

    After the above changes are applied you will need to open Redis port 8447 in Azure VM NSG.

    Create an inbound security rule allowing traffic and assign values to the following settings:

    • Destination port ranges: 8447
    • Source port ranges: * (allows any source port)
    • Priority value: Enter a value that is less than 65,500 and higher in priority than the default catch-all deny inbound rule.

    160340-image.png

    https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-20-04


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.