Skip to content

Instantly share code, notes, and snippets.

@masatokawano
Created March 9, 2018 03:06
Show Gist options
  • Save masatokawano/e4f5ad904968c122dbd59cbfac797cc2 to your computer and use it in GitHub Desktop.
Save masatokawano/e4f5ad904968c122dbd59cbfac797cc2 to your computer and use it in GitHub Desktop.
server:
# number of threads to create. 1 disables threading.
num-threads: 8
# number of ports to allocate per thread, determines the size of the
# port range that can be open simultaneously. About double the
# num-queries-per-thread, or, use as many as the OS will allow you.
outgoing-range: 4096
# number of incoming simultaneous tcp buffers to hold per thread.
incoming-num-tcp: 1000
# use SO_REUSEPORT to distribute queries over threads.
so-reuseport: yes
# the amount of memory to use for the message cache.
# plain value in bytes or you can append k, m or G. default is "4Mb".
msg-cache-size: 512m
# the number of slabs to use for the message cache.
# the number of slabs must be a power of 2.
# more slabs reduce lock contention, but fragment memory usage.
msg-cache-slabs: 8
# the number of queries that a thread gets to service.
num-queries-per-thread: 2048
# the amount of memory to use for the RRset cache.
# plain value in bytes or you can append k, m or G. default is "4Mb".
rrset-cache-size: 1024m
# the number of slabs kto use for the RRset cache.
# the number of slabs must be a power of 2.
# more slabs reduce lock contention, but fragment memory usage.
rrset-cache-slabs: 8
# the number of slabs to use for the Infrastructure cache.
# the number of slabs must be a power of 2.
# more slabs reduce lock contention, but fragment memory usage.
infra-cache-slabs: 8
# Detach from the terminal, run in background, "yes" or "no".
# Set the value to "no" when unbound runs as systemd service.
do-daemonize: no
# 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 refuse
# access-control: 127.0.0.0/8 allow
# access-control: ::0/0 refuse
# access-control: ::1 allow
# access-control: ::ffff:127.0.0.1 allow
# if yes, Unbound doesn't insert authority/additional sections
# into response messages when those sections are not required.
minimal-responses: yes
# module configuration of the server. A string with identifiers
# separated by spaces. Syntax: "[dns64] [validator] iterator"
module-config: "validator python iterator"
# the number of slabs to use for the key cache.
# the number of slabs must be a power of 2.
# more slabs reduce lock contention, but fragment memory usage.
key-cache-slabs: 8
python:
# Script file to load(webroot sdk)
python-script: "/etc/unbound/ubmodule-tst.py"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment