Changing System/Server names

Discussion in 'Installation/Configuration' started by TonyG, Sep 30, 2020.

  1. TonyG

    TonyG Member

    Please correct any misunderstandings:
    When we set the name of a System/Server, I started with hostnames ns1 and ns2. Now I'm thinking that was an error. I think hostnames should be generic and the purpose/designation of a host should be defined in DNS as a CNAME.

    So now I have servers with hostnames ns1 and ns2. I'd like to change these to something generic like alpha and bravo, or jupiter and neptune...

    Do we just need to change the names in System/Server names? Or do we need to make our own changes in /etc/hosts or /etc/hostname?

    When changing the name of DNS systems, do we need to manually change DNS at the OS level, or is that handled by ISPConfig? (/etc/resolvconf/resolv.conf.d/head, /etc/resolv.conf, etc)

    And if we change a name like ns1.foo.bar, I would be comfortable checking all other zone data, Domains, Mail configs, etc in ISPConfig to ensure it's correct in all locations. But is it expected that we need to do something else manually, especially to propagate changes to all servers that need the info?

    Of course, what I'm finding is that when just getting started, changes to DNS have a way of making the environment itself unreachable. I've purchased a new domain from my registrar just to serve as a home for the environment, not related to the applications/sites that will be hosted. I've hard-set "glue records" with my registrar, pointing ns1.mydomain.tld to the IP address of my primary ISPConfig server, and ns2 to my secondary ISPConfig server which is being configured as backup for all control applications. In ISPConfig, I will also set a CNAME like "panel" to the ISPConfig server (=alpha, =ns1). This means if I break DNS then I won't be able to get back to the ISPConfig web page to fix it without other tweaks.

    Is that a valid configuration or is that all a really bad plan? And ... If I want to RTFM, are these topics documented anywhere?

    Please remember, I'm still getting familiar with the environment, learning as fast as I can, R'ingTFM, experimenting, etc. There are just things like this where I still don't know what to expect from the software versus what is expected from the administrator.

    Thanks!
     
  2. TonyG

    TonyG Member

    Follow-up : After changing server names in the ISPC Systems page, the environment was in a bit of a mess. /etc/hostname and /etc/hosts were changed, but incorrectly. /etc/resolv.conf is not touched by ISPC, for better or worse, so I loaded the resolvconf package to ensure local systems are resolving to the ISPC DNS servers Before they go outside.

    I understand this would be a poor issue report. My goal is to document an area of interest, a problem I'm having and the resolutions I'm using. As time permits I'll come back to this, do a fresh install of a few servers, log details, and post a note here and/or an actual Issue for review. For now, I'm resetting and testing all names and IPs, and will 'dig' and use other tooling to make sure everything is connecting properly. Then if there is something specific that comes up from ISPC in a working environment, I'll ask about it here. Thanks for putting up with this process. (I shoulda been blogging. ;) )
     
  3. nhybgtvfr

    nhybgtvfr Active Member

    i wouldn't worry about whether a server has a generic hostname or one that identifies it's function.
    just give the server whatever name you want. giving it eg ns1 or mail or web1 etc only aids in making it obvious what it's function is, not just for you at a later date, but for anyone else looking at your network for the first time.
    also, you can give it multiple names in dns anyway. if you have a webserver that is also a database server, and a dns server, you can give it the dns records web1, db1, and ns1.
    and personally, i would create them all as A records rather than CNAME's.
    either way has advantages, eg for CNAMES, if you change the ip of the server, you only have to change one A record target address.
    but CNAMES require multiple dns lookups to resolve, whereas each A record would be done with just 1 lookup.
     

Share This Page