[libvirt-users] Specify DNS MX record for domain in KVM default network

TSHIMANGA Minkoka tshikose at tshimix.cd
Fri Mar 16 15:27:39 UTC 2018


Dears,
This is my first post in this mailing list.I have browsed the archives, but I
have not found a solution to my concern.So I decided to open a new thread.Please
excuse me, if it has already been addressed here or somewhere else. And just
provide me directions to the solutions.
I am using Fedora 27 with kernel 4.15.8-300.fc27.x86_64 and KVM libvirt 3.7.0-
4.fc27.x86_64.
My need is to be able to have the DNS server initialized by the KVM default
network to answer DNS MX query for the domain.The idea is to have something
similar to the below MX record lines in default network xml.
<network>  <name>default</name>  <uuid>11111111-2222-3333-4444-
555555555555</uuid>  <forward mode='nat'>    <nat>      <port start='1024'
end='65535'/>    </nat>  </forward>  <bridge name='virbr0' stp='on'
delay='0'/>  <mac address='52:54:00:00:00:01'/>  <domain name='example.com'
localOnly='yes'/>  <dns enable='yes' forwardPlainNames='no'>    <mx
domain='example.com' target='mail' priority='10'/>    <mx domain='example.com'
target='mail_backup' priority='20'/>  </dns>  <ip address='192.168.122.1'
netmask='255.255.255.0'>    <dhcp>      <range start='192.168.122.100'
end='192.168.122.199'/>      <host mac='52:54:00:00:00:10'
name='mail.example.com' ip='192.168.122.10'/>      <host mac='52:54:00:00:00:20'
name='mail_backup.example.com' ip='192.168.122.20'/>    </dhcp>  </ip></network>
So that queries such the below.
dig @192.168.122.1 -t MX example.com
give answers such as below.
; <<>> DiG 9.11.2-P1-RedHat-9.11.2-1.P1.fc27 <<>> -t MX example.com;; global
options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id:
61856;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 8192;; QUESTION
SECTION:;example.com.			IN	MX
;; ANSWER SECTION:example.com.		3600	IN	MX	10
mail.example.com.example.com.		3600	IN	MX	20
mail_backup.example.com.
;; Query time: 558 msec;; SERVER: 192.168.122.1#53(192.168.122.1);; WHEN: Fri
Mar 16 16:21:00 WAT 2018;; MSG SIZE  rcvd: 96

Best regards,
Tshimanga

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20180316/6550a7af/attachment.htm>


More information about the libvirt-users mailing list