[solved] DNS resolv order (vpn)

Hi to all

i am using OpenWRT x86 virtual to be able to connect some specific site

ok, network is:
wan -> mikrotik ROS -> vlan40 -> clients
so i could not break existing vlan40 to put OpenWRT between clients and mikrotik, instead, it is in same vlan40 with only one interface

so far so good

Mikrotik is 40.1, OpenWRT is 40.2, clients are 40.xx

now, the hard part
i am using openconnect to dial out and eth0 is LAN, openconnect is WAN
still good, everything is working

but ... DNS
to be able for initial connection i need to put 40.1 in lan dns
ok, OpenWRT query the Mikrotik, name is resolved and openconnect succes in connecting
openconnect grab and and put them in

cat /tmp/resolv.conf.d/resolv.conf.auto 
# Interface lan
# Interface wan

and here is the problem
if i try to use OpenWRT as resolver from some client PC 40.xx

nslookup exa02.somedomain.whatever

OpenWRT first ask 40.1 and get negative response

how can i change order of name servers ?

if i modify by hand
and remove 40.1 from list, then everything works as expected

some ideas ?

then instruct your DNS server to use this address for specific domain only:
DNS forwardings: /example.org/x.x.40.1

You don't need to configure "lan dns".

hi @AndrewZ

i was so occupied with stupid network design & routing that i miss this obvious solution

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.