NAT networking, linksys router and dns problems

Discussions related to using VirtualBox on Linux hosts.
Post Reply
klippe
Posts: 14
Joined: 16. Dec 2008, 22:32

NAT networking, linksys router and dns problems

Post by klippe »

Hi!

I run Virtualbox 2.1.2 on Kubuntu host with Xubuntu guest (earlier also Kubuntu guest with the same problems). My networking is configured to use NAT (default). I have some problems with my guest.

1. Everything is ok when I have a direct internet connection.
2. There is something wrong with DNS resolution when I'm behind a router.

What is happening (on guest system):
a) I can't get acces (browser is not able to find such addresses) to some sites like: blogspot.com, googlecode.com, yahooapis.com, gstatic.com etc.
b) at the same time many other pages work well
c) at the same time I can connect to these addresses from my host system

Configuration:
a) My router is Linksys WRT45GP2. It has DHCP and NAT enabled.
b) I have opendns servers set manually in host as well as in guest system (I also tried other dns servers - it changed nothing)
c) my guest is assigned 10.0.2.15 ip address
d) my host has 192.168.15.100 ip address

Workaround:
When I call

Code: Select all

dig googlecode.com
on my guest then I can get access to this page for a while.

I have this problem for a long time and I couldn't find any solution (I googled with no success). It is really annoying. I even asked on this forum but there was no good answer. This is my next try, please HELP!
Martiinez
Posts: 1
Joined: 14. Feb 2009, 02:03
Contact:

Re: NAT networking, linksys router and dns problems

Post by Martiinez »

klippe wrote:
Configuration:
a) My router is Linksys WRT45GP2. It has DHCP and NAT enabled.
b) I have opendns servers set manually in host as well as in guest system (I also tried other dns servers - it changed nothing)
c) my guest is assigned 10.0.2.15 ip address
d) my host has 192.168.15.100 ip address
1. What's in /etc/resolv.conf file on host and guest machine?
2. Does your linksys work as dns proxy?

Martiinez
klippe
Posts: 14
Joined: 16. Dec 2008, 22:32

Re: NAT networking, linksys router and dns problems

Post by klippe »

Martiinez wrote: 1. What's in /etc/resolv.conf file on host and guest machine?
Host:

Code: Select all

search airbites
nameserver 208.67.220.220
nameserver 208.67.222.222
Guest (default values after system is started - I don't know how to set static dns-es in Xubuntu)

Code: Select all

domain airbites
search airbites
nameserver 10.0.2.3
Guest (after manual changes):

Code: Select all

domain airbites
search airbites

nameserver 208.67.220.220
nameserver 208.67.222.222
I also tried different dns servers.
2. Does your linksys work as dns proxy?
I think no, but I'm not sure what is "dns proxy". My router has DNS servers set to opendns, and these servers are later set in host's resolv.conf.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

You have a redundant setup of name servers. You set your router, host and guest all to the same DNS server. What is the point of setting your router to a DNS, if the router won't even be used for DNS lookups? Same goes for the Guest. The NAT DHCP will use the first DNS server on the Host for name resolving.

Anyway, what happens if you ditch OpenDNS entrirely and use your provider's DNS server (so set everything on default, router use the ISP addresses, Host uses the router as DNS, Guest keeps it NAT DNS). If you don't have any problems with that, then really get rid of OpenDNS. I've seen several issues with them before. It even gives problems with IPv6 only servers.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
klippe
Posts: 14
Joined: 16. Dec 2008, 22:32

Post by klippe »

Sasquatch wrote:You have a redundant setup of name servers. You set your router, host and guest all to the same DNS server. What is the point of setting your router to a DNS, if the router won't even be used for DNS lookups?
I mean my router only servers DNS adresses (opendns ones) to connected systems. So the connected system has opendns in its resolv.conf (this is how my host has opendns servers set).
Same goes for the Guest. The NAT DHCP will use the first DNS server on the Host for name resolving.

Anyway, what happens if you ditch OpenDNS entrirely and use your provider's DNS server (so set everything on default, router use the ISP addresses, Host uses the router as DNS, Guest keeps it NAT DNS). If you don't have any problems with that, then really get rid of OpenDNS. I've seen several issues with them before. It even gives problems with IPv6 only servers.
IIRC I used OpenDNS because I had problems with my provider's dnses. But I'll try to do what you said. One question - what do you mean when you say: "host uses the router as DNS"? Should I set my router's ip as dns server?
Post Reply