relies on authbind for this:
$ ls -al /etc/authbind/byport/53
- -rwxr-xr-x 1 root root 0 May 31 2012 /etc/authbind/byport/53
+ -rwxr-xr-x 1 you you 0 May 31 2012 /etc/authbind/byport/53
-Other dependencies: daemontools.
+Note that this file needs to be executable by the user you run as for
+authbind to work!
+
+Other dependencies: daemontools, lua-posix
SETTING UP
----------
$ cp vars.sample vars
-Edit `vars`.
+Edit `vars`:
The /24 to bind the various daemons in:
How to run the recursor (usually, again, no need to change this):
- RECRUN="exec authbind ../../../pdns/pdns_recursor --config-dir=. --socket-dir=. --daemon=no --trace=yes --dont-query= --local-address=$PREFIX.9 --hint-file=hintfile --packetcache-ttl=0 --max-cache-ttl=15 --threads=1 > logfile 2>&1"
+ RECRUN="exec authbind ../../../pdns/recursordist/pdns_recursor --config-dir=. --socket-dir=. --daemon=no --trace=yes --dont-query= --local-address=$PREFIX.9 --hint-file=hintfile --packetcache-ttl=0 --max-cache-ttl=15 --threads=1 > logfile 2>&1"
RUNNING
...
configs/10.0.3.8: up (pid 1138) 13 seconds
configs/recursor-service: up (pid 1140) 13 seconds
- configs/run-auth: unable to chdir: not a directory
(They all need to be up more than a few seconds, otherwise they might be
crashing on startup. Check the per-service `logfile` if something is wrong).
-The `run- auth` error is normal.
Run the tests:
exit 1
fi
-
rm -rf configs/
mkdir configs
-cd configs
cat > run-auth <<EOF
#!/bin/sh
EOF
chmod +x run-auth
+cd configs
+
mkdir recursor-service
-cat > recursor-service/run <<EOF
+cd recursor-service
+if [ \! -x "$PDNSRECURSOR" ]
+then
+ echo "Could not find an executable pdns_recursor at \"$PDNSRECURSOR\", check PDNSRECURSOR"
+ echo "Continuing with configuration anyhow"
+fi
+
+if [ \! -x "$PDNS" ]
+then
+ echo "Could not find an executable pdns_server at \"$PDNS\", check PDNS"
+ echo "Continuing with configuration anyhow"
+fi
+
+cat > run <<EOF
#!/bin/sh
$RECRUN
EOF
-chmod +x recursor-service/run
+chmod +x run
-cat > recursor-service/hintfile << EOF
+cat > hintfile << EOF
. 3600 IN NS ns.root.
ns.root. 3600 IN A $PREFIX.8
EOF
+cd ..
+
SOA="ns.example.net. hostmaster.example.net. 1 3600 1800 1209600 300"
### fake root zone
};
EOF
done
- ln -s ../run-auth $dir/run
+ ln -s ../../run-auth $dir/run
done
cat > recursor-service/forward-zones-file << EOF
PREFIX=10.0.3
+# PDNSRECURSOR= # set to override default location
+# PDNS= # set to override default location
AUTHRUN="exec authbind ${PDNS} --config-dir=. > logfile 2>&1"
RECRUN="exec authbind ${PDNSRECURSOR} --config-dir=. --socket-dir=. --daemon=no --trace=yes --dont-query= --local-address=$PREFIX.9 --hint-file=hintfile --packetcache-ttl=0 --max-cache-ttl=15 --threads=1 > logfile 2>&1"