-
Installation
$ sudo pacman -Sy $ sudo pacman -S pdnsd
-
Configure pdnsd
$ sudo vi /etc/resolvconf.conf $ sudo vi /etc/pdnsd.conf $ sudo resolvconf -u
-
Start and enable on boot
$ sudo systemctl start pdnsd $ sudo systemctl enable pdnsd
Created
March 18, 2018 10:30
-
-
Save lsl/e2ab9b4aa2fb8b3f8073f5bfc452ed16 to your computer and use it in GitHub Desktop.
Local DNS cache with pdnsd. Uses DHCP configured DNS with fallback on Google DNS
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
global { | |
perm_cache=1024; | |
cache_dir="/var/cache/pdnsd"; | |
# pid_file = /var/run/pdnsd.pid; | |
run_as="pdnsd"; | |
server_ip = 127.0.0.1; # Use eth0 here if you want to allow other | |
# machines on your network to query pdnsd. | |
status_ctl = on; | |
# paranoid=on; # This option reduces the chance of cache poisoning | |
# but may make pdnsd less efficient, unfortunately. | |
query_method=udp_tcp; | |
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; | |
udpbufsize=1024; # Upper limit on the size of UDP messages. | |
} | |
server { | |
label=resolvconf; | |
file=/etc/pdnsd-resolv.conf; | |
proxy_only=on; | |
timeout=4; | |
uptest=if; | |
interface=wlp2s0; | |
interval=10; | |
purge_cache=off; | |
# edns_query=yes; | |
preset=off; | |
} |
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
# Configuration for resolvconf(8) | |
# See resolvconf.conf(5) for details | |
resolv_conf=/etc/resolv.conf | |
# If you run a local name server, you should uncomment the below line and | |
# configure your subscribers configuration files below. | |
name_servers=127.0.0.1 | |
name_servers_append=8.8.8.8 | |
pdnsd_resolv=/etc/pdnsd-resolv.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment