#!/bin/sh
unbound_anchor () {
#here is the command
}
ENABLED=yes
PROCS=unbound
ARGS="-c /opt/etc/unbound/unbound.conf"
PREARGS=""
PRECMD="unbound_anchor"
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
. /opt/etc/init.d/rc.func
The unbound man (https://unbound.net/documentation/howto_anchor.html) states "unbound-anchor" should be:
The command line is:
- Run in the init script
- After NTP runs
- Before unbound starts
Should this be placed in the "init-start" or "services-start" script ?
unbound-anchor -a "/opt/etc/unbound/root.key" -c "/opt/etc/unbound/unbound_server.pem" -4 -p 443
maybe you can put it on PRECMD command on S61unbound.
can unbound working together with pixelserv-tls ?
I'm sure init-start is too early, why not the post-mount script to make sure usb and Entware running first - but then again surely you just add to Entware init scripts on the usb?
I want to test how Unbound over TLS will work with selective routing over the WAN and three vpn clients. Have you tested it using AB-Solution?I think I got it working, but how can you test whether DNS is really going over TLS?
I use Unbound (DNS over TLS) and AB-Solution, but I'm not familiar with selective routing.I want to test how Unbound over TLS will work with selective routing over the WAN and three vpn clients. Have you tested it using AB-Solution?
I installed unbound. But I can’t get unbound to start up. I see the log file message that it has started. But doing a check command shows it is not running and nothing appears in top I first tried the sample TLS config on https://calomel.org/unbound_dns.html followed by the simple recursive caching DNS UDP port 53 unencrypted config. I will pick it back up later today to see if I can identify the issue. Are there any configs you had to modify to get it to work?I use Unbound (DNS over TLS) and AB-Solution, but I'm not familiar with selective routing.
I think this:Are there any configs you had to modify to get it to work?
username: ""
Thank you. Did you change name:="." to be the router's domain name?I think this:
Code:username: ""
A forward-zone entry with name "." and a forward-addr target will forward all queries to that other server (unless it can answer from the cache).
# If you have an internal or private DNS names the external DNS servers can
# not resolve, then you can assign domain name strings to be redirected to a
# seperate dns server. For example, our comapny has the domain
# organization.com and the domain name internal.organization.com can not be
# resolved by Google's public DNS, but can be resolved by our private DNS
# server located at 1.1.1.1. The following tells Unbound that any
# organization.com domain, i.e. *.organization.com be dns resolved by 1.1.1.1
# instead of the public dns servers.
#
# forward-zone:
# name: "organization.com"
# forward-addr: 1.1.1.1 # Internal or private DNS
# Use the following forward-zone to forward all queries to Google DNS,
# OpenDNS.com or your local ISP's dns servers for example. To test resolution
# speeds use "drill calomel.org @8.8.8.8" and look for the "Query time:" in
# milliseconds.
#
forward-zone:
name: "."
forward-addr: 8.8.4.4 # Google
forward-addr: 8.8.8.8 # Google
forward-addr: 37.235.1.174 # FreeDNS
forward-addr: 37.235.1.177 # FreeDNS
<snip>
No, because the behaviour described is exactly what I want (for now): forward to Quad9 via DNS over TLS, unless already cached.Did you change name:="." to be the router's domain name?
I went back to look at the instructions and understand now. I just realize I can go look at the unbound config on my pfSense to help me get it working on the Asus-Merlin. I only viewed it from the web gui. But I can login to the shell and take a peak on what unbound.conf looks like.No, because the behaviour described is exactly what I want (for now): forward to Quad9 via DNS over TLS, unless already cached.
I'm interested in offering AB-Solution over VPN though!
The init script on a linux server probably isn't the direct analog to Asuswrt-Rmerlin's init-start script. However, that's what the unbound man refers to.
The /jffs/scripts/services-start script runs /opt/etc/init.d/rc.unslung' which starts the Entware packages.
According to the unbound man, unbound-anchor must run after NTP and before unbound starts.
So I'm looking for the best place to ensure that happens.
1) The first choice is placing the unbound-anchor command before rc.unslung runs. Is this the correct syntax ?Which is better ?
#!/bin/sh2) The second choice is modifying the S61unbound file.
/opt/sbin/unbound-anchor -a "/opt/etc/unbound/root.key" -c "/opt/etc/unbound/unbound_server.pem" -4
RC='/opt/etc/init.d/rc.unslung'
i=30
until [ -x "$RC" ] ; do
i=$(($i-1))
if [ "$i" -lt 1 ] ; then
logger "Could not start Entware-NG"
exit
fi
sleep 5
done
$RC start
#!/bin/sh
unbound_anchor () {
/opt/sbin/unbound-anchor -a "/opt/etc/unbound/root.key" -c "/opt/etc/unbound/unbound_server.pem" -4 -p 443
}
ENABLED=yes
PROCS=unbound
ARGS="-c /opt/etc/unbound/unbound.conf"
PREARGS=""
PRECMD="unbound_anchor"
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
. /opt/etc/init.d/rc.func
Is there another option ?
How did you managed to run unbound automatically at router start?
What are the steps for adding unbound-anchor after NTP and before unbound starts?
$ cat /opt/etc/init.d/S61unbound
#!/bin/sh
ENABLED=yes
PROCS=unbound
ARGS="-c /opt/etc/unbound/unbound.conf"
PREARGS=""
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[[ "$1" == *start ]] && unbound-anchor -a /opt/var/lib/unbound/etc/root.key
. /opt/etc/init.d/rc.func
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!