This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| netstat -ntu | awk ' $5 ~ /^(::ffff:|[0-9|])/ { gsub("::ffff:","",$5); print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | awk '{if ($1 > 100) {print }}' | |
| netstat -ntu | grep 'XX.XX.XX.XX' | awk ' $5 ~ /^(::ffff:|[0-9|])/ { gsub("::ffff:","",$4); print $4}' | cut -d: -f1 | sort | uniq -c | sort -nr | less |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| import logging.handlers | |
| import logging.config | |
| conf = { | |
| "version": 1, | |
| "disable_existing_loggers": False, | |
| "formatters": { | |
| "syslog": { | |
| "format": "__test__ %(asctime)s %(levelname)-8s %(message)s" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| prlimit --nofile --core --pid 3587 | |
| prlimit --nofile --core --pid 3971 | |
| prlimit --pid 3587 -n3000:6000 | |
| prlimit --pid 3587 -n3000:4096 | |
| rabbitmq soft nofile 3000 | |
| rabbitmq hard nofile 4096 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apt-get install git | |
| cd /opt | |
| git clone https://github.com/certbot/certbot | |
| /opt/certbot/letsencrypt-auto certonly -d *.domain.ru -m webmaster@domain.ru --server https://acme-v02.api.letsencrypt.org/directory --manual | |
| dig -t txt _acme-challenge.domain.ru | |
| https://wiki.yola.ru/letsencrypt:wildcard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| systemctl reset-failed -remove failed jobs | |
| systemctl list-units |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RABBITMQ_NODE_PORT=5672 RABBITMQ_SERVER_START_ARGS="-rabbitmq_management listener [{port,15672}]" RABBITMQ_NODENAME=shared rabbitmq-server -detached | |
| RABBITMQ_NODE_PORT=5674 RABBITMQ_SERVER_START_ARGS="-rabbitmq_management listener [{port,15674}]" RABBITMQ_NODENAME=calls rabbitmq-server -detached |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Контакты | |
| Блог | |
| Первая | |
| Настройка Linux для высоконагруженных проектов и защиты от DDoS | |
| // Декабрь 16, 2013 | 48627 просмотров | комментариев (1) | |
| В Интернете довольно много разных примеров конфигурации ядра Linux для поддержания большого количества соединений, высоконагруженных веб проектов и противодействия DDoS-атакам. Вот ещё один из примеров, что я уже смог попробовать на практике. Скажу сразу — мне более чем помогло. Попробуйте и вы. | |
| Вот опции, что необходимо добавить в конец /etc/sysctl.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh-keygen -t rsa -b 4096 -C "your_email@example.com" -f $HOME/.ssh/id_rsa | |
| ssh-keygen -t ed25519 -C "your_email@example.com" -f $HOME/.ssh/id_rsa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ~/.ssh/config: | |
| ```Host <resource name>-beta | |
| HostName <Private IP> | |
| ProxyCommand ssh <user>@<bastion or nat> nc -w 1 $(echo %h | cut -d%% -f1) 22``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ##iptables -t nat -A PREROUTING -p tcp -m multiport --dports 3390 -j DNAT --to-destination 192.168.0.2:3389 | |
| ##iptables -t nat -A POSTROUTING -s 192.168.0.0/24 ! -d 192.168.0.0/24 -j MASQUERADE |