abh / geodns

DNS server with per-client targeted responses
Apache License 2.0
1.37k stars 191 forks source link

wildcard support for a records or regex support #97

Open ufukgedik opened 7 years ago

ufukgedik commented 7 years ago

I can't find a way to work wildcard record for a records and cname records.

Example; http://www.jsoneditoronline.org/?id=b9ec0c1ee764927f249ca39ac5d3dde0

## This is ok;

[root@ns1 ~]# dig a *.edebiyati.net @127.0.1

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6 <<>> a *.edebiyati.net @127.0.1 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59929 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; WARNING: recursion requested but not available

;; QUESTION SECTION: ;*.edebiyati.net. IN A

;; ANSWER SECTION: *.edebiyati.net. 14400 IN A 185.149.100.20

;; Query time: 1 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Fri Sep 9 00:57:23 2016 ;; MSG SIZE rcvd: 64

[root@ns1 ~]#

## but give error this;

[root@ns1 ~]# dig a asd.edebiyati.net @127.0.1

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6 <<>> a asd.edebiyati.net @127.0.1 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 14673 ;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; WARNING: recursion requested but not available

;; QUESTION SECTION: ;asd.edebiyati.net. IN A

;; AUTHORITY SECTION: edebiyati.net. 3600 IN SOA bayi3-ns1.veridyen.com. hostmaster.edebiyati.net. 2016090700 5400 5400 1209600 3600

;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Fri Sep 9 00:58:01 2016 ;; MSG SIZE rcvd: 130

[root@ns1 ~]#

AnoopAlias commented 6 years ago

Can you confirm this works with the latest changes in dev branch