This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
irc:openbsd:unbound [2019/11/15 02:49] jrmu created |
irc:openbsd:unbound [2019/11/21 14:51] jrmu removed |
||
---|---|---|---|
Line 34: | Line 34: | ||
The forward-addr lines indicate which nameserver unbound will query. You can find a list of public servers on [[https://servers.opennic.org/|OpenNIC]]. | The forward-addr lines indicate which nameserver unbound will query. You can find a list of public servers on [[https://servers.opennic.org/|OpenNIC]]. | ||
+ | To start unbound: | ||
+ | <code> | ||
+ | $ doas rcctl enable unbound | ||
+ | $ doas rcctl start unbound | ||
+ | </code> | ||
+ | |||
+ | For the computer that runs unbound, you'll want to make sure /etc/resolv.conf uses 127.0.0.1 as the nameserver (that is, you query unbound running on port 53). In /etc/resolv.conf: | ||
+ | |||
+ | <code> | ||
+ | nameserver 127.0.0.1 | ||
+ | lookup file bind | ||
+ | </code> | ||
+ | |||
+ | Check to make sure /etc/resolv.conf.tail does not contain any other name servers except 127.0.0.1. All your nameservers should instead be specified in /var/unbound/etc/unbound.conf. | ||
+ | |||
+ | If the computer running unbound uses DHCP for network configuration, you will want to include this line in /etc/dhclient.conf: | ||
+ | |||
+ | <code> | ||
+ | ignore domain-name-servers; | ||
+ | </code> | ||
+ | |||
+ | This tells OpenBSD's dhclient to ignore the name server provided by the dhcp server. | ||
+ | |||
+ | If the computer running unbound is also providing a dhcp server for your local network, you will want to add this line inside your /etc/dhcpd.conf blocks: | ||
+ | |||
+ | <code> | ||
+ | option domain-name-servers 192.168.1.1; | ||
+ | </code> |