Page 1 of 1

DNS 10.0.2.3 Returns A Record Instead of MX Record

Posted: 12. Aug 2013, 16:38
by nrogers
Here is my setup:

Vagrant version: 1.2.4
VirtualBox version: 4.2.16
Host OS: Mac OS X 10.7.5: 8 GB of RAM
Guest OS: Ubuntu Server 12.04 (files.vagrantup . com/precise32.box): 512 MB of RAM, guest additions installed

I have the "natdnshostresolver1" option turned on because, without it, my guest OS cannot access code.google . com even though my host OS can.

Here is the contents of my guest OS' "/etc/resolv.conf" file:

Code: Select all

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.0.2.3
The problem is that when I run `dig mycompanysdomain . com MX`, the answer section contains the A record, not the MX record. If I run the very same command on the host OS, the answer section contains the MX record as it should. Our mail is hosted through Google Apps.

To be sure that something with the host OS wasn't causing this, I tried running this Vagrant environment using a host OS of Ubuntu 12.04. The same problem occurred. Any ideas?

The output of `dig mycompanysdomain . com MX` on the guest OS:

Code: Select all

; <<>> DiG 9.8.1-P1 <<>> mycompanysdomain . com MX
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61144
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;mycompanysdomain . com.      IN  MX

;; ANSWER SECTION:
mycompanysdomain . com.   3600    IN  A   208.80.152.186

;; Query time: 22 msec
;; SERVER: 10.0.2.3#53(10.0.2.3)
;; WHEN: Fri Aug  9 16:20:38 2013
;; MSG SIZE  rcvd: 54
The output of `dig mycompanysdomain . com MX @8.8.8.8` on the guest OS (this is basically the same as the output of `dig mycompanysdomain . com MX` on the host OS):

Code: Select all

; <<>> DiG 9.8.1-P1 <<>> mycompanysdomain . com MX @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4016
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;mycompanysdomain . com.      IN  MX

;; ANSWER SECTION:
mycompanysdomain . com.   2619    IN  MX  15 ALT2.ASPMX.L.GOOGLE . com.
mycompanysdomain . com.   2619    IN  MX  30 ASPMX2.GOOGLEMAIL . com.
mycompanysdomain . com.   2619    IN  MX  40 ASPMX3.GOOGLEMAIL . com.
mycompanysdomain . com.   2619    IN  MX  10 ASPMX.L.GOOGLE . com.
mycompanysdomain . com.   2619    IN  MX  15 ALT1.ASPMX.L.GOOGLE . com.

;; Query time: 109 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Aug  9 16:24:09 2013
;; MSG SIZE  rcvd: 168

Re: DNS 10.0.2.3 Returns A Record Instead of MX Record

Posted: 12. Aug 2013, 17:33
by Perryg
What happens if you run VirtualBox outside of vagrant?
What happens if you run Bridged instead of VBox NAT?

Re: DNS 10.0.2.3 Returns A Record Instead of MX Record

Posted: 12. Aug 2013, 19:55
by nrogers
I don't know any passwords for Vagrant's "precise32.box" VM, so I just downloaded Ubuntu Server 12.04 (32-bit) and installed it with the default settings, NAT and everything. It ended up with an IP of 10.0.2.15. Its "/etc/resolv.conf" file had my router's IP in it. Running `dig mycompanysdomain . com MX` worked fine. One difference between this newly created VM and the one I've been using with Vagrant is I have Vagrant set up to use a static IP of 10.0.0.253.

Do you think this question is better suited for the Vagrant's support?

Re: DNS 10.0.2.3 Returns A Record Instead of MX Record

Posted: 12. Aug 2013, 20:07
by Perryg
Well we don't support vagrant so it probably would be better to ask them.

Re: DNS 10.0.2.3 Returns A Record Instead of MX Record

Posted: 11. Oct 2013, 12:14
by mmarkk