کاملترین اموزش کانفیگ امنیتی سرور لینوکس || سیپنل چاپ


موارد زیر را به صورتی که اعلام میشه تغییر بدید
برید به
nano /etc/ssh/sshd_config
و Protocol 2 را فعال کنید و UseDNS no به این صورت تغییر بدید
Change #Port 22 to some other port and uncomment it
برداشتن # و همچنین باز کردن پورت دلخواه در فایروال سرور

موارد زیر را دقیقا مانند دستور تغییر بدید تمامی این موارد از منوی سمت چپ سیپنل یافت میشند
Enable open_basedir protection
Disable Compilers for all accounts(except root)
Enable Shell Bomb/memory Protection
Enable cPHulk Brute Force Protection
در قسمت
کد:
 Main >> Service Configuration >> Apache Configuration >> Global Configuration
TraceEnable Off
ServerSignature Off
ServerTokens ProductOnly
FileETag None

در
Main >> Security Center >> Apache mod_userdir Tweak
Enable mod_userdir Protection را تیک بزنید

در قسمت
کد:
 Main >> Service Configuration >> Configure PHP and SuExec
Default PHP Version (.php files) 5
PHP 5 Handler suphp
PHP 4 Handler none
Apache suEXEC on
Apache Ruid2 off
به این صورت باشه

در
کد:
nano /usr/local/lib/php.ini
enable_dl = Off
disable_functions

symlink, show_source, passthru, exec, fpassthru, popen, crack_check, crack_closedict, proc_open, crack_getlastmessage, crack_opendict, psockopen, php_ini_scanned_files, shell-exec, system, dl, tmp, safe_mode, systemroot, server_software, get_current_user, ini_restore, popen, pclose, exec, shell_exec, suExec, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, pfsockopen, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, posix_ctermid, posix_getcwd, posix_getegid, posix_geteuid, posix_getgid, posix_getgrgid, posix_getgrnam, posix_getgroups, posix_getlogin, posix_getpgid, posix_getpgrp, posix_getpid, posix_getppid, posix_getpwnam, posix_getpwuid, posix_getrlimit, posix_getsid, posix_getuid, posix_isatty, posix_setegid, posix_seteuid, posix_setgid, posix_times, posix_ttyname, posix_uname, posix_access, posix_get_last_error, posix_mknod, posix_strerror, posix_initgroups, posix_setsid, posix_setuid, perl, rsync, wget, ./, python, whoami, cat, perm, find, phpinfo, php_uname, c99_buff_prepare, c99_sess_put, c99getsource, c99sh_getupdate, c99fsearch, c99shexit, c99ftpbrutecheck, fpassthru

register_globals = Off
safe_mode = On
expose_php = Off
magic_quotes = On
display errors = off


در
کد:
 Main >> Security Center >> PHP open_basedir Tweak
Enable php open_basedir Protection تیک بزنید

حتما Suhosin را نصب کنید اگر آموزش نصب این مورد هم نیاز بود بفرمایید تا آموزششو بدم ولی از طریق easy apache قابل نصبه با یه تیک و یه تغییر کوچیک در فایل
کد:
nano /usr/local/lib/php.ini
مواردی مثل suhosin و zend رو هم اگه حوصله باشه حتما مینویسم

در
کد:
 Main >> Server Configuration >> Tweak Settings
این تغییرات رو بدید
Enable BoxTrapper spam trap off
Email password reset off
SSL Support for cPanel daemons (no stunnel) on
Allow Remote Domains off
***** subdomains off
***** subdomain override off


در
کد:
Main >> Security Center >> Compiler Access
Compiler Access رو disable کنید

در
کد:
Main >> Service Configuration >> FTP Server Configuration
Allow Anonymous Logins no

Allow Anonymous Uploads no

Allow Logins with Root Password no
Broken Clients Compatibility no

و همچنین
Set some MySQL password
از قسمت
کد:
Main >> SQL Services >> MySQL Root Password

آیا این پاسخ مفید بود؟

  • 3
« بازگشت