{"id":174845,"date":"2020-03-21T09:35:56","date_gmt":"2020-03-21T01:35:56","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=174845"},"modified":"2020-05-11T09:25:19","modified_gmt":"2020-05-11T01:25:19","slug":"linux-change-mac","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-change-mac.html","title":{"rendered":"Linux\u4e2d\u5982\u4f55\u66f4\u6539MAC\u5730\u5740"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u6211\u4eec\u4e3a\u4ec0\u4e48\u8981\u66f4\u6539MAC\u5730\u5740\uff0c\u4e5f\u8bb8\u4f60\u4e0d\u5e0c\u671b\u4f60\u7684\u5b9e\u9645MAC\u5730\u5740(\u7269\u7406\u5730\u5740)\u66b4\u9732\u5728\u516c\u5171\u7f51\u7edc\u4e0a\u3002\u53e6\u4e00\u79cd\u60c5\u51b5\u662f\uff0c\u7f51\u7edc\u7ba1\u7406\u5458\u53ef\u80fd\u5728\u7f51\u7edc\u8bbe\u5907\u4e2d\u963b\u6b62\u4e86\u4e00\u4e2a\u7279\u5b9a\u7684MAC\u5730\u5740\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\u73af\u5883<\/strong><\/div>\n
    \n
  1. Centos7.7 Minimal<\/li>\n
  2. GNU MAC changer 1.7.0<\/li>\n<\/ol>\n
    \u67e5\u8be2\u7f51\u5361\u548cMAC\u5730\u5740<\/strong><\/div>\n
    \r\n[root@localhost ~]# ip link show\r\n1: lo:  mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000\r\n    link\/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00\r\n2: ens33:  mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000\r\n    link\/ether 00:0c:29:48:4c:9a brd ff:ff:ff:ff:ff:ff\r\n<\/pre>\n

    \"\"
    \n\u7f51\u5361\u540d\u79f0\u662fens33\uff0cMAC\u5730\u5740\u662f00:0c:29:48:4c:9a\u3002\u8bf7\u8bb0\u4e0b\u81ea\u5df1\u7684MAC\u5730\u5740\uff0c\u7a0d\u540e\u505a\u5b8c\u5b9e\u9a8c\u6062\u590d\u5230\u539f\u6765\u7684MAC\u5730\u5740\u3002<\/p>\n

    \u4f7f\u7528macchanger\u5de5\u5177\u66f4\u6539MAC\u5730\u5740<\/strong><\/div>\n

    Macchanger\u53ef\u4ee5\u67e5\u770b\u3001\u4fee\u6539MAC\u5730\u5740\u3002<\/p>\n

    \u5b89\u88c5macchanger<\/strong><\/span><\/div>\n
    \r\n[root@localhost ~]# git clone https:\/\/github.com\/alobbs\/macchanger\r\n[root@localhost ~]# yum -y install autoconf automake gcc gcc-c++ texinfo\r\n<\/pre>\n
    \u5982\u4f55\u4f7f\u7528macchanger<\/strong><\/span><\/div>\n

    \u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u751f\u6210\u4e00\u4e2a\u968f\u673a\u7684mac\u5730\u5740\u4e3aens33\u7f51\u5361\uff1a<\/p>\n

    \r\n[root@localhost ~]# macchanger -r ens33\r\nCurrent MAC:   00:0c:29:48:4c:9a (VMware, Inc.)\r\nPermanent MAC: 00:0c:29:48:4c:9a (VMware, Inc.)\r\nNew MAC:       a2:97:a2:55:53:be (unknown)\r\n<\/pre>\n

    \"\"
    \n\u67e5\u770b\u4e00\u4e0bens33\u7684MAC\u5730\u5740\u662f\u5426\u6539\u53d8\u4e86<\/p>\n

    \r\n[root@localhost ~]# ip link show ens33\r\n2: ens33:  mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000\r\n    link\/ether a2:97:a2:55:53:be brd ff:ff:ff:ff:ff:ff\r\n<\/pre>\n

    \"\"
    \n\u53ef\u4ee5\u66f4\u6539\u6210\u4e00\u4e2a\u81ea\u5df1\u6307\u5b9a\u7684mac\u5730\u5740\uff0c\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u66f4\u6539\uff1a<\/p>\n

    \r\n[root@localhost ~]# macchanger --mac=XX:XX:XX:XX:XX:XX\r\n<\/pre>\n

    \u5982\u679c\u60f3\u8981\u6062\u590d\u5230\u771f\u5b9e\u7684MAC\u5730\u5740\uff0c\u8bf7\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\uff1a<\/p>\n

    \r\n[root@localhost ~]# macchanger -p ens33\r\nCurrent MAC:   a2:97:a2:55:53:be (unknown)\r\nPermanent MAC: 00:0c:29:48:4c:9a (VMware, Inc.)\r\nNew MAC:       00:0c:29:48:4c:9a (VMware, Inc.)\r\n<\/pre>\n

    \"\"<\/p>\n

    \u603b\u7ed3<\/strong><\/div>\n

    \u6211\u4eec\u4e3a\u4ec0\u4e48\u8981\u66f4\u6539MAC\u5730\u5740\uff0c\u4e5f\u8bb8\u4f60\u4e0d\u5e0c\u671b\u4f60\u7684\u5b9e\u9645MAC\u5730\u5740(\u7269\u7406\u5730\u5740)\u66b4\u9732\u5728\u516c\u5171\u7f51\u7edc\u4e0a\u3002\u53e6\u4e00\u79cd\u60c5\u51b5\u662f\uff0c\u7f51\u7edc\u7ba1\u7406\u5458\u53ef\u80fd\u5728\u7f51\u7edc\u8bbe\u5907\u4e2d\u963b\u6b62\u4e86\u4e00\u4e2a\u7279\u5b9a\u7684MAC\u5730\u5740\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

    Centos7.7 Minimal GNU MAC changer 1.7.0 [root@localhost […]<\/p>\n","protected":false},"author":309,"featured_media":174860,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-174845","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/174845","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/309"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=174845"}],"version-history":[{"count":1,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/174845\/revisions"}],"predecessor-version":[{"id":174865,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/174845\/revisions\/174865"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/174860"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=174845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=174845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=174845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}