DeNIC Ausfall
Auch mich hat der DeNIC-Ausfall am Mittwoch ziemlich geschickt
Bleibt nur zu hoffen, dass die Provider ihre DNS-Caches flushen ^^
Auch mich hat der DeNIC-Ausfall am Mittwoch ziemlich geschickt
Bleibt nur zu hoffen, dass die Provider ihre DNS-Caches flushen ^^
(I write this in English because I was asked to do so by some people on the Arch forums. Anyway, I think this should be no problem as if you hack on configs you normally understand enough to get this done as well.)
I’ve been using pdnsd for DNS caching for quite a while now and I can feel the speed up while browsing the web (at least I can go on believing so
) or checking for updates in the AUR.
The problem with pdnsd in conjunction with mobile devices (like the netbook I’m typing this on) is that in the basic setup, it only uses static DNS servers, described in /etc/pdnsd.conf. So if you happen to get behind some firewall that doesn’t permit DNS queries to other nameservers than the ones advertised by DHCP, you have to change your setup manually – and switch back when you’re out.
It would be great if pdnsd took the DNS your machine got from DHCP and use it as primary source for cache-misses. This also uses the eventually existing DNS infrastructure and local caches, instead of bypassing them. Here’s how I implemented that, using pdnsd and dhcpcd:
/etc/resolv.conf.head. Create a primary DNS source entry, mine looks like this:
server { label="maindns"; ip=8.8.8.8, 8.8.8.4; # I use Google dns as fallback proxy_only=on; # Do not query any other name servers timeout=4; # Server timeout uptest=none; # No uptest purge_cache=off; # Keep stale cache entries in case the ISP's # DNS servers go offline. }
/etc/resolv.conf, the only nameserver should be your local machine:
# /etc/resolv.conf nameserver 127.0.0.1
/etc/dhcpcd.conf, disable the resolv.conf-hook to prevent dhcpcd from changing the resolving scheme:
[...] nohook resolv.conf
/usr/lib/dhcpcd/dhcpcd-hooks, we create a hook script (e.g. 21-pdnsd.conf) that uses pdnsd-ctl to override the nameserver IPs defined in /etc/pdnsd.conf with the ones received by DHCP:
# Set the IP of "maindns" entry for pdnsd case "$reason" in BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT|STATIC) SRVS="" for X in $new_domain_name_servers; do if [ -z "$SRVS" ]; then SRVS="$X" else SRVS="${SRVS},$X" fi done pdnsd-ctl server 0 up $SRVS ;; PREINIT|EXPIRE|FAIL|IPV4LL|NAK|NOCARRIER|RELEASE|STOP) # reset to values in /etc/pdnsd.conf pdnsd-ctl config ;; esac
That’s it, no big deal ![]()
If you find any problems or disadvantages with this setup, feel free to post them in the comments!
based on theme by WordPress Themes