30 March 2026
################# Enable Offline Mode when PNETLab Online Mode fails ############################
Note: In cases where PNETLab encounters an Online Mode error and cannot log in, and Offline Mode was previously disabled, the Offline Mode interface on the web will fail. We need to modify the configuration via CLI to re-enable it.
Step 1: Modify /opt/unetlab/html/store/app/Http/Controllers/Auth/LoginController.php to re-enable Offline Mode
nano /opt/unetlab/html/store/app/Http/Controllers/Auth/LoginController.php
Find the following lines and hide them using //:
Find the line:
if ($isOnline == 1 && $isOffine == 0) return redirect(...OFFLINE Mode is disabled...);
Change to:
// if ($isOnline == 1 && $isOffine == 0) return redirect(...OFFLINE Mode is disabled...);
Find the next line:
if ($offline != 1) return redirect(...Login by ONLINE account and enable...);
Change to:
// if ($offline != 1) return redirect(...Login by ONLINE account and enable...);
Step 2: Restart Apache to apply the configuration.
systemctl restart apache2
Nguyễn Anh Dũng Net################# Enable Offline Mode when PNETLab Online Mode fails ############################
Note: In cases where PNETLab encounters an Online Mode error and cannot log in, and Offline Mode was previously disabled, the Offline Mode interface on the web will fail. We need to modify the config
I dont have those lines !