HowtoForge

Running A MyDNS Name Server On OpenBSD (MySQL/PHP + MyDNS + MyDNSConfig) - Page 4

Last step to do before your MyDNS is online and ready for to be use:

You got the backend half set up; now you have to tell MyDNS to look at mydns database with the username / password we set up for it to make it work.

jed /etc/mydns.conf

Edit the following lines:

11 username: mydns
12 password: Woot-igotmydns
34 log: /var/log/mydns

Save the file and then issue:

mydns -b

to run MyDNS as a background service.

To start it on boot we add this to the /etc/rc.local file:

jed /etc/rc.local
echo -n 'mysql'
/usr/local/bin/mysqld_safe &
sleep 2
   
echo -n 'starting mydns'
/usr/local/sbin/mydns -b

PLEASE NOTE: DO NOT LEAVE THE SQL ADMIN OR THE MYDNS ADMIN PAGES IN THE ROOT DOCUMENT FOLDER. BEST TO MAKE A VHOST AND PUT THEM IN THERE SO YOU LOCK DOWN THE ACCESS TO THEM VIA IP ADDDRESS OF YOUR OWN PC SO YOU CAN HAVE CONTROL ONLY.

To use your MyDNS server in Windows, go to Control Panel - Network Connections - Local Area Connection -> Properties  -> TCP/IP -> Properties.

Use the following DNS server addresses:

Preferred DNS Server: IP of your MyDNS box
Alternate DNS Server: put your ISP's DNS server address Here, so your Internet works, when you're not looking for your private DNS server.

Then go to Start -> Run -> cmd and run:

ipconfig /flushdns

In the MyDNSConfig frontend, log in and add a domain. Then try to dig it:

dig @localhost yourdomain.com
Running A MyDNS Name Server On OpenBSD (MySQL/PHP + MyDNS + MyDNSConfig) - Page 4