ext name resolution

Discussion in 'ISPConfig 3 Priority Support' started by JOP, Aug 27, 2024.

  1. JOP

    JOP Member HowtoForge Supporter

    Installed DNS at Perfect Server and deaktivated it in ISPConfig, but the server still does name resolution on itself. Where to put the external DNS Servers IP in ISPConfig to do the job?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    System > Server config > Nameserver

    But name resolution must have been working during perfect server setup, as you won't be able to install ISPConfig without that. You probably changed something to deactivate DNS and name resolving afterwards, which causes name resolution to fail now. So, setting name servers in ISPConfig will likely not solve your problem then as this will not install software you might have removed or enable services you might have disabled. You must try to remember what you changed that caused name resolution to start failing and undo that. For example, if you install ISPConfig with BIND, BIND will resolve DNS. If you later stopped and disabled BIND DNS, name resolving will likely stop, too. You will then either have to enable BIND again or manually configure another resolver like unbound or manually configure DNS resolving in your server's network config.
     
  3. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You configured DNS when you installed the OS on that host. You also configured network settings including name servers at that time. If you now want to change it you might be able to do it in the same way.
    If this fails read up on network settings in documentation for your OS.
     
  4. JOP

    JOP Member HowtoForge Supporter

    Well the DNS resolution works but it is not done by external DNS servers but by the server itself.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Which is the preferred way for a server and even necessary e.g. when you run a mail server to have working RBL. You are working with a server here, not a desktop client.
     
  6. JOP

    JOP Member HowtoForge Supporter

    Yes workt and still working, but where to put ext nameserver IP's in the config so they are uses? At the moment answer comes from 127.0.0.1 not ext servers.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    It means that your system, which is a server and not a desktop, caches DNS responses locally. That's how it should be.
     
  8. JOP

    JOP Member HowtoForge Supporter

    Found the problem; edit /etc/resolv.conf and restart network is fine, but using settings in ISPConfig does not work.

    I don't like every server does it's own name resolution. I centralized name resolution on my DNS servers which makes troubleshooting easier.
     
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Depends on the Operating System if this is the good way to set name servers. Recent Ubuntu systems for example use systemd which may get confused if /etc/resolv.conf is modified (and it should be a symlink).
     
  10. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    resolv.conf probably gets rebuilt on every reboot as well.. so editing the file is not really a long-term solution.

    i know a server won't get rebooted as much as a desktop, but it seems (ubuntu at least) it doesn't go more than a couple of weeks without an update that needs a reboot to make the changes live.
     
  11. JOP

    JOP Member HowtoForge Supporter

    Used it on CentOS for years without issue. Now I switched to Debian. Has Debian the same "problem" als Ubuntu changing it under some circumstances? Or could it be an ISPConfig issue?

    How exactly would a symlink do the job on Debian 12? Can you please post this?
     
  12. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    /etc/resolv.conf is a symlink to /run/systemd/resolve/stub-resolv.conf
    it's a dynamically generated file managed by systemd-resolved

    ubuntu is a debian based system, so i would be very surprised if debian itself didn't behave the same way.
     
  13. JOP

    JOP Member HowtoForge Supporter

    Yes you are right, also Debian has a symlink, but to "/run/resolvconf/resolv.conf". That is different to CentOS v7.x. that does not.
    Any idea where to place it in Debian?
     
  14. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  15. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    use resolvectl...

    resolvectl status will show you network details
    resolvectl dns should show you just the dns ip's.
    you should also be able to use resolvectl dns to set the nameservers, which should persists after reboots..
    never used it myself, so i would suggest using with caution... on a test system first.. and read the man file.
     
  16. JOP

    JOP Member HowtoForge Supporter

  17. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Whose time? Your or mine?
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    As the Debian wiki mentions, the likely fastest way is to make the file immutable with simply:
    chattr +i /etc/resolv.conf
    That way you do not have to figure out in which way this file is managed on your system (as this depends on your base system install and not ISPConfig, so it can differ).
     
    JOP likes this.
  19. JOP

    JOP Member HowtoForge Supporter

    Thank you Till, would be a possible solution. Sadly there is a bug that may clutter files in /etc if make the resolv.conf immutable.
    #860928 - dnssec-trigger + isc-dhcp-client: /etc/ being cluttered with tons of resolv.conf.dhclient-new.* files - Debian Bug report logs

    What I will try first is to put "nameserver xxx.xxx.xxx.xxx" directive in "/etc/resolvconf/resolv.conf.d/head", that places the entries on top of "/etc/resolve.conf" before 127.0.0.1. Hoping not beeing overwritten some day.
     
  20. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    But your system should not have dhcp client installed? So that bug does not appear.
     
    JOP likes this.

Share This Page