CentOS 5 name server [MyDNS]

This how-to will show you how to configure:

  • A MyDNS name server
  • A database to hold the DNS record information

Before starting

Please ensure that you have followed the instructions in the getting started guide here.

If you have not setup the database server yet, please follow the database how-to first.

Installing MyDNS

yum install mydns mydns-mysql
chkconfig mydns on
iptables -I RH-Firewall-1-INPUT 4 -p udp -m udp --sport 53 --dport 1024:65535 -j ACCEPT
iptables -I RH-Firewall-1-INPUT 4 -p udp -m udp --dport 53 -j ACCEPT
service iptables save

Setting up the database

MyDNS uses MySQL as its backend to store record information, so it needs a database setup before it can be configured. Start by opening a root MySQL session:

mysql -u root -p

Enter your MySQL root user's password and type at the mysql> prompt:
GRANT SELECT ON mydns.* TO 'mydns'@'localhost' IDENTIFIED BY 'mydns_password';

Replace new_password with a secure password. It will be used to grant MyDNS read-only access to the record database; this ensures that no exploits can result in write access to the record store (it is recommend that you setup another MySQL user for scripted write access to the database).

Next, import the default database:

mydns --create-tables | mysql -u root -p mydns

The last step is to adjust the MyDNS configuration file to use the newly database user credentials:

sed -i.bak -e 's/db-user = username/db-user = mydns/' /etc/mydns.conf
sed -i.bak -e 's/db-password = password/db-password = mydns_password/' /etc/mydns.conf

As before, replace mydns_password with your selected MySQL user password for MyDNS.

Start the service

MyDNS is now fully configured and ready to run. The service can be started:

service mydns start

Administering the server

MyDNS will now serve records zones from the rr with records from the soa table. The daemon does not have to be restarted for changes to be recognized, so you can take advantage of this by using scripts to update your MyDNS database on-the-fly. Zone replication via SQL backups is another particularly handy side-effect of this feature.

As an example, included below is a small script I use to add new domains my servers:

# Usage: add_dns_domain mysite.tld [mysite2.tld ...]
TIME="$(date +'%s')"
TMPFILE="$(mktemp)" || exit 1

# Set this to your primary and secondary nameservers

# Set this to your primary email, with the @ replaced by a single dot.

# Default shared IP to point domains to

for domain in "$@";do
  cat << EOF >> $TMPFILE
INSERT INTO mydns.soa (origin,ns,mbox,serial,refresh,retry,expire,minimum,ttl) VALUES('${domain}.', '${NS1}.', '${EMAIL}.', $TIME, 10800, 3600, 604800, 14400, 14400);
INSERT INTO mydns.rr (zone,name,data,aux,ttl,type) VALUES(LAST_INSERT_ID(), '${domain}.', '${NS1}.', 0, 14400, 'NS'),
                                                       (LAST_INSERT_ID(), '${domain}.', '$NS2.', 0, 14400, 'NS'),
                                                       (LAST_INSERT_ID(), '${domain}.', '${domain}.', 0, 14400, 'MX'),
                                                       (LAST_INSERT_ID(), '${domain}.', '${SHAREDIP}', 0, 14400, 'A'),
                                                       (LAST_INSERT_ID(), 'mail', '${domain}.', 0, 14400, 'CNAME'),
                                                       (LAST_INSERT_ID(), 'www', '${domain}.', 0, 14400, 'CNAME');
mysql -u root -p < $TMPFILE

# you can do some other stuff here with TMPFILE if you want

# cleanup

As you can see above, it adds a zone for each domain and then sets up default CNAME aliases for www and mail to point to the main domain. The main domain gets pointed at the default shared IP using an A record.




This database dns record holds something new which lets the other things and functions work well along with this server. As i have used it to my write my essay for me blogs as a back end. The default sharing ip could give more changes.

Air Jordan uses the world's first functional woven upper. Functional woven vamps have excellent abrasion resistance and a new look. The cheap air jordan 12 design team was inspired by Italy, one of the world's greatest handicraft craftsmen, to create a vamp that provides a stable structure, support, internal comfort and external abrasion resistance. Flight Web lamination system to create the overall structure and fit the shoes, and more solid support plate and a better elastic design is to enhance the natural rhythm effect. Because air max 90 pas cher it does not use multi-layer design and bonding technology, this shoe lining breathable super, like socks in general, bring extraordinary comfort. Flight Web lamination system uses mesh strip wrapped foot, and with the lace combined, bringing superior midfielder locking function, to achieve the shoes and athletes synchronized movement. The woven upper enhances the Flight Web lamination system, while the double durable heel helps reduce the impact of hard landing. The hinge pad at the shoe collar adds a high-end, exclusive feel to the cheap air jordan retro shoes and helps to prevent the heel from sliding.

The particular router admin page can now be entered from its default user settings and its default password and username Remember to set up a brand new wireless network password because the old one will be deleted..