{"id":267733,"date":"2015-11-08T22:26:02","date_gmt":"2015-11-08T19:26:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=267733"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=267733","title":{"rendered":"Linux-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b: \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435"},"content":{"rendered":"<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/4f4\/45e\/ec6\/4f445eec61bd4e40aaee12f99eede609.jpg\"\/><\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0432\u043a\u0440\u0430\u0442\u0446\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043d\u0430\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, LXC \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0437\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0435 \u043f\u043e-\u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c. <\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0440\u0430\u0441\u0442\u0435\u0442. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043e\u0434\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u043b\u043e\u043d\u0430\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u0445, \u0438 \u043f\u043b\u044e\u0441 \u043a\u043e \u0432\u0441\u0435\u043c\u0443, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u043d\u0430 \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u0430\u0445. \u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435: \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043d\u044b\u043c \u0441\u043a\u043b\u0430\u0434\u043e\u043c. <\/p>\n<p>  <a name=\"habracut\"><\/a><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/010\/29f\/549\/01029f5491b64115912b6526adc88675.png\"\/><\/p>\n<p>  \u042d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e, \u0447\u0442\u043e \u0436\u0438\u0432\u0435\u0442 \u043d\u0430 \u043b\u0438\u0447\u043d\u043e\u043c \u043b\u0430\u043f\u0442\u043e\u043f\u0435.<\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438<\/h2>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0432\u0432\u043e\u0434\u0438\u0442\u044c sudo\/su \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f LXC \u0438\u0437-\u043f\u043e\u0434 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>  \u0422\u0443\u0442 \u0441\u0440\u0430\u0437\u0443 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043c\u044b\u0441\u043b\u044c \u043f\u043e\u043d\u0430\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043b\u0438\u0430\u0441\u043e\u0432 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438. \u0427\u0442\u043e \u0438 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043e:<\/p>\n<h4>lxc.alias<\/h4>\n<pre><code>alias &quot;lxc-monitor=sudo lxc-monitor&quot; alias &quot;lxc-test-saveconfig=sudo lxc-test-saveconfig&quot; alias &quot;lxc-wait=sudo lxc-wait&quot; alias &quot;lxc-config=sudo lxc-config&quot; alias &quot;lxc-test-createtest=sudo lxc-test-createtest&quot; alias &quot;lxc-test-apparmor=sudo lxc-test-apparmor&quot; alias &quot;lxc-test-destroytest=sudo lxc-test-destroytest&quot; alias &quot;lxc-test-containertests=sudo lxc-test-containertests&quot; alias &quot;lxc-unshare=sudo lxc-unshare&quot; alias &quot;lxc-autostart=sudo lxc-autostart&quot; alias &quot;lxc-snapshot=sudo lxc-snapshot&quot; alias &quot;lxc-create=sudo lxc-create&quot; alias &quot;lxc-execute=sudo lxc-execute&quot; alias &quot;lxc-test-shutdowntest=sudo lxc-test-shutdowntest&quot; alias &quot;lxc-freeze=sudo lxc-freeze&quot; alias &quot;lxc-test-get_item=sudo lxc-test-get_item&quot; alias &quot;lxc-test-getkeys=sudo lxc-test-getkeys&quot; alias &quot;lxc-cgroup=sudo lxc-cgroup&quot; alias &quot;lxc-test-attach=sudo lxc-test-attach&quot; alias &quot;lxc-usernsexec=sudo lxc-usernsexec&quot; alias &quot;lxc-test-cgpath=sudo lxc-test-cgpath&quot; alias &quot;lxc-test-snapshot=sudo lxc-test-snapshot&quot; alias &quot;lxc-start-ephemeral=sudo lxc-start-ephemeral&quot; alias &quot;lxc-test-device-add-remove=sudo lxc-test-device-add-remove&quot; alias &quot;lxc-test-concurrent=sudo lxc-test-concurrent&quot; alias &quot;lxc-destroy=sudo lxc-destroy&quot; alias &quot;lxc-test-console=sudo lxc-test-console&quot; alias &quot;lxc-checkconfig=sudo lxc-checkconfig&quot; alias &quot;lxc-test-autostart=sudo lxc-test-autostart&quot; alias &quot;lxc-start=sudo lxc-start&quot; alias &quot;lxc-test-locktests=sudo lxc-test-locktests&quot; alias &quot;lxc-clone=sudo lxc-clone&quot; alias &quot;lxc-test-may-control=sudo lxc-test-may-control&quot; alias &quot;lxc-test-list=sudo lxc-test-list&quot; alias &quot;lxc-test-clonetest=sudo lxc-test-clonetest&quot; alias &quot;lxc-test-lxcpath=sudo lxc-test-lxcpath&quot; alias &quot;lxc-ls=sudo lxc-ls --fancy&quot; alias &quot;lxc-console=sudo lxc-console&quot; alias &quot;lxc-info=sudo lxc-info&quot; alias &quot;lxc-unfreeze=sudo lxc-unfreeze&quot; alias &quot;lxc-test-startone=sudo lxc-test-startone&quot; alias &quot;lxc-device=sudo lxc-device&quot; alias &quot;lxc-test-reboot=sudo lxc-test-reboot&quot; alias &quot;lxc-stop=sudo lxc-stop&quot; alias &quot;lxc-attach=sudo lxc-attach&quot; <\/code><\/pre>\n<p>  \u041f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u043a\u0430\u043a \u0434\u043b\u044f zsh, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f bash. \u0414\u043b\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c source \/path\/to\/lxc.alias \u0432 ~\/.bashrc \u0438\u043b\u0438 ~\/.zshrc.<\/p>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0435 \u2014 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0432 \/etc\/sudoers.d \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0431\u0435\u0437 \u0432\u0432\u043e\u0434\u0430 \u043f\u0430\u0440\u043e\u043b\u044f:<\/p>\n<h4>\/etc\/sudoers.d\/lxc<\/h4>\n<pre><code>user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-autostart user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-attach user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-apparmor user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-concurrent user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-usernsexec user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-destroytest user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-clone user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-shutdowntest user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-device-add-remove user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-locktests user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-clonetest user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-console user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-attach user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-config user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-list user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-startone user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-device user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-snapshot user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-autostart user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-getkeys user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-unfreeze user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-lxcpath user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-createtest user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-execute user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-create user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-console user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-start-ephemeral user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-checkconfig user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-info user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-destroy user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-get_item user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-snapshot user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-cgroup user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-may-control user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-reboot user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-wait user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-unshare user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-start user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-monitor user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-cgpath user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-stop user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-containertests user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-ls user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-freeze user   ALL=(ALL) NOPASSWD:\t\/usr\/bin\/lxc-test-saveconfig <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u00abuser\u00bb \u2014 \u0438\u043c\u044f \u0432\u0430\u0448\u0435\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e DHCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h2>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435, \u0447\u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c: \u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0448\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0442\u0438 \u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u0431\u0435\u0437 \u043d\u0443\u0434\u043d\u043e\u0433\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432. \u041d\u0435\u043c\u043d\u043e\u0436\u043a\u043e \u043f\u043e\u0433\u0443\u0433\u043b\u0438\u0432, \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0432\u043e\u0442 <a href=\"http:\/\/habrahabr.ru\/company\/centosadmin\/blog\/202482\/\">\u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e<\/a>. <\/p>\n<p>  \u0420\u0435\u0446\u0435\u043f\u0442 \u0431\u044b\u043b \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d \u0438 \u0432\u0437\u044f\u0442 \u043d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u043d\u043e \u043a\u043e\u0435-\u0447\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c. \u0427\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e, \u043f\u043e\u0432\u0435\u0434\u0430\u044e \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u044d\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0430\u043c dhcp-server.<\/p>\n<pre><code>apt-get install isc-dhcp-server<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438 \u043f\u043e \u043c\u043e\u0435\u0439 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0442\u043e \u0442\u0440\u043e\u0433\u0430\u0442\u044c \/etc\/network\/interfaces \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. \u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439, \u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u043a\u0430\u043a \u043e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:<\/p>\n<h4>\/etc\/network\/interfaces<\/h4>\n<pre><code>iface br0 inet static    address 172.20.0.1    netmask 255.255.255.0    pre-up  \/sbin\/brctl addbr br0    post-up \/sbin\/brctl setfd br0 0    post-up iptables -t nat -A POSTROUTING -s 172.20.0.0\/24 -j MASQUERADE    post-up echo 1 &gt; \/proc\/sys\/net\/ipv4\/ip_forward    pre-down \/sbin\/brctl delbr br0 <\/code><\/pre>\n<p>  \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439:<\/p>\n<h4>\/etc\/lxc\/default.conf<\/h4>\n<pre><code>lxc.network.type = veth lxc.network.flags = up lxc.network.link = br0 lxc.network.name = eth0 <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c \u0448\u043b\u044e\u0437\u044b, \u043c\u0430\u0441\u043a\u0438 \u043f\u043e\u0434\u0441\u0435\u0442\u0438, DNS \u0438 \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 mac-\u0430\u0434\u0440\u0435\u0441\u0430 <b>\u043d\u0435 \u043d\u0443\u0436\u043d\u043e<\/b>. \u0412\u0441\u0435 \u044d\u0442\u043e \u0432\u044b\u0434\u0430\u0434\u0443\u0442 dhcp-\u0441\u0435\u0440\u0432\u0435\u0440 \u0438 lxc. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f21\/c47\/cc7\/f21c47cc76434e65b677e56acaf6dbd9.png\"\/><\/p>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c isc-dhcpd:<\/p>\n<h4>\/etc\/default\/isc-dhcp-server<\/h4>\n<p>  <\/p>\n<pre><code>INTERFACES=&quot;br0&quot; <\/code><\/pre>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c, \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0436\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c dhcpd \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. <\/p>\n<p>  \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \/etc\/dhcp\/dhcpd.conf, \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0442\u0430\u043c \u0437\u0430\u043a\u043e\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u0432\u0438\u0434\u0430 subnet \u0438 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0442\u0443\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<h4>\/etc\/dhcp\/dhcpd.conf<\/h4>\n<pre><code>subnet 172.20.0.0 netmask 255.255.255.0 { \trange 172.20.0.10 172.20.0.250; \toption domain-name-servers 8.8.8.8,  8.8.4.4 ; \toption routers 172.20.0.1; } <\/code><\/pre>\n<p>  DNS \u044f \u0443\u043a\u0430\u0437\u0430\u043b \u0433\u0443\u0433\u043b\u043e\u0432\u0441\u043a\u0438\u0435. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u043e \u0432\u043a\u0443\u0441\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/duckduckgo.com\/?q=public+dns&amp;ia=answer\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a> \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439.<\/p>\n<h2>\u0418\u0442\u043e\u0433\u0438<\/h2>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435: \u043f\u0440\u043e\u043f\u0430\u043b\u0430 \u043d\u0443\u0436\u0434\u0430 \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0435 \u0431\u0443\u043a\u043e\u0432\u043a\u0438 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b. <\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u043e\u043a\u0430\u043c\u0435\u0441\u0442 \u0432\u0441\u0435.               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/270439\/\"> http:\/\/habrahabr.ru\/post\/270439\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/4f4\/45e\/ec6\/4f445eec61bd4e40aaee12f99eede609.jpg\"\/><\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0432\u043a\u0440\u0430\u0442\u0446\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043d\u0430\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, LXC \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0437\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0435 \u043f\u043e-\u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c. <\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0440\u0430\u0441\u0442\u0435\u0442. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043e\u0434\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u043b\u043e\u043d\u0430\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u0445, \u0438 \u043f\u043b\u044e\u0441 \u043a\u043e \u0432\u0441\u0435\u043c\u0443, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u043d\u0430 \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u0430\u0445. \u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435: \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043d\u044b\u043c \u0441\u043a\u043b\u0430\u0434\u043e\u043c. <\/p>\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-267733","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/267733","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=267733"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/267733\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=267733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=267733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=267733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}