QUESTION:
How might I be able to specifically change the Mac Address of the enp3s0 and wlp2s0 interfaces through the /etc/network/interfaces file? What code would I have to include inside? I have been trying for some time now without success sadly enough.
ELABORATING:
So I found this great article online explaining how to change a Mac Address permanently through the /etc/network/interfaces file on my Ubuntu.
In the article, it says:
On Debian, Ubuntu, and similar systems, place the following in the appropriate section of /etc/network/interfaces (within an iface stanza, e.g., right after the gateway line) so that the MAC address is set when the network device is started:
hwaddress ether 02:01:02:03:04:08
Source: https://en.wikibooks.org/wiki/Changing_Your_MAC_Address/Linux
Now when I use the following code:
cat /etc/network/interfaces
I get the following output
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
And when I do ifconfig on my ubuntu, I get back 3 different interfaces:
enp3s0
lo
wlp2s0
I would like to change the mac address of all of my interfaces (enp3s0, wlp2s0) (lo is loopback so no need there), but I am unfamiliar with the commands in the /etc/network/interfaces file. I have been looking at tutorials online though I can't seem to get stuff right, and my computer even started acting very strangely a few times afterwards.
eth0
withenp3s0
in this case? Also for wireless, do I just replace that same portion withwlps20
? – Webeng May 22 '17 at 20:58enp3s0
, it did in fact work! however when I then appended the same thing but withwlp2s0
replacingenp3s0
and changing the Mac Address to00:11:22:33:44:56
, I got the following error when doingsudo /etc/init.d/networking restart
:[....] Restarting networking (via systemctl): networking.serviceJob for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.
– Webeng May 22 '17 at 21:19networking
service. Do you have thejournalctl -xe
output to see what is happening? – May 22 '17 at 23:11