The fun part for me was that I had no idea you could regex there. That really opens up possibilities. Yea, I never thought about looking in the wiki, duhhhhh. Its right there.
http://wiki.mikrotik.com/wiki/Manual:IP ... NS_Entries
How much of a performance hit is there doing this ? Obviously a CCR would be a big help here. The more cores the better
This is obviously less of a performance hit then using Layer 7 ? Obviously less secure as any machine on the other side could simply drop in their own DNS lookups to circumvent this trick. Anyone reading this should be aware of the downsides of this trick.
As the Wiki says "Regular expression matching is significantly slower than of the plain entries, so it is advised to minimize the number of regular expression rules and optimize the expressions themselves."
I could see a heavily loaded single core router becoming suddenly unresponsive by just adding one regex in the DNS. So I would use this with caution.
Regex is itself a art form. Ive seen regex that I could have never thought of on my own. Long ones can be mind bending but far better performance.