- (By the way, the MAC returns to the original computer's MAC after all reboots, despite telling macchanger to randomize the MAC at all reboots when it asked if I wanted that.) The other major problem is that, if I understand correctly, macchanger has been changing the Ethernet connection's MAC and not the Wifi, as it says 'link/ether' in front.
- In Ubuntu you can clone a Mac address in the network settings. Click on the network icon in the top bar and select Edit connections. Select your current network and hit Edit. In the Ethernet tab you should see your actual device MAC and a field to enter the MAC you want to clone.
How to change MAC address on Linux Ubuntu. You can easily change MAC address using Terminal commands (CLI) or Network Manager on Ubuntu 15.04, Ubuntu 14.04 and Derivatives. The most easy way to change MAC address on Linux Ubuntu Systems is via Mac Changer Software. A small utility to change your NIC's MAC address: Arch Linux Community armv7h Official: macchanger-1.7.0-5-armv7h.pkg.tar.xz: A small utility to change your NIC's MAC address: Arch Linux Community x8664 Official: macchanger-1.7.0-5-x8664.pkg.tar.zst: A small utility to change your NIC's MAC address. This process is also called spoofing or faking a MAC address. This article explains how to change a MAC address through an Ubuntu 18.04 LTS system. What is a MAC Address. MAC, that stands for Media Access Control, is a six byte ID permanently embedded in the firmware of a network adapter.
Random Mac Address and Hostname at Boot with Ubuntu
For those of you who are looking for an easy way to achieve some form of privacy and anonymity while using hotspots, I have condensed what you need right here. I am using this on Linux Mint 15 and hopefully it works on whatever flavor you are using. This should satisfy the ultra paranoid as it not only randomizes the mac address but also the hostname which is also visible to routers.
Thanks to Cris Oliver and his blog for an elegantly simple method of randomly changing the mac address at boot.
http://excid3.com/blog/random-mac-address-on-start-up-with-ubuntu/
And thanks to http://pctechtips.org/tag/backtrack/ for providing the scripting for randomly changing the hostname.
I combined the best of both for the following step-by-step directions:
First you need to install macchanger
sudo apt-get update
Mac Address Changer For Ubuntu Mac
sudo apt-get install macchanger
Mac Address Changer For Ubuntu Linux
Note the default mac addresses for the network adapters:
ifconfig
Your wireless card will likely be indicated by 'wlan0' and ethernet by 'eth0', if not then substitute the names your computer uses into the remaining instructions. Copy down the mac addresses so you can check later on that they have changed and that this script works. If you only wish to randomize the mac address of the wireless adapter then just delete the lines in the following script pertaining to 'eth0'.
All of the following commands are done through the terminal which is accessed by CTRL+ALT+T.
Create a new script called macchanger:
sudo gedit /etc/init.d/macchanger
Copy and paste the following as content and hit save:
_______________________________________________________
#!/bin/bash
#changing mac address to random
# Disable the network devices
ifconfig eth0 down
ifconfig wlan0 down
# Spoof the mac addresses
/usr/bin/macchanger -r eth0
/usr/bin/macchanger -r wlan0
# Re-enable the devices
ifconfig eth0 up
ifconfig wlan0 up
#changing hostname to random word from dictionary
FILE=/usr/share/dict/american-english
WORD=$(sort -R $FILE | head -1)
printf '%snChanging Hostname…n'
OLDHOST=$(hostname)
hostname $WORD
if [ $? 0 ]; then
printf '%sPrevius Hostname: $OLDHOST n'
printf '%sRandom Hostname: $WORD n'
else
printf '%sScript encounter an error, sorry…n'
exit 1
fi
#END
_______________________________________________________
Notice one important detail, this particular script uses the wordlist dictionary located in /usr/share/dict/ and named 'american-english'. Depending on your language settings you may have a differently named dictionary, if so be sure to edit that part of the scipt otherwise it wont change the hostname.
Now that we have the script where we need it, we need to make it possible to execute it by giving it executable permissions:
sudo chmod +x /etc/init.d/macchanger
Permanent Mac Address Change Ubuntu
Now enable the script to run at boot:
Ubuntu Mac Address Lookup
sudo update-rc.d macchanger defaults 10
Restart your computer and try 'ifconfig' again and compare the mac adresses and hostname with the originals to make sure it works.
sudo gedit /etc/init.d/macchanger
Copy and paste the following as content and hit save:
_______________________________________________________
#!/bin/bash
#changing mac address to random
# Disable the network devices
ifconfig eth0 down
ifconfig wlan0 down
# Spoof the mac addresses
/usr/bin/macchanger -r eth0
/usr/bin/macchanger -r wlan0
# Re-enable the devices
ifconfig eth0 up
ifconfig wlan0 up
#changing hostname to random word from dictionary
FILE=/usr/share/dict/american-english
WORD=$(sort -R $FILE | head -1)
printf '%snChanging Hostname…n'
OLDHOST=$(hostname)
hostname $WORD
if [ $? 0 ]; then
printf '%sPrevius Hostname: $OLDHOST n'
printf '%sRandom Hostname: $WORD n'
else
printf '%sScript encounter an error, sorry…n'
exit 1
fi
#END
_______________________________________________________
Notice one important detail, this particular script uses the wordlist dictionary located in /usr/share/dict/ and named 'american-english'. Depending on your language settings you may have a differently named dictionary, if so be sure to edit that part of the scipt otherwise it wont change the hostname.
Now that we have the script where we need it, we need to make it possible to execute it by giving it executable permissions:
sudo chmod +x /etc/init.d/macchanger
Permanent Mac Address Change Ubuntu
Now enable the script to run at boot:
Ubuntu Mac Address Lookup
sudo update-rc.d macchanger defaults 10
Restart your computer and try 'ifconfig' again and compare the mac adresses and hostname with the originals to make sure it works.
There were times where i had to reboot more than once to get it to work the first time. From my experiance there is also the odd time where you may notice the hostname or mac addresses are still the originals, but it is rare.
Enjoy!
A MAC address is the unique identifier that is assigned by the manufacturer to a piece of network hardware (like a wireless card or an ethernet card). MAC stands for Media Access Control, and each identifier is intended to be unique to a particular device.
A MAC address consists of six sets of two characters, each separated by a colon. 00:1B:44:11:3A:B7 is an example of a MAC address.
To identify the MAC address of your own network hardware:
Open the Activities overview and start typing Network.
Click on Network to open the panel.
Choose which device, Wi-Fi or Wired, from the left pane.
The MAC address for the wired device will be displayed as the Hardware Address on the right.
Click the button to see the MAC address for the wireless device displayed as the Hardware Address in the Details panel.
In practice, you may need to modify or 'spoof' a MAC address. For example, some internet service providers may require that a specific MAC address be used to access their service. If the network card stops working, and you need to swap a new card in, the service won't work anymore. In such cases, you would need to spoof the MAC address.