{"id":366385,"date":"2024-05-21T02:58:14","date_gmt":"2024-05-21T02:58:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=366385"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=366385","title":{"rendered":"<span>\u041f\u0440\u043e\u0435\u043a\u0442 \u044e\u043d\u043e\u0433\u043e DevOps \u0413\u043b\u0430\u0432\u0430 2: \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0446\u0435\u043d\u0442\u0440\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9c3\/0a1\/f3a\/9c30a1f3a333a32f03de9d3d931284c5.png\" width=\"1440\" height=\"816\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9c3\/0a1\/f3a\/9c30a1f3a333a32f03de9d3d931284c5.png\"\/><\/figure>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u043e\u043f\u0438\u0441\u0430\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e pet-\u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0435\u0433\u043e \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430 \u0432 DevOps:<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/781746\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0413\u043b\u0430\u0432\u0430 1: \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0441\u0442\u0435\u043d\u0434\u0430<\/strong><\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/789056\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0413\u043b\u0430\u0432\u0430 2: \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0446\u0435\u043d\u0442\u0440\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/strong><\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/783304\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0413\u043b\u0430\u0432\u0430 3: \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 OpenVPN<\/strong><\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/783572\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0413\u043b\u0430\u0432\u0430 4: \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430<\/strong><\/a><\/p>\n<blockquote>\n<p>\u0414\u0440\u0443\u0437\u044c\u044f, \u0445\u043e\u0447\u0443 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043e\u0431 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 DevOps &#8212; Terraform, Ansible, Kubernetes, GitLab CI\/CD \u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0433\u043b\u0430\u0441\u0435\u043d \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e DevOps \u0431\u0435\u0437 \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u0442.<\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0435\u0440\u0438\u044f \u0441\u0442\u0430\u0442\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0432 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 DevOps \u0438 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d. \u0417\u0434\u0435\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0430\u043a\u0446\u0435\u043d\u0442 \u0441\u0434\u0435\u043b\u0430\u043d \u043d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432. \u0426\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u043e\u0433\u043e pet-\u043f\u0440\u043e\u0435\u043a\u0442\u0430 &#8212; \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0441 Linux \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 DevOps &#8212; \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u00ab\u041f\u0440\u043e\u0435\u043a\u0442\u00a0<strong>\u044e\u043d\u043e\u0433\u043e<\/strong>\u00a0DevOps\u00bb. \u0412 \u043f\u043b\u0430\u043d\u0430\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u0443\u0436\u0435 \u0441 \u0443\u0433\u043b\u0443\u0431\u043b\u0435\u043d\u0438\u0435\u043c \u0432 DevOps \u0438 \u0435\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b.<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0442\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e. \u041f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043c\u043e\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u043d\u0438\u0435, \u0432\u0441\u0435\u043c \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0434\u043d\u044f!<\/p>\n<\/blockquote>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0446\u0435\u043d\u0442\u0440\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 (CA)<\/h2>\n<p>Easy-RSA &#8212; \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438 \u0432 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 (<abbr class=\"habraabbr\" title=\"Public Key Infrastructure\" data-title=\"&lt;p>Public Key Infrastructure&lt;\/p>&#187; data-abbr=&#187;PKI&#187;>PKI<\/abbr>). \u041e\u043d \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 VPN, \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 OpenVPN, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u0417\u0430\u0439\u0434\u0435\u043c \u043d\u0430 vm \u00abca\u00bb \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 Easy-RSA \u0432\u0435\u0440\u0441\u0438\u0438 3.8.0:<\/p>\n<pre><code class=\"bash\">sudo apt-get update sudo apt-get install -y easy-rsa=3.0.8-1ubuntu1<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u043c\u0435\u0442\u043a\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Easy-RSA \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.  <\/p>\n<\/div>\n<\/details>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e Easy-RSA \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u044e\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043f\u0440\u0430\u0432\u0430 \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">sudo cp -r \/usr\/share\/easy-rsa \/home\/nikolay\/ sudo chown -R nikolay:nikolay ~\/easy-rsa\/ sudo chmod -R 700 easy-rsa\/<\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c Easy-RSA, \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0432 \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u00ab<em>~\/easy-rsa\/vars.example<\/em>\u00bb:<\/p>\n<pre><code class=\"bash\">s\u0441t_var EASYRSA_REQ_COUNTRY     \"RUS\" set_var EASYRSA_REQ_PROVINCE    \"Moscow\" set_var EASYRSA_REQ_CITY        \"Moscow City\" set_var EASYRSA_REQ_ORG         \"Justnikobird\" set_var EASYRSA_REQ_EMAIL       \"justnikobird@yandex.ru\" set_var EASYRSA_REQ_OU          \"LLC\" set_var EASYRSA_ALGO            ec set_var EASYRSA_DIGEST          \"sha512\"<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 (Public Key Infrastructure):<\/p>\n<pre><code class=\"bash\">cd ~\/easy-rsa mv vars.example vars .\/easyrsa init-pki<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">Note: using Easy-RSA configuration from: \/home\/nikolay\/easy-rsa\/vars  init-pki complete; you may now create a CA or requests. Your newly created PKI dir is: \/home\/nikolay\/easy-rsa\/pki<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e\u00a0\u00ab<em>\/home\/nikolay\/easy-rsa\/pki<\/em>\u00bb, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432\u0441\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043a\u043b\u044e\u0447\u0438.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447\u0438 \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0435\u0433\u043e \u0446\u0435\u043d\u0442\u0440\u0430:<\/p>\n<pre><code>.\/easyrsa build-ca<\/code><\/pre>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442 \u0443 \u043d\u0430\u0441 \u0432\u0432\u0435\u0441\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 ca \u0438 \u0438\u043c\u044f \u043d\u043e\u0432\u043e\u0433\u043e ca:<\/p>\n<pre><code class=\"bash\">Note: using Easy-RSA configuration from: \/home\/nikolay\/easy-rsa\/vars Using SSL: openssl OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)  Enter New CA Key Passphrase: ******* Re-Enter New CA Key Passphrase: ******* read EC key writing EC key You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Common Name (eg: your user, host, or server name) [Easy-RSA CA]:  CA creation complete and you may now import and sign cert requests. Your new CA certificate file for publishing is at: \/home\/nikolay\/easy-rsa\/pki\/ca.crt<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0434\u0432\u0430 \u0444\u0430\u043b\u0430:<\/p>\n<ul>\n<li>\n<p><em>\/home\/nikolay\/easy-rsa\/pki\/ca.crt<\/em>\u00a0&#8212; \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447;<\/p>\n<\/li>\n<li>\n<p><em>\/home\/nikolay\/easy-rsa\/pki\/private\/ca.key<\/em>\u00a0&#8212; \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u043e\u0434\u043e\u0431\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 vm, \u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0441\u0442\u0440\u043e\u0436\u0430\u0439\u0448\u0435\u043c \u0441\u0435\u043a\u0440\u0435\u0442\u0435.<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0438 \u043a\u0430\u043a\u0443\u044e \u0440\u043e\u043b\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 CA \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u00ab<a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/752270\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c TLS \u043f\u043e \u0431\u0430\u0439\u0442\u0430\u043c. \u041a\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u044d\u0442\u043e\u0442 HTTPS?<\/strong><\/a>\u00bb<\/p>\n<p><a class=\"anchor\" name=\"issue\" id=\"issue\"><\/a><\/p>\n<h3>\u0412\u044b\u043f\u0443\u0441\u043a \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442<\/h3>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 &#8212; \u044d\u0442\u043e \u0434\u0432\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0442\u0438, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 SSL\/TLS \u0434\u043b\u044f \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0441\u0445\u043e\u0436\u0438: \u043e\u0431\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447, \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0446\u0435\u043d\u0442\u0440\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u043d\u044b\u043c \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u0438 \u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0432 \u0440\u043e\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0435\u0441\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 TLS. \u0421\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u043e DNS-\u0438\u043c\u0435\u043d\u0438 \u0432 \u043f\u043e\u043b\u0435 SAN, \u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0446\u0435\u043d\u0442\u0440\u043e\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<h4>\u0412\u044b\u043f\u0443\u0441\u043a \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h4>\n<p>\u0414\u043b\u044f \u0432\u044b\u043f\u0443\u0441\u043a\u0430 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u00abexample.justnikobird.ru\u00bb, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<pre><code class=\"bash\">cd ~\/easy-rsa .\/easyrsa gen-req example.justnikobird.ru nopass .\/easyrsa sign-req server example.justnikobird.ru<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<ul>\n<li>\n<p><em>~\/easy-rsa\/pki\/issued\/example.justnikobird.ru.crt<\/em>\u00a0&#8212; \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442;<\/p>\n<\/li>\n<li>\n<p><em>~\/easy-rsa\/pki\/private\/example.justnikobird.ru.key &#8212;\u00a0<\/em>\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0412\u044b\u043f\u0443\u0441\u043a \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/h4>\n<p>\u0414\u043b\u044f \u0432\u044b\u043f\u0443\u0441\u043a\u0430 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<pre><code class=\"bash\">cd ~\/easy-rsa .\/easyrsa gen-req example nopass .\/easyrsa sign-req client example<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<ul>\n<li>\n<p><em>~\/easy-rsa\/pki\/issued\/example.crt<\/em>\u00a0&#8212; \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442<\/p>\n<\/li>\n<li>\n<p><em>~\/easy-rsa\/pki\/private\/example.key &#8212;\u00a0<\/em>\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447<\/p>\n<\/li>\n<\/ul>\n<p>\u0426\u0435\u043d\u0442\u0440 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0431\u0435\u0440\u0435\u043c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u0443\u044e \u043d\u0430\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0432 deb-\u043f\u0430\u043a\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u043d\u044f\u043b \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<h3>\u0421\u0431\u043e\u0440\u043a\u0430 deb-\u043f\u0430\u043a\u0435\u0442\u0430 Easy-RSA<\/h3>\n<p>\u0412\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0431\u043e\u0440\u043a\u0438 \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u00ab<a href=\"https:\/\/habr.com\/ru\/articles\/783076\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 DEB-\u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438<\/strong><\/a>\u00bb.<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043c\u0435\u0447\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438:<\/p>\n<p>\u0424\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u043f\u0430\u043a\u0435\u0442\u0435:<\/p>\n<pre><code>\/home\/nikolay\/easy-rsa<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>install<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">easy-rsa\/ usr\/share<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>control<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">Source: easy-rsa-lab Section: unknown Priority: optional Maintainer: Nikolay &lt;justnikobird@yandex.ru> Build-Depends: debhelper-compat (= 13) Standards-Version: 4.6.0 Homepage: https:\/\/github.com\/OpenVPN\/easy-rsa #Vcs-Browser: https:\/\/salsa.debian.org\/debian\/just-easy-rsa #Vcs-Git: https:\/\/salsa.debian.org\/debian\/just-easy-rsa.git Rules-Requires-Root: no  Package: easy-rsa-lab Architecture: all Depends: easy-rsa Recommends: opensc Description: &lt;insert up to 60 chars description>  &lt;insert long description, indented with spaces><\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043d\u0435\u0442.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u043f\u0430\u043a\u0435\u0442 \u00ab<strong><em>easy-rsa-lab_0.1-1_all.deb<\/em><\/strong>\u00bb.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u043a\u0443\u0434\u0430 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043d\u0430\u0448 \u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u043a\u0435\u0442.<\/p>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c!<\/p>\n<hr\/>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/h2>\n<p>\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 &#8212; \u044d\u0442\u043e \u0430\u0440\u0445\u0438\u0432\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c. \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0432 \u043d\u0451\u043c \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0445\u0441\u044f, \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u0439, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u043f\u0440\u043e\u0447\u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0441\u0442\u0435\u043d\u0434\u0430 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432\u0441\u0435 \u043f\u0430\u043a\u0435\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0441\u043e\u0431\u0435\u0440\u0435\u043c.<\/p>\n<p>Aptly &#8212; \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 \u0434\u043b\u044f Debian-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Ubuntu. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Aptly<\/h3>\n<p>\u0417\u0430\u0439\u0434\u0435\u043c \u043d\u0430 vm \u00abrepo\u00bb \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c bash-\u0441\u043a\u0440\u0438\u043f\u0442 \u00abvm-start.sh\u00bb.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u0441 Aptly, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043f\u0430\u043a\u0435\u0442\u0430 \u00abbzip2\u00bb:<\/p>\n<pre><code class=\"bash\">sudo apt-get install -y bzip2<\/code><\/pre>\n<p>\u0421\u043a\u0430\u0447\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0432 \u0441 Aptly \u0432\u0435\u0440\u0441\u0438\u0438 1.5.0 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043d\u0430 GitHub \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u044e\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u0443\u0435\u043c \u0435\u0433\u043e:<\/p>\n<pre><code class=\"bash\">wget -P ~\/ https:\/\/github.com\/aptly-dev\/aptly\/releases\/download\/v1.5.0\/aptly_1.5.0_linux_amd64.tar.gz tar xvf ~\/aptly_1.5.0_linux_amd64.tar.gz<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u043c\u0435\u0442\u043a\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Aptly \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. <\/p>\n<\/div>\n<\/details>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u00ab<em>\/usr\/local\/bin<\/em>\u00bb:<\/p>\n<pre><code class=\"bash\">sudo cp ~\/aptly_1.5.0_linux_amd64\/aptly \/usr\/local\/bin\/<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u00ab<em>\/etc\/aptly.conf<\/em>\u00bb \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u00abroot\u00bb \u0438 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<pre><code class=\"bash\">{   \"rootDir\": \"\/opt\/aptly\",   \"downloadConcurrency\": 4,   \"downloadSpeedLimit\": 0,   \"architectures\": [\"all\"],   \"dependencyFollowSuggests\": false,   \"dependencyFollowRecommends\": false,   \"dependencyFollowAllVariants\": false,   \"dependencyFollowSource\": false,   \"dependencyVerboseResolve\": false,   \"gpgDisableSign\": false,   \"gpgDisableVerify\": false,   \"gpgProvider\": \"gpg\",   \"downloadSourcePackages\": true,   \"skipLegacyPool\": true,   \"ppaDistributorID\": \"ubuntu\",   \"ppaCodename\": \"\",   \"FileSystemPublishEndpoints\": {     \"lab\": {       \"rootDir\": \"\/var\/www\/aptly\",       \"linkMethod\": \"symlink\",       \"verifyMethod\": \"md5\"     }   },   \"enableMetricsEndpoint\": false }<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p><strong>rootDir:<\/strong>\u00a0\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c Aptly \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p><strong>downloadConcurrency:\u00a0<\/strong>\u0417\u0430\u0434\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u043f\u0440\u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432.<\/p>\n<p><strong>downloadSpeedLimit:\u00a0<\/strong>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 (\u0432 \u0431\u0430\u0439\u0442\u0430\u0445 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443). \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0432 0 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p><strong>architectures:<\/strong>\u00a0\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 Aptly \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, &#171;all&#187;).<\/p>\n<p><strong>dependencyFollowSuggests, dependencyFollowRecommends, dependencyFollowAllVariants, dependencyFollowSource:<\/strong>\u00a0\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u0442\u0435\u043c, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043b\u0438 Aptly \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u043e\u043b\u044f\u0445 Suggests, Recommends, Variants \u0438 Source.<\/p>\n<p><strong>dependencyVerboseResolve:\u00a0<\/strong>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442<strong>\u00a0<\/strong>\u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0445 \u043b\u043e\u0433\u043e\u0432 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p><strong>gpgDisableSign, gpgDisableVerify:\u00a0<\/strong>\u041e\u043f\u0446\u0438\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0438\u043b\u0438 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e GPG.<\/p>\n<p><strong>gpgProvider:\u00a0<\/strong>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 GPG, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p><strong>downloadSourcePackages:\u00a0<\/strong>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b.<\/p>\n<p><strong>skipLegacyPool:\u00a0<\/strong>\u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0440\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0443\u043b\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432.<\/p>\n<p><strong>ppaDistributorID, ppaCodename:\u00a0<\/strong>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 (Distributor ID) \u0438 \u043a\u043e\u0434\u043e\u0432\u043e\u043c \u0438\u043c\u0435\u043d\u0438 (Codename) \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 PPA (Personal Package Archive).<\/p>\n<p><strong>FileSystemPublishEndpoints:\u00a0<\/strong>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u00ablab\u00bb, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043d\u0430 \u00ab<em>\/var\/www\/aptly<\/em>\u00bb.<\/p>\n<p><strong>enableMetricsEndpoint:\u00a0<\/strong>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043f\u0443\u043d\u043a\u0442 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430.<\/p>\n<\/div>\n<\/details>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u00ablab\u00bb:<\/p>\n<pre><code class=\"bash\">sudo aptly repo create -comment=\"lab repo\" -component=\"main\" -distribution=\"focal\" lab<\/code><\/pre>\n<p><a class=\"anchor\" name=\"repo_upload\" id=\"repo_upload\"><\/a><\/p>\n<p>\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043c \u043f\u0430\u043a\u0435\u0442 \u00ab<em>easy-rsa-lab_0.1-1_all.deb\u00bb<\/em>\u00a0\u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u044e\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e vm \u00abrepo\u00bb \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/p>\n<pre><code class=\"bash\">sudo aptly repo add lab ~\/easy-rsa-lab_0.1-1_all.deb<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u043f\u0430\u043a\u0435\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SCP (Windows)<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 vm, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u043f\u0430\u043a\u0435\u0442\u0430 \u0441 vm \u00abca\u00bb \u043d\u0430 vm \u00abrepo\u00bb.<\/p>\n<p>\u0421\u043a\u0430\u0447\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442 \u0441 vm \u00abca\u00bb:<\/p>\n<pre><code class=\"bash\">scp -P 1870 nikolay@ca:\/home\/nikolay\/deb\/easy-rsa-lab_0.1-1_all.deb .<\/code><\/pre>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043f\u0430\u043a\u0435\u0442 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u044e\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e vm \u00abrepo\u00bb:<\/p>\n<pre><code class=\"bash\">scp -P 1870 easy-rsa-lab_0.1-1_all.deb nikolay@repo:\/home\/nikolay\/<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438 \u0444\u0430\u0439\u043b\u0430 \u0438\u0437 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u00abrealpath\u00bb:<\/p>\n<pre><code class=\"bash\">realpath easy-rsa-lab_0.1-1_all.deb<\/code><\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434:<\/p>\n<pre><code class=\"bash\">\/home\/nikolay\/deb\/easy-rsa-lab_0.1-1_all.deb<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430\u043c \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">sudo aptly repo list<\/code><\/pre>\n<ul>\n<li>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">sudo aptly publish list<\/code><\/pre>\n<ul>\n<li>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u00ablab\u00bb:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">sudo aptly repo show -with-packages lab<\/code><\/pre>\n<ul>\n<li>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0430\u043a\u0435\u0442\u0435 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u00abeasy-rsa-lab_0.1-1_all.deb\u00bb:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">sudo aptly package show easy-rsa-lab_0.1-1_all<\/code><\/pre>\n<ul>\n<li>\n<p>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u00ablab\u00bb:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">sudo aptly repo drop lab<\/code><\/pre>\n<p>\u0421\u043d\u044f\u0442\u0438\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0441 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u00ablab\u00bb:<\/p>\n<pre><code class=\"bash\">sudo aptly publish drop focal filesystem:lab:lab <\/code><\/pre>\n<ul>\n<li>\n<p>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u0430 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u00abeasy-rsa-lab_0.1-1_all.deb\u00bb:<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"bash\">sudo aptly repo remove lab easy-rsa-lab_0.1-1_all<\/code><\/pre>\n<h4>\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432<\/h4>\n<p>\u0414\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f gpg-\u043a\u043b\u044e\u0447. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0430\u0431\u043e\u0440 \u0443\u0442\u0438\u043b\u0438\u0442 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0432 \u044f\u0434\u0440\u0435:<\/p>\n<pre><code class=\"bash\">sudo apt-get install -y rng-tools<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0443\u0442\u0438\u043b\u0438\u0442\u0443:<\/p>\n<pre><code class=\"bash\">sudo rngd -r \/dev\/urandom<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043b\u044e\u0447:<\/p>\n<pre><code class=\"bash\">sudo gpg --default-new-key-algo rsa4096 --gen-key --keyring pubring<\/code><\/pre>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 \u0438\u043c\u044f \u0438 email.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043e\u043a\u043d\u043e \u0432\u0432\u043e\u0434\u0430 \u043f\u0430\u0440\u043e\u043b\u044f \u0434\u043b\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430. \u041f\u0440\u0438\u0434\u0443\u043c\u0430\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0438 \u0432\u0432\u0435\u0434\u0435\u043c \u0435\u0433\u043e \u0434\u0432\u0430\u0436\u0434\u044b.<\/p>\n<p>\u041a\u043b\u044e\u0447 \u0441\u043e\u0437\u0434\u0430\u043d, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"bash\">sudo gpg --list-keys<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u0443\u044e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u00ablab\u00bb:<\/p>\n<pre><code class=\"bash\">sudo aptly publish repo lab filesystem:lab:lab<\/code><\/pre>\n<p>\u041f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043e\u043a\u043d\u043e \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430 \u043f\u0430\u0440\u043e\u043b\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0433\u043e gpg-\u043a\u043b\u044e\u0447\u0430.<\/p>\n<p>\u0414\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0431\u044b\u043b \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d \u043f\u0430\u043a\u0435\u0442.<\/p>\n<details class=\"spoiler\">\n<summary>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0431\u0430\u0437\u0443 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u0445 \u00ab<em>pool<\/em>\u00bb:<\/p>\n<pre><code class=\"bash\">sudo aptly publish update focal filesystem:lab:lab<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438, \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u00ab<em>\/var\/www\/aptly\/lab<\/em>\u00bb \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0434\u0432\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438:<\/p>\n<pre><code class=\"bash\">ls \/var\/www\/aptly\/lab dists  pool<\/code><\/pre>\n<p>\u0412 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u00ab<em>dists<\/em>\u00bb \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u0432. <\/p>\n<p>\u0412 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u00ab<em>pool<\/em>\u00bb \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0438\u043c\u043b\u0438\u043d\u043a\u0438 \u043d\u0430 \u0444\u0430\u0439\u043b\u044b \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u00ab<em>\/opt\/aptly<\/em>\u00bb).<\/p>\n<p>\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043c \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u044e\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e vm \u00abrepo\u00bb \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 CA.<\/p>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0430\u0448\u0438\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c, \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 gpg-\u043a\u043b\u044e\u0447 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 CA \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u00ab<em>\/var\/www\/aptly\/lab<\/em>\u00bb \u2014 \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code class=\"bash\">sudo gpg --export --armor | sudo tee \/var\/www\/aptly\/lab\/labtest.asc > \/dev\/null sudo cp ~\/ca.crt \/var\/www\/aptly\/lab\/<\/code><\/pre>\n<p>\u041c\u044b \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u0430\u043c, \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044e.<\/p>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Nginx<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044e \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f Nginx Web Server.<\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 Nginx:<\/p>\n<pre><code class=\"bash\">sudo apt-get update sudo apt-get install -y nginx<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043c <a href=\"#issue\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435<\/a> \u043d\u0430 CA \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f vm \u00abrepo\u00bb \u0432 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e Nginx:<\/p>\n<pre><code class=\"bash\">sudo cp ~\/repo.justnikobird.ru.crt \/etc\/nginx\/ sudo cp ~\/repo.justnikobird.ru.key \/etc\/nginx\/<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0445\u044d\u0448 \u043f\u0430\u0440\u043e\u043b\u044f \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f &#8212; \u0441\u043a\u0430\u0447\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u00abpassword\u00bb \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u00abadmin\u00bb:<\/p>\n<pre><code class=\"bash\">sudo apt-get install -y apache2-utils htpasswd -nbB -C 10 admin \"password\"<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u00ab<em>\/etc\/nginx\/conf.d\/.htpasswd<\/em>\u00bb \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.:<\/p>\n<pre><code class=\"bash\">admin:$2y$10$iWOlBiff2IDDovW2wy2SauStp7ahuHpOULM2W7yQ6JpNcbDKeBPYS<\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 Nginx \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u00ab<em>\/etc\/nginx\/sites-available\/default<\/em>\u00bb:<\/p>\n<pre><code class=\"bash\">server {         listen 1111 ssl default_server;         server_name repo.justnikobird.ru;         auth_basic              \"Restricted Access!\";         auth_basic_user_file    \/etc\/nginx\/conf.d\/.htpasswd;         ssl_certificate     repo.justnikobird.ru.crt;         ssl_certificate_key repo.justnikobird.ru.key;         ssl_protocols       TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;         ssl_ciphers         HIGH:!aNULL:!MD5;          root \/var\/www\/aptly;          location \/ {                 autoindex on;         } }  # nginx prometheus exporter server {         listen 8080;          location \/stub_status {                 stub_status;                 allow 127.0.0.1;                 deny all;         } }<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u043c\u0435\u0442\u043a\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Nginx \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 8080 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c.<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c Nginx \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a:<\/p>\n<pre><code class=\"bash\">sudo systemctl restart nginx.service sudo systemctl enable nginx.service<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u0441\u043f\u0440\u0430\u0432\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 Nginx:<\/p>\n<pre><code class=\"bash\">sudo systemctl status nginx.service<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u0441\u043f\u0440\u0430\u0432\u043d\u043e, \u0442\u043e \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 \u00abactive (running)\u00bb<\/p>\n<pre><code class=\"bash\">\u25cf nginx.service - A high performance web server and a reverse proxy server      Loaded: loaded (\/lib\/systemd\/system\/nginx.service; disabled; vendor preset: enabled)      Active: active (running) since Tue 2024-01-30 18:37:36 MSK; 2 weeks 0 days ago        Docs: man:nginx(8)    Main PID: 5562 (nginx)       Tasks: 2 (limit: 1013)      Memory: 100.8M         CPU: 32.199s      CGroup: \/system.slice\/nginx.service              \u251c\u25005562 \"nginx: master process \/usr\/sbin\/nginx -g daemon on; master_process on;\"              \u2514\u25005567 \"nginx: worker process\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"  Jan 30 18:37:36 2454768-justnikobird.twc1.net systemd[1]: nginx.service: Deactivated successfully. Jan 30 18:37:36 2454768-justnikobird.twc1.net systemd[1]: Stopped A high performance web server and a reverse proxy server. Jan 30 18:37:36 2454768-justnikobird.twc1.net systemd[1]: Starting A high performance web server and a reverse proxy server... Jan 30 18:37:36 2454768-justnikobird.twc1.net systemd[1]: Started A high performance web server and a reverse proxy server.<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 \u00abfailed\u00bb, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u043b\u043e\u0433\u0438:<\/p>\n<pre><code class=\"bash\">sudo journalctl -u nginx.service<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u043f\u043e\u0440\u0442\u044b \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u00abnetstat\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043f\u0430\u043a\u0435\u0442 \u00abnet-tools\u00bb:<\/p>\n<pre><code class=\"bash\">sudo apt-get install -y net-tools sudo netstat -lptun<\/code><\/pre>\n<p>\u0412 \u0432\u044b\u0432\u043e\u0434\u0435 \u0432\u0438\u0434\u043d\u043e, \u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 Nginx \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0440\u0442\u044b \u00ab8080\u00bb \u0438 \u00ab1111\u00bb:<\/p>\n<pre><code class=\"bash\">Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID\/Program name tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      54594\/nginx: master tcp        0      0 0.0.0.0:1111            0.0.0.0:*               LISTEN      54594\/nginx: master<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 iptables \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b, \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0445 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443:<\/p>\n<pre><code class=\"bash\">sudo iptables -L -v -n | grep 1111  ...  Chain INPUT (policy DROP 531K packets, 27M bytes)  pkts bytes target     prot opt in     out     source               destination   969 56172 ACCEPT     tcp  --  *      *       0.0.0.0\/0            0.0.0.0\/0            tcp dpt:1111 \/* repo_nginx *\/  ...  Chain OUTPUT (policy DROP 214 packets, 76866 bytes)  pkts bytes target     prot opt in     out     source               destination  631K 2580M ACCEPT     all  --  *      *       0.0.0.0\/0            0.0.0.0\/0            state RELATED,ESTABLISHED<\/code><\/pre>\n<p>\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442, \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u043e\u0442\u043a\u0440\u044b\u0442.<\/p>\n<\/div>\n<\/details>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 iptables<\/h3>\n<pre><code class=\"bash\">sudo iptables -A INPUT -p tcp --dport 1111 -j ACCEPT -m comment --comment repo_nginx<\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e iptables \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 iptables-persistent:<\/p>\n<pre><code class=\"bash\">sudo apt-get install -y iptables-persistent sudo service netfilter-persistent save<\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/h3>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u043f\u0435\u0440\u0435\u0439\u0434\u044f \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u00ab<a href=\"https:\/\/repo.justnikobird.ru:1111\/\" rel=\"noopener noreferrer nofollow\"><strong>https:\/\/repo.justnikobird.ru:1111<\/strong><\/a>\u00bb:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/27f\/900\/592\/27f900592a47e31bd1439e214ba2ed74.png\" width=\"667\" height=\"209\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/27f\/900\/592\/27f900592a47e31bd1439e214ba2ed74.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e3a\/8f4\/ba4\/e3a8f4ba4df4df433a8dca37ba3bdefd.png\" width=\"666\" height=\"253\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e3a\/8f4\/ba4\/e3a8f4ba4df4df433a8dca37ba3bdefd.png\"\/><\/figure>\n<p>\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u0430\u043a \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0441 \u043d\u043e\u0432\u043e\u0439 web-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\u0439?<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0427\u0442\u043e\u0431\u044b \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u0440\u0443\u0433\u0430\u043b\u0441\u044f \u043d\u0430 \u043d\u0430\u0448 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c CA \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u00abTrusted Root Certificate Authorities\u00bb \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.<\/p>\n<\/div>\n<\/details>\n<h3>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a Repo<\/h3>\n<p>\u0412 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0433\u0434\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044e, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u00ab<em>\/etc\/apt\/sources.list.d\/own_repo.list<\/em>\u00bb \u0438 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a repo:<\/p>\n<pre><code class=\"bash\">echo \"deb https:\/\/repo.justnikobird.ru:1111\/lab focal main\" | sudo tee -a \/etc\/apt\/sources.list.d\/own_repo.list > \/dev\/null<\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c https \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0432 \u0444\u0430\u0439\u043b\u0435 \u00ab<em>\/etc\/apt\/auth.conf<\/em>\u00bb \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u00abadmin\u00bb \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u00abpassword\u00bb:<\/p>\n<pre><code class=\"bash\">machine repo.justnikobird.ru:1111 login admin password password<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 iptables \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 iptables-persistent:<\/p>\n<pre><code class=\"bash\">sudo iptables -A OUTPUT -p tcp --dport 1111 -j ACCEPT -m comment --comment repo.justnikobird.ru sudo apt-get install -y iptables-persistent sudo service netfilter-persistent save<\/code><\/pre>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043a\u043b\u044e\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435:<\/p>\n<pre><code class=\"bash\">wget --no-check-certificate -P ~\/ https:\/\/admin:password@repo.justnikobird.ru:1111\/lab\/labtest.asc  sudo apt-key add ~\/labtest.asc<\/code><\/pre>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043e\u0442 CA \u0447\u0442\u043e\u0431\u044b \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441\u0447\u0438\u0442\u0430\u043b\u0441\u044f \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c:<\/p>\n<pre><code class=\"bash\">wget --no-check-certificate -P ~\/ https:\/\/admin:password@repo.justnikobird.ru:1111\/lab\/ca.crt sudo cp ~\/ca.crt \/usr\/local\/share\/ca-certificates\/ca.crt sudo update-ca-certificates<\/code><\/pre>\n<p>\u041e\u0431\u043d\u043e\u0432\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432:<\/p>\n<pre><code class=\"bash\">sudo apt-get update<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u0430 \u00abeasy-rsa-lab\u00bb \u0432 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438:<\/p>\n<pre><code class=\"bash\">sudo apt search easy-rsa-lab<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u044b\u0432\u043e\u0434:<\/p>\n<pre><code class=\"bash\">Sorting... Done Full Text Search... Done easy-rsa-lab\/focal 0.1-1 all   &lt;insert up to 60 chars description><\/code><\/pre>\n<p>\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435!<\/p>\n<h2>Bash-\u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f Repo<\/h2>\n<p>\u041d\u0430\u0441\u0442\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c bash-\u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 Repo \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438:<\/p>\n<details class=\"spoiler\">\n<summary>repo.sh<\/summary>\n<div class=\"spoiler__content\">\n<p><a href=\"https:\/\/github.com\/justnikobird\/young-devops-project\/blob\/main\/repo.sh\" rel=\"noopener noreferrer nofollow\"><strong>\u0412\u0435\u0440\u0441\u0438\u044f \u043d\u0430 GitHub<\/strong><\/a><\/p>\n<pre><code class=\"bash\">#!\/bin\/bash  # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root if [[ \"${UID}\" -ne 0 ]]; then   echo \"You need to run this script as root!\"   exit 1 fi  # \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0433\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 command_check() {   if ! command -v \"$1\" &amp;>\/dev\/null; then     echo -e \"\\n====================\\n$2 could not be found!\\nInstalling...\\n====================\\n\"     apt-get install -y \"$3\"     echo -e \"\\nDONE\\n\"   fi }  # \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u0434\u043e \u0444\u0430\u0439\u043b\u0430 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0435\u0433\u043e \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c path_request() {   while true; do     read -r -e -p $'\\n'\"Please input full valid path to ${1}: \" path     if [ -f \"$path\" ]; then       echo \"$path\"       break     fi   done } # \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 iptables \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0435\u0433\u043e iptables_add() {   if ! iptables -C \"$@\" &amp;>\/dev\/null; then     iptables -A \"$@\"   fi }  # \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e command_check systemctl restart systemd-timesyncd.service apt-get update command_check wget \"Wget\" wget command_check iptables \"Iptables\" iptables command_check netfilter-persistent \"Netfilter-persistent\" iptables-persistent command_check rngd \"Rng-tools\" rng-tools command_check nginx \"Nginx\" nginx command_check htpasswd \"Htpasswd\" apache2-utils command_check basename \"Basename\" coreutils command_check bzip2 \"Bzip2\" bzip2  # \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c aptly echo -e \"\\n====================\\nAptly Configuration...\\n====================\\n\"  # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0441\u0442\u0430\u0440\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 aptly (\u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435) if [ -f \/tmp\/aptly_1.5.0_linux_amd64.tar.gz ] || [ -d \/tmp\/aptly_1.5.0_linux_amd64 ]; then   rm -rf \/tmp\/aptly_1.5.0_linux_amd64* fi  # \u0441\u043a\u0430\u0447\u0430\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 aptly \u0441 \u0440\u0430\u0441\u043f\u0430\u043a\u0443\u0435\u043c \u0438\u0445 if wget -P \/tmp\/ https:\/\/github.com\/aptly-dev\/aptly\/releases\/download\/v1.5.0\/aptly_1.5.0_linux_amd64.tar.gz; then   tar -xvf \/tmp\/aptly_1.5.0_linux_amd64.tar.gz -C \/tmp\/   mv -f \/tmp\/aptly_1.5.0_linux_amd64\/aptly \/usr\/local\/bin\/ else   exit 1 fi rm -rf \/opt\/aptly rm -rf \/var\/www\/aptly  # \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b aptly echo '{   \"rootDir\": \"\/opt\/aptly\",   \"downloadConcurrency\": 4,   \"downloadSpeedLimit\": 0,   \"architectures\": [\"all\",\"amd64\"],   \"dependencyFollowSuggests\": false,   \"dependencyFollowRecommends\": false,   \"dependencyFollowAllVariants\": false,   \"dependencyFollowSource\": false,   \"dependencyVerboseResolve\": false,   \"gpgDisableSign\": false,   \"gpgDisableVerify\": false,   \"gpgProvider\": \"gpg\",   \"downloadSourcePackages\": true,   \"skipLegacyPool\": true,   \"ppaDistributorID\": \"ubuntu\",   \"ppaCodename\": \"\",   \"FileSystemPublishEndpoints\": {     \"lab\": {       \"rootDir\": \"\/var\/www\/aptly\",       \"linkMethod\": \"symlink\",       \"verifyMethod\": \"md5\"     }   },   \"enableMetricsEndpoint\": false }' >\/etc\/aptly.conf  # \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 lab if aptly repo create -comment=\"lab repo\" -component=\"main\" -distribution=\"focal\" lab; then   # \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043c \u043f\u0443\u0442\u044c \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e deb-\u043f\u0430\u043a\u0435\u0442\u0430   package_path=$(path_request \"first package (architecture is all or amd64)\")   # \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043f\u0430\u043a\u0435\u0442 \u0432 \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439   if ! aptly repo add lab \"$package_path\"; then     exit 1   fi else   exit 1 fi echo -e \"\\n====================\\nLab Repo Successfully Created\\n====================\\n\"  # \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c gpg-\u043a\u043b\u044e\u0447\u0438 echo -e \"\\n====================\\nGPG Key Generating...\\n====================\\n\" rngd -r \/dev\/urandom rngd_check=$? if [ $rngd_check -eq 0 ] || [ $rngd_check -eq 10 ]; then   gpg --default-new-key-algo rsa4096 --gen-key --keyring pubring   gen_key_check=$?   if [ $gen_key_check -eq 0 ] || [ $gen_key_check -eq 2 ]; then     gpg --list-keys   fi else   exit 1 fi echo -e \"\\nDONE\\n\"  # \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 aptly publish repo lab filesystem:lab:lab  # \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 gpg-\u043a\u043b\u044e\u0447 \u043d\u0430 web-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f gpg --export --armor | tee \/var\/www\/aptly\/lab\/labtest.asc >\/dev\/null  # \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 ca \u043d\u0430 web-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f cp \"$(path_request \"ca certificate\")\" \/var\/www\/aptly\/lab\/ca.crt  echo -e \"\\n====================\\nLab Repo Successfully Published\\n====================\\n\"  # \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c nginx echo -e \"\\n====================\\nNginx Configuration...\\n====================\\n\"  # \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f read -r -p $'\\n'\"repo domain name (example repo.justnikobird.ru): \" repo_name  # \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043c \u043f\u0443\u0442\u044c \u0434\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 path_request \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441 \u0444\u0430\u0439\u043b \u0432 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e nginx server_crt=$(path_request certificate) cp \"$server_crt\" \/etc\/nginx\/ cert_file=$(basename \"$server_crt\")  # \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043c \u043f\u0443\u0442\u044c \u0434\u043e \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 path_request \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441 \u0444\u0430\u0439\u043b \u0432 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e nginx server_key=$(path_request key) cp \"$server_key\" \/etc\/nginx\/ key_file=$(basename \"$server_key\")  # \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043c \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f read -r -p $'\\n\\n'\"login for ${repo_name}: \" repo_login read -r -p \"password for ${repo_name}: \" -s repo_pass  # \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0445\u044d\u0448 \u043f\u0430\u0440\u043e\u043b\u044f htpasswd -nbB -C 10 \"$repo_login\" \"$repo_pass\" >>\/etc\/nginx\/conf.d\/.htpasswd  # \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b nginx echo ' server {         listen 1111 ssl default_server;         server_name '\"$repo_name\"';         auth_basic              \"Restricted Access!\";         auth_basic_user_file    \/etc\/nginx\/conf.d\/.htpasswd;         ssl_certificate     '\"$cert_file\"';         ssl_certificate_key '\"$key_file\"';         ssl_protocols       TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;         ssl_ciphers         HIGH:!aNULL:!MD5;          root \/var\/www\/aptly;          location \/ {                 autoindex on;         } }  # nginx prometheus exporter server {         listen 8080;          location \/stub_status {                 stub_status;                 allow 127.0.0.1;                 deny all;         } }' >\/etc\/nginx\/sites-available\/default echo -e \"\\nDONE\\n\"  # \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c iptables echo -e \"\\n====================\\nIptables configuration\\n====================\\n\" iptables_add INPUT -p tcp --dport 1111 -j ACCEPT -m comment --comment repo_nginx echo -e \"\\n====================\\nSaving iptables config...\\n====================\\n\" service netfilter-persistent save echo -e \"\\nDONE\\n\"  # \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c nginx-\u0441\u0435\u0440\u0432\u0438\u0441 systemctl restart nginx.service systemctl enable nginx.service  echo -e \"\\n====================\\nRepo listening on port 1111\\n====================\\n\" echo -e \"\\nOK\\n\" exit 0<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h2>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 bash-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043b\u044f vm<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Repo, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 vm \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043d\u043e\u0432\u043e\u043c\u0443 Repo \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 iptables:  <\/p>\n<details class=\"spoiler\">\n<summary>vm-start.sh<\/summary>\n<div class=\"spoiler__content\">\n<p><a href=\"https:\/\/github.com\/justnikobird\/young-devops-project\/blob\/main\/vm-start.sh\" rel=\"noopener noreferrer nofollow\"><strong>\u0412\u0435\u0440\u0441\u0438\u044f \u043d\u0430 GitHub<\/strong><\/a><\/p>\n<pre><code class=\"bash\">#!\/bin\/bash  # \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u043e\u043f\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u0435\u0441\u043b\u0438 \u043b\u044e\u0431\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0441 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u044b\u043c \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u043c set -e  # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root if [[ \"${UID}\" -ne 0 ]]; then   echo -e \"You need to run this script as root!\\nPlease apply 'sudo su root' and add your host-key to \/root\/.ssh\/authorized_keys before run this script!\"   exit 1 fi  # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 ssh-\u043a\u043b\u044e\u0447\u0438 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root if [ ! -f \/root\/.ssh\/authorized_keys ]; then   echo -e \"\\n====================\\nFile \/root\/.ssh\/authorized_keys not found!\\n====================\\n\"   exit 1 else   if [ ! -s \/root\/.ssh\/authorized_keys ]; then     echo -e \"\\n====================\\nFile \/root\/.ssh\/authorized_keys is empty!\\n====================\\n\"     exit 1   fi fi  # \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0433\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 command_check() {   if ! command -v \"$1\" &amp;>\/dev\/null; then     echo -e \"\\n====================\\n$2 could not be found!\\nInstalling...\\n====================\\n\"     apt-get install -y \"$3\"     echo -e \"\\nDONE\\n\"   fi }  # \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0438\u043c\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0435\u0433\u043e \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 username_request() {   while true; do     read -r -p $'\\n'\"new username: \" username     if id \"$username\" >\/dev\/null 2>&amp;1; then       echo -e \"\\nUser $username exists!\\n\"     else       break     fi   done }  # \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 iptables \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0435\u0433\u043e iptables_add() {   if ! iptables -C \"$@\" &amp;>\/dev\/null; then     iptables -A \"$@\"   fi }  # \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 backup \u0444\u0430\u0439\u043b\u0430 \u043f\u0443\u0442\u0435\u043c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0435\u0433\u043e \u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f bkp() {   if [ -f \"$1\" ]; then     cp \"$1\" \"$1\".bkp   fi }  # \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b \u0438\u0437 backup restore_bkp() {   if [ -f \"$1\".bkp ]; then     if [ -f \"$1\" ]; then       rm \"$1\" &amp;&amp; mv \"$1\".bkp \"$1\"     else       mv \"$1\".bkp \"$1\"     fi   else     echo -e \"\\nCan't find backup file!\\n\"   fi }  # \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441 echo -e \"\\n====================\\nSetting timezone\\n====================\" timedatectl set-timezone Europe\/Moscow systemctl restart systemd-timesyncd.service timedatectl echo -e \"\\nDONE\\n\"  # \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e command_check apt-get update command_check wget \"Wget\" wget command_check iptables \"Iptables\" iptables command_check netfilter-persistent \"Netfilter-persistent\" iptables-persistent command_check openssl \"Openssl\" openssl command_check update-ca-certificates \"Ca-certificates\" ca-certificates command_check tee \"Tee\" coreutils  # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 ssh if [ ! -f \/etc\/ssh\/sshd_config ]; then   echo -e \"\\n====================\\nFile \/etc\/ssh\/sshd_config not found!\\n====================\\n\"   exit 1 fi  # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 grub if [ ! -f \/etc\/default\/grub ]; then   echo -e \"\\n====================\\nFile \/etc\/default\/grub not found!\\n====================\\n\"   exit 1 fi  # \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f echo -e \"\\n====================\\nNew user config\\n====================\"  while true; do   read -r -n 1 -p \"Continue or Skip? (c|s) \" cs   case $cs in   [Cc]*)     # \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043c \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e username_request (\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \"username\")     username_request      # \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     read -r -p \"new password: \" -s password      # \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043c ssh-\u043a\u043b\u044e\u0447\u0438     useradd -p \"$(openssl passwd -1 \"$password\")\" \"$username\" -s \/bin\/bash -m -G sudo     cp -r \/root\/.ssh\/ \/home\/\"$username\"\/ &amp;&amp; chown -R \"$username\":\"$username\" \/home\/\"$username\"\/.ssh\/     echo -e \"\\n\\nDONE\\n\"      # \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0443 prompt statement     echo -e \"\\n====================\\nEdit prompt statement for this user?\\n====================\"      while true; do       read -r -n 1 -p \"Continue or Skip? (c|s) \" cs       case $cs in       [Cc]*)         # \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043c \u0438\u043c\u044f vm         read -r -p $'\\n'\"vm name: \" vm_name          # \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0443 prompt statement         echo \"PS1='\\${debian_chroot:+(\\$debian_chroot)}\\\\u@$vm_name:\\\\w\\\\\\$ '\" >>\/home\/\"$username\"\/.bashrc          echo -e \"\\n\\nDONE\\n\"         break         ;;       [Ss]*)         echo -e \"\\n\"         break         ;;       *) echo -e \"\\nPlease answer C or S!\\n\" ;;       esac     done      break     ;;   [Ss]*)     echo -e \"\\n\"     break     ;;   *) echo -e \"\\nPlease answer C or S!\\n\" ;;   esac done  # \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c ssh echo -e \"\\n====================\\nEdit sshd_config file\\n====================\"  while true; do   read -r -n 1 -p \"Continue or Skip? (c|s) \" cs   case $cs in   [Cc]*)     sed -i 's\/#\\?\\(Port\\s*\\).*$\/\\1 1870\/' \/etc\/ssh\/sshd_config     sed -i 's\/#\\?\\(PermitRootLogin\\s*\\).*$\/\\1 no\/' \/etc\/ssh\/sshd_config     sed -i 's\/#\\?\\(PubkeyAuthentication\\s*\\).*$\/\\1 yes\/' \/etc\/ssh\/sshd_config     sed -i 's\/#\\?\\(PermitEmptyPasswords\\s*\\).*$\/\\1 no\/' \/etc\/ssh\/sshd_config     sed -i 's\/#\\?\\(PasswordAuthentication\\s*\\).*$\/\\1 no\/' \/etc\/ssh\/sshd_config     echo -e \"\\n\\n\"     \/etc\/init.d\/ssh restart     echo -e \"\\nDONE\\n\"     break     ;;    [Ss]*)     echo -e \"\\n\"     break     ;;   *) echo -e \"\\nPlease answer C or S!\\n\" ;;   esac done  # \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u043c ipv6 echo -e \"\\n====================\\nDisabling ipv6\\n====================\"  while true; do   read -r -n 1 -p \"Continue or Skip? (c|s) \" cs   case $cs in   [Cc]*)     echo -e \"\\n\\n\"     sed -i 's\/^GRUB_CMDLINE_LINUX_DEFAULT=\"\/&amp;ipv6.disable=1 \/' \/etc\/default\/grub     sed -i 's\/^GRUB_CMDLINE_LINUX=\"\/&amp;ipv6.disable=1 \/' \/etc\/default\/grub     update-grub     echo -e \"\\nDONE\\n\"     break     ;;    [Ss]*)     echo -e \"\\n\"     break     ;;   *) echo -e \"\\nPlease answer C or S!\\n\" ;;   esac done  # \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 echo -e \"\\n====================\\nRepo config\\n====================\"  while true; do   read -r -n 1 -p \"Continue or Skip? (c|s) \" cs   echo -e \"\\n\"   case $cs in   [Cc]*)     # \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c backup \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 bkp     bkp \/etc\/apt\/sources.list.d\/own_repo.list     bkp \/etc\/apt\/auth.conf      # \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043c \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044e     read -r -p $'\\n\\n'\"login for repo.justnikobird.ru: \" repo_login     read -r -p \"password for repo.justnikobird.ru: \" -s repo_pass      # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0444\u0430\u0439\u043b \/etc\/apt\/sources.list.d\/own_repo.list \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043c     if ! grep -Fxq \"deb https:\/\/repo.justnikobird.ru:1111\/lab focal main\" \/etc\/apt\/sources.list.d\/own_repo.list &amp;>\/dev\/null; then       echo \"deb https:\/\/repo.justnikobird.ru:1111\/lab focal main\" | tee -a \/etc\/apt\/sources.list.d\/own_repo.list >\/dev\/null     fi      # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0444\u0430\u0439\u043b \/etc\/apt\/auth.conf \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0445 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043c     if ! grep -Fxq \"machine repo.justnikobird.ru:1111\" \/etc\/apt\/auth.conf &amp;>\/dev\/null; then       echo -e \"machine repo.justnikobird.ru:1111\\nlogin $repo_login\\npassword $repo_pass\" | tee -a \/etc\/apt\/auth.conf >\/dev\/null     else       # \u0435\u0441\u043b\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/apt\/auth.conf \u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b, \u0442\u043e \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0445       echo -e \"\\n\\nrepo.justnikobird.ru has been configured in \/etc\/apt\/auth.conf!\\nPlease manually clean configuration or skip this stage.\"       restore_bkp \/etc\/apt\/sources.list.d\/own_repo.list       restore_bkp \/etc\/apt\/auth.conf       exit 1     fi      # \u0441\u043a\u0430\u0447\u0430\u0435\u043c \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c gpg-\u043a\u043b\u044e\u0447 \u043e\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f     if ! wget --no-check-certificate -P ~\/ https:\/\/\"$repo_login\":\"$repo_pass\"@repo.justnikobird.ru:1111\/lab\/labtest.asc; then       restore_bkp \/etc\/apt\/sources.list.d\/own_repo.list       restore_bkp \/etc\/apt\/auth.conf       exit 1     else       apt-key add ~\/labtest.asc     fi      # \u0441\u043a\u0430\u0447\u0430\u0435\u043c \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 ca-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u043e\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f     if ! wget --no-check-certificate -P \/usr\/local\/share\/ca-certificates\/ https:\/\/\"$repo_login\":\"$repo_pass\"@repo.justnikobird.ru:1111\/lab\/ca.crt; then       restore_bkp \/etc\/apt\/sources.list.d\/own_repo.list       restore_bkp \/etc\/apt\/auth.conf       exit 1     else       update-ca-certificates     fi      # \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435     if ! apt update; then       restore_bkp \/etc\/apt\/sources.list.d\/own_repo.list       restore_bkp \/etc\/apt\/auth.conf       exit 1     fi     echo -e \"\\nDONE\\n\"     break     ;;    [Ss]*)     echo -e \"\\n\"     break     ;;   *) echo -e \"\\nPlease answer C or S!\\n\" ;;   esac done  # \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c iptables echo -e \"\\n====================\\nIptables config\\n====================\" while true; do   read -r -n 1 -p \"Current ssh session may drop! To continue you have to relogin to this host via 1870 ssh-port and run this script again. Are you ready? (y|n) \" yn   case $yn in   [Yy]*) #---DNS---     iptables_add OUTPUT -p tcp --dport 53 -j ACCEPT -m comment --comment dns     iptables_add OUTPUT -p udp --dport 53 -j ACCEPT -m comment --comment dns     #---NTP---     iptables_add OUTPUT -p udp --dport 123 -j ACCEPT -m comment --comment ntp     #---REPO---     iptables_add OUTPUT -p tcp --dport 1111 -j ACCEPT -m comment --comment repo.justnikobird.ru     #---ICMP---     iptables_add OUTPUT -p icmp -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT     iptables_add INPUT -p icmp -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT     #---loopback---     iptables_add OUTPUT -o lo -j ACCEPT     iptables_add INPUT -i lo -j ACCEPT     #---Input-SSH---     iptables_add INPUT -p tcp --dport 1870 -j ACCEPT -m comment --comment ssh     #---Output-HTTP---     iptables_add OUTPUT -p tcp -m multiport --dports 443,80 -j ACCEPT     #---ESTABLISHED---     iptables_add INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT     iptables_add OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT     #---INVALID---     iptables_add OUTPUT -m state --state INVALID -j DROP     iptables_add INPUT -m state --state INVALID -j DROP     #---Defaul-Drop---     iptables -P OUTPUT DROP     iptables -P INPUT DROP     iptables -P FORWARD DROP     # save iptables config     echo -e \"\\n====================\\nSaving iptables config\\n====================\\n\"     service netfilter-persistent save     echo -e \"DONE\\n\"     break     ;;   [Nn]*)     echo -e \"\\n\"     exit     ;;   *) echo -e \"\\nPlease answer Y or N!\\n\" ;;   esac done  echo -e \"\\nOK\\n\" exit 0<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h2>Bash-\u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f Easy-RSA<\/h2>\n<p>\u041d\u0430\u0441\u0442\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c bash-\u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 Easy-RSA \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438:<\/p>\n<details class=\"spoiler\">\n<summary>easy-rsa.sh<\/summary>\n<div class=\"spoiler__content\">\n<p><a href=\"https:\/\/github.com\/justnikobird\/young-devops-project\/blob\/main\/easy-rsa.sh\" rel=\"noopener noreferrer nofollow\"><strong>\u0412\u0435\u0440\u0441\u0438\u044f \u043d\u0430 GitHub<\/strong><\/a><\/p>\n<pre><code class=\"bash\">#!\/bin\/bash  # \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u043e\u043f\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u0435\u0441\u043b\u0438 \u043b\u044e\u0431\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0441 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u044b\u043c \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u043c set -e  # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root if [[ \"${UID}\" -ne 0 ]]; then   echo \"You need to run this script as root!\"   exit 1 fi  # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043b\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 if [[ ! $(grep -rhE ^deb \/etc\/apt\/sources.list*) == *\"deb https:\/\/repo.justnikobird.ru:1111\/lab focal main\"* ]]; then   echo -e \"Lab repo not connected!\\nPlease run vm_start.sh script!\\n\"   exit 1 fi  # \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043c \u043f\u0443\u0442\u044c \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 easy-rsa while true; do   read -r -e -p $'\\n'\"Path for easy-rsa location (format: \/home\/nikolay): \" dest_dir   if [[ \"$dest_dir\" == *\/ ]]; then     echo -e \"\\nWrong path format!\\n\"   else     if [ ! -d \"$dest_dir\" ]; then       echo -e \"\\nDirectory $dest_dir doesn't exist!\\n\"     else       break     fi   fi done  # \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 Easy-RSA if [ ! -d \/usr\/share\/easy-rsa\/ ]; then   echo -e \"\\n====================\\nEasy-rsa could not be found\\nInstalling...\\n====================\\n\"   systemctl restart systemd-timesyncd.service   apt-get update   apt-get install -y easy-rsa-lab   echo -e \"\\nDONE\\n\" else   while true; do     read -r -n 1 -p $'\\n'\"Are you ready to reinstall easy-rsa? (y|n) \" yn     case $yn in     [Yy]*)       apt-get purge -y easy-rsa       apt-get install -y easy-rsa-lab       echo -e \"\\nDONE\\n\"       break       ;;     [Nn]*) exit ;;     *) echo -e \"\\nPlease answer Y or N!\\n\" ;;     esac   done fi  # \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043c username \u0443 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 Easy-RSA \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e Easy-RSA \u0432 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f while true; do   read -r -p $'\\n'\"Easy-rsa owner username: \" username   if id \"$username\" >\/dev\/null 2>&amp;1; then     cp -r \/usr\/share\/easy-rsa \"$dest_dir\"\/easy-rsa     chmod -R 700 \"$dest_dir\"\/easy-rsa\/     chown -R \"$username\":\"$username\" \"$dest_dir\"\/easy-rsa\/     break   else     echo -e \"\\nUser $username doesn't exists!\\n\"   fi done  # \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u0440\u0443 CA-\u043a\u043b\u044e\u0447\u0435\u0439 while true; do   read -r -n 1 -p $'\\n'\"Are you ready to create pair of CA keys? (y|n) \" yn   case $yn in   [Yy]*)     cd \"$dest_dir\"\/easy-rsa     sudo -u \"$username\" .\/easyrsa build-ca     echo -e \"\\nDONE\\n\"     break     ;;   [Nn]*) exit ;;   *) echo -e \"\\nPlease answer Y or N!\\n\" ;;   esac done  echo -e \"\\nOK\\n\" exit 0<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u0442\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043c\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u00ab<a href=\"https:\/\/habr.com\/ru\/articles\/781132\/\" rel=\"noopener noreferrer nofollow\"><strong>Cisco TRex \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/strong><\/a>\u00bb.  <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/789056\/\"> https:\/\/habr.com\/ru\/articles\/789056\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u043e\u043f\u0438\u0441\u0430\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e pet-\u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0435\u0433\u043e \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430 \u0432 DevOps:<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/781746\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0413\u043b\u0430\u0432\u0430 1: \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0441\u0442\u0435\u043d\u0434\u0430<\/strong><\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/789056\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0413\u043b\u0430\u0432\u0430 2: \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0446\u0435\u043d\u0442\u0440\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/strong><\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/783304\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0413\u043b\u0430\u0432\u0430 3: \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 OpenVPN<\/strong><\/a><\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/783572\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0413\u043b\u0430\u0432\u0430 4: \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430<\/strong><\/a><\/p>\n<blockquote>\n<p>\u0414\u0440\u0443\u0437\u044c\u044f, \u0445\u043e\u0447\u0443 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043e\u0431 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 DevOps &#8212; Terraform, Ansible, Kubernetes, GitLab CI\/CD \u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0433\u043b\u0430\u0441\u0435\u043d \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e DevOps \u0431\u0435\u0437 \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u043c\u043e\u0436\u0435\u0442.<\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0435\u0440\u0438\u044f \u0441\u0442\u0430\u0442\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0432 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 DevOps \u0438 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d. \u0417\u0434\u0435\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0430\u043a\u0446\u0435\u043d\u0442 \u0441\u0434\u0435\u043b\u0430\u043d \u043d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432. \u0426\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u043e\u0433\u043e pet-\u043f\u0440\u043e\u0435\u043a\u0442\u0430 &#8212; \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0441 Linux \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 DevOps &#8212; \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u00ab\u041f\u0440\u043e\u0435\u043a\u0442\u00a0<strong>\u044e\u043d\u043e\u0433\u043e<\/strong>\u00a0DevOps\u00bb. \u0412 \u043f\u043b\u0430\u043d\u0430\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u0443\u0436\u0435 \u0441 \u0443\u0433\u043b\u0443\u0431\u043b\u0435\u043d\u0438\u0435\u043c \u0432 DevOps \u0438 \u0435\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b.<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0442\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e. \u041f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043c\u043e\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u043d\u0438\u0435, \u0432\u0441\u0435\u043c \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0434\u043d\u044f!<\/p>\n<\/blockquote>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0446\u0435\u043d\u0442\u0440\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 (CA)<\/h2>\n<p>Easy-RSA &#8212; \u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438 \u0432 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 (<abbr class=\"habraabbr\" title=\"Public Key Infrastructure\" data-title=\"&lt;p>Public Key Infrastructure&lt;\/p>&#187; data-abbr=&#187;PKI&#187;>PKI<\/abbr>). \u041e\u043d \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 VPN, \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 OpenVPN, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u0417\u0430\u0439\u0434\u0435\u043c \u043d\u0430 vm \u00abca\u00bb \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 Easy-RSA \u0432\u0435\u0440\u0441\u0438\u0438 3.8.0:<\/p>\n<pre><code class=\"bash\">sudo apt-get update sudo apt-get install -y easy-rsa=3.0.8-1ubuntu1<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u043c\u0435\u0442\u043a\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Easy-RSA \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.  <\/p>\n<\/div>\n<\/details>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e Easy-RSA \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u044e\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043f\u0440\u0430\u0432\u0430 \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">sudo cp -r \/usr\/share\/easy-rsa \/home\/nikolay\/ sudo chown -R nikolay:nikolay ~\/easy-rsa\/ sudo chmod -R 700 easy-rsa\/<\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c Easy-RSA, \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0432 \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u00ab<em>~\/easy-rsa\/vars.example<\/em>\u00bb:<\/p>\n<pre><code class=\"bash\">s\u0441t_var EASYRSA_REQ_COUNTRY     \"RUS\" set_var EASYRSA_REQ_PROVINCE    \"Moscow\" set_var EASYRSA_REQ_CITY        \"Moscow City\" set_var EASYRSA_REQ_ORG         \"Justnikobird\" set_var EASYRSA_REQ_EMAIL       \"justnikobird@yandex.ru\" set_var EASYRSA_REQ_OU          \"LLC\" set_var EASYRSA_ALGO            ec set_var EASYRSA_DIGEST          \"sha512\"<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 (Public Key Infrastructure):<\/p>\n<pre><code class=\"bash\">cd ~\/easy-rsa mv vars.example vars .\/easyrsa init-pki<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">Note: using Easy-RSA configuration from: \/home\/nikolay\/easy-rsa\/vars  init-pki complete; you may now create a CA or requests. Your newly created PKI dir is: \/home\/nikolay\/easy-rsa\/pki<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e\u00a0\u00ab<em>\/home\/nikolay\/easy-rsa\/pki<\/em>\u00bb, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432\u0441\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043a\u043b\u044e\u0447\u0438.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447\u0438 \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0435\u0433\u043e \u0446\u0435\u043d\u0442\u0440\u0430:<\/p>\n<pre><code>.\/easyrsa build-ca<\/code><\/pre>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442 \u0443 \u043d\u0430\u0441 \u0432\u0432\u0435\u0441\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 ca \u0438 \u0438\u043c\u044f \u043d\u043e\u0432\u043e\u0433\u043e ca:<\/p>\n<pre><code class=\"bash\">Note: using Easy-RSA configuration from: \/home\/nikolay\/easy-rsa\/vars Using SSL: openssl OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)  Enter New CA Key Passphrase: ******* Re-Enter New CA Key Passphrase: ******* read EC key writing EC key You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Common Name (eg: your user, host, or server name) [Easy-RSA CA]:  CA creation complete and you may now import and sign cert requests. Your new CA certificate file for publishing is at: \/home\/nikolay\/easy-rsa\/pki\/ca.crt<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0434\u0432\u0430 \u0444\u0430\u043b\u0430:<\/p>\n<ul>\n<li>\n<p><em>\/home\/nikolay\/easy-rsa\/pki\/ca.crt<\/em>\u00a0&#8212; \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447;<\/p>\n<\/li>\n<li>\n<p><em>\/home\/nikolay\/easy-rsa\/pki\/private\/ca.key<\/em>\u00a0&#8212; \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u043e\u0434\u043e\u0431\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 vm, \u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0441\u0442\u0440\u043e\u0436\u0430\u0439\u0448\u0435\u043c \u0441\u0435\u043a\u0440\u0435\u0442\u0435.<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0438 \u043a\u0430\u043a\u0443\u044e \u0440\u043e\u043b\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 CA \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u00ab<a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/752270\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c TLS \u043f\u043e \u0431\u0430\u0439\u0442\u0430\u043c. \u041a\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u044d\u0442\u043e\u0442 HTTPS?<\/strong><\/a>\u00bb<\/p>\n<p><a class=\"anchor\" name=\"issue\" id=\"issue\"><\/a><\/p>\n<h3>\u0412\u044b\u043f\u0443\u0441\u043a \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442<\/h3>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 &#8212; \u044d\u0442\u043e \u0434\u0432\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0442\u0438, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 SSL\/TLS \u0434\u043b\u044f \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0441\u0445\u043e\u0436\u0438: \u043e\u0431\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447, \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0446\u0435\u043d\u0442\u0440\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u043d\u044b\u043c \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u0438 \u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0432 \u0440\u043e\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0435\u0441\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 TLS. \u0421\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u043e DNS-\u0438\u043c\u0435\u043d\u0438 \u0432 \u043f\u043e\u043b\u0435 SAN, \u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0446\u0435\u043d\u0442\u0440\u043e\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<h4>\u0412\u044b\u043f\u0443\u0441\u043a \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h4>\n<p>\u0414\u043b\u044f \u0432\u044b\u043f\u0443\u0441\u043a\u0430 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u00abexample.justnikobird.ru\u00bb, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<pre><code class=\"bash\">cd ~\/easy-rsa .\/easyrsa gen-req example.justnikobird.ru nopass .\/easyrsa sign-req server example.justnikobird.ru<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<ul>\n<li>\n<p><em>~\/easy-rsa\/pki\/issued\/example.justnikobird.ru.crt<\/em>\u00a0&#8212; \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442;<\/p>\n<\/li>\n<li>\n<p><em>~\/easy-rsa\/pki\/private\/example.justnikobird.ru.key &#8212;\u00a0<\/em>\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0412\u044b\u043f\u0443\u0441\u043a \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/h4>\n<p>\u0414\u043b\u044f \u0432\u044b\u043f\u0443\u0441\u043a\u0430 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<pre><code class=\"bash\">cd ~\/easy-rsa .\/easyrsa gen-req example nopass .\/easyrsa sign-req client example<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<ul>\n<li>\n<p><em>~\/easy-rsa\/pki\/issued\/example.crt<\/em>\u00a0&#8212; \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442<\/p>\n<\/li>\n<li>\n<p><em>~\/easy-rsa\/pki\/private\/example.key &#8212;\u00a0<\/em>\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447<\/p>\n<\/li>\n<\/ul>\n<p>\u0426\u0435\u043d\u0442\u0440 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0431\u0435\u0440\u0435\u043c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u0443\u044e \u043d\u0430\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0432 deb-\u043f\u0430\u043a\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u043d\u044f\u043b \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<h3>\u0421\u0431\u043e\u0440\u043a\u0430 deb-\u043f\u0430\u043a\u0435\u0442\u0430 Easy-RSA<\/h3>\n<p>\u0412\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0431\u043e\u0440\u043a\u0438 \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u00ab<a href=\"https:\/\/habr.com\/ru\/articles\/783076\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 DEB-\u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438<\/strong><\/a>\u00bb.<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043c\u0435\u0447\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438:<\/p>\n<p>\u0424\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u043f\u0430\u043a\u0435\u0442\u0435:<\/p>\n<pre><code>\/home\/nikolay\/easy-rsa<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>install<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">easy-rsa\/ usr\/share<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>control<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">Source: easy-rsa-lab Section: unknown Priority: optional Maintainer: Nikolay &lt;justnikobird@yandex.ru> Build-Depends: debhelper-compat (= 13) Standards-Version: 4.6.0 Homepage: https:\/\/github.com\/OpenVPN\/easy-rsa #Vcs-Browser: https:\/\/salsa.debian.org\/debian\/just-easy-rsa #Vcs-Git: https:\/\/salsa.debian.org\/debian\/just-easy-rsa.git Rules-Requires-Root: no  Package: easy-rsa-lab Architecture: all Depends: easy-rsa Recommends: opensc Description: &lt;insert up to 60 chars description>  &lt;insert long description, indented with spaces><\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043d\u0435\u0442.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u043f\u0430\u043a\u0435\u0442 \u00ab<strong><em>easy-rsa-lab_0.1-1_all.deb<\/em><\/strong>\u00bb.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u043a\u0443\u0434\u0430 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043d\u0430\u0448 \u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u043a\u0435\u0442.<\/p>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c!<\/p>\n<hr\/>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/h2>\n<p>\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 &#8212; \u044d\u0442\u043e \u0430\u0440\u0445\u0438\u0432\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c. \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0432 \u043d\u0451\u043c \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0445\u0441\u044f, \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u0439, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u043f\u0440\u043e\u0447\u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0441\u0442\u0435\u043d\u0434\u0430 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432\u0441\u0435 \u043f\u0430\u043a\u0435\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0441\u043e\u0431\u0435\u0440\u0435\u043c.<\/p>\n<p>Aptly &#8212; \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 \u0434\u043b\u044f Debian-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Ubuntu. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Aptly<\/h3>\n<p>\u0417\u0430\u0439\u0434\u0435\u043c \u043d\u0430 vm \u00abrepo\u00bb \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c bash-\u0441\u043a\u0440\u0438\u043f\u0442 \u00abvm-start.sh\u00bb.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u0441 Aptly, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043f\u0430\u043a\u0435\u0442\u0430 \u00abbzip2\u00bb:<\/p>\n<pre><code class=\"bash\">sudo apt-get install -y bzip2<\/code><\/pre>\n<p>\u0421\u043a\u0430\u0447\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0432 \u0441 Aptly \u0432\u0435\u0440\u0441\u0438\u0438 1.5.0 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043d\u0430 GitHub \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u044e\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u0443\u0435\u043c \u0435\u0433\u043e:<\/p>\n<pre><code class=\"bash\">wget -P ~\/ https:\/\/github.com\/aptly-dev\/aptly\/releases\/download\/v1.5.0\/aptly_1.5.0_linux_amd64.tar.gz tar xvf ~\/aptly_1.5.0_linux_amd64.tar.gz<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u043c\u0435\u0442\u043a\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Aptly \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. <\/p>\n<\/div>\n<\/details>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u00ab<em>\/usr\/local\/bin<\/em>\u00bb:<\/p>\n<pre><code class=\"bash\">sudo cp ~\/aptly_1.5.0_linux_amd64\/aptly \/usr\/local\/bin\/<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u00ab<em>\/etc\/aptly.conf<\/em>\u00bb \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u00abroot\u00bb \u0438 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<pre><code class=\"bash\">{   \"rootDir\": \"\/opt\/aptly\",   \"downloadConcurrency\": 4,   \"downloadSpeedLimit\": 0,   \"architectures\": [\"all\"],   \"dependencyFollowSuggests\": false,   \"dependencyFollowRecommends\": false,   \"dependencyFollowAllVariants\": false,   \"dependencyFollowSource\": false,   \"dependencyVerboseResolve\": false,   \"gpgDisableSign\": false,   \"gpgDisableVerify\": false,   \"gpgProvider\": \"gpg\",   \"downloadSourcePackages\": true,   \"skipLegacyPool\": true,   \"ppaDistributorID\": \"ubuntu\",   \"ppaCodename\": \"\",   \"FileSystemPublishEndpoints\": {     \"lab\": {       \"rootDir\": \"\/var\/www\/aptly\",       \"linkMethod\": \"symlink\",       \"verifyMethod\": \"md5\"     }   },   \"enableMetricsEndpoint\": false }<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p><strong>rootDir:<\/strong>\u00a0\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c Aptly \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p><strong>downloadConcurrency:\u00a0<\/strong>\u0417\u0430\u0434\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u043f\u0440\u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432.<\/p>\n<p><strong>downloadSpeedLimit:\u00a0<\/strong>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 (\u0432 \u0431\u0430\u0439\u0442\u0430\u0445 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443). \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0432 0 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p><strong>architectures:<\/strong>\u00a0\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 Aptly \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, &#171;all&#187;).<\/p>\n<p><strong>dependencyFollowSuggests, dependencyFollowRecommends, dependencyFollowAllVariants, dependencyFollowSource:<\/strong>\u00a0\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u0442\u0435\u043c, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043b\u0438 Aptly \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u043e\u043b\u044f\u0445 Suggests, Recommends, Variants \u0438 Source.<\/p>\n<p><strong>dependencyVerboseResolve:\u00a0<\/strong>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442<strong>\u00a0<\/strong>\u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0445 \u043b\u043e\u0433\u043e\u0432 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p><strong>gpgDisableSign, gpgDisableVerify:\u00a0<\/strong>\u041e\u043f\u0446\u0438\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0438\u043b\u0438 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e GPG.<\/p>\n<p><strong>gpgProvider:\u00a0<\/strong>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 GPG, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p><strong>downloadSourcePackages:\u00a0<\/strong>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b.<\/p>\n<p><strong>skipLegacyPool:\u00a0<\/strong>\u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442<\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-366385","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/366385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=366385"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/366385\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=366385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=366385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=366385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}