کتاب درخواستی:
سیستم های امنیت شبکه
این مقاله به زبان فارسی میباشد و در مورد نفوذ های سیستم های تحت شبکه پرداخته
سیستم های امنیت شبکه
این مقاله به زبان فارسی میباشد و در مورد نفوذ های سیستم های تحت شبکه پرداخته
کتاب Mikrotik Load balancing
Load balancing چیست؟
فناوری Load balancing یک راه حل کلیدی در جهت افزایش کارایی و سرعت در امور شبکه است. به طور کلی Load balancing یعنی توزیع پردازش و فعالیتهای ارتباطی به طور مساوی بر روی سروهای اصلی شبکههای کامپیوتری به صورتی که بر روی هیچ سرور واحدی بار پردازشی بیش از حد مجاز یا ناهماهنگ با سایر سرورها اعمال نگردد بدین صورت از اعمال فشار پردازش بر روی یک سرور جلوگیری میشود.
به صورت کلی Load balancing برای سرورهایی اهمیت دارد که در مورد آنها پیشبینی تعداد درخواستهای ارسالی به سرور دشوار میباشد. سایتهایی با بازدیدهای بالا و سایتهای دانشگاهی که نیازمند ثبت نام تعداد زیادی کاربر به صورت هم زمان میباشند از این جمله به شمار میآیند. اکثر وب سایتهای پر بازدید و معتبر به طور معمول از دو یا چند سرویس دهنده وب (Web Server) به صورت موازی جهت انجام عملیات Load Balancing استفاده مینمایند، بدین صورت که اگر میزان استفاده از منابع یک سرور بیش از حد استاندارد تعیین شده باشد، به طوری که ادامه این فعالیت باعث Down شدن و از دسترس خارج گردیدن سرور شود، درخواستها به سرور دیگری که دارای ظرفیت تحمل بار بیشتری است ارجاع میشود.
Load balancing چیست؟
فناوری Load balancing یک راه حل کلیدی در جهت افزایش کارایی و سرعت در امور شبکه است. به طور کلی Load balancing یعنی توزیع پردازش و فعالیتهای ارتباطی به طور مساوی بر روی سروهای اصلی شبکههای کامپیوتری به صورتی که بر روی هیچ سرور واحدی بار پردازشی بیش از حد مجاز یا ناهماهنگ با سایر سرورها اعمال نگردد بدین صورت از اعمال فشار پردازش بر روی یک سرور جلوگیری میشود.
به صورت کلی Load balancing برای سرورهایی اهمیت دارد که در مورد آنها پیشبینی تعداد درخواستهای ارسالی به سرور دشوار میباشد. سایتهایی با بازدیدهای بالا و سایتهای دانشگاهی که نیازمند ثبت نام تعداد زیادی کاربر به صورت هم زمان میباشند از این جمله به شمار میآیند. اکثر وب سایتهای پر بازدید و معتبر به طور معمول از دو یا چند سرویس دهنده وب (Web Server) به صورت موازی جهت انجام عملیات Load Balancing استفاده مینمایند، بدین صورت که اگر میزان استفاده از منابع یک سرور بیش از حد استاندارد تعیین شده باشد، به طوری که ادامه این فعالیت باعث Down شدن و از دسترس خارج گردیدن سرور شود، درخواستها به سرور دیگری که دارای ظرفیت تحمل بار بیشتری است ارجاع میشود.
عملکرد Load Balancing:
به طور کلی Load Balancer بین یک Client و Host قرار میگیرد. هنگامیکه یک Host با اختلال مواجه شده و یا Fail شود، سرویس load balancer این مشکل را شناسایی کرده و سریعا درخواستهایClient های مربوط به آن Host خارج از دسترس را به سمت Hostهای سالم راهنمایی و یا در واقع Route میکند. باید در نظر داشت که این پروسه به صورت اتوماتیک انجام میشود، بدین طریق که تمامی Connectionهای مربوط به Host مختل، قطع شده و در ادامه کار آن Clientها به Host سالم ارتباط داده میشوند. این پروسه بدون اينكه كاربر متوجه این اختلال گردد، رخ میدهد. بنابراين در مجموع در دسترس بودن سرویس نسبت به حالتي كه يك سرور تنها به درخواستها پاسخ ميدهد، به حداکثر رسیده و نهایتا قطعی سرورها به حداقل میرسد. تمامی پروسه شناسایی هاست مختل شده تا مسیر دهی مجدد و ایجاد ارتباط با Host سالم در کمتر از 10 ثانیه رخ میدهد، از این رو کاربر به هیچ عنوان با قطعی سرویس ناشی از Down بودن یک سرور مواجه نخواهد شد.
به طور کلی Load Balancer بین یک Client و Host قرار میگیرد. هنگامیکه یک Host با اختلال مواجه شده و یا Fail شود، سرویس load balancer این مشکل را شناسایی کرده و سریعا درخواستهایClient های مربوط به آن Host خارج از دسترس را به سمت Hostهای سالم راهنمایی و یا در واقع Route میکند. باید در نظر داشت که این پروسه به صورت اتوماتیک انجام میشود، بدین طریق که تمامی Connectionهای مربوط به Host مختل، قطع شده و در ادامه کار آن Clientها به Host سالم ارتباط داده میشوند. این پروسه بدون اينكه كاربر متوجه این اختلال گردد، رخ میدهد. بنابراين در مجموع در دسترس بودن سرویس نسبت به حالتي كه يك سرور تنها به درخواستها پاسخ ميدهد، به حداکثر رسیده و نهایتا قطعی سرورها به حداقل میرسد. تمامی پروسه شناسایی هاست مختل شده تا مسیر دهی مجدد و ایجاد ارتباط با Host سالم در کمتر از 10 ثانیه رخ میدهد، از این رو کاربر به هیچ عنوان با قطعی سرویس ناشی از Down بودن یک سرور مواجه نخواهد شد.
روز های سخت دوام نمی آورند
اما آدم های سخت چرا
برای اهدافتان سخت تلاش کنید
روزنه های امید را خواهید دید
اما آدم های سخت چرا
برای اهدافتان سخت تلاش کنید
روزنه های امید را خواهید دید
Why Mosh is better than SSH?
------------------------------------------------
Mosh (stands for Mobile Shell) is replacement of SSH for remote connections to Unix/Linux systems. It brings a few noticeable advantages over well known SSH connections. In brief, it’s faster and more responsive, especially on long delay and/or unreliable links.
Key benefits of Mosh
-Stays connected if your IP is changed.
-Keeps session after loosing connection
-No root rights needed to use Mosh.
-The same credentials for remote login
-Responsive Ctrl+C combination.
-Better for slow or lagged links.
#daily_linux_tips
------------------------------------------------
Mosh (stands for Mobile Shell) is replacement of SSH for remote connections to Unix/Linux systems. It brings a few noticeable advantages over well known SSH connections. In brief, it’s faster and more responsive, especially on long delay and/or unreliable links.
Key benefits of Mosh
-Stays connected if your IP is changed.
-Keeps session after loosing connection
-No root rights needed to use Mosh.
-The same credentials for remote login
-Responsive Ctrl+C combination.
-Better for slow or lagged links.
#daily_linux_tips
Yes we take command line very seriously (:
Quit Bash Shell Without Saving Bash History (5 Methods)
------------------------------------------------
Sometimes it is very useful to delete / remove Bash history partially or completely when log out. Here is my favourite methods howto log out / quit / exit Bash shell without saving Bash history.
1. Quit Bash Shell Without Saving History: Unset HISTFILE
$ unset HISTFILE && exit
2. Quit Bash Shell Without Saving History: Kill Console
$ kill -9 $$
3. Quit Bash Shell Without Saving History: Clear History Option
$ history -c && exit
4. Quit Bash Shell Without Saving History: Set HISTSIZE to 0 (zero)
$ HISTSIZE=0 && exit
5. Quit Bash Shell Without Saving History: Delete HISTFILE and Unset HISTFILE
$ rm -f $HISTFILE && unset HISTFILE && exit
------------------------------------------------
Sometimes it is very useful to delete / remove Bash history partially or completely when log out. Here is my favourite methods howto log out / quit / exit Bash shell without saving Bash history.
1. Quit Bash Shell Without Saving History: Unset HISTFILE
$ unset HISTFILE && exit
2. Quit Bash Shell Without Saving History: Kill Console
$ kill -9 $$
3. Quit Bash Shell Without Saving History: Clear History Option
$ history -c && exit
4. Quit Bash Shell Without Saving History: Set HISTSIZE to 0 (zero)
$ HISTSIZE=0 && exit
5. Quit Bash Shell Without Saving History: Delete HISTFILE and Unset HISTFILE
$ rm -f $HISTFILE && unset HISTFILE && exit
Channel name was changed to «tabrizlug.ir-gnu/linux-unix»
Using grep to find string in files
------------------------------------------------
search for a string called ‘redeem reward’ in all text (*.txt) files located in /home/tom/ directory, use:
$ grep "redeem reward" /home/tom/*.txt
OR
$ grep "redeem reward" ~/*.txt
You can search for a text string all files under each directory, recursively with -r option:
$ grep -r "redeem reward" /home/tom/
OR
$ grep -R "redeem reward" /home/tom/
By default, the grep command prints the matching lines. You can pass -H option to print the filename for each match:
$ grep -H -r "redeem reward" /home/tom
To just display the filename use the cut command as follows:
$ grep -H -R vivek /etc/* | cut -d: -f1
The grep command shows output on a separate line, and it is preceded by the name of the file in which it was found in the case of multiple files. You can pass the -h option to suppress inclusion of the file names in the output:
$ grep -h -R 'main()' ~/projects/*.c
You can select only those lines containing matches that form whole words using the -w option. In this example, search for word ‘getMyData()’ only in ~/projects/ dirctory:
$ grep -w -R 'getMyData()' ~/projects/
Search for two or more words
Use the egrep command as follows:
$ egrep -w -R 'word1|word2' ~/projects/
Pass the —color option to the grep command display matched text/words in color on the terminal:
$grep —color -R 'word' /path/to/dir
#daily_linux_tips #linux #lx_learning #lx_commands
------------------------------------------------
search for a string called ‘redeem reward’ in all text (*.txt) files located in /home/tom/ directory, use:
$ grep "redeem reward" /home/tom/*.txt
OR
$ grep "redeem reward" ~/*.txt
You can search for a text string all files under each directory, recursively with -r option:
$ grep -r "redeem reward" /home/tom/
OR
$ grep -R "redeem reward" /home/tom/
By default, the grep command prints the matching lines. You can pass -H option to print the filename for each match:
$ grep -H -r "redeem reward" /home/tom
To just display the filename use the cut command as follows:
$ grep -H -R vivek /etc/* | cut -d: -f1
The grep command shows output on a separate line, and it is preceded by the name of the file in which it was found in the case of multiple files. You can pass the -h option to suppress inclusion of the file names in the output:
$ grep -h -R 'main()' ~/projects/*.c
You can select only those lines containing matches that form whole words using the -w option. In this example, search for word ‘getMyData()’ only in ~/projects/ dirctory:
$ grep -w -R 'getMyData()' ~/projects/
Search for two or more words
Use the egrep command as follows:
$ egrep -w -R 'word1|word2' ~/projects/
Pass the —color option to the grep command display matched text/words in color on the terminal:
$grep —color -R 'word' /path/to/dir
#daily_linux_tips #linux #lx_learning #lx_commands