Sign inSign up

riepel/stanford-dns-cache

By riepel

•Updated over 2 years ago

A caching name server for use on Stanford networks.

Image
0

596

riepel/stanford-dns-cache repository overview

⁠Stanford Caching Name Server built on Ubuntu with ISC BIND

This is a complete BIND caching name server for use on Stanford networks. It will only answer queries from Stanford networks. It is configured to use the Stanford anycast DNS service as forwarders, which gives it access to Stanford local names and RFC 1918 reverse DNS zones. It supports both IPv4 and IPv6.

⁠Running the caching server
docker run --name cache --rm --publish 53:53/tcp --publish 53:53/udp -d riepel/stanford-dns-cache
⁠Confirming it's working

Use your favorite DNS query tool to look up a name to ensure the caching server is working correctly. Here's an example using dig(1):

% dig @localhost docker.com 

; <<>> DiG 9.11.4 <<>> @localhost docker.com
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26062
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 53f3442ff0c862f9529d7da85b68e2c298b36ee5ff30a9b8 (good)
;; QUESTION SECTION:
;docker.com.			IN	A

;; ANSWER SECTION:
docker.com.		53	IN	A	34.232.188.57
docker.com.		53	IN	A	52.1.154.128
docker.com.		53	IN	A	54.209.102.157

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Aug 06 17:07:30 PDT 2018
;; MSG SIZE  rcvd: 115
⁠Using the caching server

DNS queries can be sent to localhost (as shown above) or to any IP address on the host that docker is configured to use. That means the caching server can be used a local DNS cache or a shared DNS cache for any set of DNS clients on the Stanford network.

For a shared DNS cache service, UIT recommends creating two stanford-dns-cache containers on different docker hosts and using their IP addresses as the first and second nameserver entries in /etc/resolv.conf, followed by one of the Stanford anycast DNS service IP addresses.

⁠share and enjoy

Tag summary

Content type

Image

Digest

sha256:9b680b052…

Size

109.5 MB

Last updated

over 2 years ago

docker pull riepel/stanford-dns-cache