Wpa supplicant: Difference between revisions

imported>Rasmus-kirk
m Fixed MAC spelling and added a little info
imported>Rasmus-kirk
m Fixed mac spoofing code
Line 49: Line 49:
systemd.services.macchanger = {
systemd.services.macchanger = {
enable = true;
enable = true;
description = "macchanger on %I";
description = "macchanger on wlxxxx";
wants = [ "network-pre.target" ];
wants = [ "network-pre.target" ];
before = [ "network-pre.target" ];
before = [ "network-pre.target" ];
bindsTo = [ "sys-subsystem-net-devices-%i.device" ];
bindsTo = [ "sys-subsystem-net-devices-wlxxxx.device" ];
after = [ "sys-subsystem-net-devices-%i.device" ];
after = [ "sys-subsystem-net-devices-wlxxxx.device" ];
wantedBy = [ "multi-user.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
serviceConfig = {
Type = "oneshot";
Type = "oneshot";
ExecStart = "${pkgs.macchanger}/bin/macchanger -r %I";
ExecStart = "${pkgs.macchanger}/bin/macchanger -r wlxxxx";
};
};
};
};
</syntaxHighlight>
</syntaxHighlight>
The above snippet fully randomizes your MAC address, for more information you can read macchanger's manpage. This obviously requires you to have the <code>macchanger</code> package installed.
Where you need to change the <code>wlxxxx</code> with your own wifi network interface. You can list your interfaces by running <code>ip link</code>, your wifi network interface should have "wl" prepended. Note that the above snippet fully randomizes your MAC address, for more information you can read macchanger's manpage. This obviously requires you to have the <code>macchanger</code> package installed.


== External links ==
== External links ==


[https://www.stura.htw-dresden.de/stura/ref/hopo/dk/nachrichten/eduroam-meets-nixos (german) article ''eduroam meets NixOS'' (with configuration)] (instance ''University of Applied Sciences Dresden'': The [https://cat.eduroam.org/?idp=5106&profile=5098 eduroam installer for GNU/Linux] works [https://www.htw-dresden.de/en/university/organisation/it-service-centre/services-for-workplace-and-communication/wi-fi-/-wlan/eduroam/linux for example for Ubuntu] but not [[NixOS]])
[https://www.stura.htw-dresden.de/stura/ref/hopo/dk/nachrichten/eduroam-meets-nixos (german) article ''eduroam meets NixOS'' (with configuration)] (instance ''University of Applied Sciences Dresden'': The [https://cat.eduroam.org/?idp=5106&profile=5098 eduroam installer for GNU/Linux] works [https://www.htw-dresden.de/en/university/organisation/it-service-centre/services-for-workplace-and-communication/wi-fi-/-wlan/eduroam/linux for example for Ubuntu] but not [[NixOS]])