From 3c563b3ae8397da33a03c0429c17b97eb9625c5f Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 12 Jan 2019 10:49:42 +0100 Subject: T1041: make upstream DNS server optional The name-server option under "service dns-forwarding" was never mandatory so users never needed to specify an upstream server. With the recent switch to PowerDNS recursor in VyOS 1.2.0 we will act as a full DNS recursor when there is no upstream DNS server configured. --- interface-definitions/dns-forwarding.xml | 2 +- src/conf_mode/dns_forwarding.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/interface-definitions/dns-forwarding.xml b/interface-definitions/dns-forwarding.xml index 88af5f4f9..b989434f2 100644 --- a/interface-definitions/dns-forwarding.xml +++ b/interface-definitions/dns-forwarding.xml @@ -135,7 +135,7 @@ - Domain Name Servers (DNS) addresses + Domain Name Servers (DNS) addresses [OPTIONAL] ipv4 Domain Name Server (DNS) IPv4 address diff --git a/src/conf_mode/dns_forwarding.py b/src/conf_mode/dns_forwarding.py index c21a91a30..135f6fec0 100755 --- a/src/conf_mode/dns_forwarding.py +++ b/src/conf_mode/dns_forwarding.py @@ -67,8 +67,12 @@ forward-zones={% for d in domains %} # dnssec dnssec={{ dnssec }} +{% if name_servers -%} # name-server forward-zones-recurse=.={{ name_servers | join(';') }} +{% else %} +# no name-servers specified - start full recursor +{% endif %} """ -- cgit v1.2.3