CloudPanel fails to load in "Iran-only" networks due to external file dependencies (suggest caching mechanism) #78

Closed
opened 2026-04-05 20:25:26 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @saeed-54996 on 6/26/2025

CloudPanel version(s) affected

2.5.1

Description

Describe the issue

In Iran, due to political decisions or wartime restrictions, there are times when access to the global internet is cut off. In such cases, servers located inside Iran become "Iran-only" – meaning they are accessible only from within the country, but cannot connect to any resources outside Iran.

During such a recent incident, we observed that CloudPanel failed to load (even though it was hosted locally inside the country). The web panel interface would not come up at all.

Upon investigation, we found that CloudPanel tries to fetch certain files from the internet every time the panel is opened. Since these external requests hang and eventually time out, the entire panel page fails to render before the timeout.

Root Cause

CloudPanel attempts to fetch files like:

public_suffix_list.dat

tlds-alpha-by-domain.txt

(and possibly more...)

These files are requested on each panel load, and are not cached locally. In case of network unavailability, the panel gets stuck waiting for these requests to timeout. Since there are multiple of them, the accumulated timeout exceeds the browser’s load limit, and the interface fails to load.

Why this matters

During network shutdowns, users inside Iran (and potentially in other regions with restricted internet) lose access to their own hosting panels.

Some organizations may want to run CloudPanel entirely offline in isolated or secure environments, e.g., internal company networks, military/government infrastructures.

Current design makes such use-cases unreliable or even impossible.

Proposed Solution

Please consider changing the behavior so that:

These files are fetched using a cron job (e.g. daily or weekly), not at runtime.

Fetched files are cached locally and served from the local server.

In case of failed downloads, the panel should gracefully fall back to the last known good version, instead of blocking the entire UI.

Summary

This small architectural change can make CloudPanel more resilient, especially for users in restricted environments or those wanting to self-host in isolated intranets. It ensures the panel always loads, regardless of internet connectivity, which is critical for reliability and usability.

Thanks for considering this request on behalf of many Iranian users 🙏

How to reproduce

How to reproduce

  1. Install CloudPanel on a server (e.g. Ubuntu 22.04).

  2. Ensure the server has internet access and complete setup.

  3. Simulate a restricted network:

    • Block outbound traffic to global internet (e.g., using iptables, ufw, or disconnecting from external DNS).
    • Allow only local network or specific IP ranges (simulate "Iran-access only" environment).
  4. Try to open the CloudPanel web interface in the browser.

  5. Wait…
    🔥 You will notice:

    • The page hangs for a long time (due to external requests).
    • Eventually, the UI fails to load completely.
    • The browser may throw timeout errors in the console (F12 Dev Tools → Network tab).

Optional quick test:

iptables -A OUTPUT -p tcp -m multiport --dports 80,443 -j REJECT

(Use with caution! This blocks all outgoing HTTP/HTTPS requests temporarily.)

Then open the CloudPanel web UI. It will hang or fail to load.

Possible Solution

No response

Additional Context

No response

*Originally created by @saeed-54996 on 6/26/2025* ### CloudPanel version(s) affected 2.5.1 ### Description Describe the issue In Iran, due to political decisions or wartime restrictions, there are times when access to the global internet is cut off. In such cases, servers located inside Iran become "Iran-only" – meaning they are accessible only from within the country, but cannot connect to any resources outside Iran. During such a recent incident, we observed that CloudPanel failed to load (even though it was hosted locally inside the country). The web panel interface would not come up at all. Upon investigation, we found that CloudPanel tries to fetch certain files from the internet every time the panel is opened. Since these external requests hang and eventually time out, the entire panel page fails to render before the timeout. Root Cause CloudPanel attempts to fetch files like: public_suffix_list.dat tlds-alpha-by-domain.txt (and possibly more...) These files are requested on each panel load, and are not cached locally. In case of network unavailability, the panel gets stuck waiting for these requests to timeout. Since there are multiple of them, the accumulated timeout exceeds the browser’s load limit, and the interface fails to load. Why this matters During network shutdowns, users inside Iran (and potentially in other regions with restricted internet) lose access to their own hosting panels. Some organizations may want to run CloudPanel entirely offline in isolated or secure environments, e.g., internal company networks, military/government infrastructures. Current design makes such use-cases unreliable or even impossible. Proposed Solution Please consider changing the behavior so that: These files are fetched using a cron job (e.g. daily or weekly), not at runtime. Fetched files are cached locally and served from the local server. In case of failed downloads, the panel should gracefully fall back to the last known good version, instead of blocking the entire UI. Summary This small architectural change can make CloudPanel more resilient, especially for users in restricted environments or those wanting to self-host in isolated intranets. It ensures the panel always loads, regardless of internet connectivity, which is critical for reliability and usability. Thanks for considering this request on behalf of many Iranian users 🙏 ### How to reproduce **How to reproduce** 1. Install CloudPanel on a server (e.g. Ubuntu 22.04). 2. Ensure the server has internet access and complete setup. 3. **Simulate a restricted network**: * Block outbound traffic to global internet (e.g., using `iptables`, `ufw`, or disconnecting from external DNS). * Allow only local network or specific IP ranges (simulate "Iran-access only" environment). 4. Try to open the CloudPanel web interface in the browser. 5. Wait… 🔥 You will notice: * The page hangs for a long time (due to external requests). * Eventually, the UI **fails to load completely**. * The browser may throw timeout errors in the console (F12 Dev Tools → Network tab). **Optional quick test:** ```bash iptables -A OUTPUT -p tcp -m multiport --dports 80,443 -j REJECT ``` > (Use with caution! This blocks all outgoing HTTP/HTTPS requests temporarily.) Then open the CloudPanel web UI. It will hang or fail to load. ### Possible Solution _No response_ ### Additional Context _No response_
Sign in to join this conversation.