Debian forced fixed MAC address
Set a Fixed MAC Address on Debian
In this tutorial, you will learn how to set a fixed MAC address for the Ethernet interface on a Debian system using nmcli.
Step 1: List Network Connections
First, list all network connections to identify the connection you want to modify:
nmcli connection show
This command will display a list of all network connections. Note the name of the connection you want to modify.
Step 2: Modify the Connection
Next, modify the connection to set a fixed MAC address. Replace "Connection Name" with the actual name of your connection and "<mac address>" with the desired MAC address:
sudo nmcli connection modify "Connection Name" 802-3-ethernet.cloned-mac-address "<mac address>"
# If it is a Wi-Fi connection, use `wifi.cloned-mac-address permanent`
Step 3: Verify the Change
Verify that the MAC address has been set correctly by running the following command:
nmcli connection show "Connection Name" | grep cloned-mac-address
This should output wifi.cloned-mac-address: "<mac address>" or 802-3-ethernet.cloned-mac-address: "<mac address>", depending on the type of connection.
Step 4: Bring Up the Connection
Finally, bring up the modified connection to apply the changes:
nmcli connection up "Connection Name"
Your network connection should now be using the fixed MAC address you specified.