[lug] What's my IP?

David Anselmi anselmi at anselmi.us
Tue Jan 25 19:08:45 MST 2005


Jeff Schroeder wrote:
> Hey all--
> 
> A friend just posed an interesting question to me... he wants to know 
> the IP address of a Linux machine, and he suspects that 'ifconfig' has 
> been compromised (as a joke, not as an evil rootkit).  He asked how he 
> can find the IP without using ifconfig and without connecting to 
> another machine.  He has root access.

How about:

ifconfig eth0 <desired ip>

Presumably a compromised ifconfig will still set an IP on an interface, 
so it doesn't break init scripts or whatever.  So instead of asking what 
it is, set it to what you want.

Dave



More information about the LUG mailing list