Unbound from scratch

Requirements

Libevent useful for 1000+ outgoing ports.

Slackware

slackpkg search libevent
ls -lF /var/log/packages/libevent*

Debian/Ubuntu

apt install libevent-dev
# libexpat1-dev

and make sure you do NOT have those installed or enabled

dpkg -l | grep dnsmasq
dpkg -l | grep resolvconf
systemctl status systemd-resolved
dpkg -l | grep network-manager

also clean-up the package in case you had it

systemctl stop unbound
apt purge unbound
ls -lF /var/lib/unbound/root.key
ls -lF /etc/unbound/unbound.conf
ls -alF /etc/unbound/unbound.conf.d/

Build

Build the latest version

ver=1.13.1
wget https://nlnetlabs.nl/downloads/unbound/unbound-$ver.tar.gz
sha1sum unbound-$ver.tar.gz
# 9932931d495248b4e45d278b4679efae29238772  unbound-1.10.1.tar.gz
# 561522b06943f6d1c33bd78132db1f7020fc4fd1  unbound-1.13.1.tar.gz
tar xzf unbound-$ver.tar.gz
cd unbound-$ver/
./configure --help | less

# slackware
./configure --with-libevent --sysconfdir=/etc --localstatedir=/var --disable-systemd

# ubuntu
./configure --with-libevent --sysconfdir=/etc --localstatedir=/var
echo $MAKEFLAGS
make > ../unbound.log && echo BUILT
make install
ldconfig

Create a system user for Unbound to drop its priviledges

groupadd -g 499 unbound
useradd --system -M -d /var/chroot/unbound -s /sbin/nologin -g unbound -u 499 unbound

grep unbound /etc/passwd
grep unbound /etc/group

Resources

build

Unbound-1.9.1 http://www.linuxfromscratch.org/blfs/view/svn/server/unbound.html


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5
Copyright © 2022 Pierre-Philipp Braun