Aircrack-ng forum

General Category => Useful stuff => Topic started by: kcdtv on May 11, 2016, 12:35:48 pm

Title: How to go back to our wlanX interfaces instead of the new wlxXXXXXXXXXXXX
Post by: kcdtv on May 11, 2016, 12:35:48 pm
How to revert the change in the new interface names that uses the mac address to go back to the old fashioned way

  System.d is here.
We can like it or not; but it is as a matter of fact the standard now in the GNU-Linux world.
This project launched by the Red Hat did overtake the init which is condemned to disappear. 
We will not discuss here if it is good or not (because we all know it is one of the worst move made blindly by 95% of GNU-Linux distribution  ;D < just kidding)
  Like the dinosaurs, we have to adapt (ups... they did not,. bad example) if we want to survive.

  The issue : with system.d version 197 and above the wifi interfaces could not be named wlan0, waln1 etc... but wlxXXXXXXXXXXXX, the X are the digits of the mac address of the interface.
(http://pix.toile-libre.org/upload/original/1462968327.png)
  The reasons for this change are explained here : Predictable Network Interface Names (https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/)
  As a matter of fact the new rule (nº4) will be apllied by default when we use a USB wifi device.
Quote
    Names incorporating Firmware/BIOS provided index numbers for on-board devices (example: eno1)
    Names incorporating Firmware/BIOS provided PCI Express hotplug slot index numbers (example: ens1)
    Names incorporating physical/geographical location of the connector of the hardware (example: enp2s0)
    Names incorporating the interfaces's MAC address (example: enx78e7d1ea46da)
    Classic, unpredictable kernel-native ethX naming (example: eth0)
 
  The arguments given are "safety" and "avoid confusion".
Safety : If our firewall ruyles are designed for one interface, if we use several wifi USB interfaces to be connected at the same time, they could be a confusion, what we think is wlan1 is wlan2 and the firewall rules that we designed for one interface wil be used in another one.
  The one milion € question is : Who the hell does that?  :D
Confusion : Mac is a unique identifer so we will not be confused...
What confuses me personally is to have write down the whole mac address in my interfaces  command lines and it is more easy to me to check with one of the multiple command we have the chipset than to check which mac adress belong to which devices,
  I don't know them by heart... do you?

  I see no point at all in this change and it is definitely not a choice that simplify the life of the users that use command line. .

Give me back my wlanX

No problem... I found a very easy solution here : 0003276: 73-special-net-names.rules causes all USB wifi devices to follow MAC based naming (https://bugs.kali.org/view.php?id=3276)
Thanks to threeway (Kali linux developer) for the trick!  ;)

1) Open 73-special-net-names.rules with a text editor

You need rots privileges to edit it.
 Use your favorite simple text editor.
Mine is gedit so :
Code: [Select]
sudo gedit /lib/udev/rules.d/73-special-net-names.rulesIt looks like that ;
(http://pix.toile-libre.org/upload/original/1462969622.png)

2) Coment the last line to desactivate the new rules

Just put a dash at beginning of the line (comment it)
Your file should looks like now like this :
(http://pix.toile-libre.org/upload/original/1462969745.png)

3) Save the changes and reboot

Now you have your USB interface named like before:
(http://pix.toile-libre.org/upload/original/1462969936.png)

In conclusion, i would like to say thank you to mister X for this :
(http://pix.toile-libre.org/upload/original/1462970270.png)
Too long for linux... and users   ;D
Title: Re: How to go back to our wlanX interfaces instead of the new wlxXXXXXXXXXXXX
Post by: misterx on May 12, 2016, 12:32:40 am
Have you tried the package biosdevname + and additional linux to grub + update-grub? I know it works to get ethX interface names but haven't had such issue with wireless interfaces.
Title: Re: How to go back to our wlanX interfaces instead of the new wlxXXXXXXXXXXXX
Post by: kcdtv on May 13, 2016, 02:38:48 pm
Quote
Have you tried the package biosdevname + and additional linux to grub + update-grub?
Not yet because for the moment in Kali rolling I just had the "issue" with USB wifi.
But I will soon i guess because I just downloaded and installed Xubuntu 16.04 which is pretty new and this is what i get in the laptop with one Ethernet and one internal wifi interface :
(http://pix.toile-libre.org/upload/original/1463149697.png)
The new names are less annoying than the ones for USB devices.
But still, i will search for the rule(s) in system.d to edit in order to get back the wlan* name for the internal wifi card because some tools or script may not work if they don't have a wlan* interface.
I had a look before but I was not able to find it, I still didn't got used to system.d, I lack some reading.
Thank you Red Hat for making our lives easiers!  ( <irony  :P )