add pdnsd

This commit is contained in:
kev 2015-06-30 08:41:42 +08:00
parent 7605584df6
commit 0c83e65c07
4 changed files with 93 additions and 0 deletions

13
pdnsd/Dockerfile Normal file
View File

@ -0,0 +1,13 @@
#
# Dockerfile for pdnsd
#
FROM alpine
MAINTAINER kev <noreply@datageek.info>
RUN apk add -U pdnsd \
&& rm -rf /var/cache/apk/*
EXPOSE 53/tcp 53/udp
CMD ["pdnsd"]

23
pdnsd/README.md Normal file
View File

@ -0,0 +1,23 @@
pdnsd
=====
`pdnsd` is a proxy DNS server with permanent caching (the cache contents are
written to hard disk on exit) that is designed to cope with unreachable or down
DNS servers (for example in dial-in networking).
Since version 1.1.0, pdnsd supports negative caching.
## docker-compose.yml
```
pdnsd:
image: vimagick/pdnsd
# volumes:
# - pdnsd.conf:/etc/pdnsd.conf
ports:
- "53:53/tcp"
- "53:53/udp"
restart: always
```
> Uncomment `volumes` to use customized config file.

6
pdnsd/docker-compose.yml Normal file
View File

@ -0,0 +1,6 @@
pdnsd:
image: vimagick/pdnsd
ports:
- "53:53/tcp"
- "53:53/udp"
restart: always

51
pdnsd/pdnsd.conf Normal file
View File

@ -0,0 +1,51 @@
#
# Default Alpine Linux pdnsd config
#
# See /usr/share/pdnsd/pdnsd.conf.sample and the pdnsd.conf(5) manpage,
# both available in the pdnsd-doc package.
#
# Comments can begin with either '#' or '//', and entire blocks may be
# commented out with '/*' and '*/'.
#
global {
perm_cache=2048;
cache_dir="/var/cache/pdnsd";
run_as="pdnsd";
server_ip = any;
status_ctl = on;
# paranoid=on; # This option reduces the chance of cache poisoning
# but may make pdnsd less efficient, unfortunately.
min_ttl=15m; # Retain cached entries at least 15 minutes.
max_ttl=1w; # One week.
timeout=10; # Global timeout option (10 seconds).
neg_domain_pol=on;
}
server {
label= "googledns";
ip = 8.8.8.8, 8.8.4.4;
proxy_only=on;
lean_query=on;
timeout=4; # Server timeout; this may be much shorter
# that the global timeout option.
uptest=none;
interval=10m; # Check every 10 minutes.
purge_cache=off;
}
/*
source {
owner=localhost;
# serve_aliases=on;
file="/etc/hosts";
}
*/
rr {
name=localhost;
reverse=on;
a=127.0.0.1;
# a=::1;
owner=localhost;
soa=localhost,root.localhost,42,86400,900,86400,86400;
}