LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-03-2003, 03:30 PM   #1
Hano
Member
 
Registered: Sep 2001
Location: Venezuela, Caracas
Distribution: RedHat 9.0
Posts: 196

Rep: Reputation: 30
editing the inetaddr/HWaddr


Hi,


is there a way i can make the inetaddr/HWaddr returned by ifconfig be what i want? (locally, of course


cheers
 
Old 11-03-2003, 04:46 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
AFAIK you can't change hwaddrs, they're hardcoded into the device (you can lie to arp, but that only works until reboot IIRC). The inetaddr is simple.

ifconfig eth0 192.168.0.5 netmask 255.255.255.128

The above example would set the inetaddr of eth0 to 192.168.0.5 and the netmask to a /25

By the way, cross posting is frowned on.

Last edited by chort; 11-03-2003 at 04:50 PM.
 
Old 11-04-2003, 12:55 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
In your other thread you showed you got SIOCSIFHWADDR when applying your command (which was right, BTW). Try bringing down the device first.
And yes, cross-posting isn't allowed.
Please don't do that again.
 
Old 11-04-2003, 01:56 PM   #4
Hano
Member
 
Registered: Sep 2001
Location: Venezuela, Caracas
Distribution: RedHat 9.0
Posts: 196

Original Poster
Rep: Reputation: 30
sorry about the cross-posting; i first posted in one and then i realized (or assumed) that the people that would most likely know about the subject was in the other thread group


btw, i did

ifconfig etho down
ifconfig eth0 hw ether <newHWaddr>
ifconfig etho up


it worked beatifully!

with hostname command i changed the ..um, hostname, and the inetaddr can also be changed straightforwardly with ifconfig

..as expected, i lose connection and had to reboot

maybe i could configure eth1 to point to the same device, but that just sounds too hacky

cheers!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
MA101 wireless USB, HWAddr is 00:00:00:00:00:00 fuzzy_umbra Linux - Wireless Networking 1 10-20-2005 11:12 AM
Changing HWaddr Iridesce Linux - Networking 2 04-20-2005 03:56 AM
My nic Hwaddr is FF:FF:FF:FF:FF:FF:FF can this be correct? sempie Slackware 4 04-15-2005 01:33 PM
how do I change other peoples hwaddr? Rhys Linux - Newbie 3 12-17-2003 08:17 AM
faking HWaddr and inetaddr Hano Linux - Networking 3 11-05-2003 01:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:08 AM.

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