<?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[Networking - Whitelist ports does not work as expected]]></title><description><![CDATA[<p dir="auto">Referring Question: <a href="https://forum.cloudron.io/topic/1788/zabbix-agent-on-cloudronserver/6?_=1602837777357">Zabbix Agent on Cloudron</a></p>
<p dir="auto"><a href="https://docs.cloudron.io/networking/#whitelist-ports" target="_blank" rel="noopener noreferrer nofollow ugc">Docs: Networking - Whitelist ports</a></p>
<p dir="auto"><strong>TL;DR</strong></p>
<p dir="auto">Create/Edit file <code>/home/yellowtent/boxdata/firewall-config.json</code></p>
<p dir="auto">Add your Ports:</p>
<pre><code class="language-json">{
    "allowed_tcp_ports": [ 10050 ]
}
</code></pre>
<p dir="auto">Restart the firewall to apply the configuration:</p>
<pre><code>systemctl restart cloudron-firewall
</code></pre>
<p dir="auto">Expected outcome:</p>
<p dir="auto">The Port 10050 should now be allowed inbound for TCP.</p>
<p dir="auto">Real outcome:</p>
<p dir="auto">No entry in iptables about port 10050.</p>
<h3>Trackback</h3>
<p dir="auto">Checking my work.<br />
Cloudron Version v5.6.3</p>
<pre><code class="language-bash">$ cat /home/yellowtent/boxdata/firewall-config.json
{
    "allowed_tcp_ports": [ 10050 ]
}

# restart the firewall
systemctl restart cloudron-firewall

# view iptalbes for port 10050
$ iptables -L -n | grep -i 10050

# tcpdump shows only inbound traffic 
$ tcpdump -i any -n tcp port 10050
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
09:03:27.641147 IP X.X.X.X &gt; X.X.X.X: Flags [S], seq 3765228499, win 64240, options [mss 1460,sackOK,TS val 2196509506 ecr 0,nop,wscale 9], length 0
09:03:28.647277 IP X.X.X.X &gt; X.X.X.X: Flags [S], seq 3765228499, win 64240, options [mss 1460,sackOK,TS val 2196510512 ecr 0,nop,wscale 9], length 0

# nc from my client to cloudron after waiting 30 sec
$ nc -vt my.domain.tld 10050  
^CExiting.
# to be sure lets try the zabbix server himself
$ nc -vt monitoring.domain.tld 10050
monitoring.domain.tld [X.X.X.X] 10050 (zabbix-agent) open
</code></pre>
<p dir="auto"><img src="https://puu.sh/GDArT/4b3ba6eeae.png" alt="Zabbix Error" class=" img-fluid img-markdown" /></p>
<h3>Hotfix</h3>
<pre><code class="language-bash"># Check CLOUDRON table first
$ iptables -L CLOUDRON
Chain CLOUDRON (1 references)
target     prot opt source               destination         
DROP       all  --  anywhere             anywhere             match-set cloudron_blocklist src
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere             tcp multiport dports ssh,smtp,http,at-nbp,https
ACCEPT     tcp  --  anywhere             anywhere             multiport dports 3478,5349
ACCEPT     udp  --  anywhere             anywhere             multiport dports 3478,5349
ACCEPT     udp  --  anywhere             anywhere             multiport dports 50000:51000
ACCEPT     icmp --  anywhere             anywhere             icmp echo-request
ACCEPT     icmp --  anywhere             anywhere             icmp echo-reply
ACCEPT     udp  --  anywhere             anywhere             udp spt:domain
ACCEPT     all  --  172.18.0.0/16        anywhere            
ACCEPT     all  --  anywhere             anywhere            
LOG        all  --  anywhere             anywhere             limit: avg 2/min burst 5 LOG level debug prefix "IPTables Packet Dropped: "
</code></pre>
<p dir="auto">Add the port on position two:</p>
<pre><code>$ iptables -I CLOUDRON 2 -p tcp -m tcp --dport 10050 -j ACCEPT

# nc again from my localhost
nc -vt my.domain.tld 10050             
my.domain.tld [X.X.X.X] 10050 (zabbix-agent) open
</code></pre>
]]></description><link>https://forum.cloudron.io/topic/3443/networking-whitelist-ports-does-not-work-as-expected</link><generator>RSS for Node</generator><lastBuildDate>Wed, 16 Sep 2026 07:03:57 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/3443.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Oct 2020 09:14:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Networking - Whitelist ports does not work as expected on Mon, 30 Nov 2020 19:00:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> said in <a href="/post/20226">Networking - Whitelist ports does not work as expected</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robi" aria-label="Profile: robi">@<bdi>robi</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/brutalbirdie" aria-label="Profile: BrutalBirdie">@<bdi>BrutalBirdie</bdi></a> done! <a href="https://git.cloudron.io/cloudron/box/-/commit/4287642308081d27dcc160f845fd5dedb27eb481" target="_blank" rel="noopener noreferrer nofollow ugc">https://git.cloudron.io/cloudron/box/-/commit/4287642308081d27dcc160f845fd5dedb27eb481</a></p>
</blockquote>
<p dir="auto">That was fast. <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/2665.png?v=0511f331faa" class="not-responsive emoji emoji-android emoji--hearts" style="height:23px;width:auto;vertical-align:middle" title=":hearts:" alt="♥" /></p>
]]></description><link>https://forum.cloudron.io/post/20227</link><guid isPermaLink="true">https://forum.cloudron.io/post/20227</guid><dc:creator><![CDATA[BrutalBirdie]]></dc:creator><pubDate>Mon, 30 Nov 2020 19:00:16 GMT</pubDate></item><item><title><![CDATA[Reply to Networking - Whitelist ports does not work as expected on Mon, 30 Nov 2020 18:34:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robi" aria-label="Profile: robi">@<bdi>robi</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/brutalbirdie" aria-label="Profile: BrutalBirdie">@<bdi>BrutalBirdie</bdi></a> done! <a href="https://git.cloudron.io/cloudron/box/-/commit/4287642308081d27dcc160f845fd5dedb27eb481" target="_blank" rel="noopener noreferrer nofollow ugc">https://git.cloudron.io/cloudron/box/-/commit/4287642308081d27dcc160f845fd5dedb27eb481</a></p>
]]></description><link>https://forum.cloudron.io/post/20226</link><guid isPermaLink="true">https://forum.cloudron.io/post/20226</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Mon, 30 Nov 2020 18:34:03 GMT</pubDate></item><item><title><![CDATA[Reply to Networking - Whitelist ports does not work as expected on Mon, 30 Nov 2020 18:00:25 GMT]]></title><description><![CDATA[<p dir="auto">I would also enjoy UDP being supported this way.<br />
Since I can still just do it manual via iptables why not give the user a easier way.</p>
]]></description><link>https://forum.cloudron.io/post/20224</link><guid isPermaLink="true">https://forum.cloudron.io/post/20224</guid><dc:creator><![CDATA[BrutalBirdie]]></dc:creator><pubDate>Mon, 30 Nov 2020 18:00:25 GMT</pubDate></item><item><title><![CDATA[Reply to Networking - Whitelist ports does not work as expected on Mon, 30 Nov 2020 17:29:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> mosh, video streams, etc any other app using udp</p>
]]></description><link>https://forum.cloudron.io/post/20217</link><guid isPermaLink="true">https://forum.cloudron.io/post/20217</guid><dc:creator><![CDATA[robi]]></dc:creator><pubDate>Mon, 30 Nov 2020 17:29:44 GMT</pubDate></item><item><title><![CDATA[Reply to Networking - Whitelist ports does not work as expected on Mon, 30 Nov 2020 17:26:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robi" aria-label="Profile: robi">@<bdi>robi</bdi></a> No, we haven't added it. What is the use case for UDP ports?</p>
]]></description><link>https://forum.cloudron.io/post/20216</link><guid isPermaLink="true">https://forum.cloudron.io/post/20216</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Mon, 30 Nov 2020 17:26:59 GMT</pubDate></item><item><title><![CDATA[Reply to Networking - Whitelist ports does not work as expected on Mon, 30 Nov 2020 17:18:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> are udp ports added to Cloudron 6.x?</p>
]]></description><link>https://forum.cloudron.io/post/20215</link><guid isPermaLink="true">https://forum.cloudron.io/post/20215</guid><dc:creator><![CDATA[robi]]></dc:creator><pubDate>Mon, 30 Nov 2020 17:18:50 GMT</pubDate></item><item><title><![CDATA[Reply to Networking - Whitelist ports does not work as expected on Sun, 29 Nov 2020 19:58:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/drml" aria-label="Profile: drml">@<bdi>drml</bdi></a> It's JSON, so it would be something like</p>
<pre><code>{
    "allowed_tcp_ports": [ 8787, 8080 ]
}
</code></pre>
]]></description><link>https://forum.cloudron.io/post/20161</link><guid isPermaLink="true">https://forum.cloudron.io/post/20161</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Sun, 29 Nov 2020 19:58:05 GMT</pubDate></item><item><title><![CDATA[Reply to Networking - Whitelist ports does not work as expected on Sun, 29 Nov 2020 19:38:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> How would be the syntax to open several ports? I'd need RStudio server (8787) and Geoserver (8080).</p>
<p dir="auto">Is it comma separated, semicolon separated or a line per port?</p>
<p dir="auto">Thanks a lot for the support!</p>
]]></description><link>https://forum.cloudron.io/post/20153</link><guid isPermaLink="true">https://forum.cloudron.io/post/20153</guid><dc:creator><![CDATA[drml]]></dc:creator><pubDate>Sun, 29 Nov 2020 19:38:09 GMT</pubDate></item><item><title><![CDATA[Reply to Networking - Whitelist ports does not work as expected on Sun, 18 Oct 2020 06:21:58 GMT]]></title><description><![CDATA[<p dir="auto">This only works for TCP right now.</p>
]]></description><link>https://forum.cloudron.io/post/16255</link><guid isPermaLink="true">https://forum.cloudron.io/post/16255</guid><dc:creator><![CDATA[robi]]></dc:creator><pubDate>Sun, 18 Oct 2020 06:21:58 GMT</pubDate></item><item><title><![CDATA[Reply to Networking - Whitelist ports does not work as expected on Sat, 17 Oct 2020 10:37:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> said in <a href="/post/16169">Networking - Whitelist ports does not work as expected</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/brutalbirdie" aria-label="Profile: BrutalBirdie">@<bdi>BrutalBirdie</bdi></a> Whoops, the filename is wrong. The correct filename is <code>/home/yellowtent/boxdata/firewall/ports.json</code>.</p>
<pre><code># cat /home/yellowtent/boxdata/firewall/ports.json
{
    "allowed_tcp_ports": [ 10050 ]
}

# systemctl restart cloudron-firewall
# iptables -L -n | grep -i 10050
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp multiport dports 10050
</code></pre>
</blockquote>
<p dir="auto">Now it's working as intended.<br />
I will create a PR for the docs.</p>
<p dir="auto">edit:<br />
<a href="https://git.cloudron.io/cloudron/docs/-/commit/fd7c5d31f5fbd02e65589e06d5f9ee50322269eb" target="_blank" rel="noopener noreferrer nofollow ugc">https://git.cloudron.io/cloudron/docs/-/commit/fd7c5d31f5fbd02e65589e06d5f9ee50322269eb</a><br />
Has been done already, because it's not live yet I thought I could do that.</p>
<p dir="auto">Thanks <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f44d.png?v=0511f331faa" class="not-responsive emoji emoji-android emoji--+1" style="height:23px;width:auto;vertical-align:middle" title=":+1:" alt="👍" /></p>
]]></description><link>https://forum.cloudron.io/post/16217</link><guid isPermaLink="true">https://forum.cloudron.io/post/16217</guid><dc:creator><![CDATA[BrutalBirdie]]></dc:creator><pubDate>Sat, 17 Oct 2020 10:37:09 GMT</pubDate></item><item><title><![CDATA[Reply to Networking - Whitelist ports does not work as expected on Fri, 16 Oct 2020 16:55:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/brutalbirdie" aria-label="Profile: BrutalBirdie">@<bdi>BrutalBirdie</bdi></a> Whoops, the filename is wrong. The correct filename is <code>/home/yellowtent/boxdata/firewall/ports.json</code>.</p>
<pre><code># cat /home/yellowtent/boxdata/firewall/ports.json
{
    "allowed_tcp_ports": [ 10050 ]
}

# systemctl restart cloudron-firewall
# iptables -L -n | grep -i 10050
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp multiport dports 10050
</code></pre>
]]></description><link>https://forum.cloudron.io/post/16169</link><guid isPermaLink="true">https://forum.cloudron.io/post/16169</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Fri, 16 Oct 2020 16:55:25 GMT</pubDate></item></channel></rss>