This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| computing:unbounddns [2025/09/20 18:31] – oemb1905 | computing:unbounddns [2025/09/20 18:37] (current) – oemb1905 | ||
|---|---|---|---|
| Line 68: | Line 68: | ||
| edns-buffer-size: | edns-buffer-size: | ||
| # Block private address ranges (excluding guest subnet) | # Block private address ranges (excluding guest subnet) | ||
| - | private-address: | + | private-address: |
| private-address: | private-address: | ||
| private-address: | private-address: | ||
| Line 131: | Line 131: | ||
| {{ : | {{ : | ||
| - | Alright, and in case you don't need LAN-based DNS, but just want a public facing | + | Okay, that concludes the steps for setting up pihole+unbound within an openWRT environment. However, one might also want to leverage unbound for public-facing |
| server: | server: | ||
| Line 203: | Line 203: | ||
| # forward-addr: | # forward-addr: | ||
| - | After that, navigate to ''/ | + | After that, I navigate to ''/ |
| nameserver ::1 | nameserver ::1 | ||
| nameserver 127.0.0.1 | nameserver 127.0.0.1 | ||
| - | If, instead, you are trying to setup unbound | + | And, as we already discussed, if you are using unbound |
| - | server: | + | --- // |
| - | # Bind to localhost only | + | |
| - | interface: 127.0.0.1 | + | |
| - | interface: ::1 | + | |
| - | port: 53 | + | |
| - | do-ip4: yes | + | |
| - | do-ip6: yes | + | |
| - | prefer-ip6: yes | + | |
| - | access-control: | + | |
| - | access-control: | + | |
| - | access-control: | + | |
| - | # Optimize for 8 cores | + | |
| - | num-threads: | + | |
| - | msg-cache-slabs: | + | |
| - | rrset-cache-slabs: | + | |
| - | infra-cache-slabs: | + | |
| - | key-cache-slabs: | + | |
| - | # Cache settings for high query volume | + | |
| - | cache-max-ttl: | + | |
| - | cache-min-ttl: | + | |
| - | rrset-cache-size: | + | |
| - | msg-cache-size: | + | |
| - | key-cache-size: | + | |
| - | neg-cache-size: | + | |
| - | # Enable prefetch and expired responses | + | |
| - | prefetch: yes | + | |
| - | prefetch-key: | + | |
| - | serve-expired: | + | |
| - | serve-expired-ttl: | + | |
| - | # DNSSEC validation for DANE | + | |
| - | #do-dnssec: yes | + | |
| - | harden-dnssec-stripped: | + | |
| - | harden-referral-path: | + | |
| - | harden-below-nxdomain: | + | |
| - | harden-algo-downgrade: | + | |
| - | # Performance tweaks | + | |
| - | #so-rcvbuf: 4m | + | |
| - | #so-sndbuf: 4m | + | |
| - | edns-buffer-size: | + | |
| - | outgoing-range: | + | |
| - | num-queries-per-thread: | + | |
| - | jostle-timeout: | + | |
| - | # | + | |
| - | # Logging (minimal) | + | |
| - | verbosity: 1 | + | |
| - | log-queries: | + | |
| - | log-replies: | + | |
| - | use-syslog: yes | + | |
| - | # Security and privacy | + | |
| - | hide-identity: | + | |
| - | hide-version: | + | |
| - | use-caps-for-id: | + | |
| - | qname-minimisation: | + | |
| - | harden-large-queries: | + | |
| - | harden-glue: | + | |
| - | aggressive-nsec: | + | |
| - | # Protocol settings | + | |
| - | do-tcp: yes | + | |
| - | do-udp: yes | + | |
| - | # Enable full recursion - no longer needed, retained for history | + | |
| - | # do-not-query-localhost: | + | |
| - | # root-hints: "/ | + | |
| - | # Disable subnetcache | + | |
| - | module-config: | + | |
| - | # Forward to upstream resolvers | + | |
| - | # forward-zone: | + | |
| - | # name: " | + | |
| - | # forward-addr: | + | |
| - | # forward-addr: | + | |
| - | #legacy | + | |
| - | #server: | + | |
| - | # interface: 127.0.0.1 | + | |
| - | # cache-max-ttl: | + | |
| - | # cache-min-ttl: | + | |
| - | # num-threads: | + | |
| - | # msg-cache-slabs: | + | |
| - | # rrset-cache-slabs: | + | |
| - | # infra-cache-slabs: | + | |
| - | # key-cache-slabs: | + | |
| - | # rrset-cache-size: | + | |
| - | # msg-cache-size: | + | |
| - | # #prefetch: yes | + | |
| - | # harden-dnssec-stripped: | + | |
| - | # use-syslog: yes | + | |
| - | # aggressive-nsec: | + | |
| - | # hide-identity: | + | |
| - | # hide-version: | + | |
| - | # use-caps-for-id: | + | |
| - | # do-tcp: yes | + | |
| - | # do-udp: yes | + | |
| - | # do-ip4: yes | + | |
| - | # do-ip6: yes | + | |
| - | # prefer-ip6: no | + | |
| - | + | ||
| - | And now, the current lan-based config, in '' | + | |
| - | + | ||
| - | server: | + | |
| - | # Logging (minimal) | + | |
| - | use-syslog: yes | + | |
| - | verbosity: 1 | + | |
| - | directory: "/ | + | |
| - | username: unbound | + | |
| - | # Bind to all interfaces, non-standard port | + | |
| - | interface: 0.0.0.0 | + | |
| - | interface: ::0 | + | |
| - | port: 5335 | + | |
| - | do-ip4: yes | + | |
| - | do-ip6: yes | + | |
| - | prefer-ip6: no | + | |
| - | do-udp: yes | + | |
| - | do-tcp: yes | + | |
| - | # Module configuration | + | |
| - | module-config: | + | |
| - | # Security and DNSSEC | + | |
| - | harden-glue: | + | |
| - | harden-dnssec-stripped: | + | |
| - | use-caps-for-id: | + | |
| - | aggressive-nsec: | + | |
| - | hide-identity: | + | |
| - | hide-version: | + | |
| - | qname-minimisation: | + | |
| - | harden-large-queries: | + | |
| - | # Cache settings | + | |
| - | cache-max-ttl: | + | |
| - | cache-min-ttl: | + | |
| - | rrset-cache-size: | + | |
| - | msg-cache-size: | + | |
| - | key-cache-size: | + | |
| - | neg-cache-size: | + | |
| - | # Performance tweaks | + | |
| - | num-threads: | + | |
| - | msg-cache-slabs: | + | |
| - | rrset-cache-slabs: | + | |
| - | infra-cache-slabs: | + | |
| - | key-cache-slabs: | + | |
| - | outgoing-range: | + | |
| - | num-queries-per-thread: | + | |
| - | infra-cache-numhosts: | + | |
| - | prefetch: yes | + | |
| - | prefetch-key: | + | |
| - | serve-expired: | + | |
| - | serve-expired-ttl: | + | |
| - | so-reuseport: | + | |
| - | edns-buffer-size: | + | |
| - | # Block private address ranges (excluding own subnets) | + | |
| - | private-address: | + | |
| - | private-address: | + | |
| - | private-address: | + | |
| - | private-address: | + | |
| - | private-address: | + | |
| - | # Access control for LAN and VPN subnets | + | |
| - | access-control: | + | |
| - | access-control: | + | |
| - | access-control: | + | |
| - | access-control: | + | |
| - | + | ||
| - | --- // | + | |