Why is the netstat output referring to an incorrect local hostname?
Issue
The hostname of the server is "xyz"
$ hostname
xyz
# nslookup xyz
Server: 8.8.8.8
Address: 8.8.8.8#53
Name: xyz.example.com
Address: 192.168.100.45
However the netstat output shows the local hostname as "abc":
# netstat -a|grep ldap
tcp 0 0 abc:50747 remotehost:ldap ESTABLISHED
tcp 0 0 abc:50744 remotehost:ldap ESTABLISHED
tcp 0 0 abc:50748 remotehost:ldap ESTABLISHED
# netstat -an|grep ldap
tcp 0 0 192.168.100.45:50747 remotehost:ldap ESTABLISHED
tcp 0 0 192.168.100.45:50744 remotehost:ldap ESTABLISHED
tcp 0 0 192.168.100.45:50748 remotehost:ldap ESTABLISHED
Environment
- Red Hat Enterprise Linux
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.