The man page of hostname
tells us for the option -I
: "Do not make any assumptions about the order of the output.".
Anyway, our servers always gave back the external IP in the first place and the local network IP in the second. Unfortunately, a lot of legacy code is running on this assumption whilst using hostname -I | cut -d' ' -f1
to get the external IP. Over the weekend, something changed. Now, the internal IP is displayed first and external second. This is a new situation after years and I wonder what could have influenced this change.
Any assumptions?
Operating System: Ubuntu 14.04.3 LTS
Kernel: Linux 4.4.110-x86_64-jb1