On 04/06/2012 08:18 AM, Jonathan Vomacka wrote:
Good day,
I was wondering if there was a way to change the hostname for each individual IP address allocated to a system. For example if only one NIC card is being used (single port) and the hostname of the machine is "example.example.org", this hostname is being displayed for all applications no matter what IP I set the application to BIND to. My server has multiple IP addresses setup as an ALIAS and ive tried setting up ptr's, A records, and even specifying the new hostname in /etc/hosts. No matter what I do when I connect to the application it read "example.example.org" which is the hostname of the machine rather then the hostname I want it to read on a particular IP. Is this possible to change?
If you are talking about when you ssh to the machine (or for anything else that would use the hostname variable that it gets from the machine) then I do not know of a way to make it be different based on the IP that you connect to.
If you are using something that does DNS names, then if you setup the proper forward and reverse records it will work.