{"id":408987,"date":"2024-06-29T20:30:53","date_gmt":"2024-06-29T20:30:53","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=408987"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-29T20:30:53","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=408987","title":{"rendered":"<span>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0434\u043b\u044f Rancher<\/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<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>Rancher &#8212; \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430\u0434 Kubernetes \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u043d\u0443 \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0430. Rancher \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0430\u0445: bare-metal \u0441\u0435\u0440\u0432\u0435\u0440 (\u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439, \u0436\u0435\u043b\u0435\u0437\u043d\u044b\u0439), \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u043a\u0430, \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043a \u043e\u0431\u043b\u0430\u043a\u0430 \u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0435\u0434\u0438\u043d\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438 \u043f\u043e\u043b\u0438\u0442\u0438\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041a\u0430\u043a\u0438\u043c \u0431\u044b \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0435 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u0433\u0434 \u0431\u044b \u043e\u043d \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0441\u044f, Rancher \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u043d\u0443 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0417\u0430\u0434\u0430\u0447\u0438<\/h3>\n<ol>\n<li>\n<p>\u0420\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>3 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u043d\u043e\u0434\u044b (etcd, control panel)<\/p>\n<\/li>\n<li>\n<p>4 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u043d\u043e\u0434\u044b (worker)<\/p>\n<\/li>\n<li>\n<p>1 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044f<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0442\u044f\u043c\u0438:<\/p>\n<ol>\n<li>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0435\u0442\u044c: \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u0441\u0435\u0442\u044c \u0441 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c Rancher \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u043c Rancher server<\/p>\n<\/li>\n<li>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u0441\u0435\u0442\u044c: \u0432\u043d\u0435\u0448\u043d\u044f\u044f \u0441\u0435\u0442\u044c \u0441 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c Rancher \u043d\u0430 bare-metal \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 Nexus \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432 Helm \u0438 Docker<\/p>\n<\/li>\n<\/ol>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 VMware<\/h3>\n<p>\u0414\u0430\u043d\u043e: \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438: 2 x Xeon Gold 6240R \u043f\u043e 24 \u044f\u0434\u0440\u0430 \u043a\u0430\u0436\u0434\u044b\u0439, \u041e\u0417\u0423 320 \u0413\u0411 DDR4, 4 x 480 \u0413\u0411 SSD.<\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u043b\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 RAID10 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 VMware vSphere Hypervisor 7 License. \u042d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u043e 8 \u044f\u0434\u0435\u0440 \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0412\u041c.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d<\/h3>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p><strong>#<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p><strong>Name<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p><strong>CPU<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p><strong>RAM. gb<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p><strong>HDD, gb<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p><strong>Private ip<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Public ip<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>1<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-firewall<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>1<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>4<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>16<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.1<\/p>\n<\/td>\n<td>\n<p>8.10.7.2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>2<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-rch-node-1<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>32<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>60<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.11<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>3<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-rch-node-2<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>32<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>60<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.12<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>4<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-rch-node-3<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>32<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>60<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.13<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>5<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-rch-node-4<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>32<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>60<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.14<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>6<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-rch-etcd-1<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>2<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>20<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.15<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>7<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-rch-etcd-2<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>2<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>20<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.16<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-rch-etcd-3<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>2<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>20<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.17<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>9<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-nexus<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>4<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>16<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>200<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.100<\/p>\n<\/td>\n<td>\n<p>8.10.7.2:8081<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0412\u041c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 Ubuntu Server 18.<\/p>\n<p>\u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0412\u041c \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 (\u043a\u0440\u043e\u043c\u0435 vm-nexus) \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 docker:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>apt-get update &amp;&amp; sudo apt-get install -y apt-transport-https echo \"deb https:\/\/apt.kubernetes.io\/ kubernetes-xenial main\" | sudo tee -a \/etc\/apt\/sources.list.d\/kubernetes.listcurl -s https:\/\/packages.cloud.google.com\/apt\/doc\/apt-key.gpg | sudo apt-key add -apt-get update &amp;&amp; sudo apt-get install -y kubectl docker.io open-iscsi bridge-utils open-vm-tools cifs-utils jq util-linux coreutils gccgo-go<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0418 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c swap:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>swapoff -a<\/code><\/p>\n<p>\u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/fstab \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0443\u044e \u0437\u0430 swap-\u0444\u0430\u0439\u043b\u041f\u043b\u044e\u0441 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 swap: \/swap<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0441\u0435\u0442\u0438<\/h3>\n<p>Ip-\u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0412\u041c \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0442\u0438 \u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0412\u041c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: \/etc\/netplan\/00-installer-config.yaml<\/p>\n<p>\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0435\u0442\u0438 10.1.0.0\/16<\/p>\n<p>\u0414\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0430\u0434\u0440\u0435\u0441\u043e\u0432: 10.21.0.0\/16<\/p>\n<p>\u041c\u0430\u0448\u0438\u043d\u0430 <strong>vm-firewall<\/strong> \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0430 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430:<\/p>\n<ol>\n<li>\n<p>ens160. \u041a \u044d\u0442\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0451\u043d &#171;\u0431\u0435\u043b\u044b\u0439&#187; \u0430\u0434\u0440\u0435\u0441: 8.10.7.2, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0434\u0430\u043b \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440. \u0427\u0435\u0440\u0435\u0437 \u044d\u0442\u043e\u0442 \u0430\u0434\u0440\u0435\u0441 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0442\u043e\u0447\u043a\u043e\u0439 \u0432\u0445\u043e\u0434\u0430 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0443\u043d\u043d\u0435\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>ens192. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u041e\u043d \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0432 \u0440\u043e\u043b\u0438 \u0448\u043b\u044e\u0437\u0430 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0412\u041c \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0442\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0442\u0438 \u043d\u0430 vm-firewall:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>network:\u00a0 <br \/>  ethernets:\u00a0 \u00a0 <br \/>    ens160:\u00a0 \u00a0 \u00a0 <br \/>      dhcp4: false\u00a0 \u00a0 \u00a0 <br \/>      addresses: [8.10.7.2\/23]\u00a0 \u00a0 \u00a0 <br \/>      gateway4: 8.10.7.1\u00a0 \u00a0 \u00a0     <br \/>      dhcp4-overrides:\u00a0 \u00a0 \u00a0 \u00a0 <br \/>        use-dns: false\u00a0 \u00a0 \u00a0 <br \/>      nameservers:\u00a0 \u00a0 \u00a0 \u00a0 <br \/>        addresses: [8.8.8.8,8.8.4.4]\u00a0 \u00a0 \u00a0 <br \/>      routes:\u00a0 \u00a0 \u00a0 \u00a0 <br \/>        - to: 10.1.0.0\/16\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          via: 8.10.7.2\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          on-link: true\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          metric: 100\u00a0 \u00a0 \u00a0 \u00a0 <br \/>        - to: 10.21.0.0\/16\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          via: 10.21.0.1\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          on-link: true\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          metric: 110\u00a0 \u00a0 \u00a0 \u00a0 <br \/>        - to: 0.0.0.0\/0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          via: 8.10.7.2\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          on-link: true\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          metric: 120\u00a0 \u00a0 <br \/>    ens192:\u00a0 \u00a0 \u00a0 <br \/>      dhcp4: false\u00a0 \u00a0 \u00a0 <br \/>      addresses: [10.21.0.1\/16]\u00a0 <br \/>      version: 2<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0442\u0438 \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0412\u041c:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>network:\u00a0 <br \/>  ethernets:    <br \/>    ens160:\u00a0     <br \/>      dhcp4: false\u00a0     <br \/>      addresses: [10.21.0.11\/16]\u00a0     <br \/>      gateway4: 10.21.0.1\u00a0     <br \/>      nameservers:\u00a0 \u00a0     <br \/>        addresses: [8.8.8.8,8.8.4.4]\u00a0 <br \/>  version: 2<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0441\u043b\u0443\u0436\u0431\u044b <strong>netplan<\/strong> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>netplan generate<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0418 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>netplan apply<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 ip-\u0430\u0434\u0440\u0435\u0441\u0430:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>user@vm-rch-node-01:~$ ifconfig<br \/>ens160: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST>\u00a0 mtu 1500\u00a0 \u00a0     <br \/>        inet 10.21.0.11\u00a0 netmask 255.255.0.0\u00a0 broadcast 10.21.255.255\u00a0 \u00a0             inet6 fe80::20c:29ff:fe3b:3ea5\u00a0 prefixlen 64\u00a0 scopeid 0x20&lt;link>\u00a0 \u00a0          ether 00:0c:29:3b:3e:a5\u00a0 txqueuelen 1000\u00a0 (Ethernet)\u00a0 \u00a0     <br \/>        RX packets 3756900\u00a0 bytes 2423660972 (2.4 GB)\u00a0 \u00a0     <br \/>        RX errors 0\u00a0 dropped 503\u00a0 overruns 0\u00a0 frame 0\u00a0 \u00a0     <br \/>        TX packets 2413321\u00a0 bytes 311067924 (311.0 MB)\u00a0 \u00a0     <br \/>        TX errors 0\u00a0 dropped 0 overruns 0\u00a0 carrier 0\u00a0 collisions 0<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0418 \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>user@vm-rch-node-01:~$ ip route<br \/>default via 10.21.0.1 dev ens160 proto static<br \/>10.21.0.0\/16 dev ens160 proto kernel scope link src 10.21.0.11<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u043c\u0435\u0436\u0434\u0443 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0438 \u043d\u043e\u0432\u044b\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c<\/h3>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435:<\/p>\n<ul>\n<li>\n<p>19.4.15.14 &#8212; \u0431\u0435\u043b\u044b\u0439 ip-\u0430\u0434\u0440\u0435\u0441 \u043d\u0430 \u0442\u043e\u0447\u043a\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u0441 \u043d\u043e\u0432\u044b\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c<\/p>\n<\/li>\n<li>\n<p>8.10.7.2 &#8212; \u0431\u0435\u043b\u044b\u0439 ip-\u0430\u0434\u0440\u0435\u0441 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 vm-firewall \u0438 \u0441\u043b\u0443\u0436\u0438\u0442 \u0442\u043e\u0447\u043a\u043e\u0439, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f IPsec. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u0412\u041c vm-firewall.<\/p>\n<p>\u0421\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043d\u0430\u0448\u0435\u0439 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0430 \u043d\u0430 \u0444\u0430\u0439\u0435\u0440\u0432\u043e\u043b\u0435 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 1-\u043e\u0439 \u0438 2-\u043e\u0439 \u0444\u0430\u0437\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044f.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>apt-get install racoon ipsec-tools<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0412 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430:<\/p>\n<ol>\n<li>\n<p>\u0414\u0435\u043c\u043e\u043d\u0430 <strong>racoon<\/strong> \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u0435\u043c ISAKMP.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0442\u0438\u043b\u0438\u0442\u044b <strong>setkey<\/strong> \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f SA-\u0442\u0443\u043d\u043d\u0435\u043b\u0435\u0439 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e. <strong>Racoon<\/strong> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0443\u043d\u043d\u0435\u043b\u0435\u0439 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 IKE. \u042d\u0442\u043e \u0434\u0435\u043c\u043e\u043d, \u043e\u043d \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c (\/etc\/racoon\/racoon.conf), \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u043c init-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c (\/etc\/init.d\/racoon &lt;start|stop|restart>):<\/p>\n<p>\u0412 \u0431\u043b\u043e\u043a\u0435 <strong>remote <\/strong>\u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 1-\u0439 \u0444\u0430\u0437\u044b<\/p>\n<p>\u0412 \u0431\u043b\u043e\u043a\u0435 <strong>sainfo<\/strong> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 2-\u0439 \u0444\u0430\u0437\u044b<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>root@vm-firewall:~# cat \/etc\/racoon\/racoon.conf<br \/>log notify;<br \/>path pre_shared_key \"\/etc\/racoon\/psk.txt\"; <br \/>listen {    <br \/>  isakmp 8.10.7.2[500];    <br \/>  strict_address;<br \/>} <br \/>remote 19.4.15.14 {    <br \/>  exchange_mode main,aggressive;    <br \/>  lifetime time 24 hour;    <br \/>  dpd_delay 5;    <br \/>  proposal {\u00a0 \u00a0     <br \/>    encryption_algorithm aes 256;\u00a0 \u00a0     <br \/>    hash_algorithm sha1;\u00a0 \u00a0     <br \/>    authentication_method pre_shared_key;\u00a0 \u00a0     <br \/>    dh_group 2;\u00a0 \u00a0     <br \/>    lifetime time 86400 sec;    <br \/>  }<br \/>} <br \/>sainfo address 10.21.0.0\/24 any address 10.1.0.0\/16 any {    <br \/>  pfs_group 2;    <br \/>  lifetime time 28800 sec;    <br \/>  encryption_algorithm aes 256;    <br \/>  authentication_algorithm hmac_sha1;    <br \/>  compression_algorithm deflate;<br \/>}<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 psk.txt \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u043b\u044e\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0434\u0430\u043b\u0438 \u043d\u0430 \u0442\u043e\u0447\u043a\u0435 \u0432\u0445\u043e\u0434\u0430 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0441\u0435\u0442\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>root@vm-firewall:~# cat \/etc\/racoon\/psk.txt<br \/># IPv4\/v6 addresses<br \/>19.4.15.14    PA$$W0RD<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 <strong>setkey<\/strong>. \u041e\u043d\u0430 \u0442\u043e\u0436\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0434\u0435\u043c\u043e\u043d (\/etc\/init.d\/setkey &lt;start|stop|restart>), \u043d\u043e \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u043e\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \/etc\/ipsec-tools.conf. \u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u043d\u0435\u0435, \u043e\u043d\u0430 \u0443\u0436\u0435 \u0437\u0430\u0434\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0442\u0443\u043d\u043d\u0435\u043b\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0434\u0430\u0435\u0442 <strong>SA<\/strong> \u0438 <strong>SP<\/strong> \u0434\u043b\u044f \u043d\u0438\u0445:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>root@vm-firewall:~# cat \/etc\/ipsec-tools.conf<br \/>#!\/usr\/sbin\/setkey -f <\/p>\n<p># NOTE: Do not use this file if you use racoon with racoon-tool<br \/># utility. racoon-tool will setup SAs and SPDs automatically using<br \/># \/etc\/racoon\/racoon-tool.conf configuration.<br \/># <br \/>## Flush the SAD and SPD<br \/>#<br \/>flush;<br \/>spdflush; <\/p>\n<p>## Some sample SPDs for use racoon<br \/>#<br \/>spdadd 10.21.0.0\/24 10.1.0.0\/16 any -P out ipsec \u00a0 <br \/>   esp\/tunnel\/8.10.7.2-19.4.15.14\/require;\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0      <br \/>spdadd 10.1.0.0\/16 10.21.0.0\/24 any -P in ipsec \u00a0 <br \/>   esp\/tunnel\/19.4.15.14-8.10.7.2\/require;<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0432 \u044d\u0442\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>systemctl restart setkey.service<br \/>systemctl restart racoon.service<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435, \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0432 \u043d\u0435\u0433\u043e \u043f\u043e\u0439\u0434\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a. \u041d\u0430\u0434\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0438\u043d\u0433 \u0434\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0438\u043d\u0433 \u0441 \u043d\u043e\u0434\u044b 10.21.0.11 \u0434\u043e \u043d\u043e\u0434\u044b \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 (10.1.1.13):<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>user@vm-rch-node-01:~$ ping 10.1.1.13<br \/>PING 10.1.1.13 (10.1.13.13) 56(84) bytes of data.<br \/>64 bytes from 10.1.1.13: icmp_seq=1 ttl=61 time=4.67 ms<br \/>64 bytes from 10.1.1.13: icmp_seq=2 ttl=61 time=2.55 ms<br \/>64 bytes from 10.1.1.13: icmp_seq=3 ttl=61 time=2.94 ms<br \/>64 bytes from 10.1.1.13: icmp_seq=4 ttl=61 time=4.07 ms^C<br \/>--- 10.1.1.13 ping statistics ---<br \/>4 packets transmitted, 4 received, 0% packet loss, time 3004ms<br \/>rtt min\/avg\/max\/mdev = 2.556\/3.563\/4.671\/0.850 ms<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0421 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b \u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b (\u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e ICMP \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0442 \u043d\u0430 \u0443\u0447\u0430\u0441\u0442\u043a\u0435).<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 \u043d\u0430 \u0442\u043e\u0439 \u0436\u0435 \u043d\u043e\u0434\u0435:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>user@vm-rch-node-01:~$ traceroute 10.1.1.13<br \/>traceroute to 10.1.1.13 (10.1.1.13), 30 hops max, 60 byte packets<br \/>1 _gateway (10.21.0.1) 0.113 ms 0.080 ms 0.096 ms<br \/>2 * * *<br \/>3 10.1.1.13 (10.1.1.13) 2.846 ms 2.875 ms 2.874 ms<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041d\u0430 vm-firewall \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u0434\u043d\u044f\u043b\u0441\u044f \u043b\u0438 ISAKMP-\u0442\u0443\u043d\u043d\u0435\u043b\u044c:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>root@vm-firewall:~# racoonctl show-sa isakmp<br \/>Destination\u00a0 \u00a0     Cookies\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Created<br \/>10.1.0.1.500 \u00a0     356a7e134251a93f:30071210375c165 \u00a0 \u00a0 \u00a0 \u00a0     2021-02-19 09:18:28<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043b\u0438\u0441\u044c \u043b\u0438 \u0442\u0443\u043d\u043d\u0435\u043b\u0438 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434 <strong>racoonctl show-sa esp \u0438\u043b\u0438 setket -D:<\/strong><\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>root@vm-firewall:~# setkey -D<br \/>8.10.7.2 19.4.15.14<br \/>esp mode=tunnel spi=133928257(0x07fb9541) reqid=0(0x00000000)<br \/>E: aes-cbc e12ee98c dcc52fa3 dd115cae 57aaa59e b7b37484 ffbfe306 b7a1e3cd 1e2c5301<br \/>A: hmac-sha1 a8d2c0a7 f9690fe2 287cad8f 3023a683 67d4ed85seq=0x00000000 replay=4 flags=0x00000000 state=mature<br \/>created: Feb 20 07:53:53 2021 current: Feb 20 08:15:59 2021<br \/>diff: 1326(s) hard: 1800(s) soft: 1440(s)<br \/>last: Feb 20 07:53:54 2021 hard: 0(s) soft: 0(s)<br \/>current: 49838883(bytes) hard: 0(bytes) soft: 0(bytes)<br \/>allocated: 52998 hard: 0 soft: 0<br \/>sadb_seq=1 pid=4468 refcnt=0<br \/>19.4.15.14 8.10.7.2<br \/>esp mode=tunnel spi=193529941(0x0b890855) reqid=0(0x00000000)<br \/>E: aes-cbc 8ad5774d eaa4fe28 685eb88a 12320bac 4ed8ec2e c6af576f 7f3e1f27 666da5da<br \/>A: hmac-sha1 22c82645 7f7b9550 73cbd018 1648b4b7 402411ffseq=0x00000000 replay=4 flags=0x00000000 state=mature<br \/>created: Feb 20 07:53:53 2021 current: Feb 20 08:15:59 2021<br \/>diff: 1326(s) hard: 1800(s) soft: 1440(s)<br \/>last: Feb 20 07:53:54 2021 hard: 0(s) soft: 0(s)<br \/>current: 7180221(bytes) hard: 0(bytes) soft: 0(bytes)<br \/>allocated: 24822 hard: 0 soft: 0sadb_seq=2 pid=4468 refcnt=0<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/racoon\/racoon.conf \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043b\u043e\u0433\u043e\u0432 \u0441 log notify \u0434\u043e log debug2 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>systemctl restart setkey.service<br \/>systemctl restart racoon.service<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u043b\u043e\u0433\u0438 \u0432 <strong>\/var\/log\/syslog<\/strong> \u0438 \u043f\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0435 <strong>racoon -F<\/strong><\/p>\n<p>\u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0438\u0442\u0430\u0435\u043c <strong>man racoon.conf<\/strong> \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432 <strong>\/usr\/share\/doc\/racoon\/<\/strong><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u0435\u0431\u0430\u0433\u0430 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043b\u043e\u0433\u043e\u0432 \u043d\u0430 \u043f\u0440\u0435\u0436\u043d\u0435\u0435 \u043c\u0435\u0441\u0442\u043e.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Nexus<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0443, \u0433\u0434\u0435 \u043d\u0430\u0434\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Nexus \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438: https:\/\/help.sonatype.com\/repomanager3\/installation<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e Nexus \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 8081:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>user@vm-nexus:~$ curl -I localhost:8081<br \/>HTTP\/1.1 200 OK<br \/>Date: Sat, 20 Feb 2021 09:58:41 GMT<br \/>Server: Nexus\/3.29.2-02 (OSS)<br \/>X-Content-Type-Options: nosniff<br \/>X-Frame-Options: DENY<br \/>X-XSS-Protection: 1; mode=block<br \/>Content-Type: text\/html<br \/>Last-Modified: Sat, 20 Feb 2021 09:58:41 GMT<br \/>Pragma: no-cache<br \/>Cache-Control: no-cache, no-store, max-age=0, must-revalidate, post-check=0, pre-check=0<br \/>Expires: 0Content-Length: 8435<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u0412\u041c vm-firewall.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c\/\u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c iptables:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>aptitude install iptables-persistent<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 (IP forwarding):<\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b sysctl.conf:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>nano \/etc\/sysctl.conf<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0444\u0430\u0439\u043b\u0435 \u0438 \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>net.ipv4.ip_forward=1<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c, \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043c\u0430\u0448\u0438\u043d\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 reboot<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>root@vm-firewall:~# sysctl -a | grep net.ipv4.ip_forwardnet.ipv4.ip_forward = 1<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 iptables \u0434\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>iptables -t nat -A POSTROUTING -o ens160 -j MASQUERADE<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u043e\u0441\u044c:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>root@vm-firewall:~# iptables -L -t nat<br \/>Chain PREROUTING (policy ACCEPT)<br \/>target     prot opt source \u00a0 \u00a0 \u00a0 \u00a0 \u00a0     destination \u00a0       <br \/>Chain INPUT (policy ACCEPT)<br \/>target     prot opt source \u00a0 \u00a0 \u00a0 \u00a0 \u00a0     destination \u00a0       <br \/>Chain OUTPUT (policy ACCEPT)<br \/>target     prot opt source \u00a0 \u00a0 \u00a0 \u00a0 \u00a0     destination \u00a0       <br \/>Chain POSTROUTING (policy ACCEPT)<br \/>MASQUERADE\u00a0 all\u00a0 --\u00a0 anywhere \u00a0 \u00a0 \u00a0 \u00a0     anywhere<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0417\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a 22 \u043f\u043e\u0440\u0442\u0443 (\u043f\u043e SSH) \u0434\u043b\u044f \u0432\u0441\u0435\u0445, \u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u0441\u0435\u0442\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 (10.1.0.0):<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>iptables -A INPUT -p tcp -s 10.1.0.0\/16 --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT<br \/>iptables -A OUTPUT -p tcp --sport 22 -m conntrack --ctstate ESTABLISHED -j ACCEPT<br \/>iptables -A INPUT -p tcp --dport 22 -j DROP<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 Nexus. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 10.21.0.100, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u043d\u0435\u043c\u0443 \u0441 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 8.10.7.2. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043d\u0430 iptables, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0440\u0442 8081 \u0441 10.21.0.100 \u0433\u0434\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d Nexus \u043d\u0430 \u043f\u043e\u0440\u0442 8081. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Nexus \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: 8.10.7.2:8081<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>iptables -t nat -A PREROUTING -p tcp -d 8.10.7.2 --dport 8081 -j DNAT --to-destination 10.21.0.100:8081<br \/>iptables -t nat -A POSTROUTING -p tcp --sport 8081 --dst 10.21.0.100 -j SNAT --to-source 8.10.7.2:8081<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3>\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 iptables<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 (\u043a\u0441\u0442\u0430\u0442\u0438 \u043e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438) \u043d\u0430\u0434\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u0430\u0448\u0438\u043d\u044b \u043e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>iptables-save > \/etc\/iptables\/rules.v4<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0431\u0435\u0437 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0444\u0430\u0439\u043b:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>root@vm-firewall:~# iptables-save<br \/># Generated by iptables-save v1.6.1 on Sat Feb 20 10:23:16 2021<br \/>*filter<br \/>:INPUT ACCEPT [1367208:430732612]<br \/>:FORWARD ACCEPT [2626485:2923178076]<br \/>:OUTPUT ACCEPT [887495:574719960]<br \/>-A INPUT -s 10.1.0.0\/16 -p tcp -m tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT<br \/>-A INPUT -p tcp -m tcp --dport 22 -j DROP<br \/>-A OUTPUT -p tcp -m tcp --sport 22 -m conntrack --ctstate ESTABLISHED -j ACCEPT<br \/>COMMIT<br \/># Completed on Sat Feb 20 10:23:16 2021<br \/># Generated by iptables-save v1.6.1 on Sat Feb 20 10:23:16 2021<br \/>*nat<br \/>:PREROUTING ACCEPT [590459:52961865]<br \/>:INPUT ACCEPT [218805:21703262]<br \/>:OUTPUT ACCEPT [130:9341]<br \/>:POSTROUTING ACCEPT [1549:81533]<br \/>-A PREROUTING -d 8.10.7.2\/32 -p tcp -m tcp --dport 8081 -j DNAT --to-destination 10.21.0.100:8081<br \/>-A POSTROUTING -s 10.21.0.0\/16 -d 10.1.0.0\/16 -o ens160 -m policy --dir out --pol ipsec -j ACCEPT<br \/>-A POSTROUTING -d 10.21.0.100\/32 -p tcp -m tcp --sport 8081 -j SNAT --to-source 8.10.7.2:8081<br \/>-A POSTROUTING -o ens160 -j MASQUERADE<br \/>COMMIT<br \/># Completed on Sat Feb 20 10:23:16 2021<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3>\u041e\u0442\u043b\u0430\u0434\u043a\u0430 iptables<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430\u0434\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 iptables:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>iptables -Fiptables -Xiptables -t nat -Xiptables -t nat -Fiptables -t filter -Xiptables -t filter -F<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u0438\u0437 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>iptables-restore &lt; \/etc\/iptables\/rules.v4<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/www.facebook.com\/ymalov\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.facebook.com\/ymalov\/<\/a><\/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\/551458\/\"> https:\/\/habr.com\/ru\/articles\/551458\/<\/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<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>Rancher &#8212; \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430\u0434 Kubernetes \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u043d\u0443 \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0430. Rancher \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0430\u0445: bare-metal \u0441\u0435\u0440\u0432\u0435\u0440 (\u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439, \u0436\u0435\u043b\u0435\u0437\u043d\u044b\u0439), \u0447\u0430\u0441\u0442\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u043a\u0430, \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043a \u043e\u0431\u043b\u0430\u043a\u0430 \u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0435\u0434\u0438\u043d\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438 \u043f\u043e\u043b\u0438\u0442\u0438\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041a\u0430\u043a\u0438\u043c \u0431\u044b \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0435 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438 \u0433\u0434 \u0431\u044b \u043e\u043d \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0441\u044f, Rancher \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u043e \u0432\u0441\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u043d\u0443 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0417\u0430\u0434\u0430\u0447\u0438<\/h3>\n<ol>\n<li>\n<p>\u0420\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>3 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u043d\u043e\u0434\u044b (etcd, control panel)<\/p>\n<\/li>\n<li>\n<p>4 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u043d\u043e\u0434\u044b (worker)<\/p>\n<\/li>\n<li>\n<p>1 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044f<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0442\u044f\u043c\u0438:<\/p>\n<ol>\n<li>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0435\u0442\u044c: \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u0441\u0435\u0442\u044c \u0441 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c Rancher \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u043c Rancher server<\/p>\n<\/li>\n<li>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u0441\u0435\u0442\u044c: \u0432\u043d\u0435\u0448\u043d\u044f\u044f \u0441\u0435\u0442\u044c \u0441 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c Rancher \u043d\u0430 bare-metal \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 Nexus \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432 Helm \u0438 Docker<\/p>\n<\/li>\n<\/ol>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 VMware<\/h3>\n<p>\u0414\u0430\u043d\u043e: \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438: 2 x Xeon Gold 6240R \u043f\u043e 24 \u044f\u0434\u0440\u0430 \u043a\u0430\u0436\u0434\u044b\u0439, \u041e\u0417\u0423 320 \u0413\u0411 DDR4, 4 x 480 \u0413\u0411 SSD.<\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u043b\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 RAID10 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 VMware vSphere Hypervisor 7 License. \u042d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u043e 8 \u044f\u0434\u0435\u0440 \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0412\u041c.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d<\/h3>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p><strong>#<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p><strong>Name<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p><strong>CPU<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p><strong>RAM. gb<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p><strong>HDD, gb<\/strong><\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p><strong>Private ip<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Public ip<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>1<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-firewall<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>1<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>4<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>16<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.1<\/p>\n<\/td>\n<td>\n<p>8.10.7.2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>2<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-rch-node-1<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>32<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>60<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.11<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>3<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-rch-node-2<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>32<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>60<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.12<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>4<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-rch-node-3<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>32<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>60<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.13<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>5<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-rch-node-4<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>32<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>60<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.14<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>6<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-rch-etcd-1<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>2<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>20<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.15<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>7<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-rch-etcd-2<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>2<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>20<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.16<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-rch-etcd-3<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>2<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>8<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>20<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.17<\/p>\n<\/td>\n<td>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"56\" width=\"56\">\n<p>9<\/p>\n<\/td>\n<td data-colwidth=\"163\" width=\"163\">\n<p>vm-nexus<\/p>\n<\/td>\n<td data-colwidth=\"74\" width=\"74\">\n<p>4<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>16<\/p>\n<\/td>\n<td data-colwidth=\"104\" width=\"104\">\n<p>200<\/p>\n<\/td>\n<td data-colwidth=\"124\" width=\"124\">\n<p>10.21.0.100<\/p>\n<\/td>\n<td>\n<p>8.10.7.2:8081<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0412\u041c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 Ubuntu Server 18.<\/p>\n<p>\u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0412\u041c \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 (\u043a\u0440\u043e\u043c\u0435 vm-nexus) \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 docker:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>apt-get update &amp;&amp; sudo apt-get install -y apt-transport-https echo \"deb https:\/\/apt.kubernetes.io\/ kubernetes-xenial main\" | sudo tee -a \/etc\/apt\/sources.list.d\/kubernetes.listcurl -s https:\/\/packages.cloud.google.com\/apt\/doc\/apt-key.gpg | sudo apt-key add -apt-get update &amp;&amp; sudo apt-get install -y kubectl docker.io open-iscsi bridge-utils open-vm-tools cifs-utils jq util-linux coreutils gccgo-go<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0418 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c swap:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>swapoff -a<\/code><\/p>\n<p>\u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/fstab \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0443\u044e \u0437\u0430 swap-\u0444\u0430\u0439\u043b\u041f\u043b\u044e\u0441 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 swap: \/swap<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0441\u0435\u0442\u0438<\/h3>\n<p>Ip-\u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0412\u041c \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0442\u0438 \u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0412\u041c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: \/etc\/netplan\/00-installer-config.yaml<\/p>\n<p>\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0435\u0442\u0438 10.1.0.0\/16<\/p>\n<p>\u0414\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0430\u0434\u0440\u0435\u0441\u043e\u0432: 10.21.0.0\/16<\/p>\n<p>\u041c\u0430\u0448\u0438\u043d\u0430 <strong>vm-firewall<\/strong> \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0430 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430:<\/p>\n<ol>\n<li>\n<p>ens160. \u041a \u044d\u0442\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0451\u043d &#171;\u0431\u0435\u043b\u044b\u0439&#187; \u0430\u0434\u0440\u0435\u0441: 8.10.7.2, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0434\u0430\u043b \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440. \u0427\u0435\u0440\u0435\u0437 \u044d\u0442\u043e\u0442 \u0430\u0434\u0440\u0435\u0441 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0442\u043e\u0447\u043a\u043e\u0439 \u0432\u0445\u043e\u0434\u0430 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0443\u043d\u043d\u0435\u043b\u044f.<\/p>\n<\/li>\n<li>\n<p>ens192. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u041e\u043d \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0432 \u0440\u043e\u043b\u0438 \u0448\u043b\u044e\u0437\u0430 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0412\u041c \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0442\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0442\u0438 \u043d\u0430 vm-firewall:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>network:\u00a0 <br \/>  ethernets:\u00a0 \u00a0 <br \/>    ens160:\u00a0 \u00a0 \u00a0 <br \/>      dhcp4: false\u00a0 \u00a0 \u00a0 <br \/>      addresses: [8.10.7.2\/23]\u00a0 \u00a0 \u00a0 <br \/>      gateway4: 8.10.7.1\u00a0 \u00a0 \u00a0     <br \/>      dhcp4-overrides:\u00a0 \u00a0 \u00a0 \u00a0 <br \/>        use-dns: false\u00a0 \u00a0 \u00a0 <br \/>      nameservers:\u00a0 \u00a0 \u00a0 \u00a0 <br \/>        addresses: [8.8.8.8,8.8.4.4]\u00a0 \u00a0 \u00a0 <br \/>      routes:\u00a0 \u00a0 \u00a0 \u00a0 <br \/>        - to: 10.1.0.0\/16\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          via: 8.10.7.2\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          on-link: true\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          metric: 100\u00a0 \u00a0 \u00a0 \u00a0 <br \/>        - to: 10.21.0.0\/16\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          via: 10.21.0.1\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          on-link: true\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          metric: 110\u00a0 \u00a0 \u00a0 \u00a0 <br \/>        - to: 0.0.0.0\/0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          via: 8.10.7.2\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          on-link: true\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <br \/>          metric: 120\u00a0 \u00a0 <br \/>    ens192:\u00a0 \u00a0 \u00a0 <br \/>      dhcp4: false\u00a0 \u00a0 \u00a0 <br \/>      addresses: [10.21.0.1\/16]\u00a0 <br \/>      version: 2<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0442\u0438 \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0412\u041c:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>network:\u00a0 <br \/>  ethernets:    <br \/>    ens160:\u00a0     <br \/>      dhcp4: false\u00a0     <br \/>      addresses: [10.21.0.11\/16]\u00a0     <br \/>      gateway4: 10.21.0.1\u00a0     <br \/>      nameservers:\u00a0 \u00a0     <br \/>        addresses: [8.8.8.8,8.8.4.4]\u00a0 <br \/>  version: 2<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0441\u043b\u0443\u0436\u0431\u044b <strong>netplan<\/strong> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>netplan generate<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0418 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>netplan apply<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 ip-\u0430\u0434\u0440\u0435\u0441\u0430:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>user@vm-rch-node-01:~$ ifconfig<br \/>ens160: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST>\u00a0 mtu 1500\u00a0 \u00a0     <br \/>        inet 10.21.0.11\u00a0 netmask 255.255.0.0\u00a0 broadcast 10.21.255.255\u00a0 \u00a0             inet6 fe80::20c:29ff:fe3b:3ea5\u00a0 prefixlen 64\u00a0 scopeid 0x20&lt;link>\u00a0 \u00a0          ether 00:0c:29:3b:3e:a5\u00a0 txqueuelen 1000\u00a0 (Ethernet)\u00a0 \u00a0     <br \/>        RX packets 3756900\u00a0 bytes 2423660972 (2.4 GB)\u00a0 \u00a0     <br \/>        RX errors 0\u00a0 dropped 503\u00a0 overruns 0\u00a0 frame 0\u00a0 \u00a0     <br \/>        TX packets 2413321\u00a0 bytes 311067924 (311.0 MB)\u00a0 \u00a0     <br \/>        TX errors 0\u00a0 dropped 0 overruns 0\u00a0 carrier 0\u00a0 collisions 0<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0418 \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>user@vm-rch-node-01:~$ ip route<br \/>default via 10.21.0.1 dev ens160 proto static<br \/>10.21.0.0\/16 dev ens160 proto kernel scope link src 10.21.0.11<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u043c\u0435\u0436\u0434\u0443 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c \u0438 \u043d\u043e\u0432\u044b\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c<\/h3>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435:<\/p>\n<ul>\n<li>\n<p>19.4.15.14 &#8212; \u0431\u0435\u043b\u044b\u0439 ip-\u0430\u0434\u0440\u0435\u0441 \u043d\u0430 \u0442\u043e\u0447\u043a\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u0441 \u043d\u043e\u0432\u044b\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c<\/p>\n<\/li>\n<li>\n<p>8.10.7.2 &#8212; \u0431\u0435\u043b\u044b\u0439 ip-\u0430\u0434\u0440\u0435\u0441 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 vm-firewall \u0438 \u0441\u043b\u0443\u0436\u0438\u0442 \u0442\u043e\u0447\u043a\u043e\u0439, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f IPsec. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u0412\u041c vm-firewall.<\/p>\n<p>\u0421\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043d\u0430\u0448\u0435\u0439 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0430 \u043d\u0430 \u0444\u0430\u0439\u0435\u0440\u0432\u043e\u043b\u0435 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 1-\u043e\u0439 \u0438 2-\u043e\u0439 \u0444\u0430\u0437\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u044f.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>apt-get install racoon ipsec-tools<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0412 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430:<\/p>\n<ol>\n<li>\n<p>\u0414\u0435\u043c\u043e\u043d\u0430 <strong>racoon<\/strong> \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0443\u043d\u043d\u0435\u043b\u0435\u043c ISAKMP.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0442\u0438\u043b\u0438\u0442\u044b <strong>setkey<\/strong> \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f SA-\u0442\u0443\u043d\u043d\u0435\u043b\u0435\u0439 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e. <strong>Racoon<\/strong> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0443\u043d\u043d\u0435\u043b\u0435\u0439 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 IKE. \u042d\u0442\u043e \u0434\u0435\u043c\u043e\u043d, \u043e\u043d \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c (\/etc\/racoon\/racoon.conf), \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u043c init-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c (\/etc\/init.d\/racoon &lt;start|stop|restart>):<\/p>\n<p>\u0412 \u0431\u043b\u043e\u043a\u0435 <strong>remote <\/strong>\u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 1-\u0439 \u0444\u0430\u0437\u044b<\/p>\n<p>\u0412 \u0431\u043b\u043e\u043a\u0435 <strong>sainfo<\/strong> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 2-\u0439 \u0444\u0430\u0437\u044b<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>root@vm-firewall:~# cat \/etc\/racoon\/racoon.conf<br \/>log notify;<br \/>path pre_shared_key \"\/etc\/racoon\/psk.txt\"; <br \/>listen {    <br \/>  isakmp 8.10.7.2[500];    <br \/>  strict_address;<br \/>} <br \/>remote 19.4.15.14 {    <br \/>  exchange_mode main,aggressive;    <br \/>  lifetime time 24 hour;    <br \/>  dpd_delay 5;    <br \/>  proposal {\u00a0 \u00a0     <br \/>    encryption_algorithm aes 256;\u00a0 \u00a0     <br \/>    hash_algorithm sha1;\u00a0 \u00a0     <br \/>    authentication_method pre_shared_key;\u00a0 \u00a0     <br \/>    dh_group 2;\u00a0 \u00a0     <br \/>    lifetime time 86400 sec;    <br \/>  }<br \/>} <br \/>sainfo address 10.21.0.0\/24 any address 10.1.0.0\/16 any {    <br \/>  pfs_group 2;    <br \/>  lifetime time 28800 sec;    <br \/>  encryption_algorithm aes 256;    <br \/>  authentication_algorithm hmac_sha1;    <br \/>  compression_algorithm deflate;<br \/>}<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 psk.txt \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u043b\u044e\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0434\u0430\u043b\u0438 \u043d\u0430 \u0442\u043e\u0447\u043a\u0435 \u0432\u0445\u043e\u0434\u0430 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0441\u0435\u0442\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>root@vm-firewall:~# cat \/etc\/racoon\/psk.txt<br \/># IPv4\/v6 addresses<br \/>19.4.15.14    PA$$W0RD<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 <strong>setkey<\/strong>. \u041e\u043d\u0430 \u0442\u043e\u0436\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0434\u0435\u043c\u043e\u043d (\/etc\/init.d\/setkey &lt;start|stop|restart>), \u043d\u043e \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u043e\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \/etc\/ipsec-tools.conf. \u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u043d\u0435\u0435, \u043e\u043d\u0430 \u0443\u0436\u0435 \u0437\u0430\u0434\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0442\u0443\u043d\u043d\u0435\u043b\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a\u0430. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u0434\u0430\u0435\u0442 <strong>SA<\/strong> \u0438 <strong>SP<\/strong> \u0434\u043b\u044f \u043d\u0438\u0445:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>root@vm-firewall:~# cat \/etc\/ipsec-tools.conf<br \/>#!\/usr\/sbin\/setkey -f <\/p>\n<p># NOTE: Do not use this file if you use racoon with racoon-tool<br \/># utility. racoon-tool will setup SAs and SPDs automatically using<br \/># \/etc\/racoon\/racoon-tool.conf configuration.<br \/># <br \/>## Flush the SAD and SPD<br \/>#<br \/>flush;<br \/>spdflush; <\/p>\n<p>## Some sample SPDs for use racoon<br \/>#<br \/>spdadd 10.21.0.0\/24 10.1.0.0\/16 any -P out ipsec \u00a0 <br \/>   esp\/tunnel\/8.10.7.2-19.4.15.14\/require;\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0      <br \/>spdadd 10.1.0.0\/16 10.21.0.0\/24 any -P in ipsec \u00a0 <br \/>   esp\/tunnel\/19.4.15.14-8.10.7.2\/require;<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0432 \u044d\u0442\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>systemctl restart setkey.service<br \/>systemctl restart racoon.service<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435, \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0432 \u043d\u0435\u0433\u043e \u043f\u043e\u0439\u0434\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a. \u041d\u0430\u0434\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0438\u043d\u0433 \u0434\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0438\u043d\u0433 \u0441 \u043d\u043e\u0434\u044b 10.21.0.11 \u0434\u043e \u043d\u043e\u0434\u044b \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 (10.1.1.13):<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>user@vm-rch-node-01:~$ ping 10.1.1.13<br \/>PING 10.1.1.13 (10.1.13.13) 56(84) bytes of data.<br \/>64 bytes from 10.1.1.13: icmp_seq=1 ttl=61 time=4.67 ms<br \/>64 bytes from 10.1.1.13: icmp_seq=2 ttl=61 time=2.55 ms<br \/>64 bytes from 10.1.1.13: icmp_seq=3 ttl=61 time=2.94 ms<br \/>64 bytes from 10.1.1.13: icmp_seq=4 ttl=61 time=4.07 ms^C<br \/>--- 10.1.1.13 ping statistics ---<br \/>4 packets transmitted, 4 received, 0% packet loss, time 3004ms<br \/>rtt min\/avg\/max\/mdev = 2.556\/3.563\/4.671\/0.850 ms<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0421 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b \u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b (\u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e ICMP \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0442 \u043d\u0430 \u0443\u0447\u0430\u0441\u0442\u043a\u0435).<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 \u043d\u0430 \u0442\u043e\u0439 \u0436\u0435 \u043d\u043e\u0434\u0435:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>user@vm-rch-node-01:~$ traceroute 10.1.1.13<br \/>traceroute to 10.1.1.13 (10.1.1.13), 30 hops max, 60 byte packets<br \/>1 _gateway (10.21.0.1) 0.113 ms 0.080 ms 0.096 ms<br \/>2 * * *<br \/>3 10.1.1.13 (10.1.1.13) 2.846 ms 2.875 ms 2.874 ms<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u041d\u0430 vm-firewall \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u0434\u043d\u044f\u043b\u0441\u044f \u043b\u0438 ISAKMP-\u0442\u0443\u043d\u043d\u0435\u043b\u044c:<\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>root@vm-firewall:~# racoonctl show-sa isakmp<br \/>Destination\u00a0 \u00a0     Cookies\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Created<br \/>10.1.0.1.500 \u00a0     356a7e134251a93f:30071210375c165 \u00a0 \u00a0 \u00a0 \u00a0     2021-02-19 09:18:28<\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043b\u0438\u0441\u044c \u043b\u0438 \u0442\u0443\u043d\u043d\u0435\u043b\u0438 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434 <strong>racoonctl show-sa esp \u0438\u043b\u0438 setket -D:<\/strong><\/p>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p><code>root@vm-firewall:~# setkey -D<br \/>8.10.7.2 19.4.15.14<br \/>esp mode=tunnel spi=133928257(0x07fb9541) reqid=0(0x00000000)<br \/>E: aes-cbc e12ee98c dcc52fa3 dd115cae 57aaa59e b7b37484 ffbfe306 b7a1e3cd 1e2c5301<br \/>A: hmac-sha1 a8d2c0a7 f9690fe2 287cad8f 3023a683 67d4ed85seq=0x00000000 replay=4 flags=0x00000000 state=mature<br \/>created: Feb 20 07:53:53 2021 current: Feb 20 08:15:59 2021<br \/>diff: 1326(s) hard: 1800(s) soft: 1440(s)<br \/>last: Feb 20 07:53:54 2021 hard: 0(s) soft: 0(s)<br \/>current: 49838883(bytes) hard: 0(bytes) soft: 0(bytes)<br \/>allocated: 52998 hard: 0 soft: 0<br \/>sadb_seq=1 pid=4468 refcnt=0<br \/>19.4.15.14 8.10.7.2<br \/>esp mode=tunnel spi=193529941(0x0b890855) reqid=0(0x00000000)<br \/>E: aes-cbc 8ad5774d eaa4fe28 685eb88a 12320bac 4ed8ec2e c6af576f 7f3e1f27 666da5da<br \/>A: hmac-sha1 22c82645 7f7b9550 73cbd018 1648b4b7 402411ffseq=0x00000000 replay=4 flags=0x00000000 state=mature<br \/>created: Feb 20 07:53:53 2021 current: Feb 20 08:15:59 2021<br \/>diff: <\/code><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\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-408987","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/408987","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=408987"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/408987\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=408987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=408987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=408987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}