New in CWP Edge / LTSFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers. Available now in the Edge-Latest and LTS-Stable versions. Discuss in the forum

LSPHP / Cache ›
CWP Secure KernelKernel-level protectionEvery site in its own sandbox

Every PHP site, cron job and SSH session runs in its own profile that the kernel enforces. A hacked WordPress cannot read other accounts’ files, and crypto miners and unexpected processes are stopped. Discuss in the forum

Secure Kernel ›
CWP DataCenter PanelFree for CWPpro serversAll your servers on one screen

Manage all your CWP servers from one panel: live health, every hosting account, CWP and OS updates on many servers at once, backups, SSL, firewall and Telegram alerts. Discuss in the forum

DataCenter Panel ›
CWP Backup ServerFree for CWPpro serversBackups that ransomware cannot reach

Protected backups of all your CWP servers on a separate machine. Snapshots a hosting server cannot delete, and restore of files, databases, mail and whole accounts in the admin and user panel. Discuss in the forum

Backup Server ›
WordPress ManagerIncluded & freeWordPress managed from the panel

Install, secure, update, back up and clone WordPress sites without FTP. Updates are tested on a staging clone first and applied to the live site only when they pass, with a backup taken first. Discuss in the forum

WordPress Manager ›
CWP CageIsolationEvery account in its own cage

Per-account isolation built from Linux namespaces and cgroups. A break-in or a runaway script on one site cannot reach another account, the panel or the rest of the server; resource limits per hosting package. Discuss in the forum

CWP Cage ›
Script InstallerOne-click appsWordPress, Joomla, Moodle and more in one click

CWP’s own script installer in the user panel: pick an app, choose the domain and folder, and it is live in seconds with its database and admin login created automatically. Ready for LSPHP and LSAPI-Cache. Discuss in the forum

Script Installer ›
DNS ClusterFor every control panelOne DNS cluster for all your servers

Your servers keep creating domains as usual; the zones are collected into one authoritative PowerDNS cluster you control, with DNSSEC, roles and a full activity trail. Accepts CWP, cPanel, Plesk, DirectAdmin and BIND. Discuss in the forum

DNS Cluster ›
CWP BillingFree to useBilling and support system for hosting providers

Clients, services, invoices, payments, domains, server provisioning and support tickets in one place. All gateways, server modules and registrars are free, with free migration from WHMCS, ClientExec and Blesta. Discuss in the forum

CWP Billing ›
CWPproFrom $1.49 per monthEvery CWP feature unlocked

CWPpro is the professional version of Control Web Panel: all features, unlimited accounts, the latest CWP version and security fixes first. $1.49 per month or $11.99 per year. Discuss in the forum

Get CWPpro ›

Two Factor Authorization Mod

Started by rcschaff, February 06, 2020, 12:48:12 AM

Previous topic - Next topic

rcschaff

I have built a Two Factor Authorization Module for CWP.  I have tested it, but please consider this is BETA.   All Issues should be reported to me on this post.

Pre-Requisites.
You need an API key created with ACCOUNT-> list created
After installation, make sure you change User Account -> Themes to the modified theme, and don't allow them to change

Please not that this system works around the CWP login system, and therefore is not infallible, though I did my best to hide that it's there.

TO install:
From root user via ssh:
wget https://schaffner.org/cwp2fa.tar.gz
tar -xzf cwp2fa.tar.gz
cd cwp_2fa/
./install.sh
When prompted, put in your API key
That's it. 

Now log into CWP and you should see a new menu 2Factor Auth directly under Server Settings Menu


Users Menu Appears under CWP Settings
Google Hangouts:  rcschaff82@gmail.com

Jamshed Datori

Zip File is corrupt. Kindly check again

rcschaff

Google Hangouts:  rcschaff82@gmail.com

rcschaff

Fixed now.  Not sure why it corrupted.
Google Hangouts:  rcschaff82@gmail.com

rcschaff

Here are the checksums for the file cwp2fa.tar.gz
MD5:  a3b85cbb5f67022da228de61224560fc
sha1:  65d80e3cd034d54ef0cf144ae236a42b84468366
sha256:  edb57a36d2df601e1ef4d02020d7c11a1e74109b7d3a895fee53808e510a57e1 
Google Hangouts:  rcschaff82@gmail.com

thenob

Works great!

Only I bumped into 2 things
-1 Couldn't copy
/usr/local/cwpsrv/htdocs/admin/design/ was read-only due to an SE-linux setting, maybe check it? (ls -Z)

-2 Local time on the server was off with 2 minutes, so every login failed.
Solved it with installing ntpd
So maybe do a check if ntpdate is installed?

rcschaff

md5sum 2b158a964d064639df93697c9aee0b42
sha1sum 5a3cb827e7cc8e9ff7b6892b88c5cb333820af19
sha256sum af36c7e02c5de41d911477fdecdc806d43db8c59e94432488335bc013d4f5e6e

The only update I made was to check for ntp, and install it if it's not installed.

If you have selinux installed, then you must know what you are doing, as CWP disables it by default.
Google Hangouts:  rcschaff82@gmail.com

annettek

#7
i am gertting this error in cwp admin

Warning: require_once(design/googleAuthenticator.php): failed to open stream: No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/modules/cwp2fa.php on line 106

Fatal error: require_once(): Failed opening required 'design/googleAuthenticator.php' (include_path='.:/usr/local/cwp/php71/lib/php') in /usr/local/cwpsrv/htdocs/resources/admin/modules/cwp2fa.php on line 106

when trying to create a key

it has stopped me from loggin into my user control panel. also the file manager only loads this /home/google
phpqrcode  not my site files

i reinstalled it to try that now i have 2 entries in the left menu. sorry to be a pain

any help would be great as i really want the use of this mod

rcschaff

make sure you are on the root account
go to where you untarred cwp_2fa

try these
cp -v admin/googleAuthenticator.php /usr/local/cwpsrv/htdocs/admin/design/
cp -v admin/showQRCode.php /usr/local/cwpsrv/htdocs/admin/design/

If you cannot copy them, try chattr -i /usr/local/cwpsrv/htdocs/admin/design and see if they will copy.   It's also possible you have selinux activated.
If it is, you can do
setenforce 0
copy the files
then
setenforce 1
Google Hangouts:  rcschaff82@gmail.com

annettek

se linux disabled

setenforce: SELinux is disabled

the files are in the correct dir

still same error

/usr/local/cwpsrv/htdocs/admin/design

googleAuthenticator.php
showQRCode.php

rcschaff

Install script has been updated.

Redownload, and rerun the install.

md5sum 8f0f50679d5a37fd49610227b840db60
Google Hangouts:  rcschaff82@gmail.com

annettek

workd nowe how do i remove the 2 extra entries in left menu i have  now lol.

thanks

so much appericated for this.

rcschaff

#12
Edit

/usr/local/cwpsrv/htdocs/resources/admin/include/3rdparty.php

remove the extra lines ;)

It starts with <noscript>  20 lines or so, end with </script>
Google Hangouts:  rcschaff82@gmail.com

annettek

#13
ok one last part

/home/google
phpqrcode

the file manager is user control panel loads these dir not the user files home/public_html ect

thanks for the support awsome many many thanks

rcschaff

Correct.  The login user uses /home/google
Google Hangouts:  rcschaff82@gmail.com