Author Topic: Login CWP Cloudflare  (Read 5670 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Login CWP Cloudflare
« on: April 24, 2023, 09:17:01 PM »
Hi all,

Not sure if i am in the right section, but i have a problem.

If i place my server domain under cloudflare i can't login anymore on: https://server.mydomain.com:2031/login/index.php  Then i get no connection.

Is there a solution for this?

Thanks in advance!

Peter

Offline
*****
Re: Login CWP Cloudflare
« Reply #1 on: April 25, 2023, 12:14:57 AM »
I am using CWP and Cloudflare for my DNS infrastructure. Do you have Cloudflare configured as Flexible or Full for SSL? Do you have it set to always redirect plain HTTP connections to HTTPS?

Offline
*
Re: Login CWP Cloudflare
« Reply #2 on: April 25, 2023, 07:21:31 AM »
Hi,

It's set on flexible and always redirect http to https.

Offline
*****
Re: Login CWP Cloudflare
« Reply #3 on: April 25, 2023, 05:16:16 PM »
Try turning off the redirect and manage it yourself on the CWP level (with the CSF firewall). I switched my CWP to run an alternate port and only have the HTTPS custom port exposed on the firewall. It will help you avoid getting profiled by someone doing a Shodan search for ports 2030 and 2031, indicators of running CWP and possibly identifying unpatched weaknesses. And since I do the management on my servers solo, I definitely turned off the cPanel wannabe ports 2086,2087. I have left 2083 enabled due to customer familiarity with that port for the customer panel.

Offline
*
Re: Login CWP Cloudflare
« Reply #4 on: April 25, 2023, 06:45:19 PM »
I turned off the redirect, that makes no difference.

Must say i am not really a server nerd, so i don't understand how to set another port in the cfs firewall. Is it this rule that i have to change  in csf.conf?  PORTS_cwp = "2030,2031"

And how do i get the new port trough Cloudflare?
« Last Edit: April 25, 2023, 07:37:35 PM by Xadus »

Offline
***
Re: Login CWP Cloudflare
« Reply #5 on: April 25, 2023, 09:32:08 PM »
Try turning off the redirect and manage it yourself on the CWP level (with the CSF firewall). I switched my CWP to run an alternate port and only have the HTTPS custom port exposed on the firewall. It will help you avoid getting profiled by someone doing a Shodan search for ports 2030 and 2031, indicators of running CWP and possibly identifying unpatched weaknesses. And since I do the management on my servers solo, I definitely turned off the cPanel wannabe ports 2086,2087. I have left 2083 enabled due to customer familiarity with that port for the customer panel.
FYI  cloudflare has the option require authentication to get to your admin login page.  FWIW
Listen to everything Pixelpadre says.

Offline
*****
Re: Login CWP Cloudflare
« Reply #6 on: April 26, 2023, 12:52:24 AM »
Hi,

Make sure the A record server.mydomain.com isn't using the Cloudflare DNS PROXY option.

Offline
*
Re: Login CWP Cloudflare
« Reply #7 on: April 26, 2023, 10:38:28 AM »
Thnx for the suggestions all,

It's now working, had to disable Cloudflare proxy  A record Cpanel. I had to notice that myself...

Is it wise to change the ports in csf.conf  PORTS_cwp = "2030,2031" to another number?

Offline
*
Re: Login CWP Cloudflare
« Reply #8 on: April 26, 2023, 04:44:15 PM »
Thnx for the suggestions all,

It's now working, had to disable Cloudflare proxy  A record Cpanel. I had to notice that myself...

Is it wise to change the ports in csf.conf  PORTS_cwp = "2030,2031" to another number?

EDIT: now, 5 hours later not working anymore... :(

Offline
*****
Re: Login CWP Cloudflare
« Reply #9 on: April 27, 2023, 05:11:54 PM »
what do you mean ?

Offline
*
Re: Login CWP Cloudflare
« Reply #10 on: April 27, 2023, 08:54:41 PM »
what do you mean ?

I have a dedicated server with CWP, and the nameservers are on the main domain.

Al my sites on the server are under Cloudflare and running fine, only my main domain not. When i set it under Cloudflare i can't reach the CWP any more on https://server.mydomain.com:2031.

The last time i tried i had the Cpanel record in the Cloudflare DNS set on DNS only - local IP. The nameservers of the main domain where propagated and i could login to the CWP again, but after around 5 hours it was again not working.

I would like to have the main domain on Cloudflare and that it is possible to go to the CWP trough https://server.mydomain.com:2031.

Thanks!

Offline
*****
Re: Login CWP Cloudflare
« Reply #11 on: May 06, 2023, 03:08:16 AM »
It should work -- did you try Cloudflare's dev mode? Did you test via a VPN from outside your LAN? Sometimes loopback/hairpin NAT requires further setup to work with your router, if that's what you are doing.

If you want to change your CWP login port, there are many guides:
https://azdigi.com/blog/en/webserver-panel-en/centos-web-panel-en/how-to-change-the-port-on-centos-web-panel-cwp/

I personally don't run under CWP's default port assignments, nor the cPanel/WHM port-alike assignments. I chose my own custom ports. But if anyone does a port scan on my server, obviously I have typical LAMP/LEMP ports open, with mail service ports open as well. It just makes it that much harder for script kiddies to pound my server and doesn't leave me susceptible to FritzFrog for SSH hack attacks.

Offline
*
Re: Login CWP Cloudflare
« Reply #12 on: May 07, 2023, 08:28:05 PM »
It should work -- did you try Cloudflare's dev mode? Did you test via a VPN from outside your LAN? Sometimes loopback/hairpin NAT requires further setup to work with your router, if that's what you are doing.

If you want to change your CWP login port, there are many guides:
https://azdigi.com/blog/en/webserver-panel-en/centos-web-panel-en/how-to-change-the-port-on-centos-web-panel-cwp/

I personally don't run under CWP's default port assignments, nor the cPanel/WHM port-alike assignments. I chose my own custom ports. But if anyone does a port scan on my server, obviously I have typical LAMP/LEMP ports open, with mail service ports open as well. It just makes it that much harder for script kiddies to pound my server and doesn't leave me susceptible to FritzFrog for SSH hack attacks.

Thank you!

Going to take a look at this