You are making a classical mistake, and that's the assumption that machines have IP addresses. Machines don't have IP addresses,
interfaces do. Servers often have more than one interface, interfaces often have more than one IP address, IP addresses can be assigned to more than one interface at the same time, and interfaces can change their IP addresses without the services on the same machine needing a restart. This is
common practise with webservers that run in a high-available and/or load balancing cluster. Furthermore, it's not at all uncommon for the actual webserver to only have "internal" IP addresses (addresses in the private range) - routers, firewalls and NAT boxes happily do address translation, port forwarding, etc.
Therefore, the question "finding out the 'real' IP address of a machine" doesn't make much sense.
Abigail