lgq1w2e3 Posted June 25, 2015 Posted June 25, 2015 Hi all, I am working on a project that relies (among other things) on: - Setting an access point in RaspPi that bridges an ethernet connection from my macbook (check! done!). - Hard-assigning a MAC address to this access point. (this is where I am having problems). I was able to set up the whole network, and it works fine. I was also able to change my mac address, using (mainly) ifconfig + ether command. And it also worked. However, after changing the MAC address I cannot connect to such access point anymore with any device. I have tried several different methods, and all have failed. Am I trying to do something impossible here? Is there any work around to such thing? Just to know. I am changing the MAC address using the following lines: sudo service ifplugd stop sudo ifconfig wlan1 down ifconfig wlan1 hw ether [MAC ADDRESS] sudo service ifplugd start And the AP is set up by a bridge between the eth0 and wlan1. Thank you! Quote
cooper Posted June 25, 2015 Posted June 25, 2015 I would say start by not having the other radio actively monitoring. Only have your one AP radio using its default mac address, start it and try to connect to it. Take things from there. Quote
lgq1w2e3 Posted June 27, 2015 Author Posted June 27, 2015 Hi Cooper, thanks for your answer. I already did like you suggested, and even without having the second device running in monitor mode, I still was not able to assign an specific MAC address to my access point that is able to be connected afterwards. Meaning: I do can assign an specific mac address, but when I do so, no other device can connect to it (it appears on the lists, but it can't be connected, seems like the other devices can't gain an ip). Quote
cooper Posted June 27, 2015 Posted June 27, 2015 You're missing the point. You should first verify that you can connect to the radio running as an AP when you DIDN'T change the MAC. Once you've verified that this works you try to change the MAC and try again. The goal is to have a working situation first, then change things 1 item at a time until something doesn't work as expected. You then know where to start looking for a solution. Quote
lgq1w2e3 Posted June 27, 2015 Author Posted June 27, 2015 Understood, I misinterpreted your suggestion. I have already done that. Step by step. Without changing the AP's MAC it works perfectly as expected (even when having the other device as Monitor). However I could not, in any circumstance, create a bridge AP with a specific "hand-assigned" MAC address that works. Maybe I should rephrase my question: is it possible to create an AP with a hand-assigned specific MAC address? If so, how? An example: I want to be able to enter on wiggle.net, pick up any valid MAC address, assign that to my local Access Point, and make it work as a normal wireless router. Thanks. Quote
cooper Posted June 28, 2015 Posted June 28, 2015 I wouldn't be surprised if some radios simply don't allow you to change the MAC address at all. To quote the ifconfig man page on the 'hw' parameter: Set the hardware address of this interface, if the device driver supports this operation. See what your system log says when you try to set the MAC address. You could also see what packets fly by before and after the MAC change when trying to connect and see which side decides it's a no-go. My guess is that once the MAC change fails, it should still work using the original MAC address. One thing though... Why is changing the MAC address a big deal to begin with? Isn't the correct ESSID (network name) sufficient? Quote
lgq1w2e3 Posted June 28, 2015 Author Posted June 28, 2015 The MAC changes perfectly, my driver does support this operation. I will try looking at the packets as you have suggested. Thank you! I am doing a similar application as this one: http://hackaday.com/2013/08/27/spoofing-wifi-ap-based-geolocation/ However, the spoofing does not work so well as described in that post (it only works on some circumstances), so I am trying to, in addition of doing what the above link describes, also make an internet bridge available with a spoofed mac address to see if the geolocation spoofing works better that way. Quote
lgq1w2e3 Posted June 28, 2015 Author Posted June 28, 2015 Hi Cooper, I managed to do it. I have discovered that the problem was simply that I needed to reboot HOSTAPD before turning on the ifplugd again. Code: sudo service ifplugd stop sudo ifconfig wlan0 down macchanger --mac=00:00:00:00:00:00 wlan0 /etc/init.d/hostapd restart sudo ifconfig wlan0 up sudo service ifplugd start Although I have solved this (and thus this topic can also be closed), I still wasn't able to spoof the geolocation to connected devices. It seems that this theory here and here are both wrong, or at least they work only in very specific cases, and not general as I've wanted. Thanks! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.