Technitium DNS Server on OPNsense

Started by piepre, March 14, 2025, 08:23:30 AM

Previous topic - Next topic
Hello,
I am in the process of migrating to OPNsense. Since I am already running a Technitium DNS server (https://technitium.com/dns/) in a Docker container, I wondered if I could simply run a secondary DNS on the OPNsense. It worked directly with bind (+unbound), but I was not satisfied because I was missing the filters for ADS.
There is a repository for ADGuard, but I switched to Technitium DNS Server about a year ago because I wanted full zone management. I had no previous experience with OPNsense/FreeBSD as I only use Debian Linux. However, the documentation made it relatively easy to install the Technitium DNS Server. Below are the necessary steps (I did it on a virtual opnsense test/dev machine):

- build port dotnet8
cd /usr/ports/
mkdir packages
opnsense-code tools src ports
cd lang/dotnet8
make package
... wait ...
- install dotnet8 and run technitium dns server
make install
cd
fetch https://download.technitium.com/dns/DnsServerPortable.tar.gz
zfs create zroot/opt
zfs set mountpoint=/opt zroot/opt
tar -zxf DnsServerPortable.tar.gz -C /opt/technitium/dns/
cd /opt/technitium/dns
./start.sh
- build packages
cd /usr/ports/lang/dotnet8
pkg create -a -o /usr/ports/packages/
- TODO: create a pkg repository
- for now I copied the following pkg-files to my productive OPNsense via scp and manually installed the with pkg install <package>
compat13x-amd64-13.2.1302001.20231227.pkg
dotnet-host-9.0.2.pkg
dotnet8-8.0.6_3.pkg
node22-22.14.0.pkg
terminfo-db-20231209.pkg
- autostart dns server; create file /usr/local/etc/rc.syshook.d/start/90-dns
#!/bin/sh
/opt/technitium/dns/start.sh > /dev/null 2>&1 &

Welcome to the forum and thanks for the post. :)

Hi,

Im a bit slow, how did you get dot net installed on opnsense?

Quite easy if you follow the directions

it states:
-build port dotnet8
cd /usr/ports/
mkdir packages
opnsense-code tools src ports
cd lang/dotnet8
make package

Ok, my opnsense box does not have a /usr/ports folder

Quote from: cbothma on April 25, 2025, 01:41:45 PMOk, my opnsense box does not have a /usr/ports folder

mkdir /usr/ports
# or
zfs create zroot/usr/ports
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)