0

I have 4G failover via an old Android phone plugged in to USB.

This was working find as interface usb0.

Since upgrading to Debian 12 the device gets renamed to something completely random, and different every time it is plugged in. This fucks up /etc/network/interfaces and my iptables script.

# grep -a renamed  /var/log/syslog
2023-06-27T11:30:09.891759+01:00 calleva kernel: [    1.117331] r8169 0000:02:00.0 enp2s0: renamed from eth0
2023-06-27T11:30:09.891773+01:00 calleva kernel: [    1.144188] r8169 0000:03:00.0 enp3s0: renamed from eth1
2023-06-27T11:30:09.891903+01:00 calleva kernel: [    2.997299] rndis_host 2-1.6:1.0 enx720b8e586e43: renamed from usb0
2023-06-27T11:30:09.892058+01:00 calleva kernel: [    5.010330] rt2800pci 0000:01:00.0 wlp1s0: renamed from wlan0
2023-06-27T11:30:09.892071+01:00 calleva kernel: [    5.325336] rtl8192cu 1-1.4:1.0 wlx08beac0a6c1d: renamed from wlan0
2023-06-27T12:27:13.975350+01:00 calleva kernel: [ 3429.810797] rndis_host 2-1.6:1.0 enx9657a45d9349: renamed from usb0
2023-06-29T22:24:16.219329+01:00 calleva kernel: [212048.668218] rndis_host 2-1.6:1.0 enx5edf49046a6d: renamed from usb0
2023-06-29T22:27:16.975407+01:00 calleva kernel: [212229.420430] rndis_host 2-1.6:1.0 enxea7010e4b5e5: renamed from usb0
2023-06-29T22:53:13.186625+01:00 calleva kernel: [213785.614002] rndis_host 2-1.6:1.0 enx76f12e43a7a6: renamed from usb0

I believe that there are two problems

  • something called udev is renaming things, and
  • the Android phone is generating random MACs becauase 'security' bollocks.

There are no settings available on the phone. Therefore: how can this udev nonsense be stopped?

While I'm at it: I noticed that, after editing /etc/network/interfaces and ifup the interface goes to UNKNOWN rather than UP. What's going on?!

enx76f12e43a7a6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000

Tried adding

SUBSYSTEM=="net", ACTION=="add", ATTRS{product}=="XT1700", NAME="hp"

to a new file in `/etc/udev/rules.d

1 Answer 1

2

Moved the file containing

SUBSYSTEM=="net", ACTION=="add", ATTRS{product}=="XT1700", NAME="hp"

from /etc/udev/rules.d/hp to /etc/udev/rules.d/99-persistent-net.rules. (I suspect that if the file has a 'wrong' name then it doesn't work -- fuck knows.)

Ran

# udevadm control --reload-rules
# udevadm trigger

and re-plugged the device and now the interface is called hp and this seems to be stable.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .