MAC address

Pierre Fortin pfortin at pfortin.com
Tue Sep 21 00:26:03 EDT 2004


On Tue, 21 Sep 2004 11:14:41 +1000 Ajay wrote:

> i suppose i should clarify again that the question is not in the context
> of the Internet but a wireless LAN.
> within a LAN, if i were to open a socket connection with a server and
> send some data to it, the server would be able to pick up my MAC and IP
> address.
> so what i want to do is to anonymize the MAC by picking a random (but
> valid) MAC address and using that. after that i will anonymize the IP.


The type of LAN is immaterial to what you are proposing.  Whatever MAC
address (excl. broad-/multi-cast) you pick, the server should only snarf
it if you send some packets to the server (unless the server is also
running some sniffer code).  As long as you _do_ try to talk to the
server, whichever MAC you use *will*be*known* to the server -- it's the
only way you can get a response...  if you could change just your Tx MAC
and not your Rx MAC, the server would respond to your known-to-the-server
MAC address; but your machine wouldn't hear it cuz it'd be listening on a
different MAC (Rx)...

You can't "anonymize" if you plan to have a _conversation_ with the
server...  well, actually, it _might_ be possible if you set your MAC to
the broadcast address (that's about as "anonymous" as you can get; and not
at all appropriate!)-- however, each packet _from_ the server to your
'address' (broadcast) will be heard by every other machine on the LAN --
no guarantees that some other box won't respond (ICMP error or some
unexpected gibberish) to the server and mess up your 'anonymous'
connection.

To make this relative to Python:  yes you can use Python to change your
MAC if your hardware and OS support it; but you can't use the change for
the purpose you indicate.

-30-



More information about the Python-list mailing list