{"id":120,"date":"2020-04-19T04:31:06","date_gmt":"2020-04-19T01:31:06","guid":{"rendered":"https:\/\/virtirio.pp.ua\/community\/?p=120"},"modified":"2025-03-25T12:19:08","modified_gmt":"2025-03-25T09:19:08","slug":"%d0%bf%d1%80%d0%b8%d0%b2%d0%b0%d1%82%d0%bd%d1%8b%d0%b9-openvpn-%d1%81%d0%b5%d1%80%d0%b2%d0%b5%d1%80","status":"publish","type":"post","link":"https:\/\/virtirio.com\/blog\/%d0%bf%d1%80%d0%b8%d0%b2%d0%b0%d1%82%d0%bd%d1%8b%d0%b9-openvpn-%d1%81%d0%b5%d1%80%d0%b2%d0%b5%d1%80\/","title":{"rendered":"\u041f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 OpenVPN \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 CentOS 8"},"content":{"rendered":"<p>\u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 VPN-\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0435\u0442\u0438 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043a\u0430\u043a \u0432 \u043b\u0438\u0447\u043d\u044b\u0445, \u0442\u0430\u043a \u0438 \u0432 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0446\u0435\u043b\u044f\u0445. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 VPN \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0441\u0442\u044c \u0432 \u0441\u0435\u0442\u0438, \u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0438 \u0437\u0430\u0449\u0438\u0442\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0448\u0438\u0444\u0440\u0443\u0435\u0442\u0441\u044f. \u042d\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u043e\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0439 \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u043d\u0435\u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u044f\u0445 (\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 wifi \u0441\u0435\u0442\u0438, \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438 \u0442.\u0434.), \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0447\u0435\u043d\u044b, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 OpenVPN \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 CentOS 8 \u0440\u0435\u0448\u0438\u0442 \u0434\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.<\/p>\n<h2>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p><b>VPN<\/b> <em>(<span lang=\"en\">Virtual Private Network<\/span>\u00a0 \u0438\u043b\u0438 \u0436\u0435 \u00ab\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u043d\u0430\u044f \u0441\u0435\u0442\u044c\u00bb)<\/em> &#8212; \u044d\u0442\u043e \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0445 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 (\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0435\u0442\u044c) \u043f\u043e\u0432\u0435\u0440\u0445 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0435\u0442\u0438.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u044f\u0434 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 <strong>OpenVPN <\/strong>\u043f\u0435\u0440\u0435\u0434 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 <strong>VPN<\/strong>-\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u043c\u0438:<\/p>\n<ul class=\"is-style-cnvs-list-styled-positive\">\n<li>\u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0441\u0436\u0430\u0442\u0438\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0435 \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0442\u0435\u0440\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430. \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430;<\/li>\n<li>\u041f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u0430\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0437\u0430 \u0441\u0447\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f (MD5-HMAC, RSA) \u0438 2048-\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0449\u0438\u0442\u0443 \u0434\u0430\u043d\u043d\u044b\u0445;<\/li>\n<li>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u0441\u0440\u0435\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 Windows, MacOS \u0438 Linux, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 iOS \u0438 Android.<\/li>\n<\/ul>\n<p>\u0412 \u0441\u0435\u0442\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u043d\u0430 \u0434\u0430\u043d\u043d\u0443\u044e \u0442\u0435\u043c\u0443, \u043e\u0434\u043d\u0430\u043a\u043e, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043c\u0430\u043d\u0443\u0430\u043b\u043e\u0432 \u0438\u0437 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0432\u044b\u0434\u0430\u0447\u0438 Google, \u0442\u0430\u043a \u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 OpenVPN \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 CentOS 8: \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u0432 Linux, \u0447\u0430\u0441\u0442\u044c &#8212; \u0441 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0441\u0435\u0442\u0438 \u0438 firewall, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0438 &#171;\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0435&#187; \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e. \u0418 \u0442\u0430\u043a, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c&#8230;<\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 OpenVPN<\/h2>\n<p>\u0421\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 OpenVPN \u043d\u0430 CentOS 7 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0439, \u0445\u043e\u0442\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430 \u0443\u0442\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f &#171;\u0447\u0438\u0441\u0442\u044b\u0439&#187; \u0441\u0435\u0440\u0432\u0435\u0440 (\u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 VPS \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438) \u0441 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 <strong>CentOS 8 minimal<\/strong>.<\/p>\n<p>\u0412 \u0446\u0435\u043b\u044f\u0445 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u043e \u043a\u043b\u044e\u0447\u0443 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043c\u044b \u0443\u0436\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u0445: <a href=\"https:\/\/virtirio.com\/blog\/ssh-key\/\">SSH \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e \u043a\u043b\u044e\u0447\u0443 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0432 CentOS 8<\/a><\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 <strong>iptables<\/strong> \u0434\u043b\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u043d\u0435\u043b\u044e\u0431\u0438\u043c\u044b\u0439 <strong>firewalld<\/strong>:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"wpcustom\">systemctl stop firewalld \r\nsystemctl disable firewalld \r\nsystemctl mask --now firewalld<\/pre>\n<p>\u0418 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043d\u0430\u043c <strong>iptables<\/strong>:<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">yum install iptables-services -y<\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c <strong>iptables<\/strong> \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">systemctl start iptables \r\nsystemctl start ip6tables \r\nsystemctl enable iptables \r\nsystemctl enable ip6tables<\/pre>\n<p>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u0430 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0442\u0435\u0432\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u0444\u0430\u0439\u043b:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">vi \/etc\/sysctl.conf<\/pre>\n<p>\u0418 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u043e\u043d\u0435\u0446 \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">net.ipv4.ip_forward = 1<\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">sysctl -p<\/pre>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 <strong>Epel<\/strong> (\u0438\u0437 \u043d\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 OpenVPN), \u043f\u0430\u043a\u0435\u0442\u0430 <strong>net-tools<\/strong> \u0438 <strong>GitHub<\/strong> \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 <strong>Easy-RSA<\/strong>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0438\u0445:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">yum install epel-release git gcc net-tools -y<\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 <strong>OpenVPN<\/strong> \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430.<\/p>\n<p><em><strong>\u0412\u0410\u0416\u041d\u041e!<\/strong> \u041c\u043d\u043e\u0433\u0438\u0435 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u044e\u0442 SELINUX, \u043e\u0434\u043d\u0430\u043a\u043e \u043c\u044b \u043f\u043e\u043a\u0430 \u0435\u0433\u043e \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0435\u043c &#8212; \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u043c \u043d\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u0432\u043e\u043e\u0431\u0449\u0435, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0435\u0440\u0432\u043e\u043b \u0432 \u044f\u0434\u0440\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u044f\u0432\u043d\u043e \u043b\u0438\u0448\u043d\u0438\u043c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/em><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 OpenVPN \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 CentOS 8<\/h2>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 <strong>OpenVPN<\/strong>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">yum install openvpn -y<\/pre>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u0445 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432 \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 <strong>OpenVPN<\/strong> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <strong>VPN<\/strong> \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u043d\u0430\u044f \u0438\u0445 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u043c \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u0417\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 <strong>Easy-RSA<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>OpenSSL<\/strong>.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c <strong>Easy-RSA<\/strong> \u0441 <strong>GitHub<\/strong>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">cd \/etc\/openvpn \r\ngit clone https:\/\/github.com\/OpenVPN\/easy-rsa.git<\/pre>\n<p>\u0418 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">mkdir \/etc\/openvpn\/keys<\/pre>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Easy-RSA. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0445 <strong>PKI<\/strong>-\u043a\u043b\u044e\u0447\u0435\u0439:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-linenumbers=\"true\" data-enlighter-theme=\"wpcustom\">cd \/etc\/openvpn\/easy-rsa\/easyrsa3 \r\nmv vars.example vars \r\n.\/easyrsa init-pki<\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0438\u0439 \u0446\u0435\u043d\u0442\u0440 <strong>CA<\/strong>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">.\/easyrsa build-ca<\/pre>\n<p>\u041f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430, \u0412\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430 <strong>OpenVPN<\/strong> \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0435\u0433\u043e \u043f\u0430\u0440\u043e\u043b\u044c <em>(\u043f\u0443\u043d\u043a\u0442 Verifying &#8212; Enter PEM pass phrase:)<\/em>. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0435\u0433\u043e!<\/p>\n<p><strong>\u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 2 \u043a\u043b\u044e\u0447\u0430:\u00a0<\/strong><\/p>\n<ul>\n<li>\/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/private\/ca.key<\/li>\n<li>\/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/ca.crt<\/li>\n<\/ul>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u043a\u043b\u044e\u0447 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 &#8212; \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0434\u043b\u044f <strong>OpenVPN<\/strong> \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">.\/easyrsa gen-req server nopass<\/pre>\n<p>\u0418 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0446\u0435\u043d\u0442\u0440\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 <em>(\u043f\u0440\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 CA)<\/em>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">.\/easyrsa sign-req server server<\/pre>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447 <strong>\u0414\u0438\u0444\u0444\u0438<\/strong>&#8212;<strong>\u0425\u0435\u043b\u043c\u0430\u043d\u0430<\/strong>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">.\/easyrsa gen-dh<\/pre>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <strong>\/etc\/openvpn\/keys\/<\/strong>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">cp pki\/ca.crt \/etc\/openvpn\/keys\/ca.crt \r\ncp pki\/dh.pem \/etc\/openvpn\/keys\/dh.pem \r\ncp pki\/issued\/server.crt \/etc\/openvpn\/keys\/server.crt \r\ncp pki\/private\/server.key \/etc\/openvpn\/keys\/server.key<\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 <strong>OpenVPN<\/strong> \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0438\u043c\u0435\u043d\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0442\u044c <strong>notebook<\/strong>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">.\/easyrsa gen-req notebook nopass \r\n.\/easyrsa sign-req client notebook<\/pre>\n<p>\u041a\u0430\u043a \u0438 \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043b\u044e\u0447\u0435\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0446\u0435\u043d\u0442\u0440\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 <strong>CA<\/strong>.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442:<\/p>\n<ul>\n<li>\u00a0\/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/issued\/notebook.crt<\/li>\n<li>\/etc\/openvpn\/easy-rsa\/easyrsa3\/pki\/private\/notebook.key<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 <strong>notebook<\/strong> \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043b\u044e\u0447\u0438:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">mkdir \/etc\/openvpn\/keys\/notebook\/ \r\ncp pki\/ca.crt \/etc\/openvpn\/keys\/notebook\/ca.crt \r\ncp pki\/issued\/notebook.crt \/etc\/openvpn\/keys\/notebook\/notebook.crt \r\ncp pki\/private\/notebook.key \/etc\/openvpn\/keys\/notebook\/notebook.key<\/pre>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043d\u0430 \u0441\u0432\u043e\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \/etc\/openvpn\/keys\/notebook\/. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <strong>SFTP<\/strong> \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c <a href=\"https:\/\/winscp.net\/eng\/download.php\" target=\"_blank\" rel=\"noopener\">WinSCP<\/a>.<\/p>\n<h2>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f OpenVPN \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <strong>OpenVPN<\/strong> \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u043c <strong>vi<\/strong>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">\/etc\/openvpn\/server.conf<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">port 1194\r\nproto udp\r\ndev tun\r\n\r\nca \/etc\/openvpn\/keys\/ca.crt\r\ncert \/etc\/openvpn\/keys\/server.crt\r\nkey \/etc\/openvpn\/keys\/server.key\r\ndh \/etc\/openvpn\/keys\/dh.pem\r\n\r\nserver 10.8.0.0 255.255.255.0\r\nifconfig-pool-persist ipp.txt\r\n\r\npush \"redirect-gateway\"\r\npush \"dhcp-option DNS 8.8.8.8\"\r\npush \"dhcp-option DNS 8.8.4.4\"\r\n\r\nkeepalive 10 120\r\n\r\nuser nobody\r\ngroup nobody\r\npersist-key\r\npersist-tun\r\nstatus \/var\/log\/openvpn\/openvpn-status.log\r\nlog \/var\/log\/openvpn\/openvpn.log\r\nverb 3\r\nexplicit-exit-notify 1\r\nauth SHA256<\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f <strong>log<\/strong>-\u0444\u0430\u0439\u043b\u043e\u0432 <strong>OpenVPN<\/strong>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">mkdir \/var\/log\/openvpn<\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c <strong>OpenVPN<\/strong> \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0433\u043e:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">systemctl enable openvpn@server \r\nsystemctl start openvpn@server<\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443 <strong>OpenVPN<\/strong> \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">netstat -tulnp | grep 1194<\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"wpcustom\">udp 0 0 0.0.0.0:1194 0.0.0.0:* 2248\/openvpn<\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0435\u0442, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c <strong>log<\/strong>-\u0444\u0430\u0439\u043b <strong>\/var\/log\/openvpn\/openvpn.log <\/strong>\u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u0448\u0438\u0431\u043a\u0438:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">TCP\/UDP: Socket bind failed on local address [undef]: Permission denied<\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043e\u043d\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u043d\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c <strong>SELINUX<\/strong>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">vi \/etc\/sysconfig\/selinux<\/pre>\n<p>\u0418 \u043c\u0435\u043d\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>SELINUX=enforcing<\/strong> \u043d\u0430<strong> SELINUX=disabled<\/strong><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">setenforce 0<\/pre>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 firewall<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c <strong>bash<\/strong>-\u0441\u043a\u0440\u0438\u043f\u0442 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 <strong>iptables<\/strong> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"wpcustom\">vi \/etc\/iptables.sh<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">#!\/bin\/sh\r\n\r\nIF_EXT=\"eth0\"\r\nIF_OVPN=\"tun0\"\r\n\r\nOVPN_PORT=\"1194\"\r\n\r\nIPT=\"\/sbin\/iptables\"\r\nIPT6=\"\/sbin\/ip6tables\"\r\n\r\n# flush\r\n$IPT --flush\r\n$IPT -t nat --flush\r\n$IPT -t mangle --flush\r\n$IPT -X\r\n\r\n$IPT6 --flush\r\n\r\n# loopback\r\n$IPT -A INPUT -i lo -j ACCEPT\r\n$IPT -A OUTPUT -o lo -j ACCEPT\r\n\r\n# default\r\n$IPT -P INPUT DROP\r\n$IPT -P OUTPUT DROP\r\n$IPT -P FORWARD DROP\r\n\r\n$IPT6 -P INPUT DROP\r\n$IPT6 -P OUTPUT DROP\r\n$IPT6 -P FORWARD DROP\r\n\r\n# allow forwarding\r\necho 1 &gt; \/proc\/sys\/net\/ipv4\/ip_forward\r\n\r\n# NAT\r\n# #########################################\r\n# SNAT - local users to out internet\r\n$IPT -t nat -A POSTROUTING -o $IF_EXT -j MASQUERADE\r\n\r\n# INPUT chain\r\n# #########################################\r\n$IPT -A INPUT -p tcp ! --syn -m state --state NEW -j DROP\r\n$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT\r\n\r\n# ssh\r\n$IPT -A INPUT -i $IF_EXT -p tcp --dport 22 -j ACCEPT\r\n$IPT -A INPUT -i $IF_OVPN -p icmp -s 10.8.0.0\/24 -j ACCEPT\r\n$IPT -A INPUT -i $IF_OVPN -p udp --dport 53 -s 10.8.0.0\/24 -j ACCEPT\r\n# openvpn\r\n$IPT -A INPUT -i $IF_EXT -p udp --dport $OVPN_PORT -j ACCEPT\r\n\r\n\r\n# FORWARD chain\r\n# #########################################\r\n$IPT -A FORWARD -i $IF_OVPN -o $IF_EXT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT\r\n$IPT -A FORWARD -i $IF_EXT -o $IF_OVPN -m state --state ESTABLISHED,RELATED -j ACCEPT\r\n\r\n\r\n# OUTPUT chain\r\n# #########################################\r\n\r\n$IPT -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT\r\n\r\n\/sbin\/iptables-save &gt; \/etc\/sysconfig\/iptables\r\n<\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a <strong>iptables<\/strong>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"wpcustom\">sh \/etc\/iptables.sh<\/pre>\n<p><strong>\u0413\u043e\u0442\u043e\u0432\u043e!<\/strong> \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 <strong>OpenVPN<\/strong> \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 <strong>CentOS 8<\/strong> \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430. \u0423 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u0439 <strong>VPN<\/strong>-\u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 <strong>OpenVPN<\/strong> \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 <strong>Windows<\/strong> \u0438 <strong>Linux<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 VPN-\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0435\u0442\u0438 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043a\u0430\u043a \u0432 \u043b\u0438\u0447\u043d\u044b\u0445, \u0442\u0430\u043a \u0438 \u0432 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0446\u0435\u043b\u044f\u0445. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 VPN \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1913,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-120","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-4"],"_links":{"self":[{"href":"https:\/\/virtirio.com\/blog\/wp-json\/wp\/v2\/posts\/120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtirio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtirio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtirio.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/virtirio.com\/blog\/wp-json\/wp\/v2\/comments?post=120"}],"version-history":[{"count":71,"href":"https:\/\/virtirio.com\/blog\/wp-json\/wp\/v2\/posts\/120\/revisions"}],"predecessor-version":[{"id":1444,"href":"https:\/\/virtirio.com\/blog\/wp-json\/wp\/v2\/posts\/120\/revisions\/1444"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/virtirio.com\/blog\/wp-json\/wp\/v2\/media\/1913"}],"wp:attachment":[{"href":"https:\/\/virtirio.com\/blog\/wp-json\/wp\/v2\/media?parent=120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtirio.com\/blog\/wp-json\/wp\/v2\/categories?post=120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtirio.com\/blog\/wp-json\/wp\/v2\/tags?post=120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}