Debian 10 and Ubuntu 20.04.1 Different System hostname showing

Hello,

I have few questions, let me begin with providing you with my server configurations.

One of my VPS using Debian 10 with Virtualmin and on my control panel dashboard i can see “System hostname” with my Primary IP

On my 2nd VPS using Ubuntu 20.04.1 with virtualmin “System hostname” (127.0.1.1)

Is this something that i have to worry about? or do i have to do some changes? or is this perfectly fine?

When i check with my ISP this is what they told me
“A hostname should always be fqdn compliant. We do not recommend to use IPs as hostnames at all.”

Any advice would be greatly appreciated

Thank you

Dilshan!

Screen Shot 2020-12-25 at 9.56.47 PM

The IP isn’t part of the hostname, it’s just shown after it.
You can also always check the hostname via command or virtualmin directly (webmin -> networking -> network configuration -> hostname and dns client / or simply click on the hostname).
I am unsure why the Ubuntu one displays the local IP as the used one, but you can check that also in the network settings.

1 Like

@DrCarsonBeckett
Thank you for your reply. when i got network setting i can see these values.

Found the issue i believe. i checked the hosts file and it had values like this

127.0.0.1 localhost
127.0.0.1 server1.example.net server1 ns1.example.net

I changed the local ip 127.0.0.1 to my primary server ip and saved the file reboot the system.

now everything looks ok.

If your VPS provider / ISP has set up their servers behind a NAT (lots of them do this, e.g. Linode) then you will see IP addresses in the private IP address ranges / loopback range.

I ignore this discrepancy because I know how and why it happens.

1 Like

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.