Thanks Mindy & Heidi,
I got this to work with a single zone - however, when I tried using
DNS.serve_with_zonefiles and used dig, dig only returned the dns values of the
last zone in the list, ie:
let zonefiles = ["example1.com.zone"; "example2.net.zone"]
module Main (C:CONSOLE) (K:KV_RO) (S:STACKV4) = struct
module U = S.UDPV4
module DNS = Dns_server_mirage.Make(K)(S)
let start c k s =
let t = DNS.create s k in
DNS.serve_with_zonefiles t ~port ~zonefiles
end
gives:
[example1.com]
dig @127.0.0.1 www.example1.com
; <<>> DiG 9.9.5-3ubuntu0.2-Ubuntu <<>> @127.0.0.1 www.example1.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 3848
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
;www.example1.com. IN A
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon May 11 12:09:29 UTC 2015
;; MSG SIZE rcvd: 36
and
[example2.net]
dig @127.0.0.1 www.example2.net
; <<>> DiG 9.9.5-3ubuntu0.2-Ubuntu <<>> @127.0.0.1 www.example2.net
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19560
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 1500
;; QUESTION SECTION:
;www.example2.net. IN A
;; ANSWER SECTION:
www.example2.net. 3600 IN A 192.168.1.11
;; AUTHORITY SECTION:
example2.net. 3600 IN NS ns2.example2.net.
example2.net. 3600 IN NS ns1.example2.net.
;; ADDITIONAL SECTION:
ns1.example2.net. 3600 IN A 192.168.1.11
ns2.example2.net. 3600 IN A 192.168.1.11
;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon May 11 12:11:52 UTC 2015
;; MSG SIZE rcvd: 131
Incidentally, I see your personal dns server zone file includes an MX record -
I also need a person mails server for my cubieboard, what server are you
running?
Cheers (and thanks)
Nick
_______________________________________________
MirageOS-devel mailing list
[email protected]
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel