Randomizando o endereço MAC na inicialização no Linux Mint

3

Gostaria que o Linux Mint randomizasse meu endereço MAC na inicialização de todas as interfaces de rede ( enp2s0f1 & wlp3s0 ) e avisasse se um deles não conseguiu mudar por meio de um pop-up.

Como eu faria isso?

(Estou executando o Linux Mint 18.1 de 64 bits)

    
por Bashtheparty 11.10.2017 / 21:32

1 resposta

2

Uma maneira mais padrão de randomizar endereços mac é usar macchanger .

Seguindo as instruções do wiki do ubuntu: AnonymizingNetworkMACAddresses

Install MACCHANGER

The package macchanger is in the Networking (universe). Install it.

apt-get install macchanger 

Create the Randomizer Trigger

Utilizing Network-Manager's methods to trigger events when a network interface changes state, place the macchanger script into /etc/network/if-pre-up.d.

vi /etc/network/if-pre-up.d/macchanger

Don't change $IFACE. It is a reference provided by NetworkManager for the particular activated interface.

#!/bin/sh

# Randomize the mac address for the given interface 
/usr/bin/macchanger -e "$IFACE" 

Make it executable.

chmod +x /etc/network/if-pre-up.d/macchanger 

Interface State Change

Now everytime any managed interface is activated, as it passes through the pre-up phase, the network MAC address will be randomized under the VENDOR id.

Fully Random

If you desire a completely random MAC address change the -e in the macchanger script to -r.

    
por 12.10.2017 / 11:20