How to change MAC address of interface – ubuntu
Introduction –
Why we need to change MAC address? On one of our proxy server which is directly connected to internet. Due to some reason I have to assign MAC address to one of the Interface eth0! My ISP want unique MAC address to interface which is connected to there service.
Set MAC address to interface manually –
step(1) Edit the /etc/network/interfaces file. to modify the interface configuration on Ubuntu or Debian system…
root@arunbagul:~# vi /etc/network/interfaces
root@arunbagul:~#
See your network interface conf file. If you have dhcp enabled, it will look like this…
root@arunbagul:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
root@arunbagul:~#
step(2) Now specify the MAC address as shown below…
root@arunbagul:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hwaddress ether 01:06:03:04:0B:06
root@arunbagul:~#
step(3) Now restart your network service –
root@arunbagul:~# /etc/init.d/networking restart
* Reconfiguring network interfaces…
There is already a pid file /var/run/dhclient.eth0.pid with pid 4440
killed old client process, removed PID file
…
…..
DHCPACK from 192.168.1.10
bound to 192.168.1.89 — renewal in 3110 seconds.
[ OK ]
root@arunbagul:~#
step(4) macchanger – is the tool available for Ubuntu to change the MAC address –
How to install macchanger ?
root@arunbagul:~# apt-get install macchanger
Reading package lists… Done
Building dependency tree
…
…..
Setting up macchanger (1.5.0-1) …
root@arunbagul:~#
step(5) How to use this –
root@arunbagul:~# macchanger eth0
root@arunbagul:~#
Cheers,
Arun Bagul