lost and found ( for me ? )

install YADIFA 1.0.3 on Ubuntu 12.04 64bit


Here are trial and error logs when installing YADIFA on Ubuntu 12.04 64bit.

# tail -1 /etc/lsb-release ;uname –ri
DISTRIB_DESCRIPTION="Ubuntu 12.04.3 LTS"
3.2.0-58-generic x86_64

install gcc etc via apt-get
# apt-get install build-essential

download the source code.
# tar xzvf yadifa-1.0.3-2880.tar.gz
# cd yadifa-1.0.3-2880/

error
# ./configure
SSL is required by this setup ...
checking if SSL is available... no
CPPFLAGS= -m64
LDFLAGS= -ldl
checking for RSA_new in -lcrypto... no
checking for SSL_library_init in -lssl... no
configure: error: ./configure failed for lib/dnscore

install SSL library
# apt-get install libssl-dev -y

try again.
Okay.
# ./configure
Features used:
--------------

Install prefix ...................... : /usr/local
Install sysconf ..................... : ${prefix}/etc

# make
# make install

# /usr/local/sbin/yadifad --version
yadifa 1.0.3-2880 (2013-06-10)

zone files
# ls /usr/local/var/zones/masters/
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.zone
0.0.127.in-addr.arpa.zone
localhost6.zone
localhost.zone
somedomain.eu.zone

sample configuration files
# pwd
/root/YADIFA_works/yadifa-1.0.3-2880/etc

# ls
Makefile     yadifad.conf.example         yadifad-slave.conf.example
Makefile.am  yadifad.init
Makefile.in  yadifad-master.conf.example

# cp yadifad.conf.example /usr/local/etc/yadifad.conf

start daemon
error.
# /usr/local/sbin/yadifad
error setting variable: main.edns0 = 'on': CONFIG_UNKNOWN_SETTING_ERR
config: <main>: CONFIG_UNKNOWN_SETTING_ERR ( 'edns0' = 'on' [] )
config: at /usr/local/etc/yadifad.conf:31: CONFIG_UNKNOWN_SETTING_ERR)
error: CONFIG_UNKNOWN_SETTING_ERR
2014-01-10 20::12:30.394442 | server   | E | config: <main>: CONFIG_UNKNOWN_SETTING_ERR ( 'edns0' = 'on' [] )
2014-01-10 20::12:30.394471 | server   | E | config: at /usr/local/etc/yadifad.conf:31: CONFIG_UNKNOWN_SETTING_ERR)

comment out this line
# egrep -i edns0 /usr/local/etc/yadifad.conf
       # Enable EDNS0 support (?)
       #edns0                       on
       edns0-max-size              4096

I edited the following option
<main>
       # Detach from the console
       #daemon                      off
       daemon                      on

# /usr/local/sbin/yadifad

# /usr/local/sbin/yadifad
# lsof -ni:53
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
yadifad 26444 root   10u  IPv4  26856      0t0  TCP *:domain (LISTEN)
yadifad 26444 root   11u  IPv4  26855      0t0  UDP *:domain

# dig @127.1 version.bind chaos txt +norec +short
"1.0.3"

add a master zone file “foo.com”

# cat /etc/bind/foo.com.db
$TTL    3600
@       IN      SOA     ns1.localdomain. ns1.localdomain.  (
                               2000091801      ; Serial
                               3600            ; Refresh
                               900             ; Retry
                               3600000         ; Expire
                               3600 )          ; Minimum
       IN      NS      ns1.foo.com.
       IN      NS      ns2.foo.com.
ns1     IN      A       192.168.10.253
ns2     IN      A       192.168.10.250
       IN      MX      10 mx1.foo.com.
       IN      MX      10 mx2.foo.com.
mx1     IN      A       192.168.10.253
mx2     IN      A       192.168.10.250
www      IN      A       127.0.0.1
      

copy the file to /usr/local/var/zones/masters/ directory.
# cp foo.com.db /usr/local/var/zones/masters/

edit yadifad.conf
<zone>
       type    master
       domain  foo.com.
       file    masters/foo.com.db
       allow-transfer          none
       allow-update            none
       allow-update-forwarding none
</zone>

restart the daemon
# kill <PID>
# /usr/local/sbin/yadifad

error.
file '/usr/local/var/zones/masters/foo.com.db': NO_ORIGIN_FOUND (not loaded)
2014-01-10 21::39:42.371148 | server   | E | database_load_thread: error loading master foo.com.: NO_ORIGIN_FOUND

add the ORIGIN statement.
# vi foo.com.db

$TTL    3600
$ORIGIN foo.com.
<snip>

restart the daemon
# kill <PID>
# /usr/local/sbin/yadifad

# dig @127.1 www.foo.com +norec +short
127.0.0.1

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.