mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-08 09:04:18 +01:00
Update install-unbound.ps1 and unbound.conf
This commit is contained in:
parent
39071714b7
commit
8875545f20
@ -1,3 +1,5 @@
|
||||
# Configuration file for Unbound DNS server, which usually resides at: /etc/unbound/unbound.conf
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
remote-control:
|
||||
control-enable: yes # allows control using "unbound-control"
|
||||
|
||||
@ -22,12 +24,15 @@ server:
|
||||
cache-max-ttl: 86400 # 1 day maximum caching time
|
||||
cache-max-negative-ttl: 3600 # 1 hour maximum caching time for negative responses
|
||||
so-reuseport: yes # faster UDP with multithreading (only on Linux)
|
||||
tls-cert-bundle: /etc/ssl/certs/ca-certificates.crt # for encrypted DNS over TLS
|
||||
verbosity: 0 # log nothing
|
||||
|
||||
forward-zone:
|
||||
name: "."
|
||||
forward-addr: 1.1.1.1@53 # use Cloudflare (primary)
|
||||
forward-addr: 1.0.0.1@53 # use Cloudflare (secondary)
|
||||
forward-addr: 8.8.8.8@53 # use Google Public DNS (primary)
|
||||
forward-addr: 8.8.4.4@53 # use Google Public DNS (secondary)
|
||||
forward-addr: 9.9.9.9@53 # use Quad9
|
||||
forward-tls-upstream: yes
|
||||
forward-addr: 1.1.1.1@853#cloudflare-dns.com # for encrypted DNS over TLS
|
||||
# forward-addr: 1.1.1.1@53 # use Cloudflare (primary)
|
||||
# forward-addr: 1.0.0.1@53 # use Cloudflare (secondary)
|
||||
# forward-addr: 8.8.8.8@53 # use Google Public DNS (primary)
|
||||
# forward-addr: 8.8.4.4@53 # use Google Public DNS (secondary)
|
||||
# forward-addr: 9.9.9.9@53 # use Quad9
|
||||
|
@ -20,7 +20,7 @@ try {
|
||||
& sudo apt update -y
|
||||
if ($lastExitCode -ne "0") { throw "'sudo apt update' failed" }
|
||||
|
||||
"⏳ Step 2/7: Installing Unbound..."
|
||||
"⏳ Step 2/7: Installing Unbound package..."
|
||||
& sudo apt install unbound -y
|
||||
if ($lastExitCode -ne "0") { throw "'sudo apt install unbound' failed" }
|
||||
|
||||
@ -32,7 +32,7 @@ try {
|
||||
& sudo unbound-anchor
|
||||
if ($lastExitCode -ne "0") { throw "'unbound-anchor' failed" }
|
||||
|
||||
"⏳ Step 5/7: Copying default configuration..."
|
||||
"⏳ Step 5/7: Copying config file to /etc/unbound/unbound.conf ..."
|
||||
& sudo cp "$PSScriptRoot/../Data/unbound.conf" /etc/unbound/unbound.conf
|
||||
if ($lastExitCode -ne "0") { throw "'cp' failed" }
|
||||
|
||||
@ -41,7 +41,7 @@ try {
|
||||
& sudo unbound-control start
|
||||
if ($lastExitCode -ne "0") { throw "'unbound-control start' failed" }
|
||||
|
||||
"⏳ Step 7/7: Checking status..."
|
||||
"⏳ Step 7/7: Checking Unbound status..."
|
||||
& sudo unbound-control status
|
||||
if ($lastExitCode -ne "0") { throw "'unbound-control status' failed" }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user