Need to spoof MAC of ethernet-connected wifi adapter
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Need to spoof MAC of ethernet-connected wifi adapter
I got a directional wifi adapter at a little beach cottage in order to make a better connection to the router in the main house. Even though the handshake works well, I am not getting the router to give me an IP address, because I'm using MAC filtering for security. I can just barely make the connection without the directional adapter, but the signal is weak and keeps dropping.
So does anybody know how to send the ifconfig command or whatever would work to the ethernet connected device to change its MAC for the handshake?
Are you using a graphical desktop environment or the command-line? If you are using NetworkManager, you should be able to spoof MAC addresses by:
1. Right-clicking the nm-applet (icon in the panel)
2. Select "Edit Connections..."
3. Click the connection type you are using, such as "Ethernet connection 1," for example.
4. Select "Edit"
5. Under the "Ethernet" tab, where it says "Cloned MAC address," select "Random."
6. You may or may not need to edit or double-check what "Device" is listed just above the option.
You should now get a random MAC address each time you connect to the Internet.
If you are using the command-line, you can still do the same as listed above but would run 'nmtui' to get a dialog-based interface. Navigate using tab, arrows, and toggle items with Spacebar.
If you need much more advanced help than this, I really can't be much more help other than maybe you could also try installing 'macchanger' and do some sort of BASH scripting "Kung-Fu" with it.
I am using MAC filtering for security implies you have access to the router's configuration so why not add the new adapter to the list?
With MAC filtering random setting will not work because the router is configured to only allow specific addresses. However, with the Network Manager applet you should be able to configure the new adapter with the same address as the built in adapter.
And MAC filtering does not really improve security.
I guess it might work if your router always assigns DHCP to a mac address. Different routers use different words. Otherwise you can still use static ip/subnet/gateway settings.
Yes, MAC filter does almost nothing. Making it hidden and filter may slow down the feeble.
Both the ip command and the more gui connection editing can only affect the actual ethernet port MAC, the one that connects my laptop to the adapter, not the mac of the device at the other end. I suspect that what I want can't be done, and I will just have to fix this at the router end. Thanks.
There is no general tool that changes the configuration of a remote device. Usually, there are device specific tools; for example, many devices run a web server that has configuration options, or some routers run Linux-based software like DD-WRT or OpenWRT that include the ip command.
Both the ip command and the more gui connection editing can only affect the actual ethernet port MAC, the one that connects my laptop to the adapter, not the mac of the device at the other end. I suspect that what I want can't be done, and I will just have to fix this at the router end. Thanks.
If I understand the post correctly the new network adapter is connected to the router and not your laptop? If the router is a generic SOHO unit like a Netgear or Linksys then a USB adapter isn't going to work unless the router OS is specifically designed for an external device or like posted running a special linux version. Asus routers run linux but never have played with them but probably not.
MAC filtering is all about the address on the client not the other end.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.