ثبت آنلاین هاست و دامنه

ثبت آنلاین هاست و دامنه کمتر از 60 ثانیه

ثبت آنلاین هاست و دامنه

ثبت آنلاین هاست و دامنه کمتر از 60 ثانیه

تامین بسیاری از موارد امنیتی سرور لینوکس

این جلسه میخوام یه مورد خیلی ساده و خیلی کارا در امنیت سرور رو توضیح بدم
اصولا باید من در مورد فعال کردن فایروال و کانفیگش بگم ولی فعلا از اون صرف نظر میکنیم و همونطور اجازه بدید فایروال بصورت تست نصب بشه
امروز میخوام در مورد یه اسکریپت ساده و مفید و کم حجم صحبت کنم
ELS
Easy Linux Security
این برنامه همونطور که از اسمش پیداست برای تامین بسیاری از موارد امنیتی لینوکس بصورت خیلی ساده است …
برای نصبش دستور زیر رو تو اس اس اچ بزنید

کد:

wget –output-document=installer.sh http://servermonkeys.com/projects/els/installer.sh; chmod +x installer.sh; sh installer.sh

و حالا دستور

کد:

els –all

رو بزنید
حالا مراحل رو توضیح میدم
ممکنه در سرور شما برخی از موارد پرسیده نشه زیاد بهش اهمیت ندید

کد:

Admin (your) E-Mail Address (this should NOT be on this server):

ایمیل خودتون رو وارد کنید و اینتر رو بزنید
و وقتی در مورد درست بودنش سوال کردن y بزنید و اینتر کنید

کد:

Several packages installed by yum may not be compatable or may cause
problems with DirectAdmin or cPanel.  To help prevent complications, ELS can add special
packages to be skipped when running yum.
These packages can still be updated manually with yum.

y رو بزنید و اینتر کنید
کد:

sysctl is used to harden the kernel.  If you have not hardened your
kernel with sysctl or do not know how to, it is recommended to have
ELS do it for you.  Your current /etc/sysctl.conf will be backed up to
/usr/local/els/bakfiles/sysctl.conf.

n رو بزنیدو اینتر

کد:

This will only run cPanel’s pre-installed scripts to update itself.
updatenow, upcp, sysup, and serveral other software updaters will be executed.

این سوال که فقط در سرور های سی پنل میاد جوابش y هست

کد:

ELS can tweak several cPanel/WHM settings for you to further
optimize and secure your server

این سوال که فقط در سرور های سی پنل میاد جوابش y هست

کد:

ELS can have an alert email sent to you each time someone logs in as root.

اینم میگه وقتی کسی به عنوان روت وارد شد براتون میل ارسال بشه ، انتخاب با خودتونه

کد:

ELS can now install RKHunter.

بزنید و اینتر
نصب این برنامه و اینکه تنظیمش کنید هر روز اسکن کنه به امنیت سرور کمک زیادی میکنه

کد:

Would you like for RKHunter to run and send you scan details
to your admin email address nightly? (y/n):

y
کد:

ELS can now install CHKROOTKIT.

y
نصب این برنامه و اینکه تنظیمش کنید هر روز اسکن کنه به امنیت سرور کمک زیادی میکنه
کد:

Would you like for CHKROOTKIT to run and send you scan details
to your admin email address nightly? (y/n):

y

کد:

ELS can now install APF.

n
این یه فایروال هست با توجه به اینکه این آموزش بر مبنای فایروال CSF هست به هیچ عنوان این فایروال رو نصب نکنید
نصب همزمان دو تا فایروال مشکلات جدی رو به دنبال داره

کد:

ELS can now install BFD.

اینم یه پلاگین بره فایروال بالاست که به هیچ عنوان نباید نصب شه
پس n بزنید

کد:

ELS can now install Libsafe.

y
کد:

ELS can now install MyTOP.

y
کد:

This feature can make the SSH deamon force SSH Protocl 2

n
فعال کردنش به امنیت یه کمک جزیی میکنه ولی ممکنه با بعضی از کلاینت ها اس اس اچ قابل دسترسی نباشه
کد:

This feature can chmod dangerous files only to root

y
کد:

This feature can disable PHP register_globals.

y
کد:

This feature can disable dangerous PHP functions.

y
کد:

This feature can secure and optimize your MySQL configuration.

y
You can now renice MySQL to -10 (higher CPU priority).
In MySQL intensive environments, overall performance can
increase dramatically by using highest CPU priority,
however in a few cases, this may offer no performance
gain or even decrease performance slightly.
If you wish to undo this, use the following command:
els –undomysqlrenice
n
انجامش در برخی سرور ها ایجاد مشکل میکنه
کد:

This feature can optimize and repair all the MySQL database tables.

y
کد:

ImageMagick is not installed.
ELS can now install ImageMagick.

y
کد:

ELS can install the Exim Dictionary Attack ACL
Created by Chirpy from ConfigServer Services

n
این قابلیت به طور پیشفرض در سی پنل ۱۱ وجود داره و این برنامه هم باگ داره و سازنده دیگه پیشتیبانیش نمیکنه پس جواب n هست
کد:

Changing SSH to use a non-default port helps prevent
against Brute Force attacks and potential hackers.
If you choose to change the SSH port, ensure the port is
not already in use by another program.  There is a chance
of locking yourself out of SSH, so it is recommended to
add your Desktop’s IP address to /etc/apf/allow_hosts.rules.
ELS can now change your SSH port for you.

با این کار پورت اس اس اچ رو میتونید تغییر بدید که کمک زیادی به امنیت میکنه ولی دو تا مورد مهم
۱- باید قبل این کار حتما و حتما پورت مورد نظر رو در فایروال باز کنید (آموزش در جلسات بعد)
۲- حواستون باشه که از دفعه بعد با پورت جدید به سرور کانکت شید
فعلا n بزنید تا هر موقع که آموزش باز و بسته کردن پورت در فایروال رو گفتم این رو تغییر بدید
کد:

Disabling root login to SSH adds an extra layer of security
to prevent hackers from gaining root access.  It requires
you to login as a special user and then use the command
‘su -’ to get prompted for root password and become root.
You should be careful and write the information necessary
down incase you need it.

این کار هم لوگین روت رو غیر فعال میکنه که دردسرش بیشتر از امنیتیه که ایجاد میکنه
پس پیشنهاد من n هست ( اگر y بزنید حتما و حتما و حتما باید یه یوزر داشته باشید که بتونه به اس اس اچ لوگین کنه)
تموم

نظرات 0 + ارسال نظر
برای نمایش آواتار خود در این وبلاگ در سایت Gravatar.com ثبت نام کنید. (راهنما)
ایمیل شما بعد از ثبت نمایش داده نخواهد شد