OPNsense Forum

English Forums => Tutorials and FAQs => Topic started by: piepre on March 14, 2025, 08:23:30 AM

Title: Technitium DNS Server on OPNsense
Post by: piepre on March 14, 2025, 08:23:30 AM
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 &
Title: Re: Technitium DNS Server on OPNsense
Post by: lilsense on March 14, 2025, 12:24:49 PM
Welcome to the forum and thanks for the post. :)
Title: Re: Technitium DNS Server on OPNsense
Post by: cbothma on April 23, 2025, 11:18:27 AM
Hi,

Im a bit slow, how did you get dot net installed on opnsense?
Title: Re: Technitium DNS Server on OPNsense
Post by: lilsense on April 24, 2025, 12:14:02 AM
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
Title: Re: Technitium DNS Server on OPNsense
Post by: cbothma on April 25, 2025, 01:41:45 PM
Ok, my opnsense box does not have a /usr/ports folder
Title: Re: Technitium DNS Server on OPNsense
Post by: Patrick M. Hausen on April 25, 2025, 01:46:51 PM
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
Title: Re: Technitium DNS Server on OPNsense
Post by: cbothma on April 25, 2025, 02:11:01 PM
got it sorted thanx
Title: Re: Technitium DNS Server on OPNsense
Post by: cbothma on April 28, 2025, 09:08:28 AM
Finally got it up and running, i have a question, does anyone know how i would get it's DHCP working? I would rather have technitium do the dhcp all in one app ontop of my firewall?
Title: Re: Technitium DNS Server on OPNsense
Post by: NeoDragon on July 01, 2025, 02:57:24 AM
Fair warning ⚠️

Make package is a long process. 5 hours in with a C3758 and still running.
Title: Re: Technitium DNS Server on OPNsense
Post by: NeoDragon on July 02, 2025, 02:32:02 AM
So, i managed to install technitium with this guide, with a few hiccups.
The start job is not working, i need to start it manually.

I can't figure out how to make DHCP work with this too.. anyone?
Title: Re: Technitium DNS Server on OPNsense
Post by: tango38317 on July 17, 2025, 07:44:47 PM
Hi,
I installed dotnet packages downloaded from FreeBSD.pkgs.org.
Seems to Work, i'm able to start technitium, but Not able to Open Management port. Maybe an Idea whats the issue?
Verified Binding with netstat -an and technitium seems to run and bound on all Interfaces.

tried it also with compiled packages - same issue.

EDIT:Technitium is running, i´m able to connect to dns server (nslookup).
so only webinterface is not reachable.
only thing i found: dotnet for 5380 is bound to tcp46.

root     dotnet     34826 304 tcp46  *:5380                *:*
root     dotnet     34826 305 udp4   *:53                  *:*
root     dotnet     34826 306 tcp4   *:53                  *:*
root     dotnet     34826 307 udp6   *:53                  *:*
root     dotnet     34826 308 tcp6   *:53                  *:*


Thx
Chris
Title: Re: Technitium DNS Server on OPNsense
Post by: tango38317 on July 20, 2025, 05:52:34 PM
Quote from: tango38317 on July 17, 2025, 07:44:47 PMHi,
I installed dotnet packages downloaded from FreeBSD.pkgs.org.
Seems to Work, i'm able to start technitium, but Not able to Open Management port. Maybe an Idea whats the issue?
Verified Binding with netstat -an and technitium seems to run and bound on all Interfaces.

tried it also with compiled packages - same issue.

EDIT:Technitium is running, i´m able to connect to dns server (nslookup).
so only webinterface is not reachable.
only thing i found: dotnet for 5380 is bound to tcp46.

root     dotnet     34826 304 tcp46  *:5380                *:*
root     dotnet     34826 305 udp4   *:53                  *:*
root     dotnet     34826 306 tcp4   *:53                  *:*
root     dotnet     34826 307 udp6   *:53                  *:*
root     dotnet     34826 308 tcp6   *:53                  *:*


Thx
Chris

found my issue on testinstance of opnsense:
did not run the wizard. after running wizard, and deploying a static ip i was able to configure Technitium.
I was also not able to get the DHCP Server up and running.


br
Chris
Title: Re: Technitium DNS Server on OPNsense
Post by: piepre on August 06, 2025, 09:42:07 AM
Quote from: NeoDragon on July 02, 2025, 02:32:02 AMSo, i managed to install technitium with this guide, with a few hiccups.
The start job is not working, i need to start it manually.

I can't figure out how to make DHCP work with this too.. anyone?
I changed my start job to:
#!/bin/sh
cd /opt/technitium/dns/
./start.sh > /dev/null 2>&1 &
I do not use the technitium dhcp, but I'll test it in the next days...
Title: Re: Technitium DNS Server on OPNsense
Post by: chrisgtl on November 10, 2025, 12:26:51 PM
Is this guide still valid with the latest OPNsense build? I've been testing Technitium out on my unRAID server as a docker, and I must say - I am impressed.

I want to run this on my metal OPNsense box, but following the guide I am unable to progress further than the first steps due to:

lang/dotnet8 does not exist.
Title: Re: Technitium DNS Server on OPNsense
Post by: lilsense on November 13, 2025, 04:50:18 AM
Ah... You forgot to read... No worries! Please re read the thread all the way to this post. :)
Title: Re: Technitium DNS Server on OPNsense
Post by: gehoernchen on April 03, 2026, 05:04:36 PM
Hi, while this probably still works somehow (though the newest Technitium version requires .NET 9), I was able to make this work a bit easier, as there are official dotnet packages of FreeBSD in the official repositories. The OPNsense repositories do not provide it.

As such, using a separate OPNsense / FreeBSD 14 machine, I was able to fetch dotnet 9 and its required packages with this somewhat:
# Enable FreeBSD repositories
# In /usr/local/etc/pkg/repos/FreeBSD.conf, set this (vi/vim/nano):
# FreeBSD: { enabled: true }

# Search for the newest/desired dotnet version
pkg update
pkg search dotnet
# Use its output, I got dotnet-9.0.10

# Fetch dotnet and its dependencies to a local path
mkdir /tmp/dotnet
pkg fetch -d -o /tmp/dotnet dotnet-9.0.10

--
From there on, transfer over the pkg files to your actual OPNsense host (I did that with scp) and do pkg install on them. On my box, all dependencies were already installed in the same version as I got on my test VM.

You could also just enable FreeBSD repos on your actual OPNsense box outright and install dotnet-9 over there, but I felt that was a bit too risky for my taste. As such, I installed dotnet-9 on my test VM first and made sure Technitium actually ran.

This will probably cause some problems later down the line, as we will probably need to watch the dotnet package once Technitium migrates to dotnet10 or OPNsense goes to FreeBSD 15. Works for the moment, though, with Technitium 14.3
Title: Re: Technitium DNS Server on OPNsense
Post by: nero355 on April 03, 2026, 10:12:03 PM
Quote from: gehoernchen on April 03, 2026, 05:04:36 PMTechnitium requires .NET
My #1 reason not to use it :)

There are enough alternatives for both FreeBSD and Linux that do their job just fine!
Title: Re: Technitium DNS Server on OPNsense
Post by: piepre on May 03, 2026, 12:47:25 AM
it is also possible to use the freebsd dotnet release:
zfs create zroot/opt
zfs set mountpoint=/opt zroot/opt
cd /tmp
fetch https://github.com/sec/dotnet-core-freebsd-source-build/releases/download/10.0.103-vmr/dotnet-sdk-10.0.103-freebsd.14-x64.tar.gz
tar -zxf dotnet-sdk-10.0.103-freebsd.14-x64.tar.gz -C /opt/dotnet/
ln -s /opt/dotnet/dotnet /usr/local/bin/dotnet
fetch https://download.technitium.com/dns/DnsServerPortable.tar.gz
tar -zxf DnsServerPortable.tar.gz -C /opt/technitium/dns/
cd /opt/technitium/dns
./start.sh &
Title: Re: Technitium DNS Server on OPNsense
Post by: jaykumar2005 on May 14, 2026, 09:17:55 AM
Will the Technitium installation survive a OPNsense major upgrade?