How to get NetworkManager to accept my spoofed mac address without using the gui?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




So, I'm sitting in a hotel in North Carolina that has two levels of wireless -- free and paid.  I tried the free, and it's too slow.  So, I decided to pay.

But I can't.  The system has mapped my mac address to the free sign up, and there's nothing I can do to get it to change.

No problem, I tell myself.  Back in the day, I used to spoof my mac address all the time.  I'll just change my mac address, reconnect, and hook up using that.

Now, back when I used to do that a lot, I was running Fedora 19, and it was easy:

It was just...


%service NetworkManager stop
%macchanger -a wlo1
%service NetworkManager start

... and voila!


However, this time in Fedora 24, that doesn't work.

Here's what happens:

% ifconfig
eno1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether dc:4a:3e:e3:5f:da  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1  (Local Loopback)
        RX packets 18320  bytes 10794663 (10.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 18320  bytes 10794663 (10.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 63.140.174.12  netmask 255.255.255.128  broadcast
63.140.174.127
        inet6 fe80::825e:9233:a48f:ec  prefixlen 64  scopeid 0x20<link>
        ether e0:94:67:84:ae:36  txqueuelen 1000  (Ethernet)
        RX packets 3671575  bytes 4805208717 (4.4 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1642049  bytes 940283651 (896.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


Note the "ether e0:94:67:84:ae:36" for wlo1.

Now...

%service NetworkManager stop
Redirecting to /bin/systemctl stop  NetworkManager.service


%macchanger -a wlo1
Current MAC:   e0:94:67:84:ae:36 (Intel Corporate)
Permanent MAC: e0:94:67:84:ae:36 (Intel Corporate)
[ERROR] Could not change MAC: interface up or insufficient permissions:
Device or resource busy



Hmmm... Well, it worked a couple of years ago.  Maybe I have to turn the
interface off completely...


%ifconfig wlo1 down
%macchanger -a wlo1
Current MAC:   e0:94:67:84:ae:36 (Intel Corporate)
Permanent MAC: e0:94:67:84:ae:36 (Intel Corporate)
New MAC:       00:1e:9d:ee:9a:79 (Recall Technologies, Inc.)


OK, looks good.

Let's turn it on.


%ifconfig wlo1 up
CAST,MULTICAST>  mtu 1500
        ether dc:4a:3e:e3:5f:da  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1  (Local Loopback)
        RX packets 18400  bytes 10801463 (10.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 18400  bytes 10801463 (10.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlo1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:1e:9d:ee:9a:79  txqueuelen 1000  (Ethernet)
        RX packets 3672803  bytes 4805318432 (4.4 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1642451  bytes 940340115 (896.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


Yayy!  Looks goot.

So, let's turn Network Manager back on...


%service NetworkManager start
Redirecting to /bin/systemctl start  NetworkManager.service

%ifconfig
eno1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether dc:4a:3e:e3:5f:da  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1  (Local Loopback)
        RX packets 18420  bytes 10803103 (10.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 18420  bytes 10803103 (10.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 63.140.174.12  netmask 255.255.255.128  broadcast
63.140.174.127
        inet6 fe80::825e:9233:a48f:ec  prefixlen 64  scopeid 0x20<link>
        ether e0:94:67:84:ae:36  txqueuelen 1000  (Ethernet)
        RX packets 3673409  bytes 4805359209 (4.4 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1642523  bytes 940351071 (896.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


Son of a gun.  NetworkManger changed it back, it seems.  What happens if
I turn it off...




%service NetworkManager stop
Redirecting to /bin/systemctl stop  NetworkManager.service
%ifconfig
ifconfig
eno1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether dc:4a:3e:e3:5f:da  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1  (Local Loopback)
        RX packets 18436  bytes 10804463 (10.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 18436  bytes 10804463 (10.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlo1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:1e:9d:ee:9a:79  txqueuelen 1000  (Ethernet)
        RX packets 3673647  bytes 4805375390 (4.4 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1642544  bytes 940357501 (896.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


What???  Now the change is reinstated???

So, NetworkManager is ignoring the changes I make.  I thought that maybe I could use nmcli to do this.  But this is what I get:

%nmcli connection modify wlo1 802-11-wireless.cloned-mac-address 55:44:33:22:11:00 Error: Unknown connection 'wlo1'.

Damn.  An interface isn't a connection, apparently...  But it's not connected to anything.


OK, I'll connect and see what happens:
`

%nmcli connection modify attwifi 802-11-wireless.cloned-mac-address 55:44:33:22:11:00

Well, that didn't give me an error, but it also didn't actually change the mac address when I did an ifconfig.

So, I know I could disconnect and type in a mac address using the gui for network manager, but I'd like to be able to script this.  What am I doing wrong?  How can I get NetworkManager to scarf up a mac address I generate either by editing a config file or by using nmcli?


Thanks

billo
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://lists.fedoraproject.org/admin/lists/users@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux