Vyatta Proxy Setup

domain-name-systeminternal-dnsPROXYvyatta

So I am currently migrating our office away from the current proxy (Squid running in Windows on our Mail server…I did not set it up…) to a new one, Squid running on Vyatta.

So far I have everything setup and working perfectly, however im having trouble getting it to use two different DNS servers, one for internet (8.8.8.8) and another for internal domain name sites.

If I set our internal DNS ip first with:

set system name-server 192.168.47.1
set system name-server 8.8.8.8

Then it does seem to resolve everything, however any public websites on the internet take an incredibly long time to resolve. However, if I switch it around so the public DNS is first, websites load incredibly quick but it will only load records in the public DNS.

Using nslookup with either setting only seems to use the first name server.

Anyone dealt with this before?

Best Answer

What is happening with the squid config above is that it's trying to resolve public DNS via your internal server, then waiting for it to fail, then trying public DNS.

I would suggest running a separate DNS proxy on the system and tell squid to use that. Something nice and easy like dnsmasq allows you to set different DNS servers for internal domains, but everything else goes to public internet DNS. Looks like Vyatta includes dnsmasq.

Alternatively, set up forwarding on whatever your internal DNS server is to allow it to resolve internet domain names, then just use the one DNS server in squid.