@Sevastoporn

Как получить сертификат Let's Encrypt для FTP и какие порты необходимо открыть?

FTP сервер снаружи имеет домен ftp.mydomain.ru с открытыми портами 20-21 и 45000-46000, все остальные порты закрыты.

При выполнении команды:
certbot certonly --standalone --agree-tos --email ftp@mydomain.ru -d ftp.mydomain.ru


Выдает ошибку:
spoiler
Challenge failed for domain ftp.mydomain.ru
http-01 challenge for ftp.mydomain.ru
Cleaning up challenges
Some challenges have failed.

IMPORTANT NOTES:
- The following errors were reported by the server:

Domain: ftp.mydomain.ru
Type: connection
Detail: Fetching
ftp.mydomain.ru/.well-known/acme-challenge/hfENwda...
Timeout during connect (likely firewall problem)

To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.


DNS запись типа А есть и ftp.mydomain.ru при этом резолвится нормально.

Правильно ли составлена команда получения сертификата для FTP?
Обязательно ли открывать 80 и 443 порты?
  • Вопрос задан
  • 768 просмотров
Пригласить эксперта
Ответы на вопрос 2
sashkets
@sashkets
Прекратил отвечать после 24.02.2022
у меня днс на claudflare, поэтому я добавил плагин клауда к сертботу

pip install certbot-dns-cloudflare --user

certbot plugins
* dns-cloudflare

* nginx

* standalone

* webroot

Теперь в /etc/letsencrypt создадим файл cloudflare.ini в котором укажем

dns_cloudflare_email = admin@domain.tld
dns_cloudflare_api_key = fr1sdeq2bf7621be94ca37c777859ee

certbot certonly --dns-cloudflare --dns-cloudflare-credentials /etc/letsencrypt/cloudflare.ini -d domain.tld -d "*.domain.tld"

серт получен, ну а далее дело техники

написано по мотивам https://4admin.info/automatically-renews-letsencry...
Ответ написан
Комментировать
@Psypianino
Обязательно ли открывать 80?
Открой 80 порт, получишь валидный сертификат. Закроешь порт.
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы