Vagrant Networking - can ping IP but not a FQDN

0

I have a CentOs vagrant machine and I have no problem pining an IP address such as: 216.58.223.4

When I try and ping: www.google.com, it is unable to find the network.

/etc/resolv.conf

This file is managed by Puppet, do not edit nameserver 8.8.8.8 nameserver 8.8.4.4

dig google.com

DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6_6.1 <<>> google.com ;; global options: +cmd ;; connection timed out; no servers could be reached –

The machine has been setup with a private network and on a fixed IP address. It is running on a windows machine.

Essentially I am attempting to do a composer.phar update but as the machine can not access the internet, this is failing.

Any help, much appreciated!

HappyCoder

Posted 2015-05-18T21:07:04.537

Reputation: 103

Answers

1

It's a DNS issue, obviously. You cannot edit /etc/resolv.conf because puppet does so based on config management, so you need to tell puppet a set of working DNS servers to use. Your ISP probably has one, but here's a short list of servers that should be good DNS servers, and easy to remember:

4.2.2.2
4.2.2.1
8.8.8.8
8.8.4.4

Depending on the setup, the way to achieve this varies, but you shold look in /etc/puppet/modules/resolver/ or thereabouts.

If still no luck, ensure that your DNS requests aren't blocked somehow, such by forgetting to allow traffic on port 53.

Jarmund

Posted 2015-05-18T21:07:04.537

Reputation: 5 155

Thank you for your suggestions. What resolved this was a reboot... – HappyCoder – 2015-05-18T21:29:29.063

@HappyCoder lol, OK. "Have you tried turning your computer off and then on again?" – Jarmund – 2015-05-18T21:38:21.370