fix: support port configuration of dns forwarder
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Markus Pesch 2023-01-09 17:54:49 +01:00
parent c19f3c9db4
commit d0db9e6944
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
2 changed files with 21 additions and 9 deletions

View File

@ -35,14 +35,22 @@ bind9_options:
blackhole: []
dnssec_validations: true
forwarders:
- "8.8.8.8" # Google IPv4
- "8.8.4.4" # Google IPv4
- "2001:4860:4860::8888" # Google IPv6
- "2001:4860:4860::8844" # Google IPv6
- "208.67.222.222" # OpenDNS IPv4
- "208.67.220.220" # OpenDNS IPv4
- "2620:0:ccc::2" # OpenDNS IPv6
- "2620:0:ccd::2" # OpenDNS IPv6
- ip: "8.8.8.8" # Google IPv4
port: "53"
- ip: "8.8.4.4" # Google IPv4
port: "53"
- ip: "2001:4860:4860::8888" # Google IPv6
port: "53"
- ip: "2001:4860:4860::8844" # Google IPv6
port: "53"
- ip: "208.67.222.222" # OpenDNS IPv4
port: "53"
- ip: "208.67.220.220" # OpenDNS IPv4
port: "53"
- ip: "2620:0:ccc::2" # OpenDNS IPv6
port: "53"
- ip: "2620:0:ccd::2" # OpenDNS IPv6
port: "53"
interface_interval: 0
listen_on_ipv4:
- "127.0.0.1"

View File

@ -176,7 +176,11 @@ options {
{% if bind9_options.forwarders is defined and bind9_options.forwarders | length > 0 %}
forwarders {
{% for forwarder in bind9_options.forwarders %}
{{ forwarder }};
{% if forwarder.port is defined and forwarder.port | length > 0 %}
{{ forwarder.ip }} port {{ forwarder.port }};
{% else %}
{{ forwarder.ip }};
{% endif %}
{% endfor %}
};
{% else %}