#1 - PNETLab + Cloudflare Tunnel: How to Fix the White Screen Issue

Table of Contents
If you are trying to expose your PNETLab environment to the outside world using Cloudflare Tunnel (cloudflared), you have likely encountered a frustrating issue: the login screen loads perfectly, but after entering your credentials, you are greeted by a white screen (blank screen) and the dashboard never loads.
At first, everything seems to work correctly. When you access your domain, the login page loads perfectly, leading you to believe the connection is fine.

However, the problem arises immediately after you enter your credentials and click “Login”. Instead of loading the dashboard, the application hangs, and you are left staring at a completely blank white screen.

This happens regardless of the browser (Chrome, Edge, Firefox) and is caused by an incompatibility in how PNETLab validates the server response when traffic passes through the Cloudflare proxy.
In this post, I will show you how to fix this by editing just one line of code on your server.
The Problem
PNETLab (based on UNETLAB) has a check in its JavaScript code that expects the HTTP response to contain the specific text “OK” (statusText == 'OK'). However, when the connection goes through Cloudflare (especially via HTTP/2), this statusText field may come back empty or different than expected, causing the validation to fail silently and preventing the interface from loading.
The Solution
To fix this, we need to remove the strict statusText check and validate only the HTTP status code (200).
Step 1: Access the PNETLab Console
Access your PNETLab server via SSH or directly through the console (Proxmox/ESXi).
Step 2: Edit the app.js file
The file responsible for this validation is located at /opt/unetlab/html/store/public/main/js/angularjs/app.js. Let’s edit it:
nano /opt/unetlab/html/store/public/main/js/angularjs/app.jsStep 3: Locate and Change the Problematic Line
Inside the editor, you need to find the conditional validation. It is usually around line 93.
The original code looks like this:
if (response.status == '200' && response.statusText == 'OK')You must remove the && response.statusText == 'OK' part, leaving the line like this:
Corrected Code:
if (response.status == '200')Save the file (Ctrl + O, Enter) and exit the editor (Ctrl + X).
Step 4: Clear Cache and Reboot
To ensure the changes take effect, follow these final steps:
- Purge Cloudflare Cache: In your Cloudflare dashboard, go to Caching > Configuration and click Purge Everything.
- Clear Browser Cache: This is crucial, as the old
.jsfile might be cached locally. - (Optional) Reboot the Server: If you prefer to be safe, reboot PNETLab.
rebootAfter the reboot, try accessing it again via your Cloudflare Tunnel URL. The dashboard should load normally.

⚠️ Important Security Disclaimer
While this fix allows you to access the PNETLab dashboard via a public URL, please be aware that PNETLab is not designed to be directly exposed to the public internet. The platform contains known vulnerabilities and runs with high privileges, making it a potential target for attacks if left unprotected.
I strongly recommend adding an extra layer of security using Cloudflare Zero Trust (Access).
Instead of relying solely on the PNETLab login screen, you should configure a Self-hosted Application policy in Cloudflare Zero Trust. This forces users to authenticate via an Identity Provider (Google, GitHub, or One-time PIN) before they can even reach the PNETLab interface.
This ensures that only authorized users can access your lab, protecting your infrastructure even if the PNETLab application itself has unpatched vulnerabilities.
Technical Summary
- File:
/opt/unetlab/html/store/public/main/js/angularjs/app.js - Cause:
statusText == 'OK'check fails on connections via Cloudflare Tunnel. - Fix: Remove the text validation, keeping only
response.status == '200'.
