SlackwareThis Forum is for the discussion of Slackware Linux.
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.
how do I change the mac address on bootup but still be able to connect to a network (without mac filtering enabled)? The network I'm testing uses dhcp and usually an ip address is associated with my wireless interface. Should I edit the rc.local file? If so, how would I go about it? If it means anything, I'm using a laptop so usually I would first have to activate a wifi button to switch on the radio.
I think you can't change the MAC address... unless you plan to use another networking device. The MAC is hardcoded into the device and each device has a unique MAC address... or I misunderstood your question?
You would probably want to do that before the network is configured. I'm not at my slackware computer right now, but I believe the dhcpcd is runned from /etc/rc.d/rc.M. There is a program called macchanger that can change mac address, but I don't know how to make a mac generator with a bashscript, so further then this I can't help you.
In /etc/rc.d/rc.inet1.conf add a "HWADDR" parameter to your card's configuration settings. Look further down in that file:
Code:
HWADDR[?]="00:01:23:45:67:89" # Overrule the card's hardware MAC address
Change the '?' to the correct index number and substitute the MAC address you want the card to have. On every boot your card will now get the custom MAC address.
For most cards this will work. I just tested it as an example on my madwifi-driven wireless card.
I think you can't change the MAC address... unless you plan to use another networking device. The MAC is hardcoded into the device and each device has a unique MAC address... or I misunderstood your question?
You can, there's just no legitimate reason for doing this.
You can, there's just no legitimate reason for doing this.
I'd say "you can, but there's usually no reason for doing this." MAC addresses aren't unique (as in "every single device that exists has a unique MAC address"), they just need to be unique within the (sub)network they're connected to (because two devices can't, as far as I understand, have identical MAC addresses within the same network where they can "see" each other). So it's possible, though very unprobable, that you happen to bump into a network where "your" MAC address is already in use and needs to be changed. I'd say it's so rare you'll never have to do that..
But really, changing MAC address every boot sounds a little peculiar. Why are you doing it? If you're being paranoid or thinking that your machine can't be "detected" if you change your IP and MAC address every boot, you're probably wrong; there are other means for that, and it's general knowledge (or should be) that it's not possible, in a secure/"bullet-proof" way, to know a certain machine based on it's IP and/or MAC (so when a machine is tracked, nobody who's got brains tries to do that based on IP/MAC address only, other means would be used). So for example if you were downloading illegal content off the web or p2p networks or torrents or something, changing IP and MAC addresses, your machine's name and such wouldn't prevent you from getting caught.
You can, there's just no legitimate reason for doing this.
I can think of at least one legitimate reason (and a lot of home broadband routers offer it as a feature): it is called "MAC address cloning".
If your ISP ties your IP address and provisioning information for the broadband connection to the MAC address of your home computer, it is regarded as a good idea to keep using the same MAC address for the network component that is facing the ISP. That way you can swap hardware inside your home network without the need to go back to your ISP's provisioning web page and change the MAC address of the computer that is currently attached to the ISP's modem. With some ISP's, changing the registered MAC address can be a pain, and in the meantime you do not have Internet access.
Like it was said earlier, when network hardware is branded with a MAC address by the card manufacturer, it is guaranteed to be unique. But for your own small network, there is no problem at all when you modify a card's MAC address as long as all computers that talk to each other have unique MAC addresses.
I play safe on my physical LAN and re-use MAC addresses from cards that I scrapped before (so that these addresses are guaranteed not to appear again), but for my virtual machines, I use random MAC addresses all the time.
Except this is a wireless network segment he's talking about. I've yet to see any wireless equipment do a MAC lock like the typical cablemodem.
It's rather more likely he's just pilfering wireless access from someone's unsecured AP and is attempting to make it look like he's not the same person doing it day after day (or is attempting to be sure his real MAC address never shows up in any logs).
Except this is a wireless network segment he's talking about. I've yet to see any wireless equipment do a MAC lock like the typical cablemodem.
It's rather more likely he's just pilfering wireless access from someone's unsecured AP and is attempting to make it look like he's not the same person doing it day after day (or is attempting to be sure his real MAC address never shows up in any logs).
I will agree with this. So far, this is one of the reason I know why we need to manipulate our network device's MAC - to 'hide' in someone else wireless network, or to pretend to be someone else. So a normal MAC filtering in the AP won't block that user from stealing the wireless network. For the ISP case, this is the first time I heard that some ISP will use your MAC to allocate the IP address, at least this doesn't happened in my country. :-p
I will agree with this. So far, this is one of the reason I know why we need to manipulate our network device's MAC - to 'hide' in someone else wireless network, or to pretend to be someone else. So a normal MAC filtering in the AP won't block that user from stealing the wireless network. For the ISP case, this is the first time I heard that some ISP will use your MAC to allocate the IP address, at least this doesn't happened in my country. :-p
Most cablemodems (mainly to keep people from just connecting their home switch to it and screwing everything up) will bind to the first MAC address (to request an IP) they see when they power up. This isn't anything like a security measure--it's meant to reduce confusion on the user's part and to reduce the number of support calls. Once the cablemodem has bound to that MAC, it won't accept packets from any other device (so someone's printer can't grab the one lease your the cablemodem ISP provides) unless you perform a hard reset. Linksys and some other manuf's go the extra mile and their setup programs will clone the MAC address of the device when you're doing the setup tasks so that the cablemodem still thinks it's talking to the old device when you put the router/AP online. They do this because it's a lot simpler than trying to explain to someone how to hard-reset their cablemodem, and a hard-reset of a cablemodem tends to mean you're offline for several minutes or more while the cablemodem resynchs, gets a new TFTP image, etc etc.
How can it be illegitimate? I hate when people talk like this. It's illegitimate to change MAC, it's illegitimate to reverse BIOS, it's illegitimate to decrypt DVDs, it's illegitimate to reflash with RPC-1 firmware, it's illegitimate to make backup CDs, it's illegitimate to craft your own TCP/IP packets, it's illegitimate to use P2P, it's illegitimate to use "analog hole". What else? Soon it will be illegitimate to use your pc without MPAA, RIAA and Microsoft tracking your daily work.
You can do whatever you want with your own hardware. If providers rely on MAC address to limit pcs connectivity, that's their own problem.
Last edited by Alien_Hominid; 10-31-2007 at 04:21 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.