Can you add a full fledged dashboard for CSF like that in WHM or Webmin?
- 1 for this
+2 for this.
Guys you have to understand that the interface like in whm and webmin is made by the devs of csf, you guys have to convince them to create a plugin for cyberpanel.
we should be able to easily port that. The main issue is that the CSF cli doesn’t allow you to add permanent port openings via command-line arguments yet.
Suggested they port the --tempallow -ta port openings support to the main -a --allow functions. this would be ideal and make the webui wrapper much easier and less error prone for any control panel to integrate.
This would allow us to reuse the existing interface setup for firewalld but just switch to the CSF version commands when CSF is installed.
This could also be done via reading/writing to the /etc/csf/csf.allow file to load which current stuff is opened. This is already done to manage the globally open ports this option we could do right now without needing to wait on CSF to officially code anything.
I’m still learning python but I have already written a PHP version of these port creation tools for CSF in PHP.
Well, I was able to export all the config variables names and then bulk generated the python code via a loop to be able to fetch the settings from the config based off the current examples. Going to need some more work to clean it up and probably structure it out under different subtabs. If anyone wants to give it a go:
I pushed a commit to repo with better integration of the log files and LFD which sets it up by default all good.
I will start working on adding new features like checking blocked IP’s and why it was blocked etc as I have time in the future.
the native CSF Web UI is now possible via the CSF installer for Cyberpanel in the latest patch committed and will use your Hostname SSL for signed SSL if available.
So can do the simple stuff via the Cyberpanel UI for add remove ports/block/unblock IP’s. Anything complex you can hop over to the CSF full UI on port:1025 and set it through that. More about that is in the link below.
yeah the upgrade does not run this for you. Probably for the best as some people might have customizations that would get lost.
For anyone else who wants to rapidly do this post upgrade see the below link
cp /etc/csf/csf.conf /root/csf.conf
You could also use the below commands to modify the different things manually vs uninstalling.
Mv the default ssl keys out of the way and create the symlinks.
mv /etc/csf/ui/server.crt /etc/csf/ui/server.crt-bak; ln -s /usr/local/lscp/conf/cert.pem /etc/csf/ui/server.crt;
mv /etc/csf/ui/server.key /etc/csf/ui/server.key-bak; ln -s /usr/local/lscp/conf/key.pem /etc/csf/ui/server.key;
Specify your username and password in the below you want it to use
sed -i ‘s/^UI_USER =./UI_USER = “username”/g’ /etc/csf/csf.conf
sed -i 's/^UI_PASS =./UI_PASS = “password”/g’ /etc/csf/csf.conf
Enable UI UI port and disable
sed -i ‘s/^UI =./UI = “1”/g’ /etc/csf/csf.conf
sed -i 's/^UI_PORT =./UI_PORT = “1025”/g’ /etc/csf/csf.conf
sed -i ‘s/^UI_ALLOW =.*/UI_ALLOW = “0”/g’ /etc/csf/csf.conf
To restart both lfd/csf via -ra aka --restart-all