View Single Post
Old 29th July 2010, 23:43
MrCompTech MrCompTech is offline
Join Date: Jul 2010
Posts: 92
Thanks: 1
Thanked 20 Times in 9 Posts
Default But what if I'm using MyDNS instead of BIND?

Hi Turbanator,

You didn't provide a link to the specific 'How-To' that you used.

Is this the one you followed ?:
On page 4 of the this How-To you should have installed MyDNS. So your correct your not using BIND.

You should have installed software that is required by MyDNS
apt-get install g++ libc6 gcc gawk make texinfo libmysqlclient15-dev
Then downloaded the source code and build MyDNS for your specific system
cd /tmp
tar xvfz mydns-
cd mydns-1.2.8
make install
The next part of the installation of MyDNS is to create the startup script. The script, if created by the 'make install' above should be located at
You can use this command to see if it already exists
ls -l /etc/init.d/mydns
If you start the vi editor with the command
vi /etc/init.d/mydns
and have typed the path and file name correctly you should be viewing the file. If the file is empty, that means that the file does not exist and you need to type in the commands one line at a time. Any time I use braces, {}, I am referring to a key on the keyboard. To get 'vi' into 'insert' mode press {i}. When done editing press, one key at a time, {ESC}{:}{w}{q}. The Escape key will take you out of edit/insert mode, {:} indicates that you are going to input a "vi" command, the {w} writes the file and {q} quits "vi".

Alternatively you could use a different computer and copy and paste the code from the How-To into a plain text file then transfer it to the target server using a USB flash drive. A few moments after the USB drive has been plugged into the server at the command prompt enter "fdisk -l" the last line of the output will show were to mount the USB drive at:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              16        7748     1979456    e  W95 FAT16 (LBA)
To mount the drive:
mount /dev/sdb1 /mnt
Then you can run "cd /mnt" to see the file. Use the "cp" command to copy the file. To get help on these command you can at the command prompt type "man {name of command}". When NOT in the /mnt directory unmount the USB drive using "umount /mnt".

Next is to change the permissions on the file so that the operating system will allow it to be executed:
chmod +x /etc/init.d/mydns
update-rc.d mydns defaults
If you done all the above steps and rebooted your system then your DNS server should be running, but that doesn't mean that it is working the way you need it to.

Let's find out if it's running, if MyDNS is installed you should see it in the process list by running the command:
ps -A
This will probably scroll by too fast so you should pipe this throught the more command:
ps -A | more
You can press "q" to quit the "more" command without having to view all pages. Use the spacebar to advance on screen/page at a time. Pressing {enter} will advance the screen one row/line at a time.

If you have "Grep" installed, find out by typing "grep" and pressing return and view results, you should be able to see it in the process list using this:
ps -A | grep -i mydns
This just tells us if MyDNS is running, it doesn't tell us if everything is properly configured for MyDNS. The way I usually check something like this is to restart the service using the command prompt and see if any errors are displayed.

For me, since I am using BIND I do this with:
/etc/init.d/named restart
Looking at the How-To that I think you followed, you should run the command:
/etc/init.d/mydns restart
If the service restarts without error then 'things' are basically OK.

Some info I found by Googling says that MyDNS uses the config file /etc/mydns.conf

This would be the file you want to change similarly to my previous post.

If the config file isn't in "/etc" one way you maybe able to find it is to run this:
locate mydns
You can create a "mydns.conf" file by running:
mydns --dump-config > /etc/mydns.conf
I found this at

You should have an "/etc/resolv.conf" file that was created during the network part of the setup. In this file should be listed the DNS servers of your Internet Service Provider (ISP).


The first line should be the local IP address of the network adapter that your server uses to access the Internet. This didn't show up in my resolv.conf until after I configured my server within ISPConfig. If your isn't listed here yet I don't think that shoudl matter.

The second line is your ISP DNS server, there maybe two listed here.

Assuming you have more than one computer on your local LAN and you want your ISPConfig3 server to be the DNS server...

The way DNS is going to work is:
On your server your Network Interface Card's (NIC) first DNS server shoudl be the IP address of your server. When your server needs an IP address, like say when you are updating software on your system, say using YUM, the request will go to the first DNS server listed in your NIC settings. If your DNS server doesn't have the DNS information then MyDNS will look at the resolve.conf file to see what other DNS servers it can use to resolve the URL to an IP address.

The way to test whether or not your DNS server is working use either the "nslookup" or "dig" commands, like so:
NOTE: Replace "" with the LAN IP address of your servers NIC.

If this is successfull you will get a result such as:
[root@prl-ofc-s01 ~]# dig

; <<>> DiG 9.7.1-P2-RedHat-9.7.1-2.P2.fc13 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13050
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0

;                      IN      A

;; ANSWER SECTION:               86316   IN      A

;; AUTHORITY SECTION:               86316   IN      NS               86316   IN      NS

;; Query time: 0 msec
;; WHEN: Thu Jul 29 16:16:45 2010
;; MSG SIZE  rcvd: 88

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 53917
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;                  IN      A

.                       10716   IN      SOA 2010072900 1800 900 604800 86400

;; Query time: 0 msec
;; WHEN: Thu Jul 29 16:16:45 2010
;; MSG SIZE  rcvd: 105
More info on MyDNS can be found at:
Reply With Quote