Linux common gateway to solve the pollution of DNS

Recommended for you: Get network issues from WhatsUp Gold. Not end users.
The initial treatment of this problem, in the SAG deployment, when a user's OA, a domain name, you can resolve the network and the network of two different IP, intranet user priority use of intranet server.
Although the windows program, you can modify the host file, the Java program can be set DNS buffer, not the ultimate solution.
As for the DNS in the polluted things, can not explain, DNS parse correctly is very important for the use of SSLVPN, because the SSLVPN received in the HTTP request, the domain name has the client first analysis.
Install dnsmasq in gateway configuration,,/etc/dnsmasq.conf
no-resolv
server=8.8.8.8
bogus-priv
domain-needed
filterwin2k
no-hosts
cache-size=8192
stop-dns-rebind
neg-ttl=3600


You can also configure the OpenDNS 208.67.222.222; 208.67.220.220
Gateway to run the command
iptables -t nat -A PREROUTING -i $LAN -p udp --dport 53 -j REDIRECT

Java custom DNS


//Override system DNS setting with Google free DNS server
System.setProperty("sun.net.spi.nameservice.nameservers", "8.8.8.8");
System.setProperty("sun.net.spi.nameservice.provider.1", "dns,sun");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Ivan at December 08, 2013 - 5:07 AM