Advertisement
Guest User

Untitled

a guest
Dec 5th, 2024
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 4.05 KB | None | 0 0
  1. ##########################
  2. # Unbound Configuration
  3. ##########################
  4.  
  5. ##
  6. # Server configuration
  7. ##
  8. server:
  9.    # Basic paths and settings
  10.     chroot: /var/unbound
  11.     username: unbound
  12.     directory: /var/unbound
  13.     pidfile: /var/run/unbound.pid
  14.     root-hints: /var/unbound/root.hints
  15.     use-syslog: yes
  16.     port: 5555
  17.     include: /var/unbound/advanced.conf
  18.     auto-trust-anchor-file: /var/unbound/root.key
  19.  
  20.     # Interfaces
  21.     interface: 127.0.0.1
  22.     interface: ::1
  23.  
  24.     # Access control
  25.     access-control: 192.168.0.0/16 allow
  26.     access-control: 169.254.0.0/16 allow
  27.     access-control: 127.0.0.1/32 allow
  28.     access-control: fc00::/7 allow
  29.     access-control: fd80::/7 allow
  30.     access-control: fe80::/7 allow
  31.     access-control: ::1/128 allow
  32.  
  33.     # Protocol settings
  34.     do-ip4: yes
  35.     do-ip6: yes
  36.     do-udp: yes
  37.     do-tcp: yes
  38.     prefer-ip6: yes
  39.     so-reuseport: yes
  40.     module-config: "validator iterator"
  41.  
  42.     # Logging
  43.     log-queries: no
  44.     log-replies: no
  45.     log-tag-queryreply: no
  46.     log-servfail: no
  47.     log-local-actions: no
  48.     logfile: /var/log/unbound.log
  49.     verbosity: 1
  50.  
  51.     # Cache
  52.     cache-min-ttl: 0
  53.     cache-max-ttl: 86400
  54.     msg-cache-size: 4m
  55.     rrset-cache-size: 8m
  56.     key-cache-size: 2m
  57.     msg-cache-slabs: 8
  58.     rrset-cache-slabs: 8
  59.     key-cache-slabs: 8
  60.     infra-cache-size: 8m
  61.     infra-cache-slabs: 8
  62.     infra-cache-numhosts: 100000
  63.     infra-cache-min-rtt: 10
  64.  
  65.     # Prefetch and serving expired data
  66.     prefetch: yes
  67.     prefetch-key: yes
  68.     serve-expired: yes
  69.     serve-expired-ttl: 86400  # Use a reasonable default TTL for expired data
  70.     serve-expired-reply-ttl: 30  # Set a short reply TTL for clients
  71.     serve-expired-client-timeout: 500  # Timeout in milliseconds for clients
  72.  
  73.     # DNS rebinding protection
  74.     private-address: 192.168.0.0/16
  75.     private-address: 198.18.0.0/15
  76.     private-address: 169.254.0.0/16
  77.     private-address: 172.16.0.0/12
  78.     private-address: 10.0.0.0/8
  79.     private-address: 2001:db8::/32
  80.     private-address: fc00::/8
  81.     private-address: fd00::/8
  82.     private-address: fe80::/10
  83.  
  84.     # Security and privacy
  85.     hide-identity: yes
  86.     hide-version: yes
  87.     identity: "DNS"
  88.     http-user-agent: "DNS"
  89.     qname-minimisation: yes
  90.     deny-any: no
  91.     minimal-responses: yes
  92.     use-caps-for-id: yes
  93.     harden-glue: yes
  94.     harden-large-queries: yes
  95.     harden-dnssec-stripped: yes
  96.     harden-below-nxdomain: yes
  97.     harden-algo-downgrade: yes
  98.     harden-short-bufsize: yes
  99.     harden-referral-path: no
  100.     aggressive-nsec: yes
  101.  
  102.     # Performance
  103.     target-fetch-policy: "1 1 0 0 0"
  104.     edns-buffer-size: 1232
  105.     rrset-roundrobin: yes
  106.     val-clean-additional: yes
  107.     num-threads: 4
  108.     so-rcvbuf: 8m
  109.     so-sndbuf: 8m
  110.     unwanted-reply-threshold: 100000
  111.  
  112.     # Additional includes
  113.     include: /var/unbound/private_domains.conf
  114.     include: /var/unbound/host_entries.conf
  115.     include: /var/unbound/dhcpleases.conf
  116.     include: /var/unbound/etc/*.conf
  117.  
  118. ##
  119. # Remote-Control
  120. ##
  121. remote-control:
  122.     control-enable: yes
  123.     control-interface: 127.0.0.1
  124.     control-port: 953
  125.     server-key-file: /var/unbound/unbound_server.key
  126.     server-cert-file: /var/unbound/unbound_server.pem
  127.     control-key-file: /var/unbound/unbound_control.key
  128.     control-cert-file: /var/unbound/unbound_control.pem
  129.  
  130. ##
  131. # Forward Zones
  132. ##
  133. forward-zone:
  134.     name: "."
  135.     forward-tls-upstream: yes
  136.     forward-addr: 1.1.1.1@853  # Cloudflare IPv4
  137.     forward-addr: 1.0.0.1@853  # Cloudflare IPv4
  138.     forward-addr: 2606:4700:4700::1111@853  # Cloudflare IPv6
  139.     forward-addr: 2606:4700:4700::1001@853  # Cloudflare IPv6
  140.     forward-addr: 8.8.8.8@853  # Google IPv4
  141.     forward-addr: 8.8.4.4@853  # Google IPv4
  142.     forward-addr: 2001:4860:4860::8888@853  # Google IPv6
  143.     forward-addr: 2001:4860:4860::8844@853  # Google IPv6
  144.     forward-addr: 9.9.9.9@853  # Quad9 IPv4
  145.     forward-addr: 149.112.112.112@853  # Quad9 IPv4
  146.     forward-addr: 2620:fe::fe@853  # Quad9 IPv6
  147.     forward-addr: 2620:fe::9@853  # Quad9 IPv6
  148.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement