Anyway to get Unbound on the NAS ?

Anyway to get Unbound on the NAS ?

Postby kevin39 » Fri May 01, 2015 2:11 pm

Hi,
Is there a way to get Unbound package for our NAS ?
Unbound is a DNS resolver/caching servr.

Some ressources about Unbound :
Official : http://unbound.net/index.html
May it will help : Unbound on Raspberry Pi : http://npr.me.uk/pidns.html & https://www.the-hawkes.de/unbound-dns-o ... ry-pi.html
Howto (french) : http://korben.info/installer-unbound-se ... linux.html
kevin39
Donator VIP
Donator VIP
 
Posts: 79
Joined: Sat May 04, 2013 6:55 am
Location: Bordeaux, France

Re: Anyway to get Unbound on the NAS ?

Postby fvdw » Fri May 01, 2015 10:22 pm

I compiled unbound for you as addon

To install it you need to create a folder with name "addons" (without the quotes) in the shared folder fvdw
Put the tar archive in this folder and connect via ssh
go to the addons folder
Code: Select all
cd /share/1000/fvdw/addons

unpack the archive
Code: Select all
tar -xvf addons-unbound-1.5.3-2may15.tar


To set it up you need to do some trails yourself, let us know how it goes and if you succeeded
(NB: The path /usr/local is linked to /share/1000/fvdw/addons)

---edit 2may15 11:28 h added correct archive
You do not have the required permissions to view the files attached to this post.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Anyway to get Unbound on the NAS ?

Postby kevin39 » Sat May 02, 2015 6:42 am

Hi,
Thanks a lot !!

Are you sure you uploaded the good archive ? Correct my if I'm wrong but It's only the source folder, there is no compiled program into your archive.
kevin39
Donator VIP
Donator VIP
 
Posts: 79
Joined: Sat May 04, 2013 6:55 am
Location: Bordeaux, France

Re: Anyway to get Unbound on the NAS ?

Postby fvdw » Sat May 02, 2015 9:27 am

kevin39 wrote:Hi,
Thanks a lot !!

Are you sure you uploaded the good archive ? Correct my if I'm wrong but It's only the source folder, there is no compiled program into your archive.


:doh yes you are right I renamed the wrong file, I will upload the correct one in a minute
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Anyway to get Unbound on the NAS ?

Postby kevin39 » Sat May 02, 2015 3:20 pm

Thanks, I'm going to try :)
kevin39
Donator VIP
Donator VIP
 
Posts: 79
Joined: Sat May 04, 2013 6:55 am
Location: Bordeaux, France

Re: Anyway to get Unbound on the NAS ?

Postby fvdw » Sat May 02, 2015 6:41 pm

The correct archive is in the original post where the wrong archive was
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Anyway to get Unbound on the NAS ?

Postby kevin39 » Sun May 03, 2015 8:40 am

Hi,
I tried to install Unbound. It seems to crash without any information.

Code: Select all
root@NAS:/usr/local/etc/unbound # /usr/local/sbin/unbound -c /usr/local/etc/unbound/unbound.conf  -vvvvv
[1430642352] unbound[16895:0] notice: Start of unbound 1.5.3.
[1430642352] unbound[16895:0] debug: creating udp4 socket 0.0.0.0 53
[1430642352] unbound[16895:0] debug: creating tcp4 socket 0.0.0.0 53
[1430642352] unbound[16895:0] warning: did not exit gracefully last time (16891)
root@NAS:/usr/local/etc/unbound #


My log file is empty and Unbound is not running. Same output if I start it again.

And the 53 port is not in use :

Code: Select all
root@NAS:/usr/local/etc/unbound # netstat -npa |grep 53
tcp        0      0 192.168.1.3:22          192.168.1.10:53824      ESTABLISHED 16705/dropbear
tcp        0      0 192.168.1.3:22          192.168.1.10:53577      ESTABLISHED 16582/dropbear
udp        0      0 192.168.1.3:47757       192.168.1.254:5351      ESTABLISHED 29355/transmission-
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1750/avahi-daemon:
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1328/twonkyserver
root@NAS:/usr/local/etc/unbound #
kevin39
Donator VIP
Donator VIP
 
Posts: 79
Joined: Sat May 04, 2013 6:55 am
Location: Bordeaux, France

Re: Anyway to get Unbound on the NAS ?

Postby kevin39 » Sun May 03, 2015 8:49 am

I solved my issue. My conf file was invalid.
It seems to works.

Thanks a lot !!
kevin39
Donator VIP
Donator VIP
 
Posts: 79
Joined: Sat May 04, 2013 6:55 am
Location: Bordeaux, France

Re: Anyway to get Unbound on the NAS ?

Postby fvdw » Sun May 03, 2015 1:59 pm

:punk can you share how you have set it up (incl example conf file ?)
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Anyway to get Unbound on the NAS ?

Postby kevin39 » Sun May 03, 2015 2:16 pm

Of course. Note this is a minimal configuration.


1. Download root servers :
Code: Select all
root@NAS:/usr/local/etc/unbound # wget ftp://ftp.internic.net/domain/named.cache


2. Create the log file
Code: Select all
root@NAS:/usr/local/etc/unbound # touch unbound.log


3. To bypass any right problem I did a
Code: Select all
chmod 777 unbound.log
. I think this step may be replaced with a
Code: Select all
chown unbound:unbound unbouch.log


4. Configuration file :
Code: Select all
server:
   # verbosity number, 0 is least verbose. 1 is default.
   verbosity: 1

   # specify the interfaces to answer queries from by ip-address.
   # The default is to listen to localhost (127.0.0.1 and ::1).
   # specify 0.0.0.0 and ::0 to bind to all available interfaces.
   # specify every interface[@port] on a new 'interface:' labelled line.
   # The listen interfaces are not changed on reload, only on restart.
   interface: 0.0.0.0

   # port to answer queries from
   port: 53

   # Enable IPv4, "yes" or "no".
   do-ip4: yes

   # Enable UDP, "yes" or "no".
   do-udp: yes

   # Enable TCP, "yes" or "no".
   do-tcp: yes

   # Detach from the terminal, run in background, "yes" or "no".
   do-daemonize: yes

   # control which clients are allowed to make (recursive) queries
   # to this server. Specify classless netblocks with /size and action.
   # By default everything is refused, except for localhost.
   # Choose deny (drop message), refuse (polite error reply),
   # allow (recursive ok), allow_snoop (recursive and nonrecursive ok)
   # deny_non_local (drop queries unless can be answered from local-data)
   # refuse_non_local (like deny_non_local but polite error reply).
   access-control: 0.0.0.0/0 allow

   # If you give "" no chroot is performed. The path must not end in a /.
   chroot: "/usr/local/etc/unbound"

   # if given, user privileges are dropped (after binding port),
   # and the given username is assumed. Default is user "unbound".
   # If you give "" no privileges are dropped.
   username: "unbound"

   # the working directory. The relative files in this config are
   # relative to this directory. If you give "" the working directory
   # is not changed.
   directory: "/usr/local/etc/unbound"

   # the log file, "" means log to stderr.
   # Use of this option sets use-syslog to "no".
   logfile: "unbound.log"

   # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to
   # log to, with identity "unbound". If yes, it overrides the logfile.
   use-syslog: no

   # file to read root hints from.
   # get one from ftp://FTP.INTERNIC.NET/domain/named.cache
   root-hints: "named.cache"


6. Start unbound at boot
Note sure about the best way but I added a script into cron-boot directory
Code: Select all
root@NAS:/share/1000/fvdw/cron-boot # cat unbound-start
#!/bin/sh

/bin/adduser -h /usr/local/etc/unbound/ -s /usr/bin/false -D unbound unbound

/usr/local/sbin/unbound


7. Just run this script to immediately start Unbound :)

And have fun with your own dns server ^^

Code: Select all
iMac-de-Kevin:Kevin Kevin$ host plugout.net 192.168.1.3
Using domain server:
Name: 192.168.1.3
Address: 192.168.1.3#53
Aliases:

plugout.net has address 213.186.33.82
plugout.net mail is handled by 100 mxb.ovh.net.
plugout.net mail is handled by 1 mx1.ovh.net.
plugout.net mail is handled by 5 mx2.ovh.net.
iMac-de-Kevin:Kevin Kevin$ host google.fr 192.168.1.3
Using domain server:
Name: 192.168.1.3
Address: 192.168.1.3#53
Aliases:

google.fr has address 216.58.208.195
google.fr has IPv6 address 2a00:1450:4007:80d::2003
google.fr mail is handled by 30 alt2.aspmx.l.google.com.
google.fr mail is handled by 10 aspmx.l.google.com.
google.fr mail is handled by 40 alt3.aspmx.l.google.com.
google.fr mail is handled by 50 alt4.aspmx.l.google.com.
google.fr mail is handled by 20 alt1.aspmx.l.google.com.
iMac-de-Kevin:Kevin Kevin$
kevin39
Donator VIP
Donator VIP
 
Posts: 79
Joined: Sat May 04, 2013 6:55 am
Location: Bordeaux, France

Next

Return to Development

Who is online

Users browsing this forum: No registered users and 10 guests