临时更换MAC 请注意是在本机操作或者通过TTL或者第二网卡连接进行操作
ifconfig eth0 down #关闭网卡
ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX #将
XX更换为你需要的MAC地址
ifconfig eth0 up #开启网卡
/etc/init.d/networking restart #重启网络
两种一劳永逸的MAC更换方法
1、修改 /etc/init.d/networking 配置文件
nano /etc/init.d/networking #打开并编辑 networking
搜索
case "$1" in
start)
ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX #将此条命令添加在下面 保存重启即可
2、修改 /etc/network/interfaces 配置文件
nano /etc/network/interfaces #打开并编辑 interfaces
查找 iface eth0 inet dhcp 或 iface eth0 inet static
hwaddress ether XX:XX:XX:XX:XX:XX #将此条命令添加在下面 保存重启即可
case "$1" in
start)