[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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


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.

  <forward mode='nat'>
      <port start='1024' end='65535'/>
  <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'/>
  <ip address='' netmask=''>
      <range start='' end=''/>
      <host mac='52:54:00:00:00:10' name='mail.example.com' ip=''/>
      <host mac='52:54:00:00:00:20' name='mail_backup.example.com' ip=''/>

So that queries such the below.

dig @ -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

; EDNS: version: 0, flags:; udp: 8192
;example.com.			IN	MX

example.com.		3600	IN	MX	10 mail.example.com.
example.com.		3600	IN	MX	20 mail_backup.example.com.

;; Query time: 558 msec
;; WHEN: Fri Mar 16 16:21:00 WAT 2018
;; MSG SIZE  rcvd: 96

Best regards,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]