{"id":426525,"date":"2024-07-17T15:01:20","date_gmt":"2024-07-17T15:01:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=426525"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=426525","title":{"rendered":"<span>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 OpenVPN \u0434\u043b\u044f CTF<\/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<p>\u041e\u0434\u043d\u0430\u0436\u0434\u044b \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0435\u043d\u0434 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f CTF-\u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0439. \u0417\u0430\u0434\u0430\u0447\u0438 \u0431\u044b\u043b\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043d\u043e \u0434\u043b\u044f \u043d\u0438\u0445 \u0431\u044b\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0441\u0435\u0442\u044c.<\/p>\n<p>\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab\u0417\u0430\u0447\u0435\u043c?\u00bb. \u0421\u0435\u0442\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 IP \u0430\u0434\u0440\u0435\u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0438 \u0431\u0435\u0437 \u0441\u0435\u0442\u0438, \u043e\u0434\u043d\u0430\u043a\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0441\u043e\u0432, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li>\n<p> \u0421\u043b\u0443\u0436\u0431\u044b \u0438\u043c\u0435\u044e\u0442 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u043e\u0440\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0441\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0430\u0434\u0440\u0435\u0441\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0443\u0445\u043e\u0434\u0438\u0442 \u0432\u0430\u0436\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u043e\u0440\u0442\u043e\u0432. \u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0441\u0440\u0430\u0437\u0443 \u0431\u0443\u0434\u0443\u0442 \u0438\u0445 \u0437\u043d\u0430\u0442\u044c, \u0438 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443.<\/p>\n<\/li>\n<li>\n<p> \u0420\u0430\u0437\u0434\u0430\u0447\u0430 \u043f\u043e\u0440\u0442\u043e\u0432 \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u0412 \u043c\u043e\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445 \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0431\u044b\u043b \u043d\u0435 \u043e\u0434\u0438\u043d \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0443. \u0422\u0430\u043a \u0447\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u0439. \u0410 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u0437\u0430\u0434\u0430\u0447.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 reverse shell, \u0430 \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u0431\u0435\u043b\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e 99% \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, VPS<\/p>\n<\/li>\n<li>\n<p> \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0430\u043c. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0442\u0430\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0441\u043c\u043e\u0433 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043c\u0430\u0448\u0438\u043d\u044b \u0432 \u0441\u0432\u043e\u0438\u0445 \u0446\u0435\u043b\u044f\u0445.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u0434\u0430\u0447\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0431\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u043d\u043e \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0435\u0433\u043e \u0432\u044b\u0434\u0430\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0439 IP \u0430\u0434\u0440\u0435\u0441.<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0439 IP \u0430\u0434\u0440\u0435\u0441.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0440\u0442\u043e\u0432 \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0432 \u0441\u0432\u043e\u0438\u0445 \u0446\u0435\u043b\u044f\u0445.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0434\u0438\u043d \u043a\u043e\u043d\u0444\u0438\u0433 VPN \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u0430\u043a \u0441 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438, \u0442\u0430\u043a \u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438. \u041d\u043e, \u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0443\u043d\u043a\u0442 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c.   <\/p>\n<\/li>\n<\/ul>\n<h4>\u0421\u043e\u0444\u0442 \u0438 \u0436\u0435\u043b\u0435\u0437\u043e<\/h4>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f Proxmox 8.1.4, \u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u2013 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 Debian 12.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0441\u0445\u0435\u043c\u0430 \u0441\u0435\u0442\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/41d\/706\/782\/41d706782f353fa4be75538400070c3d.jpg\" alt=\"\u0415\u0441\u043b\u0438 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0441\u0435\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u044d\u0442\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0442\u043e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0438\u0445 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439.\" title=\"\u0415\u0441\u043b\u0438 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0441\u0435\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u044d\u0442\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0442\u043e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0438\u0445 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439.\" width=\"1485\" height=\"1076\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/41d\/706\/782\/41d706782f353fa4be75538400070c3d.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0415\u0441\u043b\u0438 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0441\u0435\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u044d\u0442\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0442\u043e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0438\u0445 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439.<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e OpenVPN?\u00bb.<\/p>\n<p>\u041a\u0430\u043a \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c Wireguard, \u043e\u0434\u043d\u0430\u043a\u043e:<\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0430\u043a\u0436\u0435 OpenVPN \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443.<\/p>\n<\/li>\n<li>\n<p> OpenVPN \u0443\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f CTF-\u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0439.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430. \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h4>\n<p>\u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0431\u044b\u043b\u0430 \u0432\u0437\u044f\u0442\u0430 Debian 12. \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u0441\u0442\u0430\u0432\u0438\u043c \u0441\u043e\u0444\u0442 \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<p><code>sudo apt update &amp;&amp; sudo apt upgrade -y &amp;&amp; sudo apt install -y curl vim nano wget net-tools iptables-persistent<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dcf\/f06\/e2f\/dcff06e2f9b7933b8bafdcf09fcabbc6.png\" alt=\"\u0415\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 iptables \u2013 \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u043c \u00abYes\u00bb\" title=\"\u0415\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 iptables \u2013 \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u043c \u00abYes\u00bb\" width=\"1026\" height=\"235\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dcf\/f06\/e2f\/dcff06e2f9b7933b8bafdcf09fcabbc6.png\"\/><\/p>\n<div><figcaption>\u0415\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 iptables \u2013 \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u043c \u00abYes\u00bb<\/figcaption><\/div>\n<\/figure>\n<h4>IP Forward<\/h4>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0434\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c IP forward \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435:<\/p>\n<p><code>sudo nano \/etc\/sysctl.conf<\/code><\/p>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440: <code>net.ipv4.ip_forward = 1.<\/code>\u041d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 1       <\/p>\n<h4>\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 \u0432 \u0441\u0435\u0442\u0438   <\/h4>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0440\u043e\u043b\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u043f\u043e DHCP \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441:   <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/26d\/662\/cff\/26d662cff7790c3a92610c38ce656372.png\" alt=\"\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441\" title=\"\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441\" width=\"613\" height=\"321\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/26d\/662\/cff\/26d662cff7790c3a92610c38ce656372.png\"\/><\/p>\n<div><figcaption>\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441<\/figcaption><\/div>\n<\/figure>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \/etc\/network\/interfaces \u0432 \u043b\u044e\u0431\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435:<\/p>\n<p><code>sudo nano \/etc\/network\/interfaces<\/code><\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e IP \u0430\u0434\u0440\u0435\u0441\u0430: <\/p>\n<p><code>auto ens18<\/code><\/p>\n<p><code>iface ens18 inet static address 192.168.0.155<\/code><\/p>\n<p><code>netmask 255.255.255.0<\/code><\/p>\n<p><code>gateway 192.168.0.1<\/code><\/p>\n<p><code>dns-nameservers 8.8.8.8<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f12\/5a1\/665\/f125a16650312e94da77c713e520b0d6.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0430\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0430\" width=\"599\" height=\"287\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f12\/5a1\/665\/f125a16650312e94da77c713e520b0d6.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0430\u0434\u0440\u0435\u0441 192.168.0.155   <\/p>\n<p><code>sudo systemctl restart NetworkManager.service<\/code><\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 OpenVPN   <\/h3>\n<p>\u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0431\u044b\u043b \u0432\u0437\u044f\u0442 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442: <a href=\"https:\/\/github.com\/kylemanna\/docker-openvpn\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/kylemanna\/docker-openvpn<\/a>.<\/p>\n<p>\u041d\u043e \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u0421\u043c\u0435\u043d\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root: <code>sudo su -<\/code><\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b: <code>sudo apt install -y openvpn iptables bash git easy-rsa pamtester<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0437 \/usr\/share\/easy-rsa\/easyrsa   <\/p>\n<p><code>ln -s \/usr\/share\/easy-rsa\/easyrsa \/usr\/local\/bin<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432: <\/p>\n<p><code>echo \"export OPENVPN=\/etc\/openvpn\" >> ~\/.bashrc<\/code><\/p>\n<p><code>echo \"export EASYRSA=\/usr\/share\/easy-rsa\"<br \/> >> ~\/.bashrc<\/code><\/p>\n<p><code>echo \"export EASYRSA_CRL_DAYS=3650\" >> ~\/.bashrc echo \"export EASYRSA_PKI=$OPENVPN\/pki\" >> ~\/.bashrc<\/code><\/p>\n<\/li>\n<li>\n<p>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 <code>~\/.bashrc<\/code> , \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u043b\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u044b: <code>source ~\/.bashrc<\/code>  <\/p>\n<\/li>\n<li>\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e: <code>git clone https:\/\/github.com\/kylemanna\/docker-openvpn cd docker-openvpn<\/code><\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0432\u044b\u0434\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0430:<\/p>\n<p><code>cp .\/bin\/* \/usr\/local\/bin<\/code><\/p>\n<p><code>cp .\/otp\/openvpn \/etc\/pam.d\/ chmod a+x \/usr\/local\/bin\/* cd<\/code><\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e. \u0412\u043c\u0435\u0441\u0442\u043e (\u0422\u0423\u0422_\u041d\u0423\u0416\u041d\u041e_\u0423\u041a\u0410\u0417\u0410\u0422\u042c_IP_\u0410\u0414\u0420\u0415\u0421_\u0421\u0415\u0420\u0412\u0415\u0420\u0410), \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c IP \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430: <\/p>\n<p><code>ovpn_genconfig -N -d -u udp:\/\/\u0422\u0423\u0422_\u041d\u0423\u0416\u041d\u041e_\u0423\u041a\u0410\u0417\u0410\u0422\u042c_IP_\u0410\u0414\u0420\u0415\u0421_\u0421\u0415\u0420\u0412\u0415\u0420\u0410<\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a09\/da0\/4b9\/a09da04b92a97b02e184738745d416e7.png\" alt=\"\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\" title=\"\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\" width=\"526\" height=\"117\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a09\/da0\/4b9\/a09da04b92a97b02e184738745d416e7.png\"\/><\/p>\n<div><figcaption>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447\u0438: <code>ovpn_initpki<\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/68d\/ae1\/9bf\/68dae19bf68d2133280379192d380eed.png\" alt=\"\u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0438 \u0432\u0432\u0435\u0441\u0442\u0438 \u043a\u043b\u044e\u0447  \" title=\"\u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0438 \u0432\u0432\u0435\u0441\u0442\u0438 \u043a\u043b\u044e\u0447  \" width=\"852\" height=\"326\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/68d\/ae1\/9bf\/68dae19bf68d2133280379192d380eed.png\"\/><\/p>\n<div><figcaption>\u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0438 \u0432\u0432\u0435\u0441\u0442\u0438 \u043a\u043b\u044e\u0447  <\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043b\u044e\u0447\u0430: <code>Qwertyqwertyqwerty123<\/code>  <\/p>\n<p><em>\u0414\u0430\u043b\u0435\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c:   <\/em><\/p>\n<\/li>\n<li>\n<p>\u00a0\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0434\u043b\u044f \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d \u043a\u043b\u044e\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0432\u0432\u043e\u0434\u0438\u043b\u0438 \u0432\u044b\u0448\u0435: <code>easyrsa build-client-full ctf-team nopass<\/code><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u0432 \u0444\u0430\u0439\u043b: <code>ovpn_getclient ctf-team > .\/ctf-team.ovpn<\/code><\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u0438\u043d \u043a\u043e\u043d\u0444\u0438\u0433 \u043a \u0441\u0435\u0442\u0438, \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433: <code>vim \/etc\/openvpn\/openvpn.conf<\/code><\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443: <code>duplicate-cn <\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cb7\/b5f\/408\/cb7b5f40812dc1e9e7f1caeccd4aaac5.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440\" width=\"199\" height=\"163\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cb7\/b5f\/408\/cb7b5f40812dc1e9e7f1caeccd4aaac5.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c OpenVPN: <code>ovpn_run<\/code><\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e \u043f\u0443\u0442\u0438 <code>\/root\/ctf-team.ovpn<\/code> \u043a \u0441\u0435\u0431\u0435 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440.   <\/p>\n<p>\u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<code>scp root@SERVER_IP:\/root\/ctf-team.ovpn ~<\/code> <\/p>\n<p>\u0418 \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u043c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435: <code>sudo openvpn ctf-team.ovpn<\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/de5\/e61\/2b2\/de5e612b27b619b2e100fbd80bc4f066.png\" alt=\"\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 tun   \" title=\"\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 tun   \" width=\"738\" height=\"169\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/de5\/e61\/2b2\/de5e612b27b619b2e100fbd80bc4f066.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 tun   <\/figcaption><\/div>\n<\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u043e \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u043d\u043e\u0432\u0430. OpenVPN \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Docker<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Docker: <code>sudo apt install -y docker.io docker-compose<\/code><\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u0434\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 docker: <code>sudo usermod -aG docker \u041d\u0410\u0428_\u042e\u0417\u0415\u0420<\/code>   <\/p>\n<\/li>\n<\/ul>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0442\u0438<\/h3>\n<p>\u0412\u043d\u043e\u0432\u044c \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0430\u0432\u0430 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0438\u0441\u044c, \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c docker \u0441\u0435\u0442\u044c: <code>docker network create --subnet=192.168.158.0\/24 ctf-net<\/code><\/p>\n<p> \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 Docker network \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0443\u0442: <a href=\"https:\/\/habr.com\/ru\/companies\/otus\/articles\/730798\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/companies\/otus\/articles\/730798\/<\/a><\/p>\n<ul>\n<li>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u0434\u043b\u044f VPN, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043a\u0430\u0447\u0430\u043b\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438: <\/p>\n<p><code>route  192.168.255.0 255.255.255.0<\/code><\/p>\n<p><code>route 192.168.158.0 255.255.255.0 <\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/65c\/c38\/362\/65cc38362971c3b6b66d526be03f84d5.jpg\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440\" width=\"604\" height=\"358\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/65c\/c38\/362\/65cc38362971c3b6b66d526be03f84d5.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a OpenVPN \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0438 \u0432\u0432\u043e\u0434\u0438\u043c:  <code>ip route<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u044d\u0442\u0438 \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0442\u043e \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e:   <\/p>\n<p><code>192.168.158.0\/24 via 192.168.255.5 dev tun0<\/code><\/p>\n<p><code>192.168.255.0\/24 via 192.168.255.5 dev tun0<\/code><\/p>\n<h3>\u041f\u0440\u0430\u0432\u0438\u043b\u0430 iptables<\/h3>\n<p>\u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f iptables: <\/p>\n<p><code>sudo iptables -A FORWARD -i tun0 -s 192.168.255.0\/24 -d 192.168.158.0\/24 -j ACCEPT<\/code><\/p>\n<p><code>sudo iptables -A FORWARD -o tun0 -s 192.168.158.0\/24 -d 192.168.255.0\/24 -m state --state RELATED,ESTABLISHED -j ACCEPT<\/code><\/p>\n<p><code># \u0420\u0430\u0437\u0440\u0435\u0448\u0438\u043c \u0442\u0440\u0430\u0444\u0438\u043a \u043e\u0442 \u043c\u0430\u0448\u0438\u043d (192.168.158.0\/24) \u043a \u0441\u0435\u0442\u0438 (192.168.255.0\/24) sudo iptables -A FORWARD -o tun0 -s 192.168.158.0\/24 -d 192.168.255.0\/24 -j ACCEPT<\/code><\/p>\n<p><code>sudo iptables -A FORWARD -i tun0 -s 192.168.255.0\/24 -d 192.168.158.0\/24 -m state --state RELATED,ESTABLISHED -j ACCEPT<\/code><\/p>\n<h2>\u0422\u0435\u0441\u0442\u044b \u0441\u0435\u0442\u0438<\/h2>\n<p><strong>\u0422\u0435\u0441\u0442\u044b \u0441\u0435\u0442\u0438 \u0434\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/strong><\/p>\n<ul>\n<li>\n<p>\u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441 nginx: <code>docker run --network=ctf-net -d --rm --name nginx_test nginx<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432 docker \u0441\u0435\u0442\u0438: <code>docker inspect nginx_test | grep IPAddress<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e <em>192.168.158.2<\/em> , \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c VPN \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0437\u0430\u0445\u043e\u0436\u0443 \u043d\u0430 \u0441\u0430\u0439\u0442 <em>192.168.158.2<\/em><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/83b\/dcb\/3c4\/83bdcb3c49b196f65203bae87848bf31.jpg\" alt=\"\u0421\u0430\u0439\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\" title=\"\u0421\u0430\u0439\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\" width=\"1378\" height=\"295\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/83b\/dcb\/3c4\/83bdcb3c49b196f65203bae87848bf31.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0421\u0430\u0439\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043e\u0442\u043a\u0440\u044b\u0442<\/figcaption><\/div>\n<\/figure>\n<h3>\u0422\u0435\u0441\u0442 \u0441\u0435\u0442\u0438 \u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h3>\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443.    <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c55\/bf9\/786\/c55bf97860088ac1d116007951f7c1de.png\" alt=\"\u041f\u043e\u043b\u0443\u0447\u0430\u044e \u0441\u0432\u043e\u0439 \u0430\u0434\u0440\u0435\u0441 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 ifcon\ufb01g.   \" title=\"\u041f\u043e\u043b\u0443\u0447\u0430\u044e \u0441\u0432\u043e\u0439 \u0430\u0434\u0440\u0435\u0441 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 ifcon\ufb01g.   \" width=\"745\" height=\"165\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c55\/bf9\/786\/c55bf97860088ac1d116007951f7c1de.png\"\/><\/p>\n<div><figcaption>\u041f\u043e\u043b\u0443\u0447\u0430\u044e \u0441\u0432\u043e\u0439 \u0430\u0434\u0440\u0435\u0441 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 ifcon\ufb01g.   <\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u044e \u0441\u0432\u043e\u0439 \u0430\u0434\u0440\u0435\u0441 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 ifcon\ufb01g: <code>docker exec -ti nginx_test \/bin\/bash<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root.<\/p>\n<p>\u00a0\u041f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 nginx \u043d\u0435\u0442 ping, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c: <code>apt update &amp;&amp; apt install iputils-ping<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043a VPN:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3a8\/ef8\/57a\/3a8ef857a096ddb24d88e4ec8a2e800d.png\" alt=\"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043a VPN \" title=\"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043a VPN \" width=\"558\" height=\"137\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3a8\/ef8\/57a\/3a8ef857a096ddb24d88e4ec8a2e800d.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043a VPN <\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>exit<\/code><\/p>\n<h3>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 iptables   <\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 iptables. <\/p>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435: <code>sudo su -<\/code><\/p>\n<\/li>\n<li>\n<p>\u0418 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c: <code>iptables-save > \/etc\/iptables\/rules.v4<\/code><\/p>\n<\/li>\n<\/ul>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a CTF-\u0437\u0430\u0434\u0430\u043d\u0438\u0439<\/h3>\n<p>\u0422\u0443\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e: \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c: <code>--network=ctf-net<\/code>, \u0441\u0440\u0430\u0437\u0443 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0443\u0436\u043d\u043e\u0439 \u043d\u0430\u043c \u0441\u0435\u0442\u0438.<\/p>\n<p>\u0422\u0430\u043a \u0447\u0442\u043e, \u0437\u0430\u043f\u0443\u0441\u043a \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a: <code>docker run --network=ctf-net -d --rm --name CONTAINER_NAME IMAGES_NAME<\/code>  <\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0434\u043e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d<\/h3>\n<p>Docker \u2013 \u044d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u043e, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u044b \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445, \u0442\u0430\u043a \u0447\u0442\u043e \u0438\u0445 \u0442\u043e\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c.<\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0442\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u043d\u0430\u0448\u0443 \u043c\u0430\u0448\u0438\u043d\u0443 \u043d\u043e\u0432\u044b\u043c \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0432 \u044d\u0442\u0443 \u0441\u0435\u0442\u044c. <\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6aa\/f44\/dfb\/6aaf44dfb28f3ff82ad63c133c0f2732.png\" alt=\"\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043d\u0430\u0448\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c   \" title=\"\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043d\u0430\u0448\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c   \" width=\"796\" height=\"886\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6aa\/f44\/dfb\/6aaf44dfb28f3ff82ad63c133c0f2732.png\"\/><\/p>\n<div><figcaption>\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043d\u0430\u0448\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c   <\/figcaption><\/div>\n<\/figure>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e ens19 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0431\u0435\u0437 \u0430\u0434\u0440\u0435\u0441\u0430, \u0442\u0430\u043a \u043a\u0430\u043a DHCP \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043d\u0435\u0442. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c DHCP \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<ul>\n<li>\n<p>\u0423\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (\u043f\u0443\u043d\u043a\u0442 <code>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 \u0432 \u0441\u0435\u0442\u0438<\/code>)<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a6e\/048\/7c8\/a6e0487c8b0801897786b8084897835e.png\" alt=\"\u0414\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\" title=\"\u0414\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\" width=\"767\" height=\"447\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a6e\/048\/7c8\/a6e0487c8b0801897786b8084897835e.png\"\/><\/p>\n<div><figcaption>\u0414\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/095\/f7d\/209\/095f7d209ffe9a3c43b6721664239a56.png\" alt=\"\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \" title=\"\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \" width=\"835\" height=\"906\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/095\/f7d\/209\/095f7d209ffe9a3c43b6721664239a56.png\"\/><\/p>\n<div><figcaption>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 <\/figcaption><\/div>\n<\/figure>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 DHCP ( \u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u0435\u0440\u043d\u0443\u0442\u044c )<\/h3>\n<p><code>sudo apt install isc-dhcp-server<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/aa9\/b37\/559\/aa9b375596e9ad43930ad9f4daeeaf7a.png\" alt=\"\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0447\u0442\u043e \u0441\u043b\u0443\u0436\u0431\u0430 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f.   \" title=\"\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0447\u0442\u043e \u0441\u043b\u0443\u0436\u0431\u0430 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f.   \" width=\"1001\" height=\"465\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aa9\/b37\/559\/aa9b375596e9ad43930ad9f4daeeaf7a.png\"\/><\/p>\n<div><figcaption>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0447\u0442\u043e \u0441\u043b\u0443\u0436\u0431\u0430 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f.   <\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433: <code>sudo nano \/etc\/dhcp\/dhcpd.conf<\/code><\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u043e\u0442 \u044d\u0442\u043e \u0432 \u043f\u0443\u0441\u0442\u043e\u0435 \u043c\u0435\u0441\u0442\u043e: <\/p>\n<p><code>subnet 10.0.50.0 netmask 255.255.255.0 {<\/code><\/p>\n<p><code>range 10.0.50.10 10.0.50.240;<\/code><\/p>\n<p><code>option domain-name-servers 8.8.8.8;<\/code><\/p>\n<p><code>option subnet-mask 255.255.255.0;<\/code><\/p>\n<p><code>option routers 10.0.50.1;<\/code><\/p>\n<p><code>default-lease-time 600;<\/code><\/p>\n<p><code>max-lease-time 7200;<\/code><\/p>\n<p><code>}<\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ae2\/af4\/de1\/ae2af4de181904c126d12d28e9dd85cb.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a\" width=\"687\" height=\"591\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ae2\/af4\/de1\/ae2af4de181904c126d12d28e9dd85cb.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a<\/figcaption><\/div>\n<\/figure>\n<p>***\u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 range <em>10.0.50.10 10.0.50.240 .<\/em> <\/p>\n<p>\u0422\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0440\u0430\u0437\u0434\u0430\u0447\u0438 IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432 DHCP \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u0422\u043e \u0435\u0441\u0442\u044c, 2-10 \u0438 240- 254 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,\u0441\u043b\u0443\u0436\u0431\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0441 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0430\u0434\u0440\u0435\u0441\u043e\u043c.<\/p>\n<ul>\n<li>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b: <code>sudo nano \/etc\/default\/isc-dhcp-server<\/code>   <\/p>\n<\/li>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441\u0430 DHCP \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ad8\/40d\/84b\/ad840d84b614a84c02c66c57025acee4.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440\" width=\"626\" height=\"335\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ad8\/40d\/84b\/ad840d84b614a84c02c66c57025acee4.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0441\u043b\u0443\u0436\u0431\u0443: <code>sudo systemctl restart isc-dhcp-server<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0435\u0435 \u0441\u0442\u0430\u0442\u0443\u0441:  <code>sudo systemctl status isc-dhcp-server<\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/566\/44e\/295\/56644e2951a5736be16905e02cb1b2b7.png\" alt=\"\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u043b\u0443\u0436\u0431\u044b\" title=\"\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u043b\u0443\u0436\u0431\u044b\" width=\"814\" height=\"312\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/566\/44e\/295\/56644e2951a5736be16905e02cb1b2b7.png\"\/><\/p>\n<div><figcaption>\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u043b\u0443\u0436\u0431\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0435 \u0432 \u0434\u0435\u043b\u0435. <\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0435\u0435 \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0435\u0442\u0438. \u041c\u0430\u0448\u0438\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c IP \u0430\u0434\u0440\u0435\u0441.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/974\/472\/ebc\/974472ebc7d285f8850e3ecd07f80356.png\" alt=\"\u041c\u0430\u0448\u0438\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430 \u0430\u0434\u0440\u0435\u0441, \u043d\u043e 8.8.8.8 \u043d\u0435 \u043f\u0438\u043d\u0433\u0443\u0435\u0442\" title=\"\u041c\u0430\u0448\u0438\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430 \u0430\u0434\u0440\u0435\u0441, \u043d\u043e 8.8.8.8 \u043d\u0435 \u043f\u0438\u043d\u0433\u0443\u0435\u0442\" width=\"860\" height=\"361\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/974\/472\/ebc\/974472ebc7d285f8850e3ecd07f80356.png\"\/><\/p>\n<div><figcaption>\u041c\u0430\u0448\u0438\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430 \u0430\u0434\u0440\u0435\u0441, \u043d\u043e 8.8.8.8 \u043d\u0435 \u043f\u0438\u043d\u0433\u0443\u0435\u0442<\/figcaption><\/div>\n<\/figure>\n<h3>\u041f\u0440\u0430\u0432\u0438\u043b\u0430 iptables   <\/h3>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433 OpenVPN, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u0430\u0447\u0430\u043b\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/78a\/879\/375\/78a87937578d8fa8d219b1770f988081.png\" alt=\"\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a\" title=\"\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a\" width=\"580\" height=\"244\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/78a\/879\/375\/78a87937578d8fa8d219b1770f988081.png\"\/><\/p>\n<div><figcaption>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f iptables. <strong>(\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u0442 root)<\/strong><\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443. <\/p>\n<p><code>iptables -A FORWARD -i tun0 -o ens19 -s 192.168.255.0\/24 -d 10.0.50.0\/24 -j ACCEPT<\/code><\/p>\n<p><code>iptables -A FORWARD -i ens19 -o tun0 -s 10.0.50.0\/24 -d 192.168.255.0\/24 -m state --state RELATED,ESTABLISHED -j ACCEPT<\/code><\/p>\n<p><code># \u0420\u0430\u0437\u0440\u0435\u0448\u0438\u043c \u0442\u0440\u0430\u0444\u0438\u043a \u043e\u0442 \u043c\u0430\u0448\u0438\u043d (10.0.50.0\/24) \u043a \u0441\u0435\u0442\u0438 (192.168.255.0\/24) iptables -A FORWARD -i ens19 -o tun0 -s 10.0.50.0\/24 -d 192.168.255.0\/24 -j ACCEPT<\/code><\/p>\n<p><code>iptables -A FORWARD -i tun0 -o ens19 -s 192.168.255.0\/24 -d 10.0.50.0\/24 -m state --state RELATED,ESTABLISHED -j ACCEPT<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u043f\u0438\u043d\u0433\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043a VPN: <\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2d1\/621\/3db\/2d16213db7c65ecaca20774478cebeaa.png\" alt=\"\u041f\u0438\u043d\u0433\u0443\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\" title=\"\u041f\u0438\u043d\u0433\u0443\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\" width=\"500\" height=\"174\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2d1\/621\/3db\/2d16213db7c65ecaca20774478cebeaa.png\"\/><\/p>\n<div><figcaption>\u041f\u0438\u043d\u0433\u0443\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d5e\/229\/9f4\/d5e2299f4412f887fc703e0866e05e86.png\" alt=\"\u0421 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043f\u0438\u043d\u0433\u0443\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443\" title=\"\u0421 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043f\u0438\u043d\u0433\u0443\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443\" width=\"489\" height=\"279\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d5e\/229\/9f4\/d5e2299f4412f887fc703e0866e05e86.png\"\/><\/p>\n<div><figcaption>\u0421 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043f\u0438\u043d\u0433\u0443\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430: <code>iptables-save > \/etc\/iptables\/rules.v4<\/code><\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0439 \u044d\u0442\u0430\u043f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u044b\u043c.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 iptables   <\/h4>\n<ol>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043d\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443.   <\/p>\n<\/li>\n<li>\n<p>\u0416\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0435\u043a\u0430\u043f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u0442\u044c.<\/p>\n<\/li>\n<\/ol>\n<ul>\n<li>\n<p>\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e ssh: <code>sudo iptables -A INPUT -i ens18 -s 192.168.0.1\/24 -p tcp --dport 22 -j ACCEPT<\/code><\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e udp \u043f\u043e\u0440\u0442\u0430 VPN: <code>sudo iptables -A INPUT -i ens18 -p udp --dport 1194 -j ACCEPT<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: <code>sudo iptables -P FORWARD DROP<\/code><\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0440\u0435\u0442 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0434\u043b\u044f tun: <\/p>\n<\/li>\n<\/ul>\n<p><code>iptables -I FORWARD -i tun0 -o ens18 -j DROP <\/code><\/p>\n<p><code>iptables -I FORWARD -i ens18 -o tun0 -j DROP<\/code><\/p>\n<h3>\u0417\u0430\u043f\u0440\u0435\u0442 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0434\u043b\u044f Docker<\/h3>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c5e\/b14\/844\/c5eb148440b853a8d6358f0c7cb39c0a.png\" width=\"511\" height=\"163\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c5e\/b14\/844\/c5eb148440b853a8d6358f0c7cb39c0a.png\"\/><\/figure>\n<ul>\n<li>\n<p>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u0438\u043c\u0435\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u043d\u043e \u043d\u0430\u0441 \u044d\u0442\u043e \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u044e\u0449\u0438\u0435 \u044d\u0442\u043e: <\/p>\n<p><code>iptables -I FORWARD -s 192.168.158.0\/24 -j DROP<\/code><\/p>\n<p><code>iptables -I FORWARD -s 192.168.158.0\/24 -d 192.168.255.0\/24 -j ACCEPT<\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/099\/357\/026\/099357026f78787fe2f168f4fba243ad.png\" alt=\"\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\" title=\"\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\" width=\"552\" height=\"276\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/099\/357\/026\/099357026f78787fe2f168f4fba243ad.png\"\/><\/p>\n<div><figcaption>\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/figcaption><\/div>\n<\/figure>\n<h3>\u0417\u0430\u043f\u0440\u0435\u0442 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0434\u043b\u044f VM<\/h3>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0445 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0439\u0442\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442.<\/p>\n<h3>\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0434\u043b\u044f Docker<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0432\u044b\u0445\u043e\u0434 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u043d\u0443\u0436\u043d\u043e \u0441\u043d\u044f\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e. <\/p>\n<ul>\n<li>\n<p>\u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:  <code>iptables -D FORWARD -s 192.168.158.0\/24 -j DROP<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0438 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443: <\/p>\n<p><code>iptables -D FORWARD -s 192.168.158.0\/24 -d 192.168.255.0\/24 -j ACCEPT<\/code><\/p>\n<p><code> iptables -I FORWARD -s 192.168.158.0\/24 -j DROP<\/code><\/p>\n<p><code>iptables -I FORWARD -s 192.168.158.0\/24 -d 192.168.255.0\/24 -j ACCEPT<\/code><\/p>\n<\/li>\n<\/ul>\n<h3>\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0434\u043b\u044f VM<\/h3>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u041d\u0443\u0436\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0443 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <em>MASQUERADE<\/em>. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0443 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0430\u0434\u0440\u0435\u0441\u043e\u0432 10.0.50.0\/24   <\/p>\n<p><code>iptables -t nat -A POSTROUTING -o ens18 -s 10.0.50.0\/24 -j MASQUERADE <\/code><\/p>\n<p><code>iptables -A FORWARD -i ens19 -o ens18 -s 10.0.50.0\/24 -j ACCEPT <\/code><\/p>\n<p><code>iptables -A FORWARD -i ens18 -o ens19 -d 10.0.50.0\/24 -j ACCEPT<\/code><\/p>\n<p>\u041e\u0431\u0440\u0430\u0449\u0430\u044e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435,\u0447\u0442\u043e\u00a0ens18 \u2013 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u2013 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0437\u0430\u043f\u0440\u0435\u0442 \u043d\u0430 \u0442\u0440\u0430\u0444\u0438\u043a:<\/p>\n<p><code>iptables -t nat -D POSTROUTING -o ens18 -s 10.0.50.0\/24 -j MASQUERADE<\/code><\/p>\n<p><code> iptables -D FORWARD -i ens19 -o ens18 -s 10.0.50.0\/24 -j ACCEPT <\/code><\/p>\n<p><code>iptables -D FORWARD -i ens18 -o ens19 -d 10.0.50.0\/24 -j ACCEPT<\/code><\/p>\n<h3>\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b<\/h3>\n<p>\u00a0\u041f\u043e\u0441\u043b\u0435 \u043d\u0443\u0436\u043d\u044b\u0445 \u043d\u0430\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430: <code>iptables-save > \/etc\/iptables\/rules.v4<\/code><\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u044b, \u0442\u043e \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u0442\u0435\u043d\u0434\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u0432\u044b\u0445\u043e\u0434\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u043d\u043e \u0435\u0441\u043b\u0438 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0442\u043e \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u044e \u0441\u0442\u0435\u043d\u0434.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0430\u0442\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0435\u043d\u0434, \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0430\u0445 \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u043d\u0435\u0442, \u0438  \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0438\u043b\u0438 \u043d\u0435\u0442. <\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434 \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u044b\u0441\u043b\u0435\u0439    <\/h2>\n<p>\u0421\u0442\u0435\u043d\u0434 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f CTF-\u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0439 \u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u0442\u0440\u0443\u0434\u0430.<\/p>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u0435\u043b\u0430\u043b\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0439<br \/> \u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0435, \u0430 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f<br \/> \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u043c, \u0438 \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043f\u0438\u0439 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>(\u041e\u0434\u043d\u0430 \u0441\u0442\u043e\u0438\u0442 \u0434\u0430\u0436\u0435 \u0434\u043e\u043c\u0430, \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u0434\u0440\u0443\u0437\u044c\u044f\u043c\u0438. \u0422\u0430\u043a \u043a\u0430\u043a \u043a \u0442\u0430\u043a\u043e\u0439 \u0441\u0435\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e \u0438 \u0438\u043c\u0435\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u0442\u0435\u043d\u0434 \u0434\u043b\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u043a.)<\/p>\n<p>\u041a\u0430\u043a \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0440\u0430\u043d\u0435\u0435, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u0438\u0441\u044c \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0438\u043d\u0441\u0442\u0438\u0442\u0443\u0442\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0421\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0438 \u043d\u0430 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445, \u0430 \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 domolo: <a href=\"https:\/\/github.com\/ductnn\/domolo.git\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/ductnn\/domolo.git<\/a><\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0447\u0435\u0440\u0435\u0437 docker-compose. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0438\u043c\u0435\u0435\u043c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u0422\u0430\u043a \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043c\u0430\u0439\u043d\u0435\u0440 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435, \u0442\u043e \u044d\u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u043e, \u0438 \u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u044c.<\/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\/829534\/\"> https:\/\/habr.com\/ru\/articles\/829534\/<\/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<p>\u041e\u0434\u043d\u0430\u0436\u0434\u044b \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0435\u043d\u0434 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f CTF-\u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0439. \u0417\u0430\u0434\u0430\u0447\u0438 \u0431\u044b\u043b\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043d\u043e \u0434\u043b\u044f \u043d\u0438\u0445 \u0431\u044b\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0441\u0435\u0442\u044c.<\/p>\n<p>\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab\u0417\u0430\u0447\u0435\u043c?\u00bb. \u0421\u0435\u0442\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 IP \u0430\u0434\u0440\u0435\u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0438 \u0431\u0435\u0437 \u0441\u0435\u0442\u0438, \u043e\u0434\u043d\u0430\u043a\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0441\u043e\u0432, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li>\n<p> \u0421\u043b\u0443\u0436\u0431\u044b \u0438\u043c\u0435\u044e\u0442 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u043e\u0440\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0441\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0430\u0434\u0440\u0435\u0441\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0443\u0445\u043e\u0434\u0438\u0442 \u0432\u0430\u0436\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u043e\u0440\u0442\u043e\u0432. \u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0441\u0440\u0430\u0437\u0443 \u0431\u0443\u0434\u0443\u0442 \u0438\u0445 \u0437\u043d\u0430\u0442\u044c, \u0438 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443.<\/p>\n<\/li>\n<li>\n<p> \u0420\u0430\u0437\u0434\u0430\u0447\u0430 \u043f\u043e\u0440\u0442\u043e\u0432 \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u0412 \u043c\u043e\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445 \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0431\u044b\u043b \u043d\u0435 \u043e\u0434\u0438\u043d \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430 \u0437\u0430\u0434\u0430\u0447\u0443. \u0422\u0430\u043a \u0447\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u0439. \u0410 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u0437\u0430\u0434\u0430\u0447.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 reverse shell, \u0430 \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u0431\u0435\u043b\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e 99% \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, VPS<\/p>\n<\/li>\n<li>\n<p> \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0430\u043c. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0442\u0430\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0441\u043c\u043e\u0433 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043c\u0430\u0448\u0438\u043d\u044b \u0432 \u0441\u0432\u043e\u0438\u0445 \u0446\u0435\u043b\u044f\u0445.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u0434\u0430\u0447\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0431\u0435\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u043d\u043e \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0435\u0433\u043e \u0432\u044b\u0434\u0430\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0439 IP \u0430\u0434\u0440\u0435\u0441.<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0439 IP \u0430\u0434\u0440\u0435\u0441.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0440\u0442\u043e\u0432 \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0432 \u0441\u0432\u043e\u0438\u0445 \u0446\u0435\u043b\u044f\u0445.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0434\u0438\u043d \u043a\u043e\u043d\u0444\u0438\u0433 VPN \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u0430\u043a \u0441 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438, \u0442\u0430\u043a \u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438. \u041d\u043e, \u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0443\u043d\u043a\u0442 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c.   <\/p>\n<\/li>\n<\/ul>\n<h4>\u0421\u043e\u0444\u0442 \u0438 \u0436\u0435\u043b\u0435\u0437\u043e<\/h4>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f Proxmox 8.1.4, \u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u2013 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 Debian 12.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0441\u0445\u0435\u043c\u0430 \u0441\u0435\u0442\u0438:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0415\u0441\u043b\u0438 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0441\u0435\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u044d\u0442\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0442\u043e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0438\u0445 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439.<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e OpenVPN?\u00bb.<\/p>\n<p>\u041a\u0430\u043a \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0443 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c Wireguard, \u043e\u0434\u043d\u0430\u043a\u043e:<\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0422\u0430\u043a\u0436\u0435 OpenVPN \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443.<\/p>\n<\/li>\n<li>\n<p> OpenVPN \u0443\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f CTF-\u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0439.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430. \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h4>\n<p>\u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0431\u044b\u043b\u0430 \u0432\u0437\u044f\u0442\u0430 Debian 12. \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u0441\u0442\u0430\u0432\u0438\u043c \u0441\u043e\u0444\u0442 \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<p><code>sudo apt update &amp;&amp; sudo apt upgrade -y &amp;&amp; sudo apt install -y curl vim nano wget net-tools iptables-persistent<\/code><\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0415\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 iptables \u2013 \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u043c \u00abYes\u00bb<\/figcaption><\/div>\n<\/figure>\n<h4>IP Forward<\/h4>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0434\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c IP forward \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435:<\/p>\n<p><code>sudo nano \/etc\/sysctl.conf<\/code><\/p>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440: <code>net.ipv4.ip_forward = 1.<\/code>\u041d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 1       <\/p>\n<h4>\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 \u0432 \u0441\u0435\u0442\u0438   <\/h4>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0440\u043e\u043b\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u043f\u043e DHCP \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441:   <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441<\/figcaption><\/div>\n<\/figure>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \/etc\/network\/interfaces \u0432 \u043b\u044e\u0431\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435:<\/p>\n<p><code>sudo nano \/etc\/network\/interfaces<\/code><\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e IP \u0430\u0434\u0440\u0435\u0441\u0430: <\/p>\n<p><code>auto ens18<\/code><\/p>\n<p><code>iface ens18 inet static address 192.168.0.155<\/code><\/p>\n<p><code>netmask 255.255.255.0<\/code><\/p>\n<p><code>gateway 192.168.0.1<\/code><\/p>\n<p><code>dns-nameservers 8.8.8.8<\/code><\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0430\u0434\u0440\u0435\u0441 192.168.0.155   <\/p>\n<p><code>sudo systemctl restart NetworkManager.service<\/code><\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 OpenVPN   <\/h3>\n<p>\u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0431\u044b\u043b \u0432\u0437\u044f\u0442 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442: <a href=\"https:\/\/github.com\/kylemanna\/docker-openvpn\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/kylemanna\/docker-openvpn<\/a>.<\/p>\n<p>\u041d\u043e \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u0421\u043c\u0435\u043d\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root: <code>sudo su -<\/code><\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b: <code>sudo apt install -y openvpn iptables bash git easy-rsa pamtester<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0437 \/usr\/share\/easy-rsa\/easyrsa   <\/p>\n<p><code>ln -s \/usr\/share\/easy-rsa\/easyrsa \/usr\/local\/bin<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432: <\/p>\n<p><code>echo \"export OPENVPN=\/etc\/openvpn\" >> ~\/.bashrc<\/code><\/p>\n<p><code>echo \"export EASYRSA=\/usr\/share\/easy-rsa\"<br \/> >> ~\/.bashrc<\/code><\/p>\n<p><code>echo \"export EASYRSA_CRL_DAYS=3650\" >> ~\/.bashrc echo \"export EASYRSA_PKI=$OPENVPN\/pki\" >> ~\/.bashrc<\/code><\/p>\n<\/li>\n<li>\n<p>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 <code>~\/.bashrc<\/code> , \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u043b\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u044b: <code>source ~\/.bashrc<\/code>  <\/p>\n<\/li>\n<li>\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e: <code>git clone https:\/\/github.com\/kylemanna\/docker-openvpn cd docker-openvpn<\/code><\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0432\u044b\u0434\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0430:<\/p>\n<p><code>cp .\/bin\/* \/usr\/local\/bin<\/code><\/p>\n<p><code>cp .\/otp\/openvpn \/etc\/pam.d\/ chmod a+x \/usr\/local\/bin\/* cd<\/code><\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e. \u0412\u043c\u0435\u0441\u0442\u043e (\u0422\u0423\u0422_\u041d\u0423\u0416\u041d\u041e_\u0423\u041a\u0410\u0417\u0410\u0422\u042c_IP_\u0410\u0414\u0420\u0415\u0421_\u0421\u0415\u0420\u0412\u0415\u0420\u0410), \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c IP \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430: <\/p>\n<p><code>ovpn_genconfig -N -d -u udp:\/\/\u0422\u0423\u0422_\u041d\u0423\u0416\u041d\u041e_\u0423\u041a\u0410\u0417\u0410\u0422\u042c_IP_\u0410\u0414\u0420\u0415\u0421_\u0421\u0415\u0420\u0412\u0415\u0420\u0410<\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447\u0438: <code>ovpn_initpki<\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>\u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0438 \u0432\u0432\u0435\u0441\u0442\u0438 \u043a\u043b\u044e\u0447  <\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043b\u044e\u0447\u0430: <code>Qwertyqwertyqwerty123<\/code>  <\/p>\n<p><em>\u0414\u0430\u043b\u0435\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c:   <\/em><\/p>\n<\/li>\n<li>\n<p>\u00a0\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0434\u043b\u044f \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d \u043a\u043b\u044e\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0432\u0432\u043e\u0434\u0438\u043b\u0438 \u0432\u044b\u0448\u0435: <code>easyrsa build-client-full ctf-team nopass<\/code><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u0432 \u0444\u0430\u0439\u043b: <code>ovpn_getclient ctf-team > .\/ctf-team.ovpn<\/code><\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u0438\u043d \u043a\u043e\u043d\u0444\u0438\u0433 \u043a \u0441\u0435\u0442\u0438, \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433: <code>vim \/etc\/openvpn\/openvpn.conf<\/code><\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443: <code>duplicate-cn <\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c OpenVPN: <code>ovpn_run<\/code><\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e \u043f\u0443\u0442\u0438 <code>\/root\/ctf-team.ovpn<\/code> \u043a \u0441\u0435\u0431\u0435 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440.   <\/p>\n<p>\u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<code>scp root@SERVER_IP:\/root\/ctf-team.ovpn ~<\/code> <\/p>\n<p>\u0418 \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u043c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435: <code>sudo openvpn ctf-team.ovpn<\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 tun   <\/figcaption><\/div>\n<\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u043e \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u043d\u043e\u0432\u0430. OpenVPN \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Docker<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Docker: <code>sudo apt install -y docker.io docker-compose<\/code><\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u0434\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 docker: <code>sudo usermod -aG docker \u041d\u0410\u0428_\u042e\u0417\u0415\u0420<\/code>   <\/p>\n<\/li>\n<\/ul>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0442\u0438<\/h3>\n<p>\u0412\u043d\u043e\u0432\u044c \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0430\u0432\u0430 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0438\u0441\u044c, \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c docker \u0441\u0435\u0442\u044c: <code>docker network create --subnet=192.168.158.0\/24 ctf-net<\/code><\/p>\n<p> \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 Docker network \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0443\u0442: <a href=\"https:\/\/habr.com\/ru\/companies\/otus\/articles\/730798\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/companies\/otus\/articles\/730798\/<\/a><\/p>\n<ul>\n<li>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u0434\u043b\u044f VPN, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043a\u0430\u0447\u0430\u043b\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438: <\/p>\n<p><code>route  192.168.255.0 255.255.255.0<\/code><\/p>\n<p><code>route 192.168.158.0 255.255.255.0 <\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a OpenVPN \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0438 \u0432\u0432\u043e\u0434\u0438\u043c:  <code>ip route<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u044d\u0442\u0438 \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0442\u043e \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e:   <\/p>\n<p><code>192.168.158.0\/24 via 192.168.255.5 dev tun0<\/code><\/p>\n<p><code>192.168.255.0\/24 via 192.168.255.5 dev tun0<\/code><\/p>\n<h3>\u041f\u0440\u0430\u0432\u0438\u043b\u0430 iptables<\/h3>\n<p>\u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f iptables: <\/p>\n<p><code>sudo iptables -A FORWARD -i tun0 -s 192.168.255.0\/24 -d 192.168.158.0\/24 -j ACCEPT<\/code><\/p>\n<p><code>sudo iptables -A FORWARD -o tun0 -s 192.168.158.0\/24 -d 192.168.255.0\/24 -m state --state RELATED,ESTABLISHED -j ACCEPT<\/code><\/p>\n<p><code># \u0420\u0430\u0437\u0440\u0435\u0448\u0438\u043c \u0442\u0440\u0430\u0444\u0438\u043a \u043e\u0442 \u043c\u0430\u0448\u0438\u043d (192.168.158.0\/24) \u043a \u0441\u0435\u0442\u0438 (192.168.255.0\/24) sudo iptables -A FORWARD -o tun0 -s 192.168.158.0\/24 -d 192.168.255.0\/24 -j ACCEPT<\/code><\/p>\n<p><code>sudo iptables -A FORWARD -i tun0 -s 192.168.255.0\/24 -d 192.168.158.0\/24 -m state --state RELATED,ESTABLISHED -j ACCEPT<\/code><\/p>\n<h2>\u0422\u0435\u0441\u0442\u044b \u0441\u0435\u0442\u0438<\/h2>\n<p><strong>\u0422\u0435\u0441\u0442\u044b \u0441\u0435\u0442\u0438 \u0434\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/strong><\/p>\n<ul>\n<li>\n<p>\u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441 nginx: <code>docker run --network=ctf-net -d --rm --name nginx_test nginx<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0432 docker \u0441\u0435\u0442\u0438: <code>docker inspect nginx_test | grep IPAddress<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e <em>192.168.158.2<\/em> , \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c VPN \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0437\u0430\u0445\u043e\u0436\u0443 \u043d\u0430 \u0441\u0430\u0439\u0442 <em>192.168.158.2<\/em><\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0430\u0439\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043e\u0442\u043a\u0440\u044b\u0442<\/figcaption><\/div>\n<\/figure>\n<h3>\u0422\u0435\u0441\u0442 \u0441\u0435\u0442\u0438 \u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h3>\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443.    <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u043e\u043b\u0443\u0447\u0430\u044e \u0441\u0432\u043e\u0439 \u0430\u0434\u0440\u0435\u0441 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 ifcon\ufb01g.   <\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u044e \u0441\u0432\u043e\u0439 \u0430\u0434\u0440\u0435\u0441 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 ifcon\ufb01g: <code>docker exec -ti nginx_test \/bin\/bash<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root.<\/p>\n<p>\u00a0\u041f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 nginx \u043d\u0435\u0442 ping, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c: <code>apt update &amp;&amp; apt install iputils-ping<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043a VPN:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043a VPN <\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>exit<\/code><\/p>\n<h3>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 iptables   <\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 iptables. <\/p>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f root \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435: <code>sudo su -<\/code><\/p>\n<\/li>\n<li>\n<p>\u0418 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c: <code>iptables-save > \/etc\/iptables\/rules.v4<\/code><\/p>\n<\/li>\n<\/ul>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a CTF-\u0437\u0430\u0434\u0430\u043d\u0438\u0439<\/h3>\n<p>\u0422\u0443\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e: \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c: <code>--network=ctf-net<\/code>, \u0441\u0440\u0430\u0437\u0443 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0443\u0436\u043d\u043e\u0439 \u043d\u0430\u043c \u0441\u0435\u0442\u0438.<\/p>\n<p>\u0422\u0430\u043a \u0447\u0442\u043e, \u0437\u0430\u043f\u0443\u0441\u043a \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a: <code>docker run --network=ctf-net -d --rm --name CONTAINER_NAME IMAGES_NAME<\/code>  <\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0434\u043e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d<\/h3>\n<p>Docker \u2013 \u044d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u043e, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u044b \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445, \u0442\u0430\u043a \u0447\u0442\u043e \u0438\u0445 \u0442\u043e\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c.<\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0442\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u043d\u0430\u0448\u0443 \u043c\u0430\u0448\u0438\u043d\u0443 \u043d\u043e\u0432\u044b\u043c \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0432 \u044d\u0442\u0443 \u0441\u0435\u0442\u044c. <\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043d\u0430\u0448\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c   <\/figcaption><\/div>\n<\/figure>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e ens19 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0431\u0435\u0437 \u0430\u0434\u0440\u0435\u0441\u0430, \u0442\u0430\u043a \u043a\u0430\u043a DHCP \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043d\u0435\u0442. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c DHCP \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<ul>\n<li>\n<p>\u0423\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (\u043f\u0443\u043d\u043a\u0442 <code>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0434\u0440\u0435\u0441 \u0432 \u0441\u0435\u0442\u0438<\/code>)<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>\u0414\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 <\/figcaption><\/div>\n<\/figure>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 DHCP ( \u042d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u0435\u0440\u043d\u0443\u0442\u044c )<\/h3>\n<p><code>sudo apt install isc-dhcp-server<\/code><\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443, \u0447\u0442\u043e \u0441\u043b\u0443\u0436\u0431\u0430 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f.   <\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433: <code>sudo nano \/etc\/dhcp\/dhcpd.conf<\/code><\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u043e\u0442 \u044d\u0442\u043e \u0432 \u043f\u0443\u0441\u0442\u043e\u0435 \u043c\u0435\u0441\u0442\u043e: <\/p>\n<p><code>subnet 10.0.50.0 netmask 255.255.255.0 {<\/code><\/p>\n<p><code>range 10.0.50.10 10.0.50.240;<\/code><\/p>\n<p><code>option domain-name-servers 8.8.8.8;<\/code><\/p>\n<p><code>option subnet-mask 255.255.255.0;<\/code><\/p>\n<p><code>option routers 10.0.50.1;<\/code><\/p>\n<p><code>default-lease-time 600;<\/code><\/p>\n<p><code>max-lease-time 7200;<\/code><\/p>\n<p><code>}<\/code><\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a<\/figcaption><\/div>\n<\/figure>\n<p>***\u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 range <em>10.0.50.10 10.0.50.240 .<\/em> <\/p>\n<p>\u0422\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0440\u0430\u0437\u0434\u0430\u0447\u0438 IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432 DHCP \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u0422\u043e \u0435\u0441\u0442\u044c, 2-10 \u0438 240- 254 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,\u0441\u043b\u0443\u0436\u0431\u044b \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0441 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0430\u0434\u0440\u0435\u0441\u043e\u043c.<\/p>\n<ul>\n<li>\n<p>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b: <code>sudo nano \/etc\/default\/isc-dhcp-server<\/code>   <\/p>\n<\/li>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441\u0430 DHCP \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0441\u043b\u0443\u0436\u0431\u0443: <code>sudo systemctl restart isc-dhcp-server<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0435\u0435 \u0441\u0442\u0430\u0442\u0443\u0441:  <code>sudo<\/code><\/p>\n<\/li>\n<\/ul>\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-426525","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/426525","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=426525"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/426525\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=426525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=426525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=426525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}