Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. how to change DNS settings of my server ?

how to change DNS settings of my server ?

Scheduled Pinned Locked Moved Solved Support
dns
21 Posts 5 Posters 2.2k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    joseph
    Staff
    wrote on last edited by
    #12

    @cylon systemd-resolved run on 127.0.0.53 . So, you have to also change /etc/resolv.conf to be nameserver 127.0.0.53 .

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cylon
      wrote on last edited by
      #13

      How do I do that ? If I change the file /etc/resolv.conf to add the line

      nameserver 127.0.0.53
      

      It get overwritten at reboot and the line is deleted

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cylon
        wrote on last edited by cylon
        #14

        I tried to changed the /etc/unbound/unbound.conf.d/cloudron-network.conf adding this:

        # Forward all DNS queries to Quad9 DNS                                              
        forward-zone:                                                                       
                name: "."                                                                   
                forward-addr: 9.9.9.9                                                       
                forward-addr: 149.112.112.112 
        

        but request are still going to 212.24.109.143 and not 9.9.9.9

        what service is managing the /etc/resolve.conf file ?

        here are all my files:
        /etc/systemd/resolved.conf:

        #  This file is part of systemd.                                                    
        #                                                                                   
        #  systemd is free software; you can redistribute it and/or modify it under the     
        #  terms of the GNU Lesser General Public License as published by the Free          
        #  Software Foundation; either version 2.1 of the License, or (at your option)      
        #  any later version.                                                               
        #                                                                                   
        # Entries in this file show the compile time defaults. Local configuration          
        # should be created by either modifying this file, or by creating "drop-ins" in     
        # the resolved.conf.d/ subdirectory. The latter is generally recommended.           
        # Defaults can be restored by simply deleting this file and all drop-ins.           
        #                                                                                   
        # Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config.
        #                                                                                   
        # See resolved.conf(5) for details.                                                 
                                                                                            
        [Resolve]                                                                                       
        DNS=9.9.9.9 9.9.9.10
        

        /etc/resolv.conf:

        # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)      
        #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN             
        # 127.0.0.53 is the systemd-resolved stub resolver.                                 
                                                                                            
        nameserver 212.24.109.143                                                           
        nameserver 80.208.225.143
        

        /run/systemd/resolve/resolv.conf:

        # This is /run/systemd/resolve/resolv.conf managed by man:systemd-resolved(8).      
        # Do not edit.                                                                      
        #                                                                                   
        # This file might be symlinked as /etc/resolv.conf. If you're looking at            
        # /etc/resolv.conf and seeing this text, you have followed the symlink.             
        #                                                                                   
        # This is a dynamic resolv.conf file for connecting local clients directly to       
        # all known uplink DNS servers. This file lists all configured search domains.      
        #                                                                                   
        # Third party programs should typically not access this file directly, but only     
        # through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a        
        # different way, replace this symlink by a static file or a different symlink.      
        #                                                                                   
        # See man:systemd-resolved.service(8) for details about the supported modes of      
        # operation for /etc/resolv.conf.                                                   
                                                                                            
        nameserver 9.9.9.9                                                                  
        nameserver 9.9.9.10                                                                 
        search . 
        

        Running resolvectl status yield:

        Global                                                                              
               Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported                    
        resolv.conf mode: foreign                                                           
             DNS Servers: 9.9.9.9 9.9.9.10                                                  
                                                                                            
        Link 2 (ens3)                                                                       
        Current Scopes: none                                                                
             Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported        
                                                                                            
        Link 3 (docker0)                                                                    
        Current Scopes: none                                                                
             Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported        
                                                                                            
        Link 4 (br-e8030366a286)                                                            
        Current Scopes: none                                                                
             Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported        
                                                                                            
        Link 6 (veth13a1cdd)                                                                
        Current Scopes: none                                                                
             Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported        
                                                                                            
        Link 8 (vethf77db43)                                                                
        Current Scopes: none                                                                
             Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverT
        

        showing that resolv.conf is in mode: foreign

        what service manage resolv.conf in cloudron ?

        1 Reply Last reply
        0
        • girishG girish marked this topic as a question on
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #15

          @cylon there's much to unwrap. Unfortunately, the way all these things interact is quite complicated.

          Before I say anything, are you on Cloudron 8? I am wonder why you have your /etc/resolv.conf handled by resolvconf ? Cloudron 8 has removed this package. If you are still on some < v8, I recommend upgrading first because the instructions to change the DNS are different.

          For Cloudron 8, here is a checklist:

          • Make sure resolvconf package is not there . We don't install this anymore intentionally. apt remove resolvconf
          • /etc/resolv.conf must be a symlink to ../run/systemd/resolve/stub-resolv.conf
          • systemctl status systemd-resolved must be enabled
          • Finally, /etc/systemd/resolved.conf has your preferred DNS servers (quad9 in your case).

          That should be it. After that, host www.cloudron.io should work out of the box.

          1 Reply Last reply
          0
          • scookeS Offline
            scookeS Offline
            scooke
            wrote on last edited by
            #16

            I used to use Time4VPS and thoroughly enjoyed it. Did you check these out?:
            https://www.time4vps.com/knowledgebase/working-with-dns-manager/
            https://www.time4vps.com/knowledgebase/create-nameserver-with-your-domain/

            A life lived in fear is a life half-lived

            1 Reply Last reply
            0
            • C Offline
              C Offline
              cylon
              wrote on last edited by
              #17

              I'm still indeed on v7, but I can't update to v8 😞
              https://forum.cloudron.io/post/93010

              1 Reply Last reply
              0
              • girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #18

                @cylon for v7, cloudron uses unbound. For Cloudron 7, please check this:

                • /etc/resolv.conf should have nameserver 127.0.0.1
                • systemctl status unbound should say running
                • host www.cloudron.io 127.0.0.1 should work

                systemd-resolved is not used at all. So, you can ignore all those related threads and configs. I would like to understand how it got to this state though? Do you think it tried to upgrade to v8 and end it up in this state?

                C 1 Reply Last reply
                0
                • C Offline
                  C Offline
                  cylon
                  wrote on last edited by
                  #19

                  thanks for the help, but this is not urgent, I can wait for the update to the v8 so I won't have to do this change twice 🙂

                  1 Reply Last reply
                  0
                  • girishG girish

                    @cylon for v7, cloudron uses unbound. For Cloudron 7, please check this:

                    • /etc/resolv.conf should have nameserver 127.0.0.1
                    • systemctl status unbound should say running
                    • host www.cloudron.io 127.0.0.1 should work

                    systemd-resolved is not used at all. So, you can ignore all those related threads and configs. I would like to understand how it got to this state though? Do you think it tried to upgrade to v8 and end it up in this state?

                    C Offline
                    C Offline
                    cylon
                    wrote on last edited by
                    #20

                    @girish said in how to change DNS settings of my server ?:

                    systemd-resolved is not used at all. So, you can ignore all those related threads and configs. I would like to understand how it got to this state though? Do you think it tried to upgrade to v8 and end it up in this state?

                    That's possible, I don't remember if I first tried to upgrade to v8 or to change the DNS

                    I updated the /etc/systemd/resolve.conf and only after did I check the /etc/resolv/conf file, I don't know what state it was before I updated /etc/systemd/resolve.conf

                    1 Reply Last reply
                    0
                    • girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #21

                      Fixed in support as outlined in https://forum.cloudron.io/topic/12300/how-to-change-dns-settings-of-my-server/18

                      1 Reply Last reply
                      0
                      • girishG girish referenced this topic on
                      • girishG girish has marked this topic as solved on
                      • J joseph referenced this topic on
                      • girishG girish referenced this topic on
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search