<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to restrict external access to Redis instance installed in a docker image]]></title><description><![CDATA[<p dir="auto">Hello, I’m receiving an email, about my server that has a docker image of redis installed and uses port 6379, saying that it is open to external connections.</p>
<p dir="auto">Redis listens for traffic from everywhere on port 6379, and you can validate this report by attempting to connect to your Redis on 6379 via a simple telnet command:</p>
<pre><code>telnet 111.111.111.111 6379 
</code></pre>
<p dir="auto">This is a part of the email, (I masked the IP to put the message here on the forum) I also did the test to see if the port is really open to external connections on the website, <a href="https://www.yougetsignal.com" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.yougetsignal.com</a> /tools/open-ports/ , and it actually shows that my server’s ip port 6379 is open. And the email says to do the following</p>
<p dir="auto">Remediation of this issue will take just a few minutes and is relatively straightforward. You will need to open /etc/redis/redis.conf and uncomment (remove the “#”) or modify the line beginning with:</p>
<pre><code>#bind 127.0.0.1 ::1  
</code></pre>
<p dir="auto">Afterwards, restart redis with:</p>
<pre><code>sudo systemctl restart redis  
</code></pre>
<p dir="auto">I would like to know if someone can help me, since I can’t access the redis.config file inside the server, because redis is in a docker image, or at least I don’t know how to access it. Is there any way to block external access to my redis installed by a docker image?</p>
]]></description><link>https://sudonix.org/topic/333/how-to-restrict-external-access-to-redis-instance-installed-in-a-docker-image</link><generator>RSS for Node</generator><lastBuildDate>Sat, 12 Sep 2026 13:48:45 GMT</lastBuildDate><atom:link href="https://sudonix.org/topic/333.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 09 Sep 2022 01:18:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to restrict external access to Redis instance installed in a docker image on Fri, 23 Sep 2022 01:48:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a><br />
Sorry to delay in responding, yes as i mentioned above, i had to remove my redis from docker and reinstall a new image with this command</p>
<pre><code>docker run --name=redis -p 127.0.0.1:6379:6379 -d -t redis:alpine
</code></pre>
<p dir="auto">and now when i test my ip and port on<br />
<a href="https://www.yougetsignal.com/tools/open-ports/" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.yougetsignal.com/tools/open-ports/</a></p>
<p dir="auto">the status of my redis port is closed. I think which to configure firewall in droplet digital ocean is a good idea too, and i will configure soon.<br />
Thanks for the help!</p>
]]></description><link>https://sudonix.org/post/4194</link><guid isPermaLink="true">https://sudonix.org/post/4194</guid><dc:creator><![CDATA[WesleyMoura]]></dc:creator><pubDate>Fri, 23 Sep 2022 01:48:53 GMT</pubDate></item><item><title><![CDATA[Reply to How to restrict external access to Redis instance installed in a docker image on Fri, 23 Sep 2022 01:42:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hari" aria-label="Profile: Hari">@<bdi>Hari</bdi></a> said in <a href="/post/4156">How to restrict external access to Redis instance installed in a docker image</a>:</p>
<blockquote>
<p dir="auto">Hello Hari, sorry my delay in responding, but i already solved this problem, using exactly this command that you mentioned, docker run --name=redis -p 127.0.0.1:6379:6379 -d -t redis:alpine, in my case. But as i already had one image of redis, i had to remove the current redis from my docker and reinstall using this comand. Now when i test the port on <a href="https://www.yougetsignal.com/tools/open-ports/" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.yougetsignal.com/tools/open-ports/</a> with my ip and port of redis, the status of port is closed now. And now i just have to configure my firewall wich i will soon.<br />
So thanks to answer me and sorry again to delay in responding.</p>
</blockquote>
]]></description><link>https://sudonix.org/post/4193</link><guid isPermaLink="true">https://sudonix.org/post/4193</guid><dc:creator><![CDATA[WesleyMoura]]></dc:creator><pubDate>Fri, 23 Sep 2022 01:42:47 GMT</pubDate></item><item><title><![CDATA[Reply to How to restrict external access to Redis instance installed in a docker image on Fri, 16 Sep 2022 13:12:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wesleymoura" aria-label="Profile: WesleyMoura">@<bdi>WesleyMoura</bdi></a> any update ?</p>
]]></description><link>https://sudonix.org/post/4188</link><guid isPermaLink="true">https://sudonix.org/post/4188</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Fri, 16 Sep 2022 13:12:40 GMT</pubDate></item><item><title><![CDATA[Reply to How to restrict external access to Redis instance installed in a docker image on Sat, 10 Sep 2022 07:43:15 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1662794775154-6a81d494-bcc6-404d-8f2a-bef1e530314d-image-resized.png" alt="6a81d494-bcc6-404d-8f2a-bef1e530314d-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Hello Wesley, i am doing great thanks for asking.</p>
<p dir="auto">actually, i am using digital ocean droplet with Plesk + Redis with docker</p>
<p dir="auto">i followed this guide and it solved the issue <a href="https://talk.plesk.com/threads/plesk-docker-redis-plesk-firewall-open-port-issue.352324/" target="_blank" rel="noopener noreferrer nofollow ugc">https://talk.plesk.com/threads/plesk-docker-redis-plesk-firewall-open-port-issue.352324/</a></p>
<p dir="auto">we need to install Redis docker using Plesk store BUT should run it using a specific command that limits its access to the local host only. (in your case you will install redis using command)</p>
<p dir="auto">Start the docker with,</p>
<pre><code>docker run --name=redis -p 127.0.0.1:6379:6379 redis
</code></pre>
<p dir="auto"><img src="/assets/uploads/files/1662795362583-d488b58b-e427-4c4e-9003-55ee1e1b35f9-image-resized.png" alt="d488b58b-e427-4c4e-9003-55ee1e1b35f9-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">not sure this helps you or not but play with above command <img src="https://sudonix.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=2ee9f75f7cb" class="not-responsive emoji emoji-android emoji--smile" style="height:23px;width:auto;vertical-align:middle" title=":D" alt="😄" /></p>
]]></description><link>https://sudonix.org/post/4156</link><guid isPermaLink="true">https://sudonix.org/post/4156</guid><dc:creator><![CDATA[Hari]]></dc:creator><pubDate>Sat, 10 Sep 2022 07:43:15 GMT</pubDate></item><item><title><![CDATA[Reply to How to restrict external access to Redis instance installed in a docker image on Fri, 09 Sep 2022 14:26:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wesleymoura" aria-label="Profile: WesleyMoura">@<bdi>WesleyMoura</bdi></a> Is it located in <code>/usr/local/etc/redis/redis.conf</code> ?</p>
<p dir="auto">Also, have a look at this</p>
<p dir="auto"><a href="https://hub.docker.com/_/redis" target="_blank" rel="noopener noreferrer nofollow ugc">https://hub.docker.com/_/redis</a></p>
]]></description><link>https://sudonix.org/post/4154</link><guid isPermaLink="true">https://sudonix.org/post/4154</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Fri, 09 Sep 2022 14:26:20 GMT</pubDate></item><item><title><![CDATA[Reply to How to restrict external access to Redis instance installed in a docker image on Fri, 09 Sep 2022 14:00:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phenomlab" aria-label="Profile: phenomlab">@<bdi>phenomlab</bdi></a> Hello, i have installed my redis on docker with this comand,<br />
docker run --name redis -p 6379:6379 -d -t redis:alpine<br />
And i don’t know how to access the redis.conf on docker image to make this step cited in email.<br />
Do you know how to do?<br />
I’m trying to search on documentation but i still can’t find it.</p>
]]></description><link>https://sudonix.org/post/4152</link><guid isPermaLink="true">https://sudonix.org/post/4152</guid><dc:creator><![CDATA[WesleyMoura]]></dc:creator><pubDate>Fri, 09 Sep 2022 14:00:58 GMT</pubDate></item><item><title><![CDATA[Reply to How to restrict external access to Redis instance installed in a docker image on Fri, 09 Sep 2022 10:16:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wesleymoura" aria-label="Profile: WesleyMoura">@<bdi>WesleyMoura</bdi></a> Hi, and welcome to Sudonix. Even with Redis installed in a docker image, you will still have a config file, and should still be able to reach it.</p>
<p dir="auto">Can you provide more detail about the docket image ? You are right - by default, Redis will listen on all addresses, and will be exposed to the internet. Another way around this is to block access at firewall level and only permit the hosts you actually want.</p>
]]></description><link>https://sudonix.org/post/4151</link><guid isPermaLink="true">https://sudonix.org/post/4151</guid><dc:creator><![CDATA[phenomlab]]></dc:creator><pubDate>Fri, 09 Sep 2022 10:16:00 GMT</pubDate></item></channel></rss>