Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
01-03-2010, 11:56 AM
|
#1
|
|
LQ Newbie
Registered: Jan 2010
Posts: 20
Rep:
|
how to permanent spoof "fake" mac address for eth0 & eth1? in NEW linux distro"s...
Hello, i tried several linux distros now like the new 2010 ubuntu ,debian,fedora,STUX 2 and mandriva but none of them let me change the mac address permanently ,have to login as root etc and go to path of the interface i did and set like hwaddress ether eth* 00:00:00:00:0B:E0
I tried some programs also, but when i set it manually in interface file and do an reboot than i cant connect to my router and internet.
Can u explain it to me for the following linux distros, ubuntu,debian,fedora,STUX 2 and mandriva, i like these distro because they have alot of packages to choose from and i want to try them all so i need to know for each one how to permanently change "spoof" the mac address for each interface ecept the loopback.
I use cable internet from upc the netherlands is dchp. also local is dchp.
Thanks in advanced ,and all the best wishes for 2010!
p.s. the mac spoofing networktool in ubuntu is buggy, when change the mac address it makes an new the same nic config ,when do this gain with new name it make the same name and when do again the tool crashes, and than my mind crashes to :P ...
Last edited by vastvet; 01-03-2010 at 12:11 PM.
Reason: forgot something
|
|
|
|
01-03-2010, 12:31 PM
|
#2
|
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,591
|
On almost any Linux distribution, you can edit /etc/sysconfig/network-scripts/ifcfg-eth0 (replace 'eth0' with your interface) and add:
Code:
HWADDR=31:32:33:34:35:36
Set your desired MAC address in place of '31:32:33:34:35:36' obviously.
|
|
|
1 members found this post helpful.
|
01-03-2010, 12:33 PM
|
#3
|
|
Guru
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,002
|
The lazy man's answer:
Put the commands you need to change your MAC address into the file /etc/rc.local on the line before the final exit 0
This file is run at every boot, as root, (so you need to be root to edit it) and you do not need to precede any commands with stuff like sudo
After those line(s) (but still before the final exit 0 )you might have to give the (distro-specific) command to restart networking, for Debian-based distros it's /etc/init.d/networking restart
For Fedora / Mandriva, it may be different, but similar.
The sane man's question: Why do you need to spoof your MAC address? Can't you just tell your ISP your MAC address has changed? Or get a modem/router?
|
|
|
1 members found this post helpful.
|
01-03-2010, 12:42 PM
|
#4
|
|
Member
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 822
Rep: 
|
The problem is that /etc/init.d/networking, /etc/network/interface, ifconfig are deprecated by Network Manager and /etc/sysconfig/ exist only in RedHat/Fedora.
That's the problem with modern distro when it come to "advanced" networking. The best way to revert to the old system is to create /etc/network, /etc/network/interfaces, /etc/init.d/networking and remove network manager. It's bad for laptop, but fine for desktop. After that, the old way of doing it will start working again.
|
|
|
1 members found this post helpful.
|
01-03-2010, 12:48 PM
|
#5
|
|
LQ Newbie
Registered: Jan 2010
Posts: 20
Original Poster
Rep:
|
Thanks for the reply!stay replying :))i want to know everything :)
Quote:
Originally Posted by tredegar
The lazy man's answer:
Put the commands you need to change your MAC address into the file /etc/rc.local on the line before the final exit 0
This file is run at every boot, as root, (so you need to be root to edit it) and you do not need to precede any commands with stuff like sudo
After those line(s) (but still before the final exit 0 )you might have to give the (distro-specific) command to restart networking, for Debian-based distros it's /etc/init.d/networking restart
For Fedora / Mandriva, it may be different, but similar.
The sane man's question: Why do you need to spoof your MAC address? Can't you just tell your ISP your MAC address has changed? Or get a modem/router?
|
Hi thanks for reply so far, more is welcome!i wanna know everything!About the isp ,well first of all ur client mac is always send to router,server and ispand to other pc"s wich is an security threat, the second thing is i dont want to buy an network card everytime the isp throws it out, and calling the provider is very expensive here,so those are the head reasons.
The point with spoofing mac address is that when in does nt really matter wich new distro, if u go to the file by gui and try to change it u dont have the root priveleges, u cant save the new manual mac address, so u have to open an shell/command prompt to do it, soem distro have shellroot and soem dont than u have to do SU than give root password, than do gedit /etc/network/interfaces of whatever i have to do..i still nbeed to test because sometimes when spoof and try to browse the internet is not their. 
|
|
|
|
01-03-2010, 12:54 PM
|
#6
|
|
LQ Newbie
Registered: Jan 2010
Posts: 20
Original Poster
Rep:
|
Thank u also for the reply
Quote:
Originally Posted by macemoneta
On almost any Linux distribution, you can edit /etc/sysconfig/network-scripts/ifcfg-eth0 (replace 'eth0' with your interface) and add:
Code:
HWADDR=31:32:33:34:35:36
Set your desired MAC address in place of '31:32:33:34:35:36' obviously.
|
I see, can u give this info in some more easyer steps.
Last edited by vastvet; 01-03-2010 at 01:26 PM.
|
|
|
|
01-03-2010, 01:04 PM
|
#7
|
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,591
|
As Elv13 pointed out, if you're using NetworkManager that method won't work. So give us a little more information. What distribution are you trying to set this on? Are you using NetworkManager? If so, it might be easier to use the method in tredegar's post.
|
|
|
1 members found this post helpful.
|
01-03-2010, 01:16 PM
|
#8
|
|
LQ Newbie
Registered: Jan 2010
Posts: 20
Original Poster
Rep:
|
Quote:
Originally Posted by Elv13
The problem is that /etc/init.d/networking, /etc/network/interface, ifconfig are deprecated by Network Manager and /etc/sysconfig/ exist only in RedHat/Fedora.
That's the problem with modern distro when it come to "advanced" networking. The best way to revert to the old system is to create /etc/network, /etc/network/interfaces, /etc/init.d/networking and remove network manager. It's bad for laptop, but fine for desktop. After that, the old way of doing it will start working again.
|
can network manager be removed by the packagemanager? if /etc/network, /etc/network/interfaces, /etc/init.d/networking are allready their?like in most distro do i have to make it again?if yes how do i make these patch/maps/file like u said? 
|
|
|
|
01-03-2010, 01:22 PM
|
#9
|
|
LQ Newbie
Registered: Jan 2010
Posts: 20
Original Poster
Rep:
|
Quote:
Originally Posted by macemoneta
As Elv13 pointed out, if you're using NetworkManager that method won't work. So give us a little more information. What distribution are you trying to set this on? Are you using NetworkManager? If so, it might be easier to use the method in tredegar's post.
|
I tried suse and mandriva, those wont reboot on my dell inspiron laptop, i tried debian that worked installing,now am trying fedora,some downloaded iso dont match in md5/sha checksum so that maby explains why, however debian worked ok but i think fedora wil lwork also,and i tried ubuntu and stux also, i prefer an GNU/Linux to instal because its freeware and has most packages ,the goal is to use winehq to play mp games etc and do everything i did on my windows like msn ,mail etc. thats the goal,who can give advise to what to instal now?wich distro?and should it be gnome ,kde or?i als oprefer new and fast kernels as optional.
I may shorten or remove unnessary questions of myown lateron to make the topic better viewable for newbies like me.
Ive read something about gnome is better with doing stuff like su and spoof mac addr.
For now its an desktop /laptop distro wich i want to set up
Last edited by vastvet; 01-03-2010 at 01:40 PM.
|
|
|
|
01-03-2010, 03:29 PM
|
#10
|
|
LQ Newbie
Registered: Jan 2010
Posts: 20
Original Poster
Rep:
|
Quote:
Originally Posted by macemoneta
On almost any Linux distribution, you can edit /etc/sysconfig/network-scripts/ifcfg-eth0 (replace 'eth0' with your interface) and add:
Code:
HWADDR=31:32:33:34:35:36
Set your desired MAC address in place of '31:32:33:34:35:36' obviously.
|
I use to test the new debian 2010 desktop, i tried what u said but it didnot totally work because some commands where missing,maby this easyly works on other distros but not on debian at least not when i try it, so i have to further test this on another distro before i can say if work,if work i will set the distro at it that worked with it,its probertly just forgotten commands or maby the wrong distro.
|
|
|
|
01-03-2010, 10:38 PM
|
#11
|
|
Member
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 822
Rep: 
|
The distribution doesn't matter that much, all of them use Network Manager by now, and you will have to remove it if you want to hack deeper in your card and have more control than the, perfect for most users, NetworkManager offering.
|
|
|
1 members found this post helpful.
|
01-03-2010, 11:19 PM
|
#12
|
|
Senior Member
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 3,580
|
If you are using a standard Debian network setup you just need to add a line to your /etc/network/interfaces file. Eg
Code:
iface eth0 inet dhcp
hwaddress ether 00:11:22:33:44:55
BTW, what is "new debian 2010 desktop"?
Cheers,
Evo2.
|
|
|
2 members found this post helpful.
|
01-04-2010, 02:13 AM
|
#13
|
|
Member
Registered: Apr 2009
Distribution: Debian testing
Posts: 254
Rep:
|
I like to spoof my mac addresses, for reasons I don't need to explain.
I install macchanger from repositories and put commands in /etc/rc.local file as such:
Code:
macchanger -r eth0
macchanger -r eth1
These commands will produce a different random mac address upon every bootup for both my Ethernet and Wireless device, you can also configure it to use a specific address as such:
Code:
macchanger -m 00:00:00:00:00:00 eth0
macchanger -m 00:00:00:00:00:00 eth1
The above will spoof the mac address of both to "00:00:00:00:00:00" upon every bootup when placed in /etc/rc.local file.
Last edited by Brains; 01-04-2010 at 02:16 AM.
|
|
|
1 members found this post helpful.
|
01-04-2010, 01:36 PM
|
#14
|
|
LQ Newbie
Registered: Jan 2010
Posts: 20
Original Poster
Rep:
|
This network manager is getting on my nurfs, when i go to services and put it of and stop service than i dont get internet at all, so how do i deletethe network manager without loosing connection forever, by teh way at that hours i was using debian the latest one, i guess i call it desktop because it isnt an server distro at that point, also my question is when i put the new macs, wich commands universal commands can i use on all distro to get the nics eth0/1 back online again? i remember sawing the macchange and in network manager sti lthe old mac andn ot getting online, now i am installing stux 2.0 cd and going to try these commands out, on debian and fedora both latest ones no luck changing the mac address maby all because of the networkmanager i dunno for sure yet... to be continued  see this link to see what i meen by eeprom mac change http://www.sdadapters.com/change-mac-address-faq.htm
My reason of mac changing is because my isp locks mac addresses, so when i buy news nics the gigabytes ones they are pritty expensive to buy new each time, i also read that there is cards solled with EEPROM program that runs from dos and can change hardware in the nic itself, i was wondering if i can use and do this in all nics i got? without buying this special card? to change the mac hardware matically [is different from spoofing in linux "oftopic"] :P
Last edited by vastvet; 01-04-2010 at 01:45 PM.
|
|
|
|
01-04-2010, 02:44 PM
|
#15
|
|
Member
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 822
Rep: 
|
You have to create /etc/network/ and /etc/network/interfaces, fill them as specified above, REMOVE network manager (apt-get purge networkmanager) and them restart the network
sudo /etc/init.d/networking restart
It -might- work if everything is configured correctly, unfortunately, it can also fail if your configuration is not right.
|
|
|
1 members found this post helpful.
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:46 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|