{"id":15,"date":"2021-06-14T15:07:00","date_gmt":"2021-06-14T08:07:00","guid":{"rendered":""},"modified":"2023-05-09T20:12:30","modified_gmt":"2023-05-09T13:12:30","slug":"%d0%bc%d0%b5%d0%bd%d1%8f%d0%b5%d0%bc-%d0%bd%d0%b0-%d0%bf%d0%be%d1%81%d1%82%d0%be%d1%8f%d0%bd%d0%ba%d1%83-mac-%d0%b0%d0%b4%d1%80%d0%b5%d1%81-%d1%81%d0%b5%d1%82%d0%b5%d0%b2%d0%be%d0%b9-%d0%ba%d0%b0","status":"publish","type":"post","link":"https:\/\/mohn.ru\/?p=15","title":{"rendered":"\u041c\u0435\u043d\u044f\u0435\u043c \u043d\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043a\u0443 MAC \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b \u0432 Zentyal 7.0"},"content":{"rendered":"<p>\u0414\u043b\u044f \u0441\u043c\u0435\u043d\u044b MAC \u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b \u0432 Ubuntu \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0435\u0449\u0438:<\/p>\n<ul>\n<li><b>\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e:<\/b><\/li>\n<\/ul>\n<blockquote>\n<p style=\"padding-left: 40px;\"><i>sudo ifconfig eth1 down<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i style=\"font-size: revert; color: initial;\">sudo ifconfig eth1 hw ether 00:11:22:33:44:55<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i style=\"font-size: revert; color: initial;\">sudo ifconfig eth1 up<\/i><\/p>\n<\/blockquote>\n<ul>\n<li><b>\u043d\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e<\/b>: \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438\u00a0<i>\/etc\/network\/interfaces<\/i>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440<i>:<\/i><\/li>\n<\/ul>\n<blockquote>\n<p style=\"padding-left: 40px;\"><i># The primary network interface<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i>allow-hotplug eth1<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i>iface eth1 inet dhcp<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i>hwaddress ether 00:11:22:33:44:55<\/i><\/p>\n<\/blockquote>\n<p>\u0433\u0434\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 ip \u043e\u0442 dhcp \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 MAC, \u043e\u043d \u0436\u0435\u00a0<i>hwaddress.<\/i><\/p>\n<p>\u0412 Zyntyal 7.0 \u044d\u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u0431\u0435\u0433\u043d\u0443\u0442\u044c \u043a \u043f\u043e\u0438\u0441\u043a\u0443 \u043f\u043e \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0434\u0430\u0432\u0430\u043b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f Ubuntu. \u0410 \u0432\u043e\u0442 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0444\u043e\u0440\u0443\u043c\u0443 Zentyal \u0434\u0430\u043b <b>\u041e\u0414\u0418\u041d<\/b>\u00a0<a href=\"https:\/\/forum.zentyal.org\/index.php\/topic,22461.msg86435.html#msg86435\" target=\"_blank\" rel=\"noopener\">\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/a>.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u00a0\/etc\/zentyal\/hooks\/network.postsetconf<\/p>\n<blockquote>\n<p style=\"padding-left: 40px;\"><i>sudo nano\u00a0 \/etc\/zentyal\/hooks\/network.postsetconf<\/i><\/p>\n<\/blockquote>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0442\u0435\u043a\u0441\u0442 \u0432 \u0444\u0430\u0439\u043b (Shift+Insert):<\/p>\n<blockquote>\n<p style=\"padding-left: 40px;\"><i>#!\/bin\/bash<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i>#\u00a0<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i># User-defined post-configuration Network hook:<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i># \/etc\/zentyal\/hooks\/network.postsetconf<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i># module is enabled (1) or not (0).<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i>\u00a0<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i>if [[ &#171;$1&#187; != &#171;1&#187; ]]; then<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i>\u00a0 \u00a0 #add custom rules here<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i>\u00a0<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i>\u00a0 \u00a0 #Changing MAC Addresses<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i>\u00a0 \u00a0 sed -i &#8216;s\/^.*iface eth0.*$\/&amp;nr\u00a0 \u00a0 \u00a0 hwaddress ether 00:11:22:FF:EE:DD\/g&#8217; \/etc\/network\/interfaces<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i>\u00a0 \u00a0 sed -i &#8216;s\/^.*iface eth1.*$\/&amp;nr\u00a0 \u00a0 \u00a0 hwaddress ether 00:11:22:EE:DD:CC\/g&#8217; \/etc\/network\/interfaces<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i>\u00a0 \u00a0 sed -i &#8216;s\/^.*iface eth2.*$\/&amp;nr\u00a0 \u00a0 \u00a0 hwaddress ether 00:11:22:DD:CC:BB\/g&#8217; \/etc\/network\/interfaces<\/i><\/p>\n<p style=\"padding-left: 40px;\"><i>fi<\/i><i><\/i><\/p>\n<p style=\"padding-left: 40px;\"><i>exit 0<\/i><\/p>\n<\/blockquote>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c (Ctrl+O, Enter). \u0417\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c (Ctrl+X).<\/p>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u043c.<\/p>\n<blockquote>\n<p style=\"padding-left: 40px;\"><i>sudo chmod +x \/etc\/zentyal\/hooks\/network.postsetconf\u00a0<\/i><\/p>\n<\/blockquote>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440 Zentyal. \u0413\u043e\u0442\u043e\u0432\u043e!<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u043e \u0434\u043b\u044f Zentyal 7.0. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0438 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u043b\u044f \u0441\u043c\u0435\u043d\u044b MAC \u0430\u0434\u0440\u0435\u0441\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b \u0432 Ubuntu \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0435\u0449\u0438: \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e: sudo ifconfig eth1 down sudo ifconfig eth1 hw ether 00:11:22:33:44:55 sudo ifconfig eth1 up \u043d\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e: \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438\u00a0\/etc\/network\/interfaces, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: # The primary network interface allow-hotplug eth1 iface eth1 inet dhcp hwaddress ether 00:11:22:33:44:55 \u0433\u0434\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 ip \u043e\u0442 dhcp [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,11,7],"tags":[],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-linux","category-zentyal","category-7"],"_links":{"self":[{"href":"https:\/\/mohn.ru\/index.php?rest_route=\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mohn.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohn.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohn.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohn.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15"}],"version-history":[{"count":3,"href":"https:\/\/mohn.ru\/index.php?rest_route=\/wp\/v2\/posts\/15\/revisions"}],"predecessor-version":[{"id":549,"href":"https:\/\/mohn.ru\/index.php?rest_route=\/wp\/v2\/posts\/15\/revisions\/549"}],"wp:attachment":[{"href":"https:\/\/mohn.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohn.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohn.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}