Page 1 of 1

[SOLVED] Problem DNS in VM CentOS

Posted: 19. Oct 2009, 20:22
by spz
Hello,

I have a problem with CentOS 5.3 (guest), I own VirtualBox 3.0.8 under Windows 7 x64 (host).

I configured the bridge and addressed fixed IP in CentOS and Windows 7. However, there's not Internet in CentOS, I configured the file /etc/resolv.conf for put the DNS of my provider, but that does not work.

I disabled the DHCP server in the VirtualBox, do you have a solution please ?

Network configuration :

== Windows 7 ==

IP : 192.168.0.1/24 (bridge interface)
Gateway : 192.168.0.254
DNS1 : 212.27.54.252
DNS2 : 212.27.53.252

== CentOS 5.3 (eth0) ==

IP : 192.168.0.10/24
Gateway : 192.168.0.1
DNS1 (in /etc/resolv.conf) : nameserver 212.27.54.252

Thank you.

spz.

Re: Problem DNS in VM CentOS

Posted: 19. Oct 2009, 20:34
by Sasquatch
Turning off the DHCP of VB won't matter if you use Bridged. The DHCP is only used for NAT and Host-Only and NAT DHCP cannot be disabled.

Now for the DNS, you can enter more than one DNS server in /etc/resolv.conf. And ehm, why did you set the Guest gateway to your Host, and not your router like on the Host? The VM is a separate machine on the network as if you plug in a new computer to your router. The Host has no gateway software or settings by default.

Re: Problem DNS in VM CentOS

Posted: 19. Oct 2009, 21:39
by spz
Effectively, it's OK !! :)

I put 192.168.0.254 in the guest OS.

Thank you ;)