Page 1 of 1

NAT networking, linksys router and dns problems

Posted: 13. Feb 2009, 23:38
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!

Re: NAT networking, linksys router and dns problems

Posted: 14. Feb 2009, 02:08
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

Re: NAT networking, linksys router and dns problems

Posted: 14. Feb 2009, 21:36
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.

Posted: 19. Feb 2009, 14:31
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.

Posted: 19. Feb 2009, 15:03
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?