Compare commits

..

No commits in common. "5f8444331ad3ef053daf5179528a481bec2cee23" and "121f806ff0ad61ec63785ff0806b595f8a397a12" have entirely different histories.

3 changed files with 5 additions and 94 deletions

View File

@ -1,6 +1,6 @@
### Influx1.x
- `unflux` - подключиться (`influx -ssl -host influx.mcarov.pro`)
- `unflux` - подключиться
- `show databases` - список бд
- `create database <db>` - создать бд
- `drop database <db>` - удалить бд
@ -30,20 +30,6 @@
- `influxd backup -database mydb /path/to/backup` - резервное копирование бд
- `influxd restore -database mydb /path/to/backup` - восстановление бд
#### HTTPS
- `influxdb.conf`
```conf
[http]
# Determines whether HTTP endpoint is enabled.
# enabled = true
enabled = true
bind-address = ":8086"
https-enabled = true
https-certificate = "/etc/letsencrypt/live/influx.mcarov.pro/fullchain.pem"
https-private-key = "/etc/letsencrypt/live/influx.mcarov.pro/privkey.pem"
```
### Influx2.x
- `SHOW BUCKETS` - показать список бакетов

View File

@ -1,77 +0,0 @@
### Установка
```bash
sudo apt update && sudo apt install fail2ban -y
```
### Настройка
```bash
# рекомендуется, но необязательно
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
```
- `vi /etc/fail2ban/jail.local`
```bash
[DEFAULT]
ignoreip = 127.0.0.1/8 ::1
[sshd]
enabled = true
port = 10001
#Для Debian добавить:
#backend = systemd
# Если в течении 24 часов
findtime = 86400
# произведено 3 неудачных попытки логина,
maxretry = 3
# то банить IP навсегда.
bantime = -1
[nginx-bad-request]
enabled = true
port = http,https
filter = nginx-bad-request
logpath = /var/log/nginx/*access.log
maxretry = 3
findtime = 5m
bantime = 24h
[nginx-http-auth]
enabled = true
port = http,https
filter = nginx-http-auth
logpath = /var/log/nginx/*error.log
maxretry = 3
findtime = 5m
bantime = 24h
[nginx-botsearch]
enabled = true
port = http,https
filter = nginx-botsearch
logpath = /var/log/nginx/*access.log
maxretry = 5
findtime = 10m
bantime = 24h
[nginx-limit-req]
enabled = true
filter = nginx-limit-req
logpath = /var/log/nginx/*error.log
maxretry = 100
findtime = 30
bantime = 24h
```
- Проверка
```bash
fail2ban-server -t
fail2ban-client reload
fail2ban-client status
fail2ban-client status sshd # Статус защиты SSH
fail2ban-client status nginx-bad-reauest
fail2ban-client status nginx-botsearch
fail2ban-client status nginx-http-auth
fail2ban-client status nginx-limit-req
tail -f /var/log/fail2ban.log
```

View File

@ -1,7 +1,9 @@
### Разное
- `haproxy -f /etc/haproxy/haproxy.cfg -c` - тестируем
- `systemctl reload haproxy` - применяем
```bash
haproxy -f /etc/haproxy/haproxy.cfg -c - тестируем
systemctl reload haproxy - применяем
```
---