The latest (dynamic) RPM’s for PowerDNS can be downloaded below. Please note, these RPM’s only include the MySQL and pipe backend!
Or you can download the GPL source tarball which includes the spec files for both x86_64 and i386
January 17th, 2009 | Posted in Linux, PowerDNS | No Comments
The latest (dynamic) RPM’s for PowerDNS can be downloaded below. Please note, these RPM’s only include the MySQL and pipe backend!
Or you can download the GPL source tarball which includes the spec files for both x86_64 and i386
January 16th, 2009 | Posted in Debian, Linux, Xen | No Comments
After creating a new VM on Debian Lenny, I got the following when trying to ssh into the DomU;
PTY allocation request failed on channel 0
stdin: is not a tty
Run the following to fix the issue;
apt-get install udev
December 21st, 2008 | Posted in Debian, Linux | No Comments
policyd error Your OS doesnt support MSG_NOSIGNAL or SO_NOSIGPIPE
apt-get install g++ gcc
policyd.h:52:19: error: mysql.h: No such file or directory
apt-get install libmysqlclient15-dev
December 21st, 2008 | Posted in Linux | No Comments
boot from cd – linux rescue
sh-3.1# umount /mnt/sysimage/data
sh-3.1# tune2fs -O ^has_journal /dev/sda6
sh-3.1# e2fsck -y /dev/sda6
sh-3.1# mount -t ext3 /dev/sda6 /mnt/sysimage/data
sh-3.1# rm -f /mnt/sysimage/data/.journal
sh-3.1# umount /mnt/sysimage/var
sh-3.1# tune2fs -j /dev/sda6
sh-3.1# exit
December 17th, 2008 | Posted in Linux | No Comments
To see what processes are accessing the disk partition you can use either lsof or fuser.
lsof /tmp
mysqld 13103 mysql 6u REG 8,6 0 12 /tmp/ibisfIna (deleted)
mysqld 13103 mysql 7u REG 8,6 504 13 /tmp/ibjWhwnX (deleted)
mysqld 13103 mysql 8u REG 8,6 0 14 /tmp/ibi5qTnK (deleted)
mysqld 13103 mysql 12u REG 8,6 0 15 /tmp/ibhsV78x (deleted)
java 18852 tomcat4 mem REG 8,6 16384 96580 /tmp/hsperfdata_tomcat4/18852
# fuser -m /dev/sda6
/dev/sda6: 13103 18852
# ps aux | grep 13103
mysql 13103 2.7 1.6 143892 34252 ? Sl Oct11 2692:12 /usr/libexec/mysqld
# ps aux | grep 18852
tomcat4 18852 0.0 1.8 283192 37928 ? Sl Dec16 1:28 /usr/java/j2sdk1.4.2/bin/java
You can then gracefully shutdown the daemon using the disk partion and unmount it.
December 16th, 2008 | Posted in Linux | No Comments
7000 and 8000 series 3ware Escalade⢠ATA RAID controllers manual
December 6th, 2008 | Posted in Linux, PowerDNS | 1 Comment
A short guide on how to setup powerdns with the geo and mysql backends to redirect visitors to servers closer to their geographic location.
So how does it work?
We delegate geo.www.domain.com to our powerdns servers that run the geo backend. The backend looks up the IP address of the user’s resolver in a data structure obtained from zz.countries.nerd.dk.
This returns the ISO country code, which is then fed through a map file to determine what CNAME to respond with. Our www.domain.com record is actually just a CNAME to www.geo.domain.com which is driven by the geo backend. Our map contains the following:
$RECORD www
$ORIGIN domain.com
After the above each ISO country code is listed and essentially where you want to send them, for example:
0 pool
# Andorra
20 eu
# United Arab Emirates
784 eu
# Afghanistan
4 eu
# Antigua and Barbuda
28 eu
# Angola
24 za
0 pool is a round robin DNS pool of all our servers located across the globe.
The rest, as you can see, is redirected to either eu or za. Note, the file is HUGE and only a few entries has been pasted here.
Our powerdns configuration looks like this:
geo-zone=geo.domain.com
geo-soa-values=ns0.domain.com,hostmaster@domain.com
geo-ns-records=ns0.domain.com,ns1.domain.com
geo-ip-map-zonefile=/home/geo/zz.countries.nerd.dk.rbldnsd
geo-maps=/etc/powerdns/geo-maps
launch=geo,gmysql
The zz.countries.nerd.dk.rbldnsd file countains all countries and their ISO country numbers. More information and how to get a copy of this (rsync once a week) can be obtained from http://countries.nerd.dk/more.html.
Our normal DNS domains and records are stored in MySQL, more information regarding that can be found in the powerdns documentation.
Here are some DNS query examples:
dig @ns0.coretanium.net nosuchdomainhere.com A
;www.nosuchdomainhere.com. IN A
www.nosuchdomainhere.com. 604800 IN CNAME www.geo.nosuchdomainhere.com.
www.geo.nosuchdomainhere.com. 3600 IN CNAME eu.nosuchdomainhere.com.
eu.nosuchdomainhere.com. 86400 IN A 87.194.37.132
As you can see, www.nosuchdomainhere.com is a CNAME to www.geo.nosuchdomainhere.com, from there it passes through the geo backend and it says your coming from lets say Germany, our geo mapping file then says country code 276 needs to go to eu(.nosuchdomainhere.com) and eu.nosuchdomainhere.com resolves to 127.0.0.1.
And that’s it. A brief explanation on how to use powerdns with the geo backend.
December 3rd, 2008 | Posted in Linux, Perl | No Comments
I am using this as a skeleton in various scripts where I need to be notified of errors or successful runs…
#!/usr/bin/perl
open(MAIL,"|/usr/lib/sendmail -t");
print MAIL "To: you\@domain.com\n";
print MAIL "From: name