Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Loading

BIND on QNAP 209 (Linux)

NOTE: NAT’d DNS through a Netgear DG834N-V1 does not appear to work. I have tested on a Zyxel Prestige 660HW-61 and Netgear DGND3300 and these work.

Logon to the QNAP using SSL

cd /
export PATH=$PATH:/opt/bin:/opt/sbin
ipkg install bind

(or ./opt/bin/ipkg install bind)

Installing bind (9.5.0-P2-1) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/stable/bind_9.5.0-P2-1_arm.ipk
Installing openssl (0.9.7m-5) to root…
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs05q3armel/cross/stable/openssl_0.9.7m-5_arm.ipk
Configuring bind
Running post-install
You must now create your named.conf file
When it is installed in /opt/etc/named/named.conf, execute
/opt/etc/init.d/S09named start
to start service
You will probably also want to create rndc.conf by running
rndc-confgen.  Of course, you may want to set your name server
in the GUI to 127.0.0.1 or your local ip-address
Configuring openssl
Successfully terminated.

Now Setup Autostart.sh

mount /dev/mtdblock5 -t ext2 /tmp/config
cd /tmp/config

Create file called Autostart.sh Containing the following

******************

rm -rf /opt
ln -sf /share/MD0_DATA/optware/opt /opt
export PATH=$PATH:/opt/bin:/opt/sbin

for optscript in `ls /opt/etc/init.d/S* | grep -v ‘~’ | sort`
do
${optscript} start
done

***********************

Save and set the permissions

chmod +x /tmp/config/autorun.sh
umount /dev/mtdblock5

Create /opt/etc/named/named.conf

Alternative path /share/MD0_DATA/.qpkg/Optware/etc/named

examples here http://www.zytrax.com/books/dns/ch6/:


// named.conf file EXAMPLE
//
//
//
//
// RNDC fragment
//
// referenced as included rather than direct
//
// execute the following to create a key /opt/sbin/rndc-confgen -a
//
//key "rndc-key" {
// algorithm hmac-md5;
// secret "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
//};
//
include "/share/MD0_DATA/.qpkg/Optware/etc/named/rndc.key";
controls {
// local host - default key
inet 127.0.0.1 allow {localhost;};
inet * port 953 allow {"rndc-users";} keys {"rndc-key";};
};
// named.conf fragment
acl "rndc-users" {
127/8; 192.168.0/24
};
acl "inside" {
127/8; 192.168.0/24
};
options {
listen-on {127.0.0.1;192.168.1.254;};
port 53;
directory "/opt/etc/named";
pid-file "/opt/var/run/named.pid";
dump-file "/opt/var/run/named.dump";
statistics-file "/opt/var/run/named.stats";
version none;
max-cache-size 12M;
minimal-responses no;
allow-notify { "inside"; };
allow-recursion { "inside"; };
allow-query { "inside"; };
query-source address * port 53;
forwarders {
217.18.80.105;
217.18.90.105;
};
disable-empty-zone "255.255.255.255.IN-ADDR.ARPA";
disable-empty-zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA";
disable-empty-zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA";
};
logging{
channel simple_log {
file "/opt/var/log/named/bind.log" versions 3 size 5m;
severity debug;
print-time yes;
print-severity yes;
print-category yes;
};
category default{
simple_log;
};
};
view "inside" {
match-clients { "inside"; };
recursion yes;
zone "." {
type slave;
file "/opt/var/run/named.db.root.slave";
masters {
192.5.5.241; // F.ROOT-SERVERS.NET.
};
notify no;
};
zone "arpa" {
type slave;
file "/opt/var/run/named.db.arpa.slave";
masters {
192.5.5.241; // F.ROOT-SERVERS.NET.
};
notify no;
};
zone "in-addr.arpa" {
type slave;
file "/opt/var/run/named.db.in-addr-arpa.slave";
masters {
192.5.5.241; // F.ROOT-SERVERS.NET.
};
notify no;
};
zone "localhost" { type master; file "db.fwd.localhost"; };
zone "127.in-addr.arpa" { type master; file "db.rev.localhost"; };
zone "255.in-addr.arpa" { type master; file "db.empty"; };
zone "0.ip6.arpa" { type master; file "db.rev.localhost"; };
zone "0.in-addr.arpa" { type master; file "db.empty"; };
zone "10.in-addr.arpa" { type master; file "db.empty"; };
zone "16.172.in-addr.arpa" { type master; file "db.empty"; };
zone "17.172.in-addr.arpa" { type master; file "db.empty"; };
zone "18.172.in-addr.arpa" { type master; file "db.empty"; };
zone "19.172.in-addr.arpa" { type master; file "db.empty"; };
zone "20.172.in-addr.arpa" { type master; file "db.empty"; };
zone "21.172.in-addr.arpa" { type master; file "db.empty"; };
zone "22.172.in-addr.arpa" { type master; file "db.empty"; };
zone "23.172.in-addr.arpa" { type master; file "db.empty"; };
zone "24.172.in-addr.arpa" { type master; file "db.empty"; };
zone "25.172.in-addr.arpa" { type master; file "db.empty"; };
zone "26.172.in-addr.arpa" { type master; file "db.empty"; };
zone "27.172.in-addr.arpa" { type master; file "db.empty"; };
zone "28.172.in-addr.arpa" { type master; file "db.empty"; };
zone "29.172.in-addr.arpa" { type master; file "db.empty"; };
zone "30.172.in-addr.arpa" { type master; file "db.empty"; };
zone "31.172.in-addr.arpa" { type master; file "db.empty"; };
zone "168.192.in-addr.arpa" { type master; file "db.empty"; };
zone "254.169.in-addr.arpa" { type master; file "db.empty"; };
zone "2.0.192.in-addr.arpa" { type master; file "db.empty"; };
zone "18.198.in-addr.arpa" { type master; file "db.empty"; };
zone "19.198.in-addr.arpa" { type master; file "db.empty"; };
zone "240.in-addr.arpa" { type master; file "db.empty"; };
zone "241.in-addr.arpa" { type master; file "db.empty"; };
zone "242.in-addr.arpa" { type master; file "db.empty"; };
zone "243.in-addr.arpa" { type master; file "db.empty"; };
zone "244.in-addr.arpa" { type master; file "db.empty"; };
zone "245.in-addr.arpa" { type master; file "db.empty"; };
zone "246.in-addr.arpa" { type master; file "db.empty"; };
zone "247.in-addr.arpa" { type master; file "db.empty"; };
zone "248.in-addr.arpa" { type master; file "db.empty"; };
zone "249.in-addr.arpa" { type master; file "db.empty"; };
zone "250.in-addr.arpa" { type master; file "db.empty"; };
zone "251.in-addr.arpa" { type master; file "db.empty"; };
zone "252.in-addr.arpa" { type master; file "db.empty"; };
zone "253.in-addr.arpa" { type master; file "db.empty"; };
zone "254.in-addr.arpa" { type master; file "db.empty"; };
zone "1.ip6.arpa" { type master; file "db.empty"; };
zone "3.ip6.arpa" { type master; file "db.empty"; };
zone "4.ip6.arpa" { type master; file "db.empty"; };
zone "5.ip6.arpa" { type master; file "db.empty"; };
zone "6.ip6.arpa" { type master; file "db.empty"; };
zone "7.ip6.arpa" { type master; file "db.empty"; };
zone "8.ip6.arpa" { type master; file "db.empty"; };
zone "9.ip6.arpa" { type master; file "db.empty"; };
zone "a.ip6.arpa" { type master; file "db.empty"; };
zone "b.ip6.arpa" { type master; file "db.empty"; };
zone "c.ip6.arpa" { type master; file "db.empty"; };
zone "d.ip6.arpa" { type master; file "db.empty"; };
zone "e.ip6.arpa" { type master; file "db.empty"; };
zone "0.f.ip6.arpa" { type master; file "db.empty"; };
zone "1.f.ip6.arpa" { type master; file "db.empty"; };
zone "2.f.ip6.arpa" { type master; file "db.empty"; };
zone "3.f.ip6.arpa" { type master; file "db.empty"; };
zone "4.f.ip6.arpa" { type master; file "db.empty"; };
zone "5.f.ip6.arpa" { type master; file "db.empty"; };
zone "6.f.ip6.arpa" { type master; file "db.empty"; };
zone "7.f.ip6.arpa" { type master; file "db.empty"; };
zone "8.f.ip6.arpa" { type master; file "db.empty"; };
zone "9.f.ip6.arpa" { type master; file "db.empty"; };
zone "a.f.ip6.arpa" { type master; file "db.empty"; };
zone "b.f.ip6.arpa" { type master; file "db.empty"; };
zone "0.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "1.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "2.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "3.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "4.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "5.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "6.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "7.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "c.f.ip6.arpa" { type master; file "db.empty"; };
zone "d.f.ip6.arpa" { type master; file "db.empty"; };
zone "8.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "9.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "a.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "b.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "c.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "d.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "e.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "f.e.f.ip6.arpa" { type master; file "db.empty"; };
zone "ip6.int" { type master; file "db.empty"; };
zone "my-home.net" {
type master;
file "db.fwd.my-home-net";
allow-transfer { localhost; };
notify no;
};
zone "1.168.192.in-addr.arpa" {
type master;
file "db.rev.my-home-net";
allow-transfer { localhost; };
notify no;
};
};
view "external" {
match-clients { any; };
recursion no;
zone "tsls.co.uk" {
type slave;
file "/opt/etc/named/slave/tsls.co.uk";
masters { 217.18.91.50; };
allow-query { any; };
};

Create rndc secure key:

/opt/sbin/rndc-confgen -a

When you create a new zone you will need to reload the DNS config by running the following:

/opt/etc/init.d/S09named reload

Setup web interface for managing BIND: *need to do
http://www.afn.org/~afn23397/archive.htm

Some more information here http://forum.qnap.com/viewtopic.php?f=90&t=10631

UPDATE LS 12-August-2009 – DNS now working Externally

5 thoughts on “BIND on QNAP 209 (Linux)

  1. before
    chmod +x /tmp/config/autorun.sh
    I get
    chmod: /tmp/config/autorun.sh: No such file or directory

    help please
    thanks
    Wilson

  2. If you recieve rndc: connect failed: 127.0.0.1#953: connection refused
    the issue is most likely due to a folder not exsisting in your named.conf file

    OR

    the rndc key is not valid. therfore re execute /opt/sbin/rndc-confgen -a

Leave a Reply

Your email address will not be published. Required fields are marked *