how to change DNS settings of my server ?
-
I tried to shh and edit the /etc/resolv/conf file but the file does not exists and if I try to create one with
sudo vim /etc/resolv/confI have a error: E212: Can't open file for writingWhen I ssh I see this, so I wonder if it is somehow cloudron also managing the resolv/conf file ?
The list of available updates is more than a week old. To check for new updates run: sudo apt update ********************************************************************** NOTE TO CLOUDRON ADMINS ----------------------- Please do not run apt upgrade manually as it will update packages that Cloudron relies on and may break your installation. Ubuntu security updates are automatically installed on this server every night. Read more at https://docs.cloudron.io/security/#os-updates For help and more information, visit https://forum.cloudron.io ********************************************************************** -
This doc seems to be for internal name resolution of my servers apps, like (app1.my-cloudron.com)
What I want is changing the DNS for external name resolution. For instance, instead of using google DNS 8.8.8.8 I want to use 9.9.9.9 -
This doc seems to be for internal name resolution of my servers apps, like (app1.my-cloudron.com)
What I want is changing the DNS for external name resolution. For instance, instead of using google DNS 8.8.8.8 I want to use 9.9.9.9 -
no I'm using time4vps.
I tried edit the file
/etc/systemd/resolve.confwith this:[Resolve] DNS=9.9.9.9 9.9.9.10but it doesn't seem to work.
Is there something else I should do? I don't really understand the
unboundDNS configuration in this doc: https://docs.cloudron.io/networking/#dns -
no I'm using time4vps.
I tried edit the file
/etc/systemd/resolve.confwith this:[Resolve] DNS=9.9.9.9 9.9.9.10but it doesn't seem to work.
Is there something else I should do? I don't really understand the
unboundDNS configuration in this doc: https://docs.cloudron.io/networking/#dns -
I did restart systemd-resolved service but doesn't seem to work.
After doing so the content of/etc/resolv.confis :# 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.143Shouldn't it be 9.9.9.9 as specified in the
/etc/systemd/resolve.conffile ?# 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.10Cloudron doc says
All apps and services use systemd-resolved for name resolution. You can configure systemctl-resolved as required by your network
So the above should have work isn't it ? -
I tried to changed the
/etc/unbound/unbound.conf.d/cloudron-network.confadding this:# Forward all DNS queries to Quad9 DNS forward-zone: name: "." forward-addr: 9.9.9.9 forward-addr: 149.112.112.112but request are still going to
212.24.109.143and not9.9.9.9what 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 statusyield: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 -DNSOverTshowing that resolv.conf is in mode: foreign
what service manage
resolv.confin cloudron ? -
G girish marked this topic as a question on
-
@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.confmust be a symlink to../run/systemd/resolve/stub-resolv.confsystemctl status systemd-resolvedmust be enabled- Finally,
/etc/systemd/resolved.confhas your preferred DNS servers (quad9 in your case).
That should be it. After that,
host www.cloudron.ioshould work out of the box. - Make sure resolvconf package is not there . We don't install this anymore intentionally.
-
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/ -
I'm still indeed on v7, but I can't update to v8

https://forum.cloudron.io/post/93010 -
@cylon for v7, cloudron uses unbound. For Cloudron 7, please check this:
/etc/resolv.confshould havenameserver 127.0.0.1systemctl status unboundshould say runninghost www.cloudron.io 127.0.0.1should work
systemd-resolvedis 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? -
@cylon for v7, cloudron uses unbound. For Cloudron 7, please check this:
/etc/resolv.confshould havenameserver 127.0.0.1systemctl status unboundshould say runninghost www.cloudron.io 127.0.0.1should work
systemd-resolvedis 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?@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.confand only after did I check the/etc/resolv/conffile, I don't know what state it was before I updated/etc/systemd/resolve.conf -
G girish referenced this topic on
-
G girish has marked this topic as solved on
-
J joseph referenced this topic on
-
G girish referenced this topic on
