On Sun, 26 May 2002, Ned Konz wrote:
On Sunday 26 May 2002 05:45 am, Niko Schwarz wrote:
The local IP address should be detected properly (it says my internet IP would be 127.0.0.1 -- hmm, that not cool).
The IP address returned is the first one returned by gethostbyname() (as I recall), which can return many addresses.
This is correct. Assuming `order hosts,bind' in /etc/host.conf, this means that the NetNameResolver class>>localHostAddress will return the first entry found in /etc/hosts for the local machine. If you have something like
127.0.0.1 localhost mymachine.mydomain mymachine the.real.ip.addr mymachine.mydomain mymachine
then try changing it to
the.real.ip.addr mymachine.mydomain mymachine 127.0.0.1 localhost mymachine.mydomain mymachine
or simply delete everything but `localhost' for 127.0.0.1 and use `localhost' explicitly if/when you need the loopack address instead of the real address.
Ian