#163 removing by default banned port 443,80, 8080,8443 and let bannedports managed this case.

This commit is contained in:
root 2016-03-23 16:18:36 +01:00
parent 18941ae560
commit 95c1397289

View file

@ -570,15 +570,18 @@ sub mysql_setup {
} }
} }
elsif ( -r "/etc/psa/.psa.shadow" and $doremote == 0 ) { elsif ( -r "/etc/psa/.psa.shadow" and $doremote == 0 ) {
# It's a Plesk box, use the available credentials # It's a Plesk box, use the available credentials
$mysqllogin = "-u admin -p`cat /etc/psa/.psa.shadow`"; $mysqllogin = "-u admin -p`cat /etc/psa/.psa.shadow`";
my $loginstatus = `$mysqladmincmd ping $mysqllogin 2>&1`; my $loginstatus = `$mysqladmincmd ping $mysqllogin 2>&1`;
unless ( $loginstatus =~ /mysqld is alive/ ) { unless ( $loginstatus =~ /mysqld is alive/ ) {
badprint # Plesk 10+
"Attempted to use login credentials from Plesk, but they failed."; $mysqllogin = "-u admin -p`/usr/local/psa/bin/admin --show-password`";
exit 1; $loginstatus = `$mysqladmincmd ping $mysqllogin 2>&1`;
} unless ( $loginstatus =~ /mysqld is alive/ ) {
badprint "Attempted to use login credentials from Plesk and Plesk 10+, but they failed.";
exit 1;
}
}
} }
elsif ( -r "/usr/local/directadmin/conf/mysql.conf" and $doremote == 0 ) { elsif ( -r "/usr/local/directadmin/conf/mysql.conf" and $doremote == 0 ) {
@ -961,18 +964,18 @@ sub system_recommendations {
goodprint "There is less than 10 opened ports on this server."; goodprint "There is less than 10 opened ports on this server.";
} }
if ( is_open_port(80) or is_open_port(443) ) { # if ( is_open_port(80) or is_open_port(443) ) {
badprint "There is Apache like server running on 80 or 443 port."; # badprint "There is Apache like server running on 80 or 443 port.";
push( @generalrec, "Consider dedicating a server for Web server in production !" ); # push( @generalrec, "Consider dedicating a server for Web server in production !" );
} else { # } else {
goodprint "No Web server runing on 80 and 444 port."; # goodprint "No Web server runing on 80 and 443 port.";
} # }
if ( is_open_port(8080) or is_open_port(8443) ) { # if ( is_open_port(8080) or is_open_port(8443) ) {
badprint "There is Application server running on 8080 or 8443 port."; # badprint "There is Application server running on 8080 or 8443 port.";
push( @generalrec, "Consider dedicating a server for Application server in production !" ); # push( @generalrec, "Consider dedicating a server for Application server in production !" );
} else { # } else {
goodprint "No Application server runing on 8080 or 8443 port."; # goodprint "No Application server runing on 8080 or 8443 port.";
} # }
foreach my $banport (@banned_ports) { foreach my $banport (@banned_ports) {
if ( is_open_port($banport) ) { if ( is_open_port($banport) ) {
badprint "Banned port: $banport is opened.."; badprint "Banned port: $banport is opened..";