Page 1 of 2

Add Cyberpanel Control Panel Support

Posted: 06 Oct 2019, 04:46
by whattheserver
Cyberpanel is a new and amazing opensource Control panel that supports Ubuntu and Centos.
https://cyberpanel.net/

Github:
https://github.com/usmannasir/cyberpanel

It uses Postfix/dovecot for email.

Openlitespeed/Litespeed for the webserver.

Overview of log files and differences.

Cyberpanel Control Panel Accesslog
/usr/local/lscp/cyberpanel/logs/access.log

Cyberpanel Control Panel errorlog
/usr/local/lscp/cyberpanel/logs/error.log

Cyberpanel Control Panel stderr.log
/usr/local/lscp/cyberpanel/logs/stderr.log

Cyberpanel Control Panel logs and rotated logs.
/usr/local/lscp/logs/


csf.logfiles csf.syslogs
# CyberPanel
/home/cyberpanel/error-logs.txt
/usr/local/lscp/cyberpanel/logs/error.log
/usr/local/lscp/cyberpanel/logs/access.log
/usr/local/lscp/cyberpanel/logs/stderr.log

csf.syslogs
# Litespeed/Openlitespeed
/usr/local/lsws/logs/error.log
/usr/local/lsws/logs/access.log
/usr/local/lsws/logs/auditmodsec.log


Ubuntu
This file contain email logs for postfix/dovecot
/var/log/mail.err
/var/log/mail.log

Auth
/var/log/syslog
/var/log/auth.log

Iptables log
/var/log/kern.log


Centos 7

sshd
/var/log/secure

FTP
/var/log/messages
tail -f /var/log/messages

Maillog
/var/log/maillog


Right now it has very minimal support. I have been working to try to add support via Python code but it would be nice to have an official plugin.

Github pages for the current code.
https://github.com/usmannasir/cyberpane ... cal/csf.py

Re: Add Cyberpanel Control Panel Support

Posted: 07 Oct 2019, 16:41
by ForumAdmin
We're working on incorporating the csf UI into CyberPanel as a plugin. It's proving tricky with python/django but we seem to be getting there. Hopefully we'll have something available soon.

Re: Add Cyberpanel Control Panel Support

Posted: 11 Oct 2019, 11:40
by whattheserver
You should try the native one I modded or check it out as a reference. It works nicely in both centos & Ubuntu for setting defaults. I have not added all the options to toggle the 300+ settings in the UI but all the important stuff is all set up during install now unlike it was before.

View
https://github.com/usmannasir/cyberpane ... cal/csf.py


cd /usr/local/CyberCP/plogical/
mv /usr/local/CyberCP/plogical/csf.py /usr/local/CyberCP/plogical/csf.py-bak
wget -O /usr/local/CyberCP/plogical/csf.py https://github.com/usmannasir/cyberpane ... cal/csf.py

Then to refresh the static files

See code here
https://github.com/usmannasir/cyberpane ... upgrade.sh

Use code:
wget -O /usr/local/CyberCP/upgrade.sh https://github.com/usmannasir/cyberpane ... upgrade.sh
chmod +x /usr/local/CyberCP/upgrade.sh

Then run this and give it a few minutes to clear cache and restart cyber panel daemon
bash /usr/local/CyberCP/upgrade.sh

Looking forward to seeing your plugin either way that will be sweet.

Re: Add Cyberpanel Control Panel Support

Posted: 11 Oct 2019, 11:43
by ForumAdmin
Thank you for that. I had decided to using the native UI as I've been finding the plugin functionally unreliable and twice ended up with corrupt cyberpanel installs. I've found a way to use the complete ConfigServer csf UI as found on other control panels, so it would be a complete replacement, though within a install option which would need to be done from shell.

Re: Add Cyberpanel Control Panel Support

Posted: 12 Oct 2019, 13:20
by whattheserver
lol yeah, we both came to the same conclusion.. it seemed a lot easier than reinventing the wheel.

See this code which I added to the cyberpanel CSF installer which will do this for you going forward.
https://github.com/usmannasir/cyberpane ... py#L62-L72
https://github.com/usmannasir/cyberpane ... #L286-L296

More about it in:
https://forums.cyberpanel.net/discussio ... mment_6546

Re: Add Cyberpanel Control Panel Support

Posted: 12 Oct 2019, 15:18
by ForumAdmin
I've found a way to do it within django/python without needing the csf UI by using an iframe in a template and a perl interface script to the csf UI perl module. This is done by utilising ProcessUtilities.outputExecutioner and a temp file for passing POST and GET data. This is a technique we've used successfully with other control panels and programming languages.

Re: Add Cyberpanel Control Panel Support

Posted: 13 Oct 2019, 05:26
by whattheserver
badass if you don't mind sharing id be happy to try to add that mod into the core functions.

Re: Add Cyberpanel Control Panel Support

Posted: 22 Oct 2019, 13:19
by whattheserver
sweet I see that this was automatically added via a CSF auto upgrade looks really sleek now in the cyberpanel UI. great work....

Re: Add Cyberpanel Control Panel Support

Posted: 22 Oct 2019, 15:55
by ForumAdmin
We've also integrated our exploit scanner into the CyberPanel UI:
https://www.configserver.com/cp/cxs.html

Re: Add Cyberpanel Control Panel Support

Posted: 23 Oct 2019, 04:25
by whattheserver
Awesome.

The one I noticed is that the centos 7 cyberpanel does not show the new CSF UI and plugin like the Ubuntu ones.