[table id=15 /]
dnscache
All posts tagged dnscache
dnscache ang logwatch
This page is written to explain how to integrate logwatch and dnscache, a component of djbdns.
First, download the logwatch script to your server:
cd /usr/share/logwatch/scripts/services/
wget http://www.cypress-systems.net/scripts/dnscache
chmod 755 dnscache
Second, edit the script to tell logwatch where the logfile is looking for
vim /usr/share/logwatch/default.conf/services/dnscache.conf
Title = “dnscache” LogFile = dnscache # vi: shiftwidth=3 tabstop=3 et |
Third, tell logwatch where the logs are exactly stored
vim /usr/share/logwatch/default.conf/logfiles/dnscache.conf
LogFile = /service/dnscache/log/main/@*.s LogFile = /service/dnscache/log/main/current # Keep only the lines in the proper date range… *applytaidate # vi: shiftwidth=3 tabstop=3 et |
Four, run a test to see if there is any output
logwatch –service dnscache –range today –detail 10 –output stdout
I know there are others, but this is mine.  I always forget how-to change the default installation path with his software, until of course it’s too late and then I get to re-do it.
Need daemontools, ucspi-tcp, and djbdns source code.
Create a working directory
$ mkdir ~/working && cd ~/working
Grab src code
$ wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
$ wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
$ wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
1). First install daemontools, now if you have never installed anything from David Bernstein, his approach, may seem a little different than what you are normally used to with ./configure; make; make install. There might be a easy approach to moving this somewhere else but I have found that when I do..it sometimes comes back to bite me. So for daemontools, I leave it defaulted even thought it still drives me nuts everytime..
Create a /package directory:
1 2 3 |
$ sudo mkdir -p /package $ sudo chmod 1755 /package $ cd /package |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
$ sudo cp ~/working/daemontools-0.76.tar.gz . $ sudo tar -xvzfdaemontools-0.76.tar.gz $ sudo rm -f daemontools-0.76.tar.gz (or just leave it, this step is optional) $ cd admin/daemontools-0.76 If your installing this on a Linux host, then you need to fix do the following with the conf-cc file. However, if your on a BSD host, you can skip and just skip to package/install $ cd src $ sudo echo gcc -O2 -include /usr/include/errno.h > conf-cc $ cd ../../ $ sudo package/install If you are successful on this, the author would like to know about it. Run the following and you satisfy his request. $ mail djb-sysdeps@cr.yp.to < /package/admin/daemontools/compile/sysdeps Done. <strong>Ucspi-tcp</strong> Next, need to install ucspi-tcp $ cd ~/working $ sudo tar -xczf ucspi-tcp-0.88.tar.gz $ cd ucspi-tcp-0.88 Need to fix the conf-cc file if on Linux. $ sudo echo gcc -O2 -include /usr/include/errno.h > conf-cc If you would like to change the default home (--prefix=) then you need to update the conf-home file. (Default installs into /usr/local) $ sudo vi conf-home $ make $ sudo make setup check |
1 |
If you are successful on this, the author would like to know about it. Run the following and you satisfy his request. |
1 2 3 4 |
( echo 'First M. Last'; cat `cat SYSDEPS` ) \ | mail djb-sysdeps@cr.yp.to Replace <tt>First M. Last</tt> with your name. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
Done. Finally, install djbdns $ cd ~/working $ tar -xvzf djbdns-1.05.tar.gz Going to stop right here, as you may need to patch. While although secure, TinyDNS does not have everything built into it. Others have added functionality. Â I know I needed to compile in a fix for the 512bytes UDP packet payload for axfrdns, we would get truncated info for some of our domains and SRV support. I will later put up some links for patches. For now I will be installing just one patch, it's basically 13 patches rolled into one. <a href="http://ohse.de/uwe/patches.html">http://ohse.de/uwe/patches.html</a> Here's the one I will be installing now. <a href="http://jeremy.kister.net/code/djbdns-1.05.isp.patch">http://jeremy.kister.net/code/djbdns-1.05.isp.patch</a> $ sudo patch -d djbdns-1.05 < djbdns-1.05.isp.patch patching file Makefile patching file axfr-get.c patching file axfrdns.c patching file cache.c patching file dns.h patching file dns_rotateip.c patching file dns_transmit.c patching file dnscache.c patching file dnsroots.global patching file error.h patching file query.c patching file response.c patching file server.c patching file tdlookup.c patching file tdlookup.h patching file tinydns-data.c patching file tinydns-get.c patching file tinydns.c $ cd djbdns-1.05 Â $ sudo echo gcc -O2 -include /usr/include/errno.h > conf-cc $ sudo conf-home (If you want to change the install path) $ sudo make $ sudo make setup check Report success: |
1 2 |
( echo 'First M. Last'; cat `cat SYSDEPS` ) \ | mail djb-sysdeps@cr.yp.to |
1 2 3 |
Replace <tt>First M. Last</tt> with your name. Done. |