Problems with DNS network config at upcloud

Discussion in 'Server Operation' started by unsichtbare, Dec 5, 2019.

  1. unsichtbare

    unsichtbare Member HowtoForge Supporter

    Hi guys!
    I have two Ubuntu 18.04 servers at upcloud where my IP address is assigned by their DHCP and supposedly reserved.
    Twice now, DNS resolution had failed on each server and I have found "nameserver 127.0.0.53" in /etc/resolv.conf
    Upcloud seems to use to use /etc/network/interfaces for network config (which I thought was ignored in 18.04) as follows:
    Code:
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet dhcp
    
    auto eth1
    iface eth1 inet dhcp
    
    auto eth2
    iface eth2 inet6 auto
    I would like to configure /etc/netplan/01-netcfg.yaml with IP, DNS, etc. but my Upcloud deployments don't even have that file.

    QUESTION IS: Am I safe writing /etc/netplan/01-netcfg.yaml and deleting /etc/network/interfaces? Will that stop the reverting to 127.0.0.53 and retain my DNS servers across reboot?
    THX
    -JB

    Code:
    systemd-resolve --status
    Global
             DNS Servers: 94.237.127.9
                          94.237.40.9
              DNSSEC NTA: 10.in-addr.arpa
                          16.172.in-addr.arpa
                          168.192.in-addr.arpa
                          17.172.in-addr.arpa
                          18.172.in-addr.arpa
                          19.172.in-addr.arpa
                          20.172.in-addr.arpa
                          21.172.in-addr.arpa
                          22.172.in-addr.arpa
                          23.172.in-addr.arpa
                          24.172.in-addr.arpa
                          25.172.in-addr.arpa
                          26.172.in-addr.arpa
                          27.172.in-addr.arpa
                          28.172.in-addr.arpa
                          29.172.in-addr.arpa
                          30.172.in-addr.arpa
                          31.172.in-addr.arpa
                          corp
                          d.f.ip6.arpa
                          home
                          internal
                          intranet
                          lan
                          local
                          private
                          test
    
    Link 4 (eth2)
          Current Scopes: none
           LLMNR setting: yes
    MulticastDNS setting: no
          DNSSEC setting: no
        DNSSEC supported: no
    
    Link 3 (eth1)
          Current Scopes: none
           LLMNR setting: yes
    MulticastDNS setting: no
          DNSSEC setting: no
        DNSSEC supported: no
    
    Link 2 (eth0)
          Current Scopes: none
           LLMNR setting: yes
    MulticastDNS setting: no
          DNSSEC setting: no
        DNSSEC supported: no
    
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I think you should contact them on the how to fix the internal ip address or whether you need one.

    This is not safe. You will need to install and configure netplan.io to a working condition before you do that, otherwise your server connection may be cut off.
     
  3. unsichtbare

    unsichtbare Member HowtoForge Supporter

    Unfortunately, Upcloud has blown me off, claiming it's my responsibility exclusively. I wish I could have deployed from ISO instead of dealing with their template.

    The only real problem is DNS, if I could prevent resolv.conf from being overwritten at every reboot with 127.0.0.53, I would be set.
     
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

  5. unsichtbare

    unsichtbare Member HowtoForge Supporter

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you tried making the file immutable with:

    chattr +i /etc/resolv.conf
     
  7. unsichtbare

    unsichtbare Member HowtoForge Supporter

    /etc/resolv.conf is a symlink will this still work? Or is this a stupid question and I should simply make ../run/resolvconf/resolv.conf immutable?
    Code:
    root@pbx1:/etc# ls -la resolv.conf
    lrwxrwxrwx 1 root root 29 Apr 25  2016 resolv.conf -> ../run/resolvconf/resolv.conf
    root@pbx1:/etc#
    
     
  8. unsichtbare

    unsichtbare Member HowtoForge Supporter

    I set vi /etc/systemd/resolved.conf:
    Code:
    ...
    [Resolve]
    DNS=8.8.8.8 8.8.4.4
    ...
    /etc/resolv.conf is still 127.0.0.53 but:
    Code:
    root@webhost1-us-chi1:~# systemd-resolve --status
    Global
             DNS Servers: 8.8.8.8
                          8.8.4.4
              DNSSEC NTA: 10.in-addr.arpa
                          16.172.in-addr.arpa
                          168.192.in-addr.arpa
                          17.172.in-addr.arpa
                          18.172.in-addr.arpa
                          19.172.in-addr.arpa
                          20.172.in-addr.arpa
                          21.172.in-addr.arpa
                          22.172.in-addr.arpa
                          23.172.in-addr.arpa
                          24.172.in-addr.arpa
                          25.172.in-addr.arpa
                          26.172.in-addr.arpa
                          27.172.in-addr.arpa
                          28.172.in-addr.arpa
                          29.172.in-addr.arpa
                          30.172.in-addr.arpa
                          31.172.in-addr.arpa
                          corp
                          d.f.ip6.arpa
                          home
                          internal
                          intranet
                          lan
                          local
                          private
                          test
    
    Link 3 (eth1)
          Current Scopes: none
           LLMNR setting: yes
    MulticastDNS setting: no
          DNSSEC setting: no
        DNSSEC supported: no
    
    Link 2 (eth0)
          Current Scopes: none
           LLMNR setting: yes
    MulticastDNS setting: no
          DNSSEC setting: no
        DNSSEC supported: no
    
     
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    How can Upcloud claim it is your responsibility when their DHCP server gives wrong network settings? Or whose DHCP server is it?
    Won't DHCP server that gives not working settings make Uploud a lot of hopping mad customers?
     
  10. unsichtbare

    unsichtbare Member HowtoForge Supporter

    Agree completely! They have configured a server to use DHCP, but supplied a DHCP IP address only with no DNS at all and then told me to configure a deprecated file to update my info!!
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    I would try to make the target of the symlink immutable.
     

Share This Page