Add to Favourites Add to Favourites    Print this Article Print this Article

I do not want to run DNS services on my DirectAdmin Server.

If you wish to control all DNS services on another server and do not need to run named (bind) on your DirectAdmin server, you can disable it by doing the following.

1) Edit /usr/local/directadmin/data/admin/services.status and set:

named=OFF


2) Stop named:
RedHat:

/sbin/service named stop
chkconfig named off


FreeBSD:

/usr/local/etc/rc.d/named stop



3) Edit /etc/init.d/named (FreeBSD: /usr/local/etc/rc.d/named) and set the file to show:

#!/bin/sh
exit 0;

This will let DirectAdmin think that it's reloading named, while the script will actually do nothing.

With these changes the dns settings will still be made, but no program will be running to host them so they will have no effect.



4) If you're running on a systemd setup (CentOS 7), then there won't be an /etc/init.d/named file.
It will be at:

/etc/systemd/system/named.service
or
/usr/lib/systemd/system/named.service

and you'd need to make it's contents look like:

[Unit]
Description=Named Placebo
After=syslog.target network.target
Requires=network.target
Documentation=http://help.directadmin.com/item.php?id=25

[Service]
Type=oneshot
ExecStart=/usr/bin/echo -n ''

which should just run the "echo" command without displaying anything, and should return a zero result.
You might also need to run:

systemctl daemon-reload

to reload the new named.service script.

Was this answer helpful?

Also Read