Hello,
can i configure mikrotik to respond to DNS requests differently?
i explain
i have mikrotik 4011 and is DHCP server, DNS server (classic installation of small office)
i setup static ip with
192.168.1.200 → server.lan
so from a windows pc (inside a lan) i run
ping server.lan
… server.lan [192.168.1.200] …
so works fine.
i would love that remotely if i connect a windows pc (with openvpn)
i run
ping server.lan
answer is 192.168.150.200
of course on mikrotik i setup a netmap to translate 192.168.1.xxx to 192.168.150.xxx
is possibile?
from now i push DNS and domain lan on openvpn client and i’m able to ping
server.lan
but answer 192.168.1.200 (of course)
i think i need an another DNS server to setup translated network…
but i’m not sure, so i ask on forum…
This is not possible in RouterOS because there is only a single DNS server/resolver instance and it is used for all DNS handling.
Sure it would be more flexible when you could create multiple DNS server/resolver instances and bind them to interfaces, similar to having multiple DHCP server instances.
Maybe in the future?
For now you will have to resolve your issue in a different way, e.g. using dstnat that would forward the same IP address to different destination IP depending on the interface.
but dstnat is not an option (for me)
because my fear is that office lan is 192.168.1.0/24
and remote lan (ovpn client) is same.
so if in remote lan exists ip 192.168.1.200
ovpn client ping/connect server.lan (192.168.1.200) call/connect local (client lan) and not server in office.
so i think right way is another DNS/resolver to push in ovpn and setup static record with server.lan → 192.168.150.200
of course on router 4011 i setup a netmap to translate entire 192.168.150.0/24 to 192.168.1.0/24
or another way could be insert in ovpn config a static dns entry???
something like
client
dev tun
...
route 192.168.150.0 255.255.255.0
dhcp-option DNS 192.168.150.1 # this could be deleted i think
dhcp-option DOMAIN lan
??? add-static-dns-record server.lan 192.168.150.200 ???
...
but i think this in not an option of openvpn…
i’m searching and post if i find something…