• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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.

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