LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-03-2005, 05:50 PM   #1
colombo187
LQ Newbie
 
Registered: Dec 2004
Distribution: Slackware 10
Posts: 16

Rep: Reputation: 0
Angry Problem spoofing mac address


I'm trying to register my router's mac address with the campus network so that I don't have to use it in bridge mode... and so I'm trying to spoof the mac address of the router
Problem is that after I bring the netcard down 'ifconfig eth0 down' , then try and bring it back up 'ifconfig eth0 up' it won't connect to the internet 'lynx' won't find anything until I reboot the system -and then the original mac address loads and I'm back at square 1 - even when I don't change the mac address I can't bring the card down then back up successfully without restarting am I missing a command? I'm very new to linux and running slack 10.0

Thanks for any help
 
Old 02-05-2005, 08:27 PM   #2
lyle_s
Member
 
Registered: Jul 2003
Distribution: Slackware
Posts: 392

Rep: Reputation: 55
The sequence for changing the ethernet device's apparent MAC address is:

ifconfig eth0 down
ifconfig eth0 hw ether 00:11:22:33:44:55
ifconfig eth0 111.222.333.444 broadcast 555.666.777.888 netmask 999.000.111.222

Make sure to change the MAC and network numbers accordingly.

If eth0 is configured by DHCP, you'd replace the last line in the above triplet of commands with:

dhcpcd -t 10 -d eth0

One way to make this persist across reboots is to add:

if [ "$1" = 0 ]
then
ifconfig eth0 hw ether 00:11:22:33:44:55
fi

at line 72 in /etc/rc.d/rc.inet1, just before the line reading:
if [ "${USE_DHCP[$1]}" = "yes" ]; then # use DHCP to bring interface up

Make a backup copy of /etc/rc.d/rc.inet1 before you start in case it gets screwed up.

This isn't the prettiest way to do it, but it should work. The proper way is to make it so /etc/rc.d/rc.inet1 picks up the desired apparent MAC address from /etc/rc.d/rc.inet1.conf, but that's a bit more work.

I haven't really tested any of this, but it should get you going.

Lyle
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic IP and MAC spoofing Iptable rules? stjoan1 Linux - Security 3 11-13-2005 05:17 PM
MAC Address spoofing on alias/secondary interface tara Linux - Networking 3 08-31-2005 09:22 PM
MAC Destination Spoofing outspoken Linux - Networking 4 04-06-2005 10:47 AM
detect mac address spoofing bensky Linux - Security 1 03-13-2005 12:23 AM
Need help spoofing MAC address, ifconfig down seems to remove wireless card sicc Linux - Wireless Networking 0 11-30-2004 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration