1

I have a development environment with 2 VMs running CentOS 7 through vagrant. My provider is VirtualBox.

site.dev.cafe is my DNS server, and I believe its configuration is correct and working.

On site.dev.cafe, the 'dig' and 'nslookup' commands work fine showing all the 13 DNS root servers, it resolves its own IP address to name and vice versa as well as any Internet domain.

vm2 is configured to use site.dev.cafe as a nameserver but vm2 is not able to resolve anything even though vm2 is able to ping site.dev.cafe.

SELinux and iptables are disabled on both VMs.

I'm wondering is this issue has to do with how Vagrant deals with networking.

Going to more specific configuration:

On site.dev.cafe:

# ifconfig
enp0s3: flags=4163  mtu 1500
        inet 10.0.2.15  netmask 255.0.0.0  broadcast 10.255.255.255
enp0s8: flags=4163  mtu 1500
        inet 10.0.6.62  netmask 255.255.255.0  broadcast 10.0.6.255


# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.0.2.3        0.0.0.0         UG    100    0        0 enp0s3
10.0.0.0        0.0.0.0         255.0.0.0       U     100    0        0 enp0s3
10.0.6.0        0.0.0.0         255.255.255.0   U     0      0        0 enp0s8
link-local      0.0.0.0         255.255.0.0     U     1003   0        0 enp0s8


# cat /var/named/dev.cafe.zone 
$ORIGIN dev.cafe.
$TTL 86400
@   IN  SOA dns1.dev.cafe. hostmaster.dev.cafe. (
    2015121400  ;serial
    21600       ;refresh after 6 hours
    3600        ;retry after 1 hour
    604800      ;expire after 1 week
    86400 )     ;minimum TTL 1 day

                IN  NS      dns1.dev.cafe.
                IN  MX  10  mail.dev.cafe.
                IN  A       10.0.6.62
dns1            IN  A       10.0.6.62
site            IN  A       10.0.6.62
ftp             IN  A       10.0.6.62
mail            IN  CNAME       site
www             IN  CNAME       site
vm2             IN  A       10.0.6.61


# cat /var/named/dev.cafe.rev.zone 
$ORIGIN 6.0.10.in-addr.arpa.
$TTL 86400
@   IN  SOA dns1.dev.cafe. hostmaster.dev.cafe. (
    2015121400  ;serial
    21600       ;refresh after 6 hours
    3600        ;retry after 1 hour
    604800      ;expire after 1 week
    86400 )     ;minimum TTL 1 day

@   IN  NS      site.dev.cafe.
61  IN  PTR     vm2.dev.cafe.
62  IN  PTR     site.dev.cafe.


# nslookup ftp.dev.cafe
Server:     127.0.0.1
Address:    127.0.0.1#53

Name:   ftp.dev.cafe
Address: 10.0.6.62

# nslookup site.dev.cafe
Server:     127.0.0.1
Address:    127.0.0.1#53

Name:   site.dev.cafe
Address: 10.0.6.62

# nslookup 10.0.6.62
Server:     127.0.0.1
Address:    127.0.0.1#53

62.6.0.10.in-addr.arpa  name = site.dev.cafe.

# ping yahoo.com
PING yahoo.com (98.138.253.109) 56(84) bytes of data.
64 bytes from ir1.fp.vip.ne1.yahoo.com (98.138.253.109): icmp_seq=1 ttl=63 time=63.9 ms


# cat /etc/resolv.conf
domain dev.cafe
nameserver 127.0.0.1

On vm2:

# ifconfig
enp0s3: flags=4163  mtu 1500
        inet 10.0.2.15  netmask 255.0.0.0  broadcast 10.255.255.255
enp0s8: flags=4163  mtu 1500
        inet 10.0.6.61  netmask 255.255.255.0  broadcast 10.0.6.255


# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.0.2.3        0.0.0.0         UG    100    0        0 enp0s3
10.0.0.0        0.0.0.0         255.0.0.0       U     100    0        0 enp0s3
10.0.6.0        0.0.0.0         255.255.255.0   U     0      0        0 enp0s8
link-local      0.0.0.0         255.255.0.0     U     1003   0        0 enp0s8


# cat /etc/resolv.conf
domain dev.cafe
nameserver 10.0.6.62

# ping 10.0.6.62
PING 10.0.6.62 (10.0.6.62) 56(84) bytes of data.
64 bytes from 10.0.6.62: icmp_seq=1 ttl=64 time=0.008 ms
64 bytes from 10.0.6.62: icmp_seq=2 ttl=64 time=3.64 ms

Help please. Thank you.

  • Despite of the DNS client (vm2) not able to resolve names using site.dev.cafe, these 2 servers have Puppet working between them just fine. – GreenTeaTech Dec 16 '15 at 0:01
  • Anyone? Help please. – GreenTeaTech Dec 18 '15 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.