a2z
V2EX  ›  macOS

每次启动自动随机生成新的MAC地址

  •  
  •   a2z · Feb 10, 2014 · 3607 views
    This topic created in 4490 days ago, the information mentioned may be changed or developed.
    不要问我有什么用,呵呵

    下面这段加到/etc/rc.common 最后

    #########################
    #Random mac address every time#

    MAC1=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`;
    MAC2=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`;
    ifconfig en0 ether $MAC1;
    ifconfig en1 ether $MAC2;
    ifconfig en0 down;
    ifconfig en0 up;
    ifconfig en1 down;
    ifconfig en1 up;
    4 replies    2015-03-09 21:52:50 +08:00
    sunxiaonian
        1
    sunxiaonian  
       Feb 10, 2014
    我们公司是MAC白名单形式,自动换了之后就没法上网了
    YouXia
        2
    YouXia  
       Feb 10, 2014 via Android
    赞。
    SoloCompany
        3
    SoloCompany  
       Feb 10, 2014   ❤️ 1
    这个帖子出现在 MAC 节点下有点莫名的喜感
    sweetomy
        4
    sweetomy  
       Mar 9, 2015
    第二位必须是偶数吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1102 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 22:58 · PVG 06:58 · LAX 15:58 · JFK 18:58
    ♥ Do have faith in what you're doing.