0

I have a Mikrotik Router with Router OS where I need to set a static DNS entry. I have set

  • a url exhibitorsearch.test.intern.customer.com to an ip with the ending .92
  • a regexp .*\.test\.intern\.customer\.com to an ip with the ending .91

enter image description here

The explicit url comes before the regexp url. The problem is that when I run dig exhibitorsearch.test.intern.customer.com I always get an answer with .91. I've tried switching them around so maybe the last entry wins, but to no avail. I have also waited five minutes because of the TTL to expire and renew the entry.

How can I get for the explicit url the .92 and how can I get the .91 for everything else?

mles
  • 115
  • 7

1 Answers1

2

You can't. Citing the documentation:

The list is ordered and is checked from top to bottom. Regular expressions are checked first, then the plain records.

I would try the following workarounds

  • Try to use non-regex wildcards. These are a standard DNS feature (unlike the regex-variant) and in that case, the more specific records should have precedence.

    *.test.intern.example.com
    exhibitorsearch.test.intern.example.com
    
  • Try to build a regexp that excludes exhibitorsearch.

Sven
  • 98,649
  • 14
  • 180
  • 226
  • Thanks for finding that in the documentation. First suggestion did not work. When using `*.test.intern.example.com` as DNS entry, I can `dig *.test.intern.example.com`, but for `dig asdf.test.intern.example.com` I don't get an answer. We ended up setting both entries as a regex, with the more specifc entry before the * entry. – mles Aug 29 '18 at 10:46