• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Change DNS server that plesk internally uses?

jmar83

Regular Pleskian
Server operating system version
Debian 10.13
Plesk version and microupdate number
18.0.64 Update 1
Hi there

As the title says! ;-)

I had some problems with automatic downloading webapp firewall many times, so maybe its a DNS problem. Because of that, i would like to change to Google DNS 8.8.8.8 & 8.8.4.4.

Thank you very much for your feedback(s) :)
 
Hi,

What issue are you encountering?

In terms of changing the used resolves, you need root access to edit /etc/resolv.conf. Add before other nameserver lines:
Code:
nameserver 8.8.8.8
nameserver 1.1.1.1

However, you might experience issues using these name servers when checking IP addresses against RBL when receiving emails.
 
Hmmm, interesting... So it seems, it was necessary to use "-f" option to make it read-only, not just "+i" (so the file will not be re-created with old DNS servers on system reboot):

chattr -f +i /etc/resolv.conf

Otherwise, i got the messsage "chattr: Operation not supported while reading flags on /etc/resolv.conf"

I don't know what this is, i never had that issue on a Debian 10 i installed by myself (?). But maybe plesk servers are secured ("hardened") in a special way, who knows?
 
Hmmm... its a "tmpfs" file system (my Plesk is hosted on a VServer on an external service provider, maybe it because of his configuration)

df -Th /etc/resolv.conf
Filesystem Type Size Used Avail Use% Mounted on
tmpfs tmpfs 1.0G 9.3M 1015M 1% /run
 
But /etc mount point is not tmpfs... the backup file i've created, /etc/resolv.conf.0, is on ext4:
df -Th /etc/resolv.conf.0
Filesystem Type Size Used Avail Use% Mounted on
/dev/ploop38847p1 ext4 50G 31G 17G 65% /


While /etc/resolv.conf links to that path:

ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 29 Jul 22 2020 /etc/resolv.conf -> ../run/resolvconf/resolv.conf



...i don't know it's a good idea so remove that symlink via:

rm /etc/resolv.conf
touch /etc/resolv.conf


Hmm... "Never touch a running system?" Maybe it's a risk to destroy the whole system with things like that?
 
ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 29 Jul 22 2020 /etc/resolv.conf -> ../run/resolvconf/resolv.conf



...i don't know it's a good idea so remove that symlink via:
Just an idea. "When resolvconf is properly installed, the resolv.conf file is replaced by a symbolic link to /etc/resolvconf/run/resolv.conf and the resolver instead uses the dynamically generated linked file." (c) resolvconf - Wikipedia

Probably, you can configure resolvers with Ubuntu Manpage: resolvconf.conf — resolvconf configuration file
 
Hmmm... the symlink target is also on a tempfs file system, so i can't protect it by setting read only flag via "chattr +i ..." after i changed the DNS list in /etc/resolvconf/run/resolv.conf:

chattr +i /etc/resolvconf/run/resolv.conf
chattr: Inappropriate ioctl for device while reading flags on /etc/resolvconf/run/resolv.conf
 
Only one workaround?

- Remove symlink
- Create new file /etc/resolv.conf
- Make it read-only with "chattr" on its ext4 location?

I can't believe that such a trivial thing is so tricky...
 
Hmmm... the symlink target is also on a tempfs file system, so i can't protect it by setting read only flag via "chattr +i ..." after i changed the DNS list in /etc/resolvconf/run/resolv.conf:

chattr +i /etc/resolvconf/run/resolv.conf
chattr: Inappropriate ioctl for device while reading flags on /etc/resolvconf/run/resolv.conf
That's the same file you tried this on before (chattr follows the symlink). You are supposed to edit the resolvconf.conf file, like explained in @AYamshanov's link.
 
OK, thx, will look on it ASAP :)

df -Th /etc/init/resolvconf.conf

Filesystem Type Size Used Avail Use% Mounted on
/dev/ploop38847p1 ext4 50G 31G 17G 66% /
 
Hmmm. in all these file ("tail", "head") they belong to /etc/init/resolvconf.conf is written: "Do not edit ... will not be saved"

to complicated...

so:

1.) unlink /etc/resolv.conf
2.) touch /etc/resolv.conf
3.) nano /etc/resolv.conf
4.) Write DNS entries into /etc/resolv.conf
5.) chattr +i unlink /etc/resolv.conf
6.) init 6
7.) cat /etc/resolv.conf
7a.) = works! :)


So thank you anyway! :)
 
Back
Top