Comment 59 for bug 94940

ITSEC (david-sanders-thewg) wrote :

Using Ubuntu 10.04.01 in an interesting situation...
Local network is connected to router with a VPN Gateway.
All work traffic goes through NetworkA via VPN over NetworkB.
All non work traffic flows through Network B directly to the internet (including NetworkC traffic).
Network B has it's own wireless router to handle home clients (NetworkC)
NetworkB filters all NetworkC traffic directly to the internet.

So, my conundrum is to resolve work addresses (foo.local) AND internet addresses (bar.com) at the same time while on NetworkA. I can use my internal DNS servers, since they are recursive, and the router will correctly toss all internet traffic out NetworkB. Network C does not require this setup, only internet DNS servers.

I could get nslookups to work, -

nslookup time
Server: xxx.xxx.xxx.xxx
Address: xxx.xxx.xxx.xxx#53

Name: time.foo.local
Address: xxx.xxx.xxx.xxx

but not ping -
ping time - No repsonse, only solid cursor
ping time.foo.local - No repsonse, only solid cursor

After dealing with this for a few days, I wound up here. After reading this and eagerly copying the changes I needed to make to my nsswitch.conf file (current is "hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4") , it hit me...I'm not using search domains for foo.local. hmmmm....

Catting the file showed me this -
cat /etc/resolv.conf
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx

So I changed it to this -

nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx
search foo.local

Viola'! I correctly get domain expansion on the hostnames (ping time resolves as time.foo.local), and I have internet resolution.

So, the fix for me was to add search domains to my /etc/resolv.conf. I realize this may not work for everyone, but it did for me.