ifconfig works, but only if you are directly connected. If you are behind a router or some other NAT setup, you will get your Private IP from ifconfig.
You can also run traces and things, but the easiest way I've found that seems to be consistent (for those with/without NAT) is the zoneedit.com or whatismyip.com pages.
Cool
<addition>
Also, for those who are unaware of "eth0" or their connection devices, and have simply "made linux work" they will have no idea 1:
What ifconfig is;
2:
where to type it in at;
or 3:
how to read it
Cool