A forwarding rule or access policy rule that uses an FQDN or wildcard FQDN address object does not match traffic to that domain. The session is handled by Default-Rule and follows the default route instead of the forwarding profile that the FQDN rule selects.
An FQDN address object is matched against the destination IP of the flow, so the device has to know which IP addresses belong to the domain. It learns them from the DNS answers it handles. When clients resolve through an internal DNS server directly and the LAN routing instance has no DNS proxy settings, the device never sees those answers and the rule never matches. Configuring DNS proxy settings in the LAN routing instance, with the same DNS servers the clients use, resolves the issue.
The SD-WAN policy rule that selects the forwarding profile and the access policy rule both reference the FQDN object, are enabled, and sit above Default-Rule. Traffic to the domain still takes the default route learned from the hub.
The session shows that the FQDN rule was not hit. For a ping to the domain, the session output includes these fields:
show orgs org <org> sessions extensive | select source-ip <client-ip> | select destination-ip <resolved-ip> | match-all pbf-enabled false forward-sdwan-rule-name Default-Rule access-policy <a later, general rule>
The destination IP in the session is one of the addresses the domain resolves to, so the name resolves correctly on the client. The device just has no mapping from that IP to the domain.
Matching on an FQDN object depends on a per-tenant mapping of IP addresses to domain names, the IP to Domain Cache. It is part of the tenant DNS settings and is enabled by default. The mapping is built from DNS answers that pass through the device's DNS proxy.
In the failing setup the clients use the internal DNS servers they receive from DHCP. The LAN routing instance has no DNS proxy settings, and the only name servers on the device are on the transport routing instances. The device never sees the answers, so the cache has no entry for the destination IP and the rule does not match.
Wildcard objects such as (.*\.|^)example\.com cannot be looked up by querying a name, so they depend completely on the mapping. A resolver on the wrong routing instance, or a public resolver that returns different IP addresses than the internal servers the client used, causes the same result.
Configure DNS proxy settings in the LAN routing instance so that the device handles the client DNS queries and forwards them to the same servers the clients already use.
(.*\.|^)example\.comA pattern such as
.*proxy\.example\.com matches only names that end in proxy.example.com.show orgs org <org> sessions extensive | select source-ip <client-ip> | select destination-ip <resolved-ip> | match-all forward-sdwan-rule-name <the FQDN rule> forward-egress-ckt <the WAN circuit from the forwarding profile>
The figures below are from a lab setup. The lab forwarder is a public resolver. In production, use the DNS servers your clients use.
Figure 1. DNS Settings. Routing Instance is the LAN VR, a forwarder is set, Default Resolver Redirection Policy is Default-Policy and IP to Domain Cache is enabled.
Figure 2. Proxy profile in Fail Over mode with a resolver. The resolver lists the DNS server and port 53.
Figure 3. DNS redirection rule under Default-Policy for the LAN zone. The DNS Headers Match tab holds the domain name patterns. The Proxy Setting tab selects the proxy profile.
Figure 4. SD-WAN policy rule, Destination tab. The destination addresses are two FQDN address objects.