| 1 | First off, you MUST have BIND 9.x or later compiled and installed. You |
| 2 | need the lwres libraries and bind libraries (and include files) and you |
| 3 | will also need lwresd. Once you have it compiled and installed, try running |
| 4 | lwresd. On solaris I had to use the -i flag to specify where to write |
| 5 | the pid file, and on linux I didn't. (shrug) Go figure. But you gotta get |
| 6 | lwresd running before moving on. Don't panic, this is FAR easier to get |
| 7 | going than a full-blown BIND server (grin). |
| 8 | |
| 9 | Building bulkquery |
| 10 | |
| 11 | First, edit the Makefile and uncomment out the section of CC, CFLAGS, and |
| 12 | LDFLAGS settings for your operating system and set DESTDIR to the directory |
| 13 | you want to install it in. |
| 14 | |
| 15 | Then, edit bulkquery.c and edit the MAXTHREADS and DEFTTL values. You probably |
| 16 | don't need to fiddle with anything else and the defaults for MAXTHREADS and |
| 17 | DEFTTL should be fine. |
| 18 | |
| 19 | MAXTHREADS is the maximum number of threads you will spawn. The more you |
| 20 | spawn, the harder you will work your DNS server (and the RBLs) and the |
| 21 | more resources you'll use up on your own machine -- AND the faster the |
| 22 | queries will complete. If you set this too high your operating system might |
| 23 | not permit bulkquery to run. The default of 50 works fine on Solaris and |
| 24 | and Linux. |
| 25 | |
| 26 | DEFTTL is the default time to live value. This is sort of a misnomer, since |
| 27 | the REAL time to live values will be obtained in the replies for queries |
| 28 | that were found. But for the queries that were NOT found, DEFTTL will be |
| 29 | used. This is so that the non-existence of an IP in one of the RBLs will be |
| 30 | cached by the filters plugin for DEFTTL seconds. |
| 31 | |
| 32 | After looking at bulkquery.c, just run "make" to compile it. If it compiles |
| 33 | without errors, you can run "make install" (you may need to be root to |
| 34 | write to DESTDIR). You can test it with the included sample input file |
| 35 | bq.in |
| 36 | |
| 37 | If all you get back are entries with the default TTL value (ie. 7200), then |
| 38 | something isn't working. Make sure you have lwresd running. You should also |
| 39 | make sure the machine you're running it on CAN make DNS queries (grin). So |
| 40 | check your /etc/resolv.conf file (on UNIX machines anyway). I'll include |
| 41 | the file bq.out to show what the output of bulkquery looked like at the time |
| 42 | of this writing (assuming everything was working). |