diff --git a/README.md b/README.md index 25342d9..186da34 100644 --- a/README.md +++ b/README.md @@ -506,9 +506,93 @@ systemctl restart ssh # Настройки UFW +UFW - Ubuntu Firewall + ## Редактирование файла приложения OpenSSH-Server + +**Шаг 1:** Перейти в каталог `/etc/ufw/applications.d/` - тут хранятся файлы политик UFW для приложений +```bash +cd /etc/ufw/applications.d/ +``` +**Шаг 2:** Получить список файлов и катологов в каталоге `/etc/ufw/applications.d/` +```bash +ls -la +``` +
+ Список файлов и катологов в каталоге `/etc/ufw/applications.d/` + +```bash +total 20 +drwxr-xr-x 2 root root 4096 Oct 7 10:05 . +drwxr-xr-x 3 root root 4096 Oct 7 09:51 .. +-rw-r--r-- 1 root root 147 Oct 7 09:57 openssh-server +``` + +
+ +**Шаг 3** Изменить файл конфигурации для OpenSSH-Server +```bash +nano openssh-server +``` +
+ Содержимое файла `/etc/ufw/applications.d/openssh-server` + +```ini +[OpenSSH] +title=Secure shell server, an rshd replacement +description=OpenSSH is a free implementation of the Secure Shell protocol. +ports=22/tcp +``` + +
+ +**Шаг 4** Изменить порт на порт указанный в [Окончательное редактирование конфигурации OpenSSH](#окончательное-редактирование-конфигурации-openssh) - в инструкции - это порт 2222 +```ini +[OpenSSH] +title=Secure shell server, an rshd replacement +description=OpenSSH is a free implementation of the Secure Shell protocol. +ports=2222/tcp +``` +> Сохранить изменения `Ctrl+X` -> `Y` -> `Enter` + ## Создание файла приложения HTTP + +**Шаг 1** Созда файл конфигурации для HTTP +```bash +nano http-server +``` +> Дописать к http слово server через дефис обязательно + +**Шаг 2** Создать инструкцию в файле +```ini +[HTTP] +title=Hyper Text Transport Protocol +description=Hyper Text Transport Protocol +ports=80 +``` + +> Сохранить изменения `Ctrl+X` -> `Y` -> `Enter` + + ## Создание файла приложения HTTPS + +**Шаг 1** Созда файл конфигурации для HTTPS +```bash +nano https-server +``` +> Дописать к https слово server через дефис обязательно + +**Шаг 2** Создать инструкцию в файле +```ini +[HTTPS] +title=Hyper Text Transport Protocol Secure +description=Hyper Text Transport Protocol Secure +ports=443 +``` + +> Сохранить изменения `Ctrl+X` -> `Y` -> `Enter` + + ## Настройка и запуск UFW ## UFW и Docker - особенности ## Настройки fail2ban