IP address, how to find

Mark J. Dulcey mark at buttery.org
Thu Sep 11 18:01:57 EDT 2003


heidi wrote:
> (I'll be a newbie for ever.  Thanks for help at last fall's InstallFest.)
> How do I find my own computer's ip address.  If I type ifconfig I get 
> the standard:
> 
> inet addr:192.168.0.101  Bcast:192.168.0.255  Mask:255.255.255.0
> 
> Someone wants to look into the Red Hat Linux 9 I have installed on my 
> computer to help me troublshoot.  This is a pieced together computer 
> with an ethernet connection.

That (192.168.0.101) IS your computer's IP address. Either you have set 
it up yourself manually, or you're getting it via DHCP from somewhere 
(broadband gateway, perhaps). But that may not answer your real question.

If you want to know what the IP address that is visible to the world is, 
you can ask your gateway, using whatever interface it has - typically, 
it's some web-based thing. Or you can visit some web site that tells 
what the IP address you're coming from is - that will show you your IP 
address as it appears to the world (after NAT), rather than the actual 
address (on your LAN) of your computer.

If you don't know the address of your gateway (the internal LAN address, 
that is), the /sbin/route command will tell you. Look for the default 
route as displayed by that command; that's the address you're looking 
for. They try putting that address in your web browser and see what you 
get. (It's probably either 192.168.0.1 or 192.168.0.100, depending on 
what brand of router you have; it HAS to be 192.168.0.something.)

If somebody actually wants to look at your system over the internet, 
you'll probably have to reconfigure your router - the default setup of 
the things doesn't support incoming connections to services. Of course, 
be careful what services you grant rights to, and who you tell about 
them - any such "holes" in your firewall are potential points of entry 
for system crackers.




More information about the Discuss mailing list