View Single Post
  #3  
Old 29th July 2010, 22:43
MrCompTech MrCompTech is offline
Member
 
Join Date: Jul 2010
Posts: 92
Thanks: 1
Thanked 19 Times in 8 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 ?:
Code:
http://howtoforge.com/perfect-server-debian-lenny-ispconfig3
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
Code:
apt-get install g++ libc6 gcc gawk make texinfo libmysqlclient15-dev
Then downloaded the source code and build MyDNS for your specific system
Code:
cd /tmp
wget http://heanet.dl.sourceforge.net/sourceforge/mydns-ng/mydns-1.2.8.25.tar.gz
tar xvfz mydns-1.2.8.25.tar.gz
cd mydns-1.2.8
./configure
make
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
Code:
/etc/init.d/mydns
You can use this command to see if it already exists
Code:
ls -l /etc/init.d/mydns
If you start the vi editor with the command
Code:
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:

EXAMPLE:
Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              16        7748     1979456    e  W95 FAT16 (LBA)
To mount the drive:
Code:
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:
Code:
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:
Code:
ps -A
This will probably scroll by too fast so you should pipe this throught the more command:
Code:
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:
Code:
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:
Code:
/etc/init.d/named restart
Looking at the How-To that I think you followed, you should run the command:
Code:
/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:
Code:
updatedb
locate mydns
You can create a "mydns.conf" file by running:
Code:
mydns --dump-config > /etc/mydns.conf
I found this at http://mydns.bboy.net/doc/html/mydns_7.html#SEC7

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).

Example:
nameserver:192.168.x.x
nameserver:xxx.xxx.xxx.xxx

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:
Code:
dig ohio.org 192.168.1.10
NOTE: Replace "192.168.1.10" with the LAN IP address of your servers NIC.

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

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

;; QUESTION SECTION:
;ohio.org.                      IN      A

;; ANSWER SECTION:
ohio.org.               86316   IN      A       74.117.116.80

;; AUTHORITY SECTION:
ohio.org.               86316   IN      NS      ns1.parked.com.
ohio.org.               86316   IN      NS      ns2.parked.com.

;; Query time: 0 msec
;; SERVER: 192.168.1.10#53(192.168.1.10)
;; 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

;; QUESTION SECTION:
;192.168.1.10.                  IN      A

;; AUTHORITY SECTION:
.                       10716   IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2010072900 1800 900 604800 86400

;; Query time: 0 msec
;; SERVER: 192.168.1.10#53(192.168.1.10)
;; WHEN: Thu Jul 29 16:16:45 2010
;; MSG SIZE  rcvd: 105
More info on MyDNS can be found at:http://mydns.bboy.net/doc/html/mydns...l#SEC_Contents
Reply With Quote