Control Web Panel

WebPanel => CentOS 7 Problems => Topic started by: mrbekir on June 20, 2023, 09:36:54 PM

Title: The connection is disconnecting
Post by: mrbekir on June 20, 2023, 09:36:54 PM
hello friends, after maintenance on my machine, my sites are not opening. restarting fixes it but after a while I can't access it. centos is working but sites are not opening. What can I do?
Title: Re: The connection is disconnecting
Post by: hill on June 22, 2023, 01:17:59 AM
rebuild your php, check the logs, did you enable any security features top stop malware that might be affecting your code?
Title: Re: The connection is disconnecting
Post by: mrbekir on June 24, 2023, 07:42:41 AM
rebuild your php, check the logs, did you enable any security features top stop malware that might be affecting your code?

Mikrotik installed on the main machine
Title: Re: The connection is disconnecting
Post by: overseer on June 24, 2023, 03:30:57 PM
MikroTik is a router hardware company... I run one of their hEX gigabit routers. So I am puzzled what you mean, unless you are simply talking about their Winbox software, which shouldn't affect your connection or CentOS server...
Title: Re: The connection is disconnecting
Post by: mrbekir on June 25, 2023, 07:44:08 AM
MikroTik is a router hardware company... I run one of their hEX gigabit routers. So I am puzzled what you mean, unless you are simply talking about their Winbox software, which shouldn't affect your connection or CentOS server...

Hello. I don't understand either. My problem persists. I reconfigured php-fpm. I changed the webserver to apache but the problem persists. I need urgent help.

Note: There's also a problem. it gets fixed from time to time. then access is lost again.
Title: Re: The connection is disconnecting
Post by: overseer on June 25, 2023, 01:40:31 PM
If you want to PM me your server IP address or main domain, I can test remotely to see if it is accessible or if it periodically is inaccessible. Otherwise, given the scant details, it's hard to know how to help you troubleshoot from afar.
Title: Re: The connection is disconnecting
Post by: mrbekir on June 25, 2023, 07:56:37 PM
If you want to PM me your server IP address or main domain, I can test remotely to see if it is accessible or if it periodically is inaccessible. Otherwise, given the scant details, it's hard to know how to help you troubleshoot from afar.

I sent you PM
Title: Re: The connection is disconnecting
Post by: overseer on June 26, 2023, 02:04:41 PM
I replied. A couple of notes here for the benefit of others:

If you don't need active FTP, close down port 20 on the firewall and open up a passive range, something like 49000-50000. Also make sure you are running TLS connections ONLY with pure-ftpd:
https://wiki.centos-webpanel.com/how-to-install-tls-for-ftp (https://wiki.centos-webpanel.com/how-to-install-tls-for-ftp)
You may want to consider switching to SFTP instead, but that depends on your clients and how much trust is there.

I would suggest switching from port 2030 for admin to SSL ONLY: block port 2030 on the firewall and allow port 2031. CWP has had active security holes that have been exploited, so best to keep everything TLS/SSL and not run anything on plain HTTP. Also consider switching ports because security through obscurity does gain you something, particularly keeping you more stealth from people doing Shodan scans for ports 2030-2031.

Your main CWP test page loads, but none of the other sites that resolve to your server currently load. So that points not to a firewall issue, but a HTTP server vhost configuration issue, or perhaps a php-fpm problem.