New in CWP Edge-LatestFree 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, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

How to access CWP panels through VPN only

Started by n8v8r, February 09, 2018, 08:52:37 PM

Previous topic - Next topic

n8v8r

Looking for a way to limit access to root (and perhaps end user) panel(s) through VPN only? The VPN server is up and running but how to route/bind the CWPanels to the VPN and remove access for any other entry point?

bullten

nano /usr/local/cwpsrv/conf/cwpsrv.conf

Locate
location / {

add
allow yourip;
deny all;

restart cwp.
service cwpsrv restart

n8v8r

probably silly question "yourip" = server.ip? Because the VPN dial-in address will be dynamic.

The panel port would then be server.ip:vpnport? And it would be the same port for the root user and the end user?

tcp ports 2030,2031,2082,2083,2086,2087,2095,2096 can then be safely removed from the CSF without impeding the usability of CWP?

bullten

Your ip means your client ip. You cnat add this rule for dynatic ip.


n8v8r

thanks, but then it is not a viable solution I suppose, considering that I would be be dialing up the VPN always from a static ip ...  :(

If CWP would just implement 2-Step Verification (TOTP) for the panels

n8v8r

On second thought - once the VPN is established the client's IP (any) is becoming the server's IP, is it not?