# config system virtual-wan-linkDNS Configuration.
set status enable
# config members
edit 1
set interface "wan1"
set gateway 10.191.19.1
next
edit 2
set interface "wan2"
set gateway 10.191.35.1
next
end
# config service
edit 2
set name "dns"
set mode sla
set dst "all"
set src "10.191.35.75" "10.191.19.75"
# config sla
edit "internet"
set id 1
next
end
set priority-members 2 1
next
end
end
# config system dns
set primary 208.91.112.52
set interface-select-method sdwan
end
# diagnose firewall proute listNote.
list route policy info(vf=root):
id=0x7f060001 vwl_service=1(DNS) vwl_mbr_seq=1 2 dscp_tag=0xff 0xff flags=0x0 tos=0x00 tos_mask=0x00 protocol=0 sport=0:65535 iif=0 dport=1-65535 oif=11 oif=7
source(2): 10.191.35.75-10.191.35.75 10.191.19.75-10.191.19.75
destination(1): 208.91.112.52-208.91.112.52
hit_count=0 last_used=2020-07-03 15:45:15
# config system dns## SD-WAN config ##
set primary 208.91.112.52
set source-ip 10.191.19.75
set interface-select-method sdwan
end
# config system virtual-wan-link
# config service
edit 2
set name "dns"
set mode sla
set dst "all" <----- Destination as all.
set src "10.191.19.75” <----- Define source.
next
end
end# diagnose firewall proute listThis is not an ideal solution in scenarios where the configuration has multiple SD-WAN interfaces and a dynamic DNS 'source-ip' selection is required.
list route policy info(vf=root):
id=0x7f080001 vwl_service=1(DNS) vwl_mbr_seq=1 2 dscp_tag=0xff 0xff flags=0x0 tos=0x00 tos_mask=0x00 protocol=0 sport=0:65535 iif=0 dport=1-65535 oif=11 oif=7
source(2): 10.191.19.75-10.191.19.75
destination(1): 0.0.0.0-255.255.255.255
hit_count=15 last_used=2020-07-09 09:52:01
2) Avoid using source in the SD-WAN rule and use destination instead with IP of DNS server.
## SD-WAN config ### config system virtual-wan-linkThe traffic will match with the SD-WAN rule then.
# config service
edit 2
set name "dns"
set mode sla
set dst " 208.91.112.52" <----- Define DNS server here.
set src "all” <----- Configure source as all.
next
end
end# diagnose firewall proute listRelated document.
list route policy info(vf=root):
id=0x7f070001 vwl_service=1(DNS) vwl_mbr_seq=1 2 dscp_tag=0xff 0xff flags=0x0 tos=0x00 tos_mask=0x00 protocol=0 sport=0:65535 iif=0 dport=1-65535 oif=11 oif=7
source(1): 0.0.0.0-255.255.255.255 <---- Source removed.
destination(1): 208.91.112.52-208.91.112.52
hit_count=2 last_used=2020-07-03 15:47:14
https://docs.fortinet.com/document/fortigate/6.2.4/cli-reference/27620/system-dnsRelated Articles
Technical Tip: Functionality of 'set interface-select-method' for local-traffic with SD-WAN
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2023 Fortinet, Inc. All Rights Reserved.