The officially official Devuan Forum!

You are not logged in.

#1 2024-11-03 12:05:33

recklessswing
Member
From: Türkiye
Registered: 2020-12-18
Posts: 103  

[SOLVED] MAC address changes every reboot

I don't want this, I do DHCP leases based on MAC, and it changes every time. How to prevent this? The device is Seagate Personal Cloud, armhf NAS device.

Offline

#2 2024-11-04 13:27:22

pcalvert
Member
Registered: 2017-05-15
Posts: 216  

Re: [SOLVED] MAC address changes every reboot

Wired or wireless connection? Is Network Manager being used?


Freespoke is a new search engine that respects user privacy and does not engage in censorship.
Another one is called Luxxle.

Offline

#3 2024-11-04 17:13:01

fanderal
Member
Registered: 2017-01-14
Posts: 86  

Re: [SOLVED] MAC address changes every reboot

DHCP (Dynamic Host Configuration Protocol) is where your ISP assigns a new IP address every time you connect/reconnect online. A static IP is where you assign the IP address, and it remains the same across reboots and every time you connect/reconnect online. Your ISP may/may not have hoops to jump through for a static IP.

DHCP vs Static IP: Which One Is Better?
https://community.fs.com/article/dhcp-v … ences.html

Linux Static IP Address Configuration
https://www.cyberciti.biz/faq/linux-con … -tutorial/

Network Configuration - Manually
https://wiki.debian.org/NetworkConfigur … e_manually

Offline

#4 2024-11-04 17:25:45

rolfie
Member
Registered: 2017-11-25
Posts: 1,178  

Re: [SOLVED] MAC address changes every reboot

Seagate Personal Cloud, armhf NAS device

Maybe this device has some internal setting that keeps it from changing the MAC.

Offline

#5 2024-11-04 21:13:26

Defective_byDesign
Member
Registered: 2024-10-30
Posts: 1  

Re: [SOLVED] MAC address changes every reboot

if the problem is changing MAC address every time, maybe you have installed something like macchanger on the machine.

Offline

#6 2024-11-16 16:50:38

berni51
Member
From: Middle of Germany
Registered: 2018-12-20
Posts: 95  
Website

Re: [SOLVED] MAC address changes every reboot

I could solve this problem as follows:

Create the a new udev rule:

-- Add a new file /etc/udev/rules.d/75-static-mac

-- write
ACTION=="add", SUBSYSTEM=="net", ATTR{dev_id}=="0x0", RUN+="/usr/bin/iplink set dev %k address XX:XX:XX:XX:XX:XX"
into the new file.

-- Replace XX:XX:XX:XX:XX:XX with your current mac address

Regards
Berni


The good ol' days will not return, and the rocks might smelt and the sea may burn.

Offline

#7 2024-11-26 17:35:08

recklessswing
Member
From: Türkiye
Registered: 2020-12-18
Posts: 103  

Re: [SOLVED] MAC address changes every reboot

That post above me didn't work. Still the mac is randomised.

Offline

#8 2024-11-27 07:14:11

stargate-sg1-cheyenne-mtn
Member
Registered: 2023-11-27
Posts: 208  

Re: [SOLVED] MAC address changes every reboot

my daedalus amd64 has the following

~$ cat /usr/lib/NetworkManager/conf.d/no-mac-addr-change.conf 
# Certain drivers are known not to support changing the MAC address.
# Disable touching the MAC address on such devices.
#
# See man NetworkManager.conf
#
# https://bugzilla.gnome.org/show_bug.cgi?id=777523
[device-31-mac-addr-change]
match-device=driver:eagle_sdio,driver:wl
wifi.scan-rand-mac-address=no

which results in part of NetworkManager configuration

~$ sudo NetworkManager --print-config

some of the different places NetworkManager components can be found/hidden(depending on your point-of-view)
/etc/NetworkManager/
/usr/lib/NetworkManager/
/var/lib/NetworkManager/

if you have time this bug report may also provide some context and/or insight:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879484

keep us posted on your progress!


Be Excellent to each other and Party On!
https://www.youtube.com/watch?v=rph_1DODXDU
https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you!

Online

#9 2024-11-27 10:08:21

Alverstone
Member
Registered: 2024-10-06
Posts: 31  

Re: [SOLVED] MAC address changes every reboot

recklessswing,

At least provide context. Which internet connection is this? Which interface? What do you mean by DHCP (isc-dhcp-client? dhcpcd5? udhcpc? something else?)? Whatever "DHCP" you use, what is the configuration? What is in /etc/network/interfaces? Maybe there are some udev rules? Maybe there is indeed something like macchanger? Maybe you use a network manager and configured something there?

Offline

#10 2024-11-27 21:52:10

recklessswing
Member
From: Türkiye
Registered: 2020-12-18
Posts: 103  

Re: [SOLVED] MAC address changes every reboot

/etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

This is just bare debian no GUI install, this is a NAS device so no desktop. I haven't done anything weird, however I migrated from debian to devuan lately. This happened after I did it.
About DHCP, in router settings I do set static lease for this NAS. But since it changes mac every time, it won't work.

user@devuan-seagate-personal-cloud:~$ cat /usr/lib/NetworkManager/conf.d/no-mac-addr-change.conf 
cat: /usr/lib/NetworkManager/conf.d/no-mac-addr-change.conf: No such file or folder

Last edited by recklessswing (2024-11-29 00:05:33)

Offline

#11 2024-11-29 00:19:08

recklessswing
Member
From: Türkiye
Registered: 2020-12-18
Posts: 103  

Re: [SOLVED] MAC address changes every reboot

I solved it by adding this to /etc/network/interfaces:
auto eth0
iface eth0 inet dhcp
hwaddress ether my_mac_address #this line here

Offline

Board footer