[toggle ads]

Odi's astoundingly incomplete notes

New entries | Code

Redhat maps hostname to loopback interface

This is typical on Redhat systems:
/etc/hosts: h1234.example.com h1234 localhost.localdomain localhost
This maps the host name to the loopback interface address. I don't find this particularly amusing. It's really bad practice. Because it leads to the following inconsistency:
user@h1234 $ host h1234
h1234.example.com has address
user@h1234$ telnet h1234 80
It gets especially in your way if you have services that bind to specific addresses only:
user@h1234 $ netstat -lnt
Active Internet connections (only servers)
Proto Local Address  Foreign Address State
tcp*       LISTEN

posted on 2011-02-22 11:58 CET in Code | 0 comments | permalink