Community discussions

MikroTik App
 
dbdom
just joined
Topic Author
Posts: 23
Joined: Sun Dec 09, 2012 9:51 pm

Static DNS and RegExp

Wed Nov 26, 2014 1:46 pm

Has anybody experience with RegExp in Static DNS ?
In my opinion it does not work - I have even tried .*\\.example\\.com from http://wiki.mikrotik.com/wiki/Manual:IP/DNS without success
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Static DNS and RegExp

Wed Nov 26, 2014 2:24 pm

/ip dns static add address=1.1.1.1 name=".+\\.e\\.com"
will give me output of:
$ dig aghj.e.com @cap

; <<>> DiG 9.9.5-4.3-Ubuntu <<>> aghj.e.com @cap
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2901
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 13, ADDITIONAL: 11

;; QUESTION SECTION:
;aghj.e.com.                    IN      A

;; ANSWER SECTION:
aghj.e.com.             86400   IN      A       1.1.1.1
this will match e.com as well as asdf.e.com etc.
/ip dns static address=1.1.1.1 name=".*\\.\\?e\\.com"
 
dbdom
just joined
Topic Author
Posts: 23
Joined: Sun Dec 09, 2012 9:51 pm

Re: Static DNS and RegExp

Wed Nov 26, 2014 10:03 pm

Sorry - my fault. I have public DNS (not router) as my default one :-)
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Static DNS and RegExp

Thu Nov 27, 2014 2:56 pm

that is why i like dig command so much, so i can set address of DNS server myself.
 
ofmoreno
just joined
Posts: 1
Joined: Fri Apr 14, 2023 12:23 pm

Re: Static DNS and RegExp

Fri Apr 14, 2023 12:26 pm

Who is online

Users browsing this forum: Chupaka, Pigsfoot, Pucur and 70 guests