Last active
July 24, 2022 21:58
-
-
Save TuranTimur/4e021785c0e9f309f336735e66fb9d94 to your computer and use it in GitHub Desktop.
dnsmasq with powerdns in a single node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/pdns/pdns.conf | |
setuid=pdns | |
setgid=pdns | |
launch=gmysql | |
gmysql-host=localhost | |
gmysql-user=myid | |
gmysql-password=mypass | |
gmysql-dbname=powerdns | |
local-port=50 | |
# /etc/dnsmasq.conf | |
... | |
server=/example.com/127.0.0.1#50 | |
# ss -lntup | grep dns | |
udp UNCONN 0 0 *:50 *:* users:(("pdns_server",pid=43964,fd=5)) | |
udp UNCONN 0 0 *:53 *:* users:(("dnsmasq",pid=44158,fd=6)) | |
udp UNCONN 0 0 *:67 *:* users:(("dnsmasq",pid=44158,fd=4)) | |
udp UNCONN 0 0 :::53 :::* users:(("dnsmasq",pid=44158,fd=8)) | |
tcp LISTEN 0 128 *:50 *:* users:(("pdns_server",pid=43964,fd=6)) | |
tcp LISTEN 0 5 *:53 *:* users:(("dnsmasq",pid=44158,fd=7)) | |
tcp LISTEN 0 5 :::53 :::* users:(("dnsmasq",pid=44158,fd=9)) | |
# dig www.example.com | |
; <<>> DiG 9.9.5-3ubuntu0.13-Ubuntu <<>> www.example.com | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 35450 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 | |
;; OPT PSEUDOSECTION: | |
; EDNS: version: 0, flags:; udp: 1680 | |
;; QUESTION SECTION: | |
;www.example.com. IN A | |
;; Query time: 18 msec | |
;; SERVER: 2.0.0.10#53(2.0.0.10) | |
;; WHEN: Wed May 10 16:20:14 UTC 2017 | |
;; MSG SIZE rcvd: 44 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment