lost and found ( for me ? )

install Power Recursor on Ubuntu 13.10

Here is how to install power recursor on Ubuntu 13.10.

[ install power recursor via apt-get ]

root@ubuntu-vm1:~# tail -1 /etc/lsb-release ;uname -ri
DISTRIB_DESCRIPTION="Ubuntu 13.10"
3.11.0-18-generic x86_64

root@ubuntu-vm1:~# apt-get install pdns-recursor

root@ubuntu-vm1:~# pdns_recursor --version
version: 3.3


root@ubuntu-vm1:~# /etc/init.d/pdns-recursor start

root@ubuntu-vm1:~# lsof -ni:53
COMMAND     PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
pdns_recu 13411 pdns    4u  IPv4  18737      0t0  UDP 127.0.0.1:domain
pdns_recu 13411 pdns    5u  IPv4  18738      0t0  TCP 127.0.0.1:domain (LISTEN)

configuration file
root@ubuntu-vm1:/etc/powerdns# pwd
/etc/powerdns

root@ubuntu-vm1:/etc/powerdns# ls
recursor.conf



root@ubuntu-vm1:~# dig @127.1 www.google.com +short
173.194.126.180
173.194.126.177
173.194.126.176
173.194.126.178
173.194.126.179



root@ubuntu-vm1:~# cat /etc/default/pdns-recursor
# Variables for PowerDNS recursor
#
# Set START to yes to start the pdns-recursor
START=yes





[ install latest version ( 3.5.3-1 ) ]

download latest power recursor deb package from https://www.powerdns.com/
# /etc/init.d/pdns-recursor stop
* Stopping PowerDNS recursor pdns-recursor                              [ OK ]

# dpkg -i pdns-recursor_3.5.3-1_amd64.deb

# pdns_recursor --version
version: 3.5.3

# /etc/init.d/pdns-recursor start
Starting PowerDNS recursing nameserver: Apr 01 02:06:38 PowerDNS recursor 3.5.3

# dpkg -l pdns-recursor
ii  pdns-recursor  3.5.3-1      amd64        extremely powerful and versatile

s# grep -v ^# /etc/powerdns/recursor.conf | grep -v ^$
local-address=127.0.0.1
local-port=53
quiet=yes
setgid=pdns
setuid=pdns

# dig @127.1 www.google.com +short
173.194.126.177
173.194.126.180
173.194.126.179
173.194.126.176
173.194.126.178

[ usage examples of rec_control ]

dump cache

root@ubuntu-vm1:~# rec_control dump-cache /tmp/cache.txt
dumped 112 records

get all stats
root@ubuntu-vm1:~# rec_control get-all
all-outqueries 11
answers-slow 0
answers0-1 0
answers1-10 0
answers10-100 1
answers100-1000 2
cache-bytes 10496
cache-entries 109
cache-hits 0
cache-misses 3
case-mismatches 0
chain-resends 0
client-parse-errors 0
concurrent-queries 0
dlg-only-drops 0
dont-outqueries 0
edns-ping-matches 0
edns-ping-mismatches 0
ipv6-outqueries 0
ipv6-questions 0
malloc-bytes 0
max-mthread-stack 13272
negcache-entries 0
no-packet-error 0
noedns-outqueries 11
noerror-answers 9
noping-outqueries 0
nsset-invalidations 0
nsspeeds-entries 65
nxdomain-answers 0
outgoing-timeouts 0
over-capacity-drops 0
packetcache-bytes 262
packetcache-entries 3
packetcache-hits 6
packetcache-misses 3
qa-latency 50
questions 9
resource-limits 0
server-parse-errors 0
servfail-answers 0
spoof-prevents 0
sys-msec 77
tcp-client-overflow 0
tcp-clients 0
tcp-outqueries 0
tcp-questions 0
throttle-entries 0
throttled-out 0
throttled-outqueries 0
unauthorized-tcp 0
unauthorized-udp 0
unexpected-packets 0
unreachables 0
uptime 528
user-msec 103

get specific stats
root@ubuntu-vm1:~# rec_control get cache-bytes cache-entries
10496
109

get specific configuration parameters
root@ubuntu-vm1:~# rec_control get-parameter setgid setgid local-port local-address
setgid="pdns"
setgid="pdns"
local-port="53"
local-address="127.0.0.1"

enable recursor.conf
remotes-ringbuffer-entries=100

root@ubuntu-vm1:~# service pdns-recursor restart

root@ubuntu-vm1:~# rec_control top-remotes
Over last 100 queries:
100.00% 127.0.0.1

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.