[Feature request] Add 'interface' parameter for static DNS entries

The purpose is to return different responses to different network interfaces for the same DNS request.

It is useful, if you have multiple separated networks and you need to return different IPs of your internal services for the same domain name. Or when you need to respond with some IP address to request from one network while responding with NXDOMAIN to the same request from other network.


For example:

/ip/dns/static/add name=someserver.com address=192.168.1.1 interfaces=ether2,ether3
/ip/dns/static/add name=someserver.com address=192.168.2.1 interfaces=ether4

In this example, if the DNS request ‘someserver.com’ comes from:

  • ether2 or ether3 - a router would return 192.168.1.1
  • ether4 - a router would return 192.168.2.1
  • some other interface - a router would forward this request to upstream DNS server.

In case no interfaces were specified for a static entry, a router should act as before - i. e. process such entry for all interfaces.


Another example:

/ip/dns/static/add name=someserver.com address=192.168.1.1 interfaces=ether2,ether3
/ip/dns/static/add name=someserver.com type=NXDOMAIN interfaces=ether4

Same as above, but for ether4 it will return ‘no such address’ response, so it will be impossible for anyone on this network interface to get the address, that belongs to another network.

I don’t believe the Mikrotik internal DNS server supports it but it sounds like you might be looking for something called Split Horizon where you can have different DNS results depending on the src-address.

If this is something critical, you could containerize “Technitium DNS Server” via Mikrotik containers. That’s what I do. They also support a bunch of other nice to have features.

Also, you should create an account and post your feature request here, it’s a good way to get eyes on it.

We can’t even get a simple source address added to the service so your chances of getting interface is next to zero :slight_smile:

I am sure plenty of the users here will tell you you just need lots of complex mangles and the feature is not needed.

I’ve already done it. But also posted it publicly on the forum. May be others are also seeking for this feature.

Emm, is it a forum bug or you just quoted an empty string?


Sometimes MikroTik can surprise. They can ignore a problem for years, at the same time they can add a feature within a month after you requested it.