dnsmasq split dns trick!

check the content of the file /etc/sysconfig/network

Make sure you have in here what the external dns name is.

HOSTNAME=mail.johnson.com

This line SHOULD be in accordance of the /etc/hosts file. If your server has an ip address like 192.168.4.1 then your /etc/hosts file should look like

127.0.0.1 localhost.localdomain localhost
192.168.0.19 mail.johnson.com mail

Install DNSMASQ

yum -y install dnsmasq

modify the following line in /etc/dnsmasq.conf

mx-host=johnson.com,mail.johnson.com,50

modify the /etc/resolv.conf as follows:

nameserver 127.0.0.1
nameserver 8.8.8.8

 

restart dnsmasq

/etc/init.d/dnsmasq restart

check your work

dig johnson.com mx

 

Leave a Reply