<?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[All client IPs logged as 172.18.0.1 (IP tracking issue)]]></title><description><![CDATA[<p dir="auto"><em>AI improved debugging and text, so please read it with a pinch of salt.</em></p>
<p dir="auto">Hello Cloudron team and community,</p>
<p dir="auto">I've noticed a recurring issue with the official Discourse app package on Cloudron regarding client IP handling.</p>
<p dir="auto">The Issue:<br />
Every single web request and API poll in Discourse is logged with the internal Docker proxy/gateway IP (172.18.0.1) instead of the actual client IP address:</p>
<pre><code>172.18.0.1 - - [24/Oct/2026:21:55:38 +0000] "GET /admin/users/... HTTP/1.1" 200 ...
</code></pre>
<p dir="auto">Why this happens:<br />
Ruby on Rails uses ActionDispatch::RemoteIp to inspect the X-Forwarded-For header. By default, Rails discards this header for security reasons unless the sending proxy IP is explicitly defined in Rails' trusted_proxies configuration. Because Cloudron routes traffic through the internal Docker network (172.16.0.0/12), Rails doesn't trust it out-of-the-box and falls back to 172.18.0.1.</p>
<p dir="auto">The Impact:</p>
<ul>
<li>All users appear to share the exact same IP address in the admin panel.</li>
<li>GeoIP lookups and IP-based security features in Discourse are completely broken.</li>
</ul>
<p dir="auto">Proposed Solution:<br />
Could the Cloudron Discourse package be updated to officially include the internal Docker network in Rails' trusted_proxies configuration? (e.g., via a permanent initializer or environment handling):</p>
<pre><code>require "ipaddr"
Rails.application.config.action_dispatch.trusted_proxies = [
  IPAddr.new("127.0.0.1"), 
  IPAddr.new("::1"), 
  IPAddr.new("172.16.0.0/12")
]
</code></pre>
<p dir="auto">Since manual file modifications inside /app/code/config/initializers/ are completely wiped out during app updates, having this built into the official Cloudron package would permanently solve this headache.</p>
<p dir="auto">Thanks for your amazing work on Cloudron! Looking forward to your feedback.</p>
]]></description><link>https://forum.cloudron.io/topic/16201/all-client-ips-logged-as-172.18.0.1-ip-tracking-issue</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 10:42:11 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/16201.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 26 Oct 2026 20:56:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to All client IPs logged as 172.18.0.1 (IP tracking issue) on Tue, 27 Oct 2026 09:40:52 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/jnzp" aria-label="Profile: jnzp">@<bdi>jnzp</bdi></a><br />
Thanks for reporting. This should be fixed the latest update.<br />
Please update your <a class="plugin-mentions-category plugin-mentions-a" href="/category/33/discourse" aria-label="Profile: discourse">@<bdi>discourse</bdi></a> app and report back if the issue is resolved.</p>
]]></description><link>https://forum.cloudron.io/post/131973</link><guid isPermaLink="true">https://forum.cloudron.io/post/131973</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Tue, 27 Oct 2026 09:40:52 GMT</pubDate></item></channel></rss>