How can I forward to a DNS server depending on domain


#1

VyOS at home is connected to both separated client networks.
I want to use the ISP nameservers for general queries and specific internal dns for each client for the domain of each client.

For example, one client have a MS domain named it.local with DC on 10.1.50.60, 10.1.50.40, so when VyOS at home receive a query for dc1.it.local, must be used 10.1.50.60 (reached by openvpn) and never use ISP name server which do not know anything about it.local domain.
“set service dns forwarding domain it.local 10.1.50.60” is not accepted!

vyos@fw# run show dns forwarding nameservers

Nameservers configured for DNS forwarding

99.99.99.53 available via ‘system’
99.99.99.153 available via ‘system’

[edit]
vyos@fw# set service dns forwarding domain it.local 10.1.50.60

Configuration path: service dns forwarding domain it.local [10.1.50.60] is not valid
Set failed

[edit]
vyos@fw#


#2

Wrong format.
vyos@fw# set service dns forwarding domain it.local server 10.1.50.60

[edit]
vyos@fw# show service dns
forwarding {
cache-size 150

  • domain it.local {
  •    server 10.1.50.60
    
  • }
    listen-on eth1
    }

[edit]
vyos@fw# commit

[edit]
vyos@fw#