Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
GNUmakefile | H A D | 22-Jun-2015 | 163 | 5 | 2 | |
LICENSE | H A D | 21-Nov-2019 | 1.3 KiB | 24 | 21 | |
Makefile | H A D | 21-Nov-2019 | 3.3 KiB | 119 | 91 | |
README.md | H A D | 21-Nov-2019 | 2.5 KiB | 65 | 54 | |
config-null.mk | H A D | 22-Jun-2015 | 38 | 2 | 0 | |
configure | H A D | 21-Nov-2019 | 3.6 KiB | 168 | 136 | |
dnsmasq.in | H A D | 21-Nov-2019 | 5.7 KiB | 212 | 164 | |
libc.in | H A D | 21-Nov-2019 | 6.6 KiB | 253 | 193 | |
named.in | H A D | 21-Nov-2019 | 3.6 KiB | 119 | 75 | |
pdns_recursor.in | H A D | 21-Nov-2019 | 2.4 KiB | 76 | 40 | |
pdnsd.in | H A D | 21-Nov-2019 | 4.3 KiB | 166 | 117 | |
resolvconf.8.in | H A D | 04-Feb-2017 | 8.1 KiB | 324 | 323 | |
resolvconf.conf | H A D | 21-Nov-2019 | 255 | 8 | 1 | |
resolvconf.conf.5.in | H A D | 21-Nov-2019 | 11.7 KiB | 385 | 383 | |
resolvconf.in | H A D | 21-Nov-2019 | 21.5 KiB | 972 | 820 | |
unbound.in | H A D | 21-Nov-2019 | 2.9 KiB | 98 | 60 |
README.md
1# openresolv 2 3openresolv is a [resolvconf](https://en.wikipedia.org/wiki/Resolvconf) 4implementation which manages `/etc/resolv.conf`. 5 6`/etc/resolv.conf` is a file that holds the configuration for the local 7resolution of domain names. 8Normally this file is either static or maintained by a local daemon, 9normally a DHCP daemon. But what happens if more than one thing wants to 10control the file? 11Say you have wired and wireless interfaces to different subnets and run a VPN 12or two on top of that, how do you say which one controls the file? 13It's also not as easy as just adding and removing the nameservers each client 14knows about as different clients could add the same nameservers. 15 16Enter resolvconf, the middleman between the network configuration services and 17`/etc/resolv.conf`. 18resolvconf itself is just a script that stores, removes and lists a full 19`resolv.conf` generated for the interface. It then calls all the helper scripts 20it knows about so it can configure the real `/etc/resolv.conf` and optionally 21any local nameservers other than libc. 22 23## Reasons for using openresolv 24 25Why openresolv over the 26[Debian implementation](http://qref.sourceforge.net/Debian/reference/ch-gateway.en.html#s-dns-resolvconf)? 27Here's some reasons: 28 * Works with 29 [POSIX shell and userland](http://www.opengroup.org/onlinepubs/009695399) 30 * Does not need awk, grep or sed which means we can work without `/usr` 31 mounted 32 * Works with other init systems than Debians' out of the box 33 * Available as a 2 clause 34 [BSD license](http://www.freebsd.org/copyright/freebsd-license.html) 35 * Prefer configs via IF_METRIC for dynamic ordering 36 * Configures zones for local resolvers other than libc 37 38The last point is quite important, especially when running VPN systems. 39Take the following resolv.conf files which have been generated by a 40[DHCP client](../dhcpcd) and sent to resolvconf: 41 42``` 43# resolv.conf from bge0 44search foo.com 45nameserver 1.2.3.4 46 47# resolv.conf from tap0 48domain bar.org 49nameserver 5.6.7.8 50``` 51 52In this instance, queries for foo.com will go to 1.2.3.4 and queries for 53bar.org will go to 5.6.7.8. 54This does require the resolvers to be configured to pickup the resolvconf 55generated configuration for them though. 56openresolv ships with helpers for: 57 * [unbound](http://www.unbound.net/) 58 * [dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html) 59 * [ISC BIND](http://www.isc.org/software/bind) 60 * [PowerDNS Recursor](http://wiki.powerdns.com/trac) 61 62See the 63[configuration section](https://roy.marples.name/projects/openresolv/config) 64for more details. 65