Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Sunday, February 19, 2023

Configuring DNS-over-QUIC and HTTPS/3 For Technitium DNS Server

Updated: 19 Apr 2024

Technitium DNS Server is a cross-platform, free, open source software that is easy to deploy and use yet pack powerful features. Starting with the version 11.0 release, the DNS server now supports DNS-over-QUIC encrypted DNS protocol in addition to existing DNS-over-TLS and DNS-over-HTTPS encrypted DNS protocols. With this update, you will be able to use DNS-over-QUIC protocol with a forwarder or connditional forwarder, or host your own DNS-over-QUIC service.

The DNS server has also added support for HTTP/3 for both its web console and DNS-over-HTTPS service. Since HTTP/3 also uses QUIC tranport protocol, the requirements and configuration mentioned in this post also applies to it.

Let's see how to configure the DNS server to use the new QUIC transport protocol.

Requirements

The DNS-over-QUIC protocol uses a very new QUIC transport protocol which is not yet available on all platforms. Currently it is available only on Windows and Linux platforms. The .NET Runtime relies on the msquic library which is an implementation of QUIC protocol by Microsoft.

For Windows

The support for QUIC on Windows is only available on following Windows versions:

  • Windows 11 (build 22000 or later)
  • Windows Server 2022

The above supported Windows version have msquic already installed and thus there is no additional installation needed. There is no option yet to use the QUIC protocol on Windows 10 or older versions. However, it is possible to use it on Windows 10 by using docker container deployments.

For Linux

On Linux, you need to install libmsquic to enable QUIC protocol support. You can install it using Microsoft Software Repository for Linux. You can follow the instructions given in the link to add the software repository on your distro as shown in examples below:

  • Ubuntu
    source /etc/os-release
    wget https://packages.microsoft.com/config/$ID/$VERSION_ID/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
    sudo dpkg -i packages-microsoft-prod.deb
    rm packages-microsoft-prod.deb
    sudo apt update
    
  • Debian / Raspberry Pi OS
    wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
    sudo dpkg -i packages-microsoft-prod.deb
    rm packages-microsoft-prod.deb
    sudo apt update
    

Once you have the Microsoft Software Repository installed on your distro, you can proceed to install libmsquic library as shown below:

sudo apt install libmsquic -y

Now restart the DNS server so that it loads the newly installed libmsquic library. Once the DNS server is available, you can use the DNS-over-QUIC protocol with forwarder or conditional forwarder configuration, or with the DNS Client tab in the DNS server web console. If you wish to run your own DNS-over-QUIC service, you can enable it from the Settings > Optional Protocols section similar to how you would enable the other encrypted DNS protocols.

If you have enabled HTTPS and HTTP/3 options, and configured a TLS certificate for the DNS web console, the web service will enable HTTP/3 support which will be available on UDP port 443.

If you have any comments or queries, do let me know in the comments section below or send an email to support@technitium.com.

Saturday, October 10, 2020

How To Host Your Own DNS-over-HTTPS, DNS-over-TLS, And DNS-over-QUIC Services

Updated: 15 Jun 2025

With Technitium DNS Server, you can not just consume DNS-over-HTTPS (DoH), DNS-over-TLS (DoT), or DNS-over-QUIC (DoQ) services using forwarders but you can also host these services yourself. There can be several reasons to host your own DoH, DoT, or DoQ service. You may wish to have better privacy by not sharing your data with public DNS providers. Or your network or ISP blocks popular DoQ, DoT, and DoH services and also interferes with unencrypted DNS traffic.

In this post, we will setup DoQ, DoT, and DoH services on a cloud server and configure a locally running Technitium DNS Server to use the DoH service as a forwarder bypassing any network restrictions that may be in place.

Home Network

In the above home network diagram, the locally running Technitium DNS Server is installed on a desktop PC or a Raspberry Pi that is connected to your WiFi router. The Cloud Linux server will host the DoH service which will be configured as a forwarder in the locally running DNS server on your network.

Once the configuration is complete, all DNS traffic will be encrypted between your locally running DNS server and the DoH server running on the cloud server. This effectively means that all your local DNS traffic will exit from the cloud server and thus wont be visible to your network provider or your ISP.

Requirements

You need a domain name which you can get from any domain name registrar like Name.com (referral link). If you already own a domain name then you can use a sub domain on it for hosting these services. A domain name is required since both these services run over TLS protocol which uses SSL/TLS certificate to work. A domain name will usually cost around $13/yr which depends on the extension. You can check for the pricing here.

You need a Linux server which you can get from any cloud hosting provider like Digital Ocean (referral link). You can get a server for as low as $5/mo with 1GB RAM. I would recommend to create a server with Ubuntu Server as the OS since this blog post will be using the same.

Installation

We will be using Ubuntu server in this blog post but you can choose any distro of your choice and follow similar instructions.

You can install Technitium DNS Server using the single line installation command as shown:

curl -sSL https://download.technitium.com/dns/install.sh | sudo bash

If the above command fails since you do not have curl installed, install it as shown below and try the above command again:

sudo apt update
sudo apt install curl

You can also manually install the DNS server by following the install instructions.

We will be using Let's Encrypt TLS certificate and will be using certbot which does automatic certificate renewal for Let's Encrypt. Run the commands below to install certbot:

sudo apt update
sudo apt install certbot

Configuration

To proceed with the DNS configuration, login to the DNS server web console using the server's IP address and port 5380. For example, if your server's IP address is '1.2.3.4' open http://1.2.3.4:5380/ in your web browser. Chrome, Firefox and Edge web browsers are supported well.

The first configuration to be done is to enable Optional DNS Server Protocol DNS-over-HTTP in the DNS server Settings as shown below. Save the settings by clicking Save Settings button at the bottom. This will start the DoH service on port 80 to allow renewing the TLS certificate with HTTP challenge.

Optional DNS Server Protocols
Optional DNS Server Protocols

Since, the DNS server requires the certificate in PKCS #12 (.pfx) format, we need to convert the issued certificate using the openssl command. To do that, we will create a small script file at /etc/letsencrypt/renewal-hooks/post/pkcs12convert.sh using nano editor.

sudo mkdir -p /etc/letsencrypt/renewal-hooks/post/
sudo nano /etc/letsencrypt/renewal-hooks/post/pkcs12convert.sh

Copy the commands as show below in the nano editor. Here, replace 'example.com' with your domain name and 'mypassword' with a password of your choice or keep it blank to generate the pfx file with no password.

#!/bin/sh
openssl pkcs12 -export -out /etc/letsencrypt/live/example.com/example.com.pfx -inkey /etc/letsencrypt/live/example.com/privkey.pem -in /etc/letsencrypt/live/example.com/cert.pem -certfile /etc/letsencrypt/live/example.com/chain.pem -passout pass:mypassword
echo "pkcs#12 generated!"

Save the script by exiting the editor using CTRL+X keys. We need to make this script excutable by using the following command:

sudo chmod +x /etc/letsencrypt/renewal-hooks/post/pkcs12convert.sh

This pkcs12convert.sh script will be automatically executed by certbot after renewing the certificate.

Now, we can run certbot command with the webroot plugin to issue the TLS certificate as shown below:

sudo certbot certonly --agree-tos --email admin@example.com --webroot -w /opt/technitium/dns/dohwww -d dns.example.com

Note: Here, replace 'example.com' with your domain name. In this example, we have used 'dns.example.com' in which the sub domain 'dns' gives a good idea that you may be running a DoH service. You may wish to avoid this by not using sub domain names like dns, doh or dot and instead use something which is very common like "mail", or "blog", etc. This will make it difficult for someone on your network to identify if you are using a DoH service by looking at the domain name.

Once the certbot command succeeds, you will see the path of the certificate that was generated in the output which should be in the /etc/letsencrypt/live/<your-domain>/ directory.

Below is the output that you should see if the certbot command succeeds.

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: N
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for dns.example.com
Using the webroot path /opt/technitium/dns/dohwww for all unmatched domains.
Waiting for verification...
Cleaning up challenges

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/dns.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/dns.example.com/privkey.pem
   Your cert will expire on 2021-01-08. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot
   again. To non-interactively renew *all* of your certificates, run
   "certbot renew"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

Since the certificate has been issued for the first time, we need to manually executed our pkcs12convert.sh script once to generate the pfx certificate.

sudo /etc/letsencrypt/renewal-hooks/post/pkcs12convert.sh

We can now configure the DNS server with the pfx certificate file path and enable the DNS-over-TLS, DNS-over-HTTPS, and DNS-over-QUIC protocols (as per your requirements) in the settings as shown below:

Optional DNS Server Protocols With TLS Certificate
Optional DNS Server Protocols With TLS Certificate

Type in the same password that you had used while generating the pkcs12 certificate for the TLS Certificate Password option.

Save the settings by clicking the Save Settings button at the bottom so that the DNS server can start the DoQ, DoT, and DoH services using the newly configured TLS certificate. You may want to check the DNS Server logs from the web console to find out if there were any errors while starting these services.

Testing The Service

For DoQ and DoT service, you need to use the domain name that was used to generate the certificate with port 853. Thus your DoQ or DoT configuration for clients will be tls-certificate-domain:853.

For DoH service, you need to use the domain name that was used to generate the certificate in a URL format. Thus you DoH configuration for clients will be https://tls-certificate-domain/dns-query.

You can test the DoH, DoT, and DoQ services using the DNS Client tool. Put in the DoQ/DoT address tls-certificate-domain:853 or the DoH url https://tls-certificate-domain/dns-query as the Server in the DNS Client, type in a domain name, select an appropriate protocol either QUIC, TLS, or HTTPS and click Resolve to test both the services.

Note: By default, the "Allow Recursion Only For Private Networks" recursive resolver option (as shown below) in the DNS server settings is enabled and thus the DNS server will refuse to respond with an answer (RCODE=Refused) when you test it with the DNS Client. You will need to enable the "Allow Recursion" option to be able to use these services from the public Internet.

Recursive Resolver Options
Recursive Resolver Options

Once the tests are successful, you can configure your locally running Technitium DNS Server to use these services as a forwarder. Once you have configured the service as a forwarder your local DNS traffic will bypassing all your network or ISP restrictions.

Technitium DNS Server Forwarder Configuration
Technitium DNS Server Forwarder Configuration

You can also configure your Firefox web browser directly with the custom DoH URL. This will work only for Firefox and all other applications on your computer will keep using the default DNS server configured in your network settings.

To configure Firefox with custom DoH, go to Options > General and scroll down to find Network Settings. Click on the Settings button and find the DoH option at the bottom as shown below:

Firefox Custom DoH Option
Firefox Custom DoH Option

Auto Renewing TLS Certificate

Since, the certificate obtained from Let's Encrypt expires in 90 days, certbot automatically configures a cron job that renews the certificates before they expire. Since we have already configured the pkcs12convert.sh script file earlier, it will get automatically executed by certbot when the certificate is renewed. The Technitium DNS Server will automatically reload the renewed certificate when it detects any changes for the pfx file by looking at its date modified attribute.

To test the certbot renewal process, we can try the dry run command. If there are no errors reported then it means the renewal was successful.

sudo certbot renew --dry-run

Running DoH With Another Web Server

You may have a requirement to run both the DNS server with DoH service and another web server for hosting websites. In such cases since both the DoH service and the web server would require to use ports 80 and 443, it would create a conflict.

A solution in such a scenario is to use the web server as a reverse proxy to the DoH service. You will need to configure the web server with TLS certificate and virtual hosting to reverse proxy to http://127.0.0.1:8053/dns-query and enable only the DNS-over-HTTP optional DNS server protocol with its port set to 8053 as shown below:

Optional DNS Server Protocols With TLS Certificate
Optional DNS Server Protocols With TLS Certificate

You also need to configure the Reverse Proxy Network ACL option below by adding the IP address of your reverse proxy server so that it is allowed to access the DNS-over-HTTP unencrypted service.

With this setup, your web server will terminate TLS and do reverse proxy allowing the DoH service through it. If your web server supports TLS termination for TCP streams then you can point it to 127.0.0.1:53 and also provide DoT service through it.

If you are using nginx as your web server, you can use the snippet below to configure a reverse proxy for the DoH service. For more details, you can refer to the blog post on using nginx as a DoT or DoH gateway.

server {
    listen 80;
    server_name dns.example.com;

    return 301 https://$http_host$request_uri;
}

server {
    listen 443 ssl http2;
    server_name dns.example.com;

    ssl_certificate /etc/letsencrypt/live/dns.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/dns.example.com/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/dns.example.com/chain.pem;

    access_log /var/log/nginx/dns.example.com-access.log;
    error_log /var/log/nginx/dns.example.com-error.log;

    location / {
        proxy_pass http://127.0.0.1:8053/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Host $http_host;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Nginx-Proxy true;

        proxy_redirect off;
    }
}

Conclusion

Using Technitium DNS Server combined with certbot, you can setup DoH, DoT, and DoQ services with automatic TLS certificate renewal and bypass any network restriction on DNS traffic. If you already have a web server like nginx running, you can use it for TLS termination and provide DoH, DoT, and DoQ services on the same server.

If you have any queries do let me know in the comments below or send an email to support@technitium.com.

Friday, November 17, 2017

Running Technitium DNS Server on Ubuntu Linux

Updated: 10 Jul 2025

Technitium DNS Server is build to be cross platform using the .NET. You can run the DNS Server Portable App on Windows, Linux, or macOS by using ASP.NET Core 8 Runtime. Raspberry Pi with an arm7 CPU is supported and thus both Raspberry Pi 1 and Raspberry Pi Zero which have arm6 CPU are not supported.

This post is written for Ubuntu Linux but, you can easily follow similar steps on your favorite distro.

This blog post is updated regularly to provide latest instructions to install the DNS Server. So, refer it when you are about to do a fresh installation.

Using Automated Installer / Updater

Automated installer script can be used to install or update the DNS Server. The automated installer script has been tested on following distros:

  • Ubuntu Server (x64)
  • Ubuntu Desktop (x64)
  • Raspbian (Buster) (ARM32)
  • CentOS 8.2 (2004) (x64)
  • Fedora Server 32 (x64)
The installer script may work on other distros and platforms as well.

curl -sSL https://download.technitium.com/dns/install.sh | sudo bash

NOTE! If you have a firewall installed, you will need to allow these ports manually:

  • 5380/tcp (for web console access)
  • 53443/tcp (for web console HTTPS access)
  • 53/udp (default DNS service)
  • 53/tcp (default DNS service)
  • 853/udp (DNS-over-QUIC service)
  • 853/tcp (DNS-over-TLS service)
  • 443/udp (DNS-over-HTTPS service over HTTP/3)
  • 443/tcp (DNS-over-HTTPS service over HTTP/1.1 and HTTP/2)
  • 80/tcp (DNS-over-HTTP service for reverse proxy or certificate renewal HTTP challenge)
  • 67/udp (if you plan to use the built-in DHCP server)

Using Automated Uninstaller

Automated uninstaller script can be used to remove the DNS Server that was installed using the above automated installer script. The uninstaller script will remove both the DNS Server and .NET runtime.

curl -sSL https://download.technitium.com/dns/uninstall.sh | sudo bash

NOTE: The uninstaller will set your /etc/resolv.conf file to use 8.8.8.8 and 1.1.1.1 DNS servers. To restore the defaults follow the steps for your distro:

  • Ubuntu Server, Ubuntu Desktop, CentOS, or Fedora
    sudo systemctl enable systemd-resolved
    sudo systemctl start systemd-resolved
    sudo rm /etc/resolv.conf
    sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
    
    The above steps will restore the default systemd-resolved setup.
  • Raspbian (Buster)
    sudo rm /etc/resolv.conf
    sudo resolvconf -ul
    
    The above steps will restore the default resolvconf setup.

Deploying Docker Container

You can install the DNS Server using the official Docker image available on Docker Hub.

Download the docker-compose.yml file and edit it as per your deployment requirements. Once the file is ready, run the following commands to create a new Docker container using the docker-compose.yml file as shown below:

docker compose up -d

To update an existing container, run the following commands:

docker compose down
docker image rm technitium/dns-server
docker compose up -d

Note! You need to ensure that the docker container is listening on 53/tcp and 53/udp ports on the host system. If the ports are already occupied by stub resolvers like dnsmasq or systemd-resolved then you need to stop them as explained later in this post.

Installing DNS Server Manually

Install the ASP.NET Core 8 Runtime using the package manager instructions provided here. If you want to install ASP.NET Core Runtime on Raspberry Pi, use the instructions in this blog post to install it manually.

Once you have installed ASP.NET Core Runtime, start Terminal or SSH into the server and follow the steps below to install DNS Server on Ubuntu:

  1. Download DNS Server portable app using wget and extract it.
    wget https://download.technitium.com/dns/DnsServerPortable.tar.gz
    sudo mkdir -p /opt/technitium/dns
    sudo tar -zxf DnsServerPortable.tar.gz -C /opt/technitium/dns
    
  2. You can now run the DNS Server directly from console as a standalone app.
    cd /opt/technitium/dns
    sudo ./start.sh
    
  3. Or, if your distro uses systemd, follow these steps to install it as a daemon.
    sudo cp /opt/technitium/dns/systemd.service /etc/systemd/system/dns.service
    sudo systemctl enable dns.service
    sudo systemctl start dns.service
    

    You may want to check the systemd log entries to find issue if the daemon fails to start:

    journalctl --unit dns --follow
    

  4. Open the url http://<server-ip-address>:5380/ to access the web console.

Updating DNS Server Manually

Make sure you got the ASP.NET Core 8 Runtime installed using the package manager instructions provided here. Start Terminal and follow the steps below to update DNS Server on Ubuntu:

  1. Download DNS Server portable app using wget and extract it.
    wget https://download.technitium.com/dns/DnsServerPortable.tar.gz
    sudo tar -zxf DnsServerPortable.tar.gz -C /opt/technitium/dns
    
  2. If your distro uses systemd, follow these steps to restart the DNS Server daemon.
    sudo systemctl restart dns.service
    

    You may want to check the systemd log entries to find issue if the daemon fails to start:

    journalctl --unit dns --follow
    

  3. Open the url http://<server-ip-address>:5380/ to access the web console.

Note! The installation folder has been changed from the old "/etc/dns" to "/opt/technitium/dns" in the above instructions. You must extract the files into the folder in which you have the DNS server installed.

Common Issue With Ubuntu

If you are using Ubuntu Desktop, you may find dnsmasq or systemd-resolved daemon already running on UDP port 53 preventing the DNS Server to listen on the same port. You can check the DNS Server log file from the web console to confirm the issue by finding this error:

[2019-01-01 07:30:59 UTC] [0.0.0.0:53] System.Net.Sockets.SocketException (98): Address already in use
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at DnsServerCore.DnsServer.Start() in Z:\Technitium\Projects\DnsServer\DnsServerCore\DnsServer.cs:line 811

You may confirm if its dnsmasq or systemd-resolved by running sudo netstat -nlpu command.

Follow these steps below to disable the dnsmasq service:

  1. Edit the NetworkManager.conf file to disable dnsmasq service:
    sudo nano /etc/NetworkManager/NetworkManager.conf
    
    Comment out the dns=dnsmasq line by adding # character at the beginning like this #dns=dnsmasq and exit the editor by pressing CTRL+X and enter y to save the file.
  2. Restart the computer to apply changes as shown below:
    sudo reboot now
    
  3. After system reboot, open Terminal and check DNS Server logs again from the web console.

Follow these steps below to disable the systemd-resolved service:

  1. Disable the systemd-resolved service and stop it:
    sudo systemctl disable systemd-resolved
    sudo systemctl stop systemd-resolved
    
  2. Configure /etc/resolv.conf as shown below:
    sudo rm /etc/resolv.conf
    sudo echo "nameserver 127.0.0.1" > /etc/resolv.conf
    
  3. If you are using Ubuntu Desktop then edit your /etc/NetworkManager/NetworkManager.conf using nano:
    sudo nano /etc/NetworkManager/NetworkManager.conf
    
    Put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf as shown below:
    [main]
    dns=default
    
    Restart network-manager:
    sudo service network-manager restart
    
  4. Now restart the DNS Server and check logs again from the web console.
    sudo systemctl restart dns.service
    

Missing ICU Package

The DNS Server v13.4 update adds requirement for your OS to have ICU package installed. There wont be an issue with most systems since they include the ICU package by default but some "lite" Linux distros like DietPi may have issues since the do not include ICU package to save on space. On such systems, the DNS server will fail to start. You can run the following command to find out the exact reason:

journalctl --unit dns --follow 

If the issue was due to missing ICU package, you will see error messages as shown below:

$ journalctl --unit dns --follow
Jan 29 16:58:27 server1 dns-server[240812]:    at System.Globalization.CultureData.get_Invariant()
Jan 29 16:58:27 server1 dns-server[240812]:    at System.Globalization.CultureInfo..cctor()
Jan 29 16:58:27 server1 dns-server[240812]:    at System.Globalization.CultureInfo.get_CachedCulturesByName()
Jan 29 16:58:27 server1 dns-server[240812]:    at System.Globalization.CultureInfo.GetCultureInfo(System.String)
Jan 29 16:58:27 server1 dns-server[240812]:    at System.Reflection.RuntimeAssembly.GetLocale()
Jan 29 16:58:27 server1 dns-server[240812]:    at System.Reflection.RuntimeAssembly.GetName(Boolean)
Jan 29 16:58:27 server1 dns-server[240812]:    at DnsServerCore.DnsWebService..ctor(System.String, System.Uri, System.Uri)
Jan 29 16:58:27 server1 dns-server[240812]:    at DnsServerApp.Program.Main(System.String[])
Jan 29 16:58:27 server1 systemd[1]: dns.service: Main process exited, code=killed, status=6/ABRT
Jan 29 16:58:27 server1 systemd[1]: dns.service: Failed with result 'signal'.
Jan 29 16:58:37 server1 systemd[1]: dns.service: Scheduled restart job, restart counter is at 4.
Jan 29 16:58:37 server1 systemd[1]: Stopped dns.service - Technitium DNS Server.
Jan 29 16:58:37 server1 systemd[1]: Started dns.service - Technitium DNS Server.
Jan 29 16:58:37 server1 dns-server[240820]: Process terminated. Couldn't find a valid ICU package installed on the system. Please install libicu (or icu-libs) using your package manager and try again. Alternatively you can set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. Please see https://aka.ms/dotnet-missing-libicu for more information.
Jan 29 16:58:37 server1 dns-server[240820]:    at System.Environment.FailFast(System.String)
Jan 29 16:58:37 server1 dns-server[240820]:    at System.Globalization.GlobalizationMode+Settings..cctor()
Jan 29 16:58:37 server1 dns-server[240820]:    at System.Globalization.CultureData.CreateCultureWithInvariantData()
Jan 29 16:58:37 server1 dns-server[240820]:    at System.Globalization.CultureData.get_Invariant()
Jan 29 16:58:37 server1 dns-server[240820]:    at System.Globalization.CultureInfo..cctor()
Jan 29 16:58:37 server1 dns-server[240820]:    at System.Globalization.CultureInfo.get_CachedCulturesByName()
Jan 29 16:58:37 server1 dns-server[240820]:    at System.Globalization.CultureInfo.GetCultureInfo(System.String)
Jan 29 16:58:37 server1 dns-server[240820]:    at System.Reflection.RuntimeAssembly.GetLocale()
Jan 29 16:58:37 server1 dns-server[240820]:    at System.Reflection.RuntimeAssembly.GetName(Boolean)
Jan 29 16:58:37 server1 dns-server[240820]:    at DnsServerCore.DnsWebService..ctor(System.String, System.Uri, System.Uri)
Jan 29 16:58:37 server1 dns-server[240820]:    at DnsServerApp.Program.Main(System.String[])
Jan 29 16:58:37 server1 systemd[1]: dns.service: Main process exited, code=killed, status=6/ABRT
Jan 29 16:58:37 server1 systemd[1]: dns.service: Failed with result 'signal'.

You can fix this issue by installing the missing libicu package for your distro. Run the following command to find out the exact package name as shown below:

$ apt search libicu
Sorting... Done
Full Text Search... Done
icu-devtools/stable 72.1-3 arm64
  Development utilities for International Components for Unicode

libicu-dev/stable 72.1-3 arm64
  Development files for International Components for Unicode

libicu4j-4.4-java/stable,stable 4.4.2.2-4 all
  Library for Unicode support and internationalization

libicu4j-java/stable,stable 72.1-1 all
  Library for Unicode support and internationalization

libicu72/stable,now 72.1-3 arm64 [installed,automatic]
  International Components for Unicode

Install the missing libicu package by using the package name found in the previous command as shown below:

sudo apt install libicu72

Once the libicu package is installed, the DNS server would start working as expected.

Build From Source Code

You can also build the DNS server from source and install it manually by following the Build Instructions.

That's it!

The DNS Server is running and you can configure your network with the IP address of this computer for DNS resolution.

Check out the web console to create zone, check cached zones, access DNS client tool and configure server settings.

The DNS Server creates a folder named config in the current folder which contains the server config and zone files. Make sure you copy this folder while moving the DNS server folder if you want all the zone files and config to persist.

For any related queries, feel free to comment on this post.

Tuesday, May 12, 2015

Running Bit Chat on Ubuntu Linux

This post is written for Ubuntu Linux but, you can easily follow similar steps on your favorite distro. Technitium Bit Chat is developed in c# and requires you to have Mono Framework installed on Linux to run it.

Start Terminal and follow the steps below to run Bit Chat on Ubuntu:
  1. Download Bit Chat from the website using wget as shown below.
    $ wget https://technitium.com/download/bitchat/linux/BitChatPortable.tar.gz
  2. Extract the files and run install-mono.sh as root to install mono framework.
    $ tar -xvzf BitChatPortable.tar.gz
    $ cd BitChat
    $ sudo ./install-mono.sh
    
  3. To run Bit Chat each time do following:
    $ sudo ./start.sh
    
The install-mono.sh is not really an application installer. It will just help you to install mono-complete framework and import root certificates. Below is the install-mono.sh file contents if you wish to run the commands manually.
#!/bin/sh

apt-get -y install mono-complete
mozroots --import --ask-remove
If you encounter the below error message during Profile Certificate registration, it means the mono framework's root certificate store is empty. Due to this, mono applications won't trust any SSL certificate and you will see this error for every HTTPS website that gets called by a mono application.
Technitium Bit Chat Profile Registration Error
Technitium Bit Chat Profile Registration Error

To resolve this error you need to import root certificates as shown below:
$ sudo mozroots --import --ask-remove
If you have any trouble installing mono framework the refer to this official mono installation guide.

For any related queries, feel free to comment on this post.