Unbound - Persistent Configuration

mockingbird

Verified User
Joined
Feb 6, 2023
Messages
41
Should the Unbound configuration be changed here:
/etc/unbound/unbound.conf.d/prefetch.conf

Or should one create the following directory?:
/usr/local/directadmin/custombuild/custom/unbound

Thank you
 
Older post but I see nobody answered that.
How is that unbound working, so you need to configure things I guess, not working out of the box.

However, I don't find any examples for Directadmin.

Does it run besides bind, any special things to take care of or keep in mind, especially with slave nameservers like Directslave and things like rSpamd and RBL's to prevent running into limits?
 
I know that they/it can see whatever they want, but less is more and I'm running it @home on my router.

My isp can also tap whatever traffic comes through and as long as the scary stuff is over a trusted vpn
and dns queries are not done through their or google/cloudflare/etc.'s servers I'm okay with it. Just that
small extra layer of protection. And dnssec of course which ziggo here is not able to understand and offer :cool:
 
Last edited:
And it is working fine out of the box.
That would be great, but searching on the DA forums let me find some post who said it was conflicting with bind on port 53 and that person had to configure Unbound to run on port 5353. Is that correct?

Also I've found that probably rSpamd needs some different configuration then.
Code:
# /etc/unbound/unbound.conf.d/rspamd.conf
server:    interface: 127.0.0.1
port: 53
do-ip4: yes
do-ip6: no
do-udp: yes
do-tcp: yes
prefetch: yes

I probably ned to change that port here too, and at this moment I use:
Code:
dns {
    nameserver = "master-slave:127.0.0.1,185.xxx.xxx.xxx";
}
That options.inc can be removed then and doesn't cause RBL limits anymore?
 
That would be great, but searching on the DA forums let me find some post who said it was conflicting with bind on port 53 and that person had to configure Unbound to run on port 5353. Is that correct?

There's no conflict if you install Unbound through DirectAdmin/CustomBuild:

Code:
[root@poralix custombuild]# cat /etc/resolv.conf
nameserver 127.0.0.253
options edns0 trust-ad
[root@poralix custombuild]#

Also I've found that probably rSpamd needs some different configuration then.

I don't have either /etc/unbound/unbound.conf.d/rspamd.conf or /etc/unbound/unbound.conf.d/ on my server with unbound and rSpamd.

p.s. If you're looking for reasons why it could break a server, I'm sure you'll find them. If you're looking for reasons why it's good for a server, you'll find those too. So, what are you trying to prove?
 
So, what are you trying to prove?
I'm not trying to prove anything, just trying to prevent known issues before installing it on the live server since I don't have a test server at the moment.
And since I found that post about conflicting ports and port 5353 just asking if that was a thing. And also if some rspamd config change was required.
So just asking questions to be sure based on what I've found on my searching.

Seems I don't need to worry so I will try and install later this evening.

Thank you!

For future references for myself and others using search option.
Code:
da build set unbound yes
da build set unbound_as_default_resolver yes
da build unbound
 
The only include directive I can find in the Unbound config on CentOS-like servers is:
Code:
include: /etc/unbound/conf.d/*.conf

Mentions of /etc/unbound/unbound.conf.d/rspamd.conf only show up in relation to ISPmanager, so there's no need to worry about it.

My pleasure, Richard
 
Just installed it, is this normal? A load of these just after installing, seen in /var/log/messages file:
Code:
Dec  6 02:02:41 server26 systemd-rc-local-generator: /etc/rc.d/rc.local is not marked executable, skipping.
Dec  6 02:02:41 server26 systemd[1]: /etc/systemd/system/[email protected]:6: ListenStream= references a path below legacy directory /var/run/, updating /var/run/directadmin/userd-1087.sock → /run/directadmin/userd-1087.sock; please update the unit file accordingly.
Dec  6 02:02:41 server26 systemd[1]: /etc/systemd/system/[email protected]:6: ListenStream= references a path below legacy directory /var/run/, updating /var/run/directadmin/userd-1025.sock → /run/directadmin/userd-1025.sock; please update the unit file accordingly.

and at the end:
Code:
Dec  6 02:02:44 server26 systemd[1]: /etc/systemd/system/[email protected]:6: ListenStream= references a path below legacy directory /var/run/
, updating /var/run/directadmin/userd-1074.sock → /run/directadmin/userd-1074.sock; please update the unit file accordingly.
Dec  6 02:02:44 server26 systemd[1]: /etc/systemd/system/[email protected]:6: ListenStream= references a path below legacy directory /var/run/
, updating /var/run/directadmin/userd-1111.sock → /run/directadmin/userd-1111.sock; please update the unit file accordingly.
Dec  6 02:02:44 server26 systemd[1]: /etc/systemd/system/[email protected]:6: ListenStream= references a path below legacy directory /var/run/
, updating /var/run/directadmin/userd-1010.sock → /run/directadmin/userd-1010.sock; please update the unit file accordingly.
Dec  6 02:02:44 server26 systemd[1]: Finished Network Manager Wait Online.
Dec  6 02:02:44 server26 nm-dispatcher[1623351]: enabled
Dec  6 02:02:44 server26 systemd[1]: Started Unbound asyncronous resolvconf update helper.
Dec  6 02:02:47 server26 kernel: Firewall: *TCP_IN Blocked* IN=enp0s31f6 OUT= MAC=90:1b:0e:93:50:3a:00:31:46:0d:3b:81:08:00 SRC=81.19.219.236 DST=138.
201.60.14 LEN=40 TOS=0x00 PREC=0x00 TTL=57 ID=0 PROTO=TCP SPT=22693 DPT=266 WINDOW=65535 RES=0x00 SYN URGP=0
Dec  6 02:02:51 server26 systemd[1]: Created slice User Slice of UID 1075.
Dec  6 02:02:51 server26 systemd[1]: Removed slice User Slice of UID 1075.
So seems it went over to normal logging stuff and didn't see the userd-***.sock unit file messages anymore.

But when checking status I see this:
Code:
Dec 06 02:02:55 server.myhosting.nl unbound[1623215]: [1623215:3] info: validation failure v0n2.pir-ns.org. A IN
Dec 06 02:07:02 server.myhosting.nl unbound[1623215]: [1623215:3] info: validation failure www.bing.com. A IN
Dec 06 02:07:02 server.myhosting.nl unbound[1623215]: [1623215:0] info: validation failure www.bing.com. A IN
Dec 06 02:07:02 server.myhosting.nl unbound[1623215]: [1623215:1] info: validation failure www.bing.com. A IN

that first domain seems strange to me, but validation failure for www.bing.com?

Guess all of this nothing to worry abount? Just info?
 
Last edited:
And #3, unbound wanting to be in 2026 but sees it's only in 1980 :ROFLMAO: Broken Internet Navigation Guide
Hahaha and that for Microsoft! Cool! :)

Oke guys, sorry for the worrying. I'm just jnot used doing things like this on a live server, but everything works fine indeed.
Also installed it now on the second server and next week on the others.

Works great!
Code:
Dec 06 09:58:21 unbound[1822799:1] info: validation failure host-eme.cgnat-e.v4.dfn.nl. AAAA IN
Dec 06 11:23:18 unbound[1822799:2] info: validation failure 129.201.205.in-addr.arpa. NS IN
Dec 06 11:23:18 unbound[1822799:2] info: validation failure 25.129.201.205.in-addr.arpa. PTR IN
Dec 06 12:37:08 unbound[1822799:0] info: validation failure www.missing.com. AAAA IN

Indeed better than localhost bind, filters out the bad guys. :)

Thanks for all the help and info!
 
Back
Top