View previous topic :: View next topic |
Author |
Message |
jabol Apprentice

Joined: 05 Oct 2005 Posts: 269
|
Posted: Fri Sep 28, 2007 1:34 pm Post subject: [network] MAC spoofing with NetworkManager |
|
|
Hi,
as a preparation before moving to a new environment with many networks of different types (vpn, wlan, lan etc.) I decided to install NetworkManager. I believe it is a good program to satisfy my upcoming needs of easy and fast switching between different networks. The problem is, here where I have network now I need to spoof my MAC address (had a different computer before, now I have a new and need to spoof the old one, can't just contact my ISP, because when I move out the old one will be used again etc etc.). Well, NetworkManager has no easy interface or option to do the job.
I installed NetworkManager according to http://gentoo-wiki.com/NetworkManager. Now, I will explain how I managed to get it working.
Prerequisites:
Installed:NetworkManager (installed as explained in the link above)
iproute2/net-tools Hardware:ethernet card supporting mac changing If you had mac changing configured before installing you probably used Code: | mac_ethX="AA:BB:CC:DD:EE:FF" | But the tutorial above told you to deactivate net.ethX. But it also explained that the net service itself is nothing wrong, only two different dhcp clients are bad. The obvious conclusion is, you can activate net.ethX unless it doesn't do anything useful. Well, again not quite right.
How does MAC changing work? I dunno, I only know that MAC has to be changed once per card-activation. After the card it activated it can change modes/addresses etc. but none of this will affect the MAC. Now, what does NetworkManager do? It assigns modes and addresses to our card (activating it only if necessary). That is, if NetworkManager gets the card already activated it should not bother it. You know where I'm heading? Yes, you need to activate the card with /etc/init.d/net.ethX to change the MAC. Nothing NetworkManager will do is able to affect the initial change. Now, how should we set up a card without firing up a dhcp client? Obvious, we assign it a static ip. Which one? Doesn't matter, because this setting will be overwritten by NetworkManager once it gets some useful IP. My config looks like: Code: | adam@awi-laptop ~ $ cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
config_eth0=( "noop" "127.0.0.1" )
modules_eth0=( "iproute2" )
mac_eth0="AA:BB:CC:DD:EE:FF"
adam@awi-laptop ~ $ sudo rc-update -s | grep -i net
NetworkManager | default
local | default nonetwork
net.eth0 | boot
net.lo | boot | Now, that's it. This works for me.
Hope it was useful to anyone. |
|
Back to top |
|
 |
LiveLarger n00b

Joined: 06 Jul 2007 Posts: 8
|
Posted: Sat Sep 29, 2007 8:31 pm Post subject: |
|
|
isn't easier to just use ifconfig?
Something like ifconfig interface hw/class adress ?? |
|
Back to top |
|
 |
jabol Apprentice

Joined: 05 Oct 2005 Posts: 269
|
Posted: Sat Sep 29, 2007 9:03 pm Post subject: |
|
|
LiveLarger wrote: | isn't easier to just use ifconfig?
Something like ifconfig interface hw/class adress ?? | Well, it surely would if there were a place to put this command, but where would you put this? Into which configuration file? Well, there is none. /etc/conf.d/local.start is the only file where you can freely start cmd's, but it's executed *after* NetworkManager starts dhcpclient. And that is just too late. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|