{"id":90455,"date":"2024-03-09T09:54:11","date_gmt":"2024-03-09T01:54:11","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=90455"},"modified":"2024-03-09T09:54:11","modified_gmt":"2024-03-09T01:54:11","slug":"mac-ubuntu","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/mac-ubuntu.html","title":{"rendered":"Ubuntu 16.04 \u4e0b\u968f\u673a\u5316\u4f60\u7684 WiFi MAC \u5730\u5740\u7684\u65b9\u6cd5"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u4f60\u7684\u8bbe\u5907\u7684 MAC \u5730\u5740\u53ef\u4ee5\u5728\u4e0d\u540c\u7684 WiFi \u7f51\u7edc\u4e2d\u8bb0\u5f55\u4f60\u7684\u6d3b\u52a8\u3002\u8fd9\u4e9b\u4fe1\u606f\u80fd\u88ab\u5171\u4eab\u540e\u51fa\u552e\uff0c\u7528\u4e8e\u8bc6\u522b\u7279\u5b9a\u7684\u4e2a\u4f53\u3002\u4f46\u53ef\u4ee5\u7528\u968f\u673a\u751f\u6210\u7684\u4f2a MAC \u5730\u5740\u6765\u963b\u6b62\u8fd9\u4e00\u884c\u4e3a\u3002\u6bcf\u4e00\u4e2a\u8bf8\u5982 WiFi \u6216\u8005\u4ee5\u592a\u7f51\u5361\u8fd9\u6837\u7684\u7f51\u7edc\u8bbe\u5907\uff0c\u90fd\u6709\u4e00\u4e2a\u53eb\u505a MAC \u5730\u5740\u7684\u552f\u4e00\u6807\u8bc6\u7b26\u3002\u8fd9\u5c31\u662f\u4f60\u80fd\u4e0a\u7f51\u7684\u539f\u56e0\uff1a\u6bcf\u5f53\u4f60\u8fde\u4e0a WiFi\uff0c\u8def\u7531\u5668\u5c31\u4f1a\u7528\u8fd9\u4e00\u5730\u5740\u6765\u5411\u4f60\u63a5\u53d7\u548c\u53d1\u9001\u6570\u636e\uff0c\u5e76\u4e14\u7528\u5b83\u6765\u533a\u522b\u4f60\u548c\u8fd9\u4e00\u7f51\u7edc\u7684\u5176\u5b83\u8bbe\u5907\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\u8fd9\u4e00\u8bbe\u8ba1\u7684\u7f3a\u9677\u5728\u4e8e\u552f\u4e00\u6027\uff0c\u4e0d\u53d8\u7684 MAC \u5730\u5740\u6b63\u597d\u53ef\u4ee5\u7528\u6765\u8ffd\u8e2a\u4f60\u3002\u8fde\u4e0a\u4e86\u661f\u5df4\u514b\u7684 WiFi? \u597d\uff0c\u6ce8\u610f\u5230\u4e86\u3002\u5728\u4f26\u6566\u7684\u5730\u94c1\u4e0a? \u4e5f\u8bb0\u5f55\u4e0b\u6765\u3002<\/p>\n

\u5982\u679c\u4f60\u66fe\u7ecf\u5728\u67d0\u4e00\u4e2a WiFi \u9a8c\u8bc1\u9875\u9762\u4e0a\u8f93\u5165\u8fc7\u4f60\u7684\u771f\u5b9e\u59d3\u540d\uff0c\u4f60\u5c31\u5df2\u7ecf\u628a\u81ea\u5df1\u548c\u8fd9\u4e00 MAC \u5730\u5740\u5efa\u7acb\u4e86\u8054\u7cfb\u3002\u6ca1\u6709\u4ed4\u7ec6\u9605\u8bfb\u8bb8\u53ef\u670d\u52a1\u6761\u6b3e\u3001\u4f60\u53ef\u4ee5\u8ba4\u4e3a\uff0c\u673a\u573a\u7684\u514d\u8d39 WiFi \u6b63\u901a\u8fc7\u51fa\u552e\u6240\u8c13\u7684 \u2018\u987e\u5ba2\u5206\u6790\u6570\u636e\u2019\uff08\u4f60\u7684\u4e2a\u4eba\u4fe1\u606f\uff09\u83b7\u5229\u3002\u51fa\u552e\u7684\u5bf9\u8c61\u5305\u62ec\u9152\u5e97\uff0c\u9910\u996e\u4e1a\uff0c\u548c\u4efb\u4f55\u60f3\u8981\u4e86\u89e3\u4f60\u7684\u4eba\u3002<\/p>\n

\u6211\u4e0d\u60f3\u4fe1\u606f\u88ab\u8bb0\u5f55\uff0c\u518d\u51fa\u552e\u7ed9\u591a\u5bb6\u516c\u53f8\uff0c\u6240\u4ee5\u6211\u82b1\u4e86\u51e0\u4e2a\u5c0f\u65f6\u60f3\u51fa\u4e86\u4e00\u4e2a\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n

MAC \u5730\u5740\u4e0d\u4e00\u5b9a\u603b\u662f\u4e0d\u53d8\u7684<\/strong><\/div>\n

\u5e78\u8fd0\u7684\u662f\uff0c\u5728\u4e0d\u65ad\u5f00\u7f51\u7edc\u7684\u60c5\u51b5\u4e0b\uff0c\u662f\u53ef\u4ee5\u968f\u673a\u751f\u6210\u4e00\u4e2a\u4f2a MAC \u5730\u5740\u7684\u3002<\/p>\n

\u6211\u60f3\u968f\u673a\u751f\u6210\u6211\u7684 MAC \u5730\u5740\uff0c\u4f46\u662f\u6709\u4e09\u4e2a\u8981\u6c42\uff1a<\/p>\n

    \n
  1. MAC \u5730\u5740\u5728\u4e0d\u540c\u7f51\u7edc\u4e2d\u662f\u4e0d\u76f8\u540c\u7684\u3002\u8fd9\u610f\u5473\u7740\uff0c\u6211\u5728\u661f\u5df4\u514b\u548c\u5728\u4f26\u6566\u5730\u94c1\u7f51\u7edc\u4e2d\u7684 MAC \u5730\u5740\u662f\u4e0d\u76f8\u540c\u7684\uff0c\u8fd9\u6837\u5728\u4e0d\u540c\u7684\u670d\u52a1\u63d0\u4f9b\u5546\u4e2d\u5c31\u65e0\u6cd5\u5c06\u6211\u7684\u6d3b\u52a8\u7cfb\u8d77\u6765\u3002<\/li>\n
  2. MAC \u5730\u5740\u9700\u8981\u7ecf\u5e38\u66f4\u6362\uff0c\u8fd9\u6837\u5728\u7f51\u7edc\u4e0a\u5c31\u6ca1\u4eba\u77e5\u9053\u6211\u5c31\u662f\u53bb\u5e74\u5728\u8fd9\u513f\u7ecf\u8fc7\u4e86 75 \u6b21\u7684\u90a3\u4e2a\u4eba\u3002<\/li>\n
  3. MAC \u5730\u5740\u4e00\u5929\u4e4b\u5185\u5e94\u8be5\u4fdd\u6301\u4e0d\u53d8\u3002\u5f53 MAC \u5730\u5740\u66f4\u6539\u65f6\uff0c\u5927\u591a\u6570\u7f51\u7edc\u90fd\u4f1a\u4e0e\u4f60\u65ad\u5f00\u8fde\u63a5\uff0c\u7136\u540e\u5fc5\u987b\u5f97\u8fdb\u5165\u9a8c\u8bc1\u9875\u9762\u518d\u6b21\u767b\u9646 - \u8fd9\u5f88\u70e6\u4eba\u3002<\/li>\n<\/ol>\n
    \u64cd\u4f5c\u7f51\u7edc\u7ba1\u7406\u5668<\/ruby><\/strong><\/div>\n

    \u6211\u7b2c\u4e00\u6b21\u5c1d\u8bd5\u7528\u4e00\u4e2a\u53eb\u505a macchanger\u7684\u5de5\u5177\uff0c\u4f46\u662f\u5931\u8d25\u4e86\u3002\u56e0\u4e3a\u7f51\u7edc\u7ba1\u7406\u5668NetworkManager<\/rt><\/ruby>\u4f1a\u6839\u636e\u5b83\u81ea\u5df1\u7684\u8bbe\u7f6e\u6062\u590d\u9ed8\u8ba4\u7684 MAC \u5730\u5740\u3002<\/p>\n

    \u6211\u4e86\u89e3\u5230\uff0c\u7f51\u7edc\u7ba1\u7406\u5668 1.4.1 \u4ee5\u4e0a\u7248\u672c\u53ef\u4ee5\u81ea\u52a8\u751f\u6210\u968f\u673a\u7684 MAC \u5730\u5740\u3002\u5982\u679c\u4f60\u5728\u4f7f\u7528 Ubuntu 17.04 \u7248\u672c\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u8fd9\u4e00\u914d\u7f6e\u6587\u4ef6\u5b9e\u73b0\u8fd9\u4e00\u76ee\u7684\u3002\u4f46\u8fd9\u5e76\u4e0d\u80fd\u5b8c\u5168\u7b26\u5408\u6211\u7684\u4e09\u4e2a\u8981\u6c42\uff08\u4f60\u5fc5\u987b\u5728\u968f\u673arandom<\/rt><\/ruby>\u548c\u7a33\u5b9astable<\/rt><\/ruby>\u8fd9\u4e24\u4e2a\u9009\u9879\u4e4b\u4e2d\u9009\u62e9\u4e00\u4e2a\uff0c\u4f46\u6ca1\u6709\u4e00\u5929\u4e4b\u5185\u4fdd\u6301\u4e0d\u53d8\u8fd9\u4e00\u9009\u9879\uff09<\/p>\n

    \u56e0\u4e3a\u6211\u4f7f\u7528\u7684\u662f Ubuntu 16.04\uff0c\u7f51\u7edc\u7ba1\u7406\u5668\u7248\u672c\u4e3a 1.2\uff0c\u4e0d\u80fd\u76f4\u63a5\u4f7f\u7528\u9ad8\u7248\u672c\u8fd9\u4e00\u65b0\u529f\u80fd\u3002\u53ef\u80fd\u7f51\u7edc\u7ba1\u7406\u5668\u6709\u4e00\u4e9b\u968f\u673a\u5316\u65b9\u6cd5\u652f\u6301\uff0c\u4f46\u6211\u6ca1\u80fd\u6210\u529f\u3002\u6240\u4ee5\u6211\u7f16\u4e86\u4e00\u4e2a\u811a\u672c\u6765\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807\u3002<\/p>\n

    \u5e78\u8fd0\u7684\u662f\uff0c\u7f51\u7edc\u7ba1\u7406\u5668 1.2 \u5141\u8bb8\u6a21\u62df MAC \u5730\u5740\u3002\u4f60\u5728\u5df2\u8fde\u63a5\u7684\u7f51\u7edc\u4e2d\u53ef\u4ee5\u770b\u89c1 \u2018\u7f16\u8f91\u8fde\u63a5\u2019 \u8fd9\u4e00\u9009\u9879\u3002<\/p>\n

    \u7f51\u7edc\u7ba1\u7406\u5668\u4e5f\u652f\u6301\u94a9\u5b50\u5904\u7406 \u2014\u2014 \u4efb\u4f55\u4f4d\u4e8e \/etc\/NetworkManager\/dispatcher.d\/pre-up.d\/\u00a0\u7684\u811a\u672c\u5728\u5efa\u7acb\u7f51\u7edc\u8fde\u63a5\u4e4b\u524d\u90fd\u4f1a\u88ab\u6267\u884c\u3002<\/p>\n

    \u5206\u914d\u968f\u673a\u751f\u6210\u7684\u4f2a MAC \u5730\u5740<\/strong><\/div>\n

    \u6211\u60f3\u6839\u636e\u7f51\u7edc ID \u548c\u65e5\u671f\u6765\u751f\u6210\u65b0\u7684\u968f\u673a MAC \u5730\u5740\u3002 \u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u7f51\u7edc\u7ba1\u7406\u5668\u7684\u547d\u4ee4\u884c\u5de5\u5177 nmcli \u6765\u663e\u793a\u6240\u6709\u53ef\u7528\u7f51\u7edc\uff1a<\/p>\n

    ifconfig\r\n> nmcli connection\r\nNAME UUID TYPE DEVICE\r\nGladstone Guest 618545ca-d81a-11e7-a2a4-271245e11a45 802-11-wireless wlp1s0\r\nDoESDinky 6e47c080-d81a-11e7-9921-87bc56777256 802-11-wireless --\r\nPublicWiFi 79282c10-d81a-11e7-87cb-6341829c2a54 802-11-wireless --\r\nvirgintrainswifi 7d0c57de-d81a-11e7-9bae-5be89b161d22 802-11-wireless --<\/pre>\n

    \u56e0\u4e3a\u6bcf\u4e2a\u7f51\u7edc\u90fd\u6709\u4e00\u4e2a\u552f\u4e00\u6807\u8bc6\u7b26\uff08UUID\uff09\uff0c\u4e3a\u4e86\u5b9e\u73b0\u6211\u7684\u8ba1\u5212\uff0c\u6211\u5c06 UUID \u548c\u65e5\u671f\u62fc\u63a5\u5728\u4e00\u8d77\uff0c\u7136\u540e\u4f7f\u7528 MD5 \u751f\u6210 hash \u503c\uff1a<\/p>\n

    ifconfig\r\n# eg 618545ca-d81a-11e7-a2a4-271245e11a45-2017-12-03\r\n> echo -n \"${UUID}-$(date +%F)\" | md5sum\r\n53594de990e92f9b914a723208f22b3f -<\/pre>\n

    \u751f\u6210\u7684\u7ed3\u679c\u53ef\u4ee5\u4ee3\u66ff MAC \u5730\u5740\u7684\u6700\u540e\u516b\u4e2a\u5b57\u8282\u3002<\/p>\n

    \u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u6700\u5f00\u59cb\u7684\u5b57\u8282 02\u00a0\u4ee3\u8868\u8fd9\u4e2a\u5730\u5740\u662f\u81ea\u884c\u6307\u5b9a\u7684\u3002\u5b9e\u9645\u4e0a\uff0c\u771f\u5b9e MAC \u5730\u5740\u7684\u524d\u4e09\u4e2a\u5b57\u8282\u662f\u7531\u5236\u9020\u5546\u51b3\u5b9a\u7684\uff0c\u4f8b\u5982 b4:b6:76\u00a0\u5c31\u4ee3\u8868 Intel\u3002<\/p>\n

    \u6709\u53ef\u80fd\u67d0\u4e9b\u8def\u7531\u5668\u4f1a\u62d2\u7edd\u81ea\u5df1\u6307\u5b9a\u7684 MAC \u5730\u5740\uff0c\u4f46\u662f\u6211\u8fd8\u6ca1\u6709\u9047\u5230\u8fc7\u8fd9\u79cd\u60c5\u51b5\u3002<\/p>\n

    \u6bcf\u6b21\u8fde\u63a5\u5230\u4e00\u4e2a\u7f51\u7edc\uff0c\u8fd9\u4e00\u811a\u672c\u90fd\u4f1a\u7528nmcli \u00a0\u6765\u6307\u5b9a\u4e00\u4e2a\u968f\u673a\u751f\u6210\u7684\u4f2a MAC \u5730\u5740\u3002<\/p>\n

    \u6700\u540e\uff0c\u6211\u67e5\u770b\u4e86 ifconfig\u00a0\u7684\u8f93\u51fa\u7ed3\u679c\uff0c\u6211\u53d1\u73b0 MAC \u5730\u5740 HWaddr\u00a0\u5df2\u7ecf\u53d8\u6210\u4e86\u968f\u673a\u751f\u6210\u7684\u5730\u5740\uff08\u6a21\u62df Intel \u7684\uff09\uff0c\u800c\u4e0d\u662f\u6211\u771f\u5b9e\u7684 MAC \u5730\u5740\u3002<\/p>\n

    > ifconfig\r\nwlp1s0 Link encap:Ethernet HWaddr b4:b6:76:45:64:4d\r\ninet addr:192.168.0.86 Bcast:192.168.0.255 Mask:255.255.255.0\r\ninet6 addr: fe80::648c:aff2:9a9d:764\/64 Scope:Link\r\nUP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1\r\nRX packets:12107812 errors:0 dropped:2 overruns:0 frame:0\r\nTX packets:18332141 errors:0 dropped:0 overruns:0 carrier:0\r\ncollisions:0 txqueuelen:1000\r\nRX bytes:11627977017 (11.6 GB) TX bytes:20700627733 (20.7 GB)<\/pre>\n
    \u811a\u672c<\/strong><\/div>\n

    \u5b8c\u6574\u7684\u811a\u672c\u4e5f\u53ef\u4ee5\u5728 Github \u4e0a\u67e5\u770b\u3002<\/p>\n

    \u66f4\u65b0\uff1a\u4f7f\u7528\u81ea\u5df1\u6307\u5b9a\u7684 MAC \u5730\u5740\u53ef\u4ee5\u907f\u514d\u548c\u771f\u6b63\u7684 intel \u5730\u5740\u51b2\u7a81\u3002\u611f\u8c22 @_fink<\/a><\/em><\/p>\n


    \n

    via: https:\/\/www.paulfurley.com\/randomize-your-wifi-mac-address-on-ubuntu-1604-xenial\/<\/a><\/p>\n

    \u4f5c\u8005\uff1aPaul M Furley <\/a>\u8bd1\u8005\uff1awenwensnow<\/a> \u6821\u5bf9\uff1awxy<\/a><\/p>\n

    \u672c\u6587\u7531 LCTT<\/a> \u539f\u521b\u7f16\u8bd1\uff0cLinux\u4e2d\u56fd<\/a> \u8363\u8a89\u63a8\u51fa<\/p>\n

    \n

    \u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-9132-1.html<\/a><\/p>\n

    \u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/mac-ubuntu.html<\/a>\u7f16\u8f91\uff1a\u4efb\u7ef4\u56fd\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

    \u5bfc\u8bfb \u4f60\u7684\u8bbe\u5907\u7684 MAC \u5730\u5740\u53ef\u4ee5\u5728\u4e0d\u540c\u7684 WiFi \u7f51\u7edc\u4e2d\u8bb0\u5f55\u4f60\u7684\u6d3b\u52a8\u3002\u8fd9\u4e9b\u4fe1\u606f\u80fd\u88ab\u5171\u4eab\u540e\u51fa\u552e\uff0c\u7528\u4e8e\u8bc6\u522b\u7279\u5b9a […]<\/p>\n","protected":false},"author":63,"featured_media":89376,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-90455","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\/90455","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\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=90455"}],"version-history":[{"count":14,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/90455\/revisions"}],"predecessor-version":[{"id":90714,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/90455\/revisions\/90714"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/89376"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=90455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=90455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=90455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}