DNS dynamic servers

Can anyone please help me identify where the DNS dynamic servers of 8.8.8.8 / 8.8.4.4 are coming from in IP > DNS on my RB2011? This is what I see:

From what I understand the dynamic servers would be obtained from an interface which uses the DHCP client. I have checked and the only interface using the DHCP client is ether1-gateway, but ether1-gateway doesn’t use the above DNS servers (it uses 192.168.0.1):

Any ideas where the dynamic servers are coming from?

Basically, I want to make the RB2011 use different DNS servers than the ones listed.

Thank you in advance!

The Mikrotik Wiki has you covered

http://lmgtfy.com/?q=mikrotik+dynamic+dns+servers

in /ip dns servers, press the ^ arrow where you have 192.168.0.1 to remove it and add the dns servers you want.

Well, the question is where do the dynamic DNS servers come from. So deleting the static entries will not solve this problem.

Do you have any other upstream interface, e.g. lte or ppp(oe)-client with use-peer-dns enabled?

Thanks for the replies.

As you said, it seems these dynamic servers must be coming from the OpenVPN client connection that we are using for VPN access - is there any way to identify if this is where the DNS servers are coming from? And do we have any way of stopping the RB2011 from using the DNS servers provided by a VPN connection?

Thanks again.

Our ISP provides DNS servers via DHCP. When we establish a PPP connection to a VPN that connection also provides DNS servers. We would like the PPP/VPN connection’s DNS servers to take priority over the ISP’s servers when the VPN is active. Is it possible to make the VPN provider’s DNS servers take priority? Currently when we connect to the VPN the list of dynamic servers in IP > DNS looks like this:

<ISP primary DNS server>
<ISP secondary DNS server>
<VPN DNS server>

It would be great if we could either force

<VPN DNS server>

to the top of the list, or remove both of the ISP’s DNS servers while the VPN connection is active.

Any suggestions?

You could create a profile for the VPN client.

/ppp profile
add name=profile1 on-down="/ip dhcp-client set [find where interface=ether1] use-peer-dns=yes" \
  on-up="/ip dhcp-client set [find where interface=ether1] use-peer-dns=no"

As a safety measure, make sure to re-enable the DNS after reboot.

/system scheduler
add name=enable-dns on-event="/ip dhcp-client set [find where interface=ether1] use-peer-dns=yes" policy=read,write start-time=startup

Edit: thanks to @msatter, changed f into find

Looks good and neat to me. Please write in full the words and to understand the workings reading “f” instead of “full” is confusing.

I can’t find the button anymore where I can give you points for your posting.