How to change MAC address automatically on boot
I would like to get the MAC address of my ethernet port changed automatically at boot. (Because spoofing the card of another machine.)
At the moment I put the lines Code:
ifdown eth0 Is there a better way of doing this? |
there is a package out there called machchanger. As far as running this software there is various ways you could do it. You could have it start up before your network (or have you network "depend" on it) or there might be a way to put it in your network configuration file. I run Gentoo and I'm able to change my MAC in the network configuration file. It makes for a nice simple change and works great. I hope this helps.
|
Or you could simply put the option into /etc/network/interfaces:
iface eth0 inet dhcp hwaddress ether 00:00:00:00:00:00 I am sort of guessing at the exact form of this, but if you read the manpage interfaces(5) you should be able to figure it out. |
Thanks both of you for those helpful suggestions.
I did already try fiddling with the interfaces file without luck. But now I will try again with the suggested syntax and variations of it. Thanks again for the pointers. |
edit ifcfg-eth_ default RH/FC /etc/sysconfig/network-scripts/ifcfg-eth_ (not sure on debian _ = device Ex ifcfg-eth0)
Remove HWADDR=00:00:00:00:00:00 add MACADDR=WH:AT:YO:UW:AN:T0 use all caps/num correct amt of char I have left HWADEDR in before and no prob but doc's say that if both exist it could have unexpected outcome be sure thats the only mac on your net |
All times are GMT -5. The time now is 11:29 AM. |