Improving your resolv.conf file – Curator

by Scott Smith

30 April 2010

Improving your resolv.conf file

The resolver can load up to 3 name servers. If your server needs to find the mx record of gmail.com, it will first need to resolve gmail.com locally.

  • using a resolver from resolv.conf

  • dig @8.8.8.8 gmail.com -t mx +short

    result: alt1.gmail-smtp-in.l.google.com

  • connect to alt1.gmail-smtp-in.l.google.com

  • dig @8.8.4.4 alt1.gmail-smtp-in.l.google.com +short

    result: 209.85.227.27

  • connect to 209.85.227.27:25

Optimized resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 4.2.2.2
option rotate
option timeout:1

option rotate – load balance the queries across the 3 listed servers
option timeout:1 – sets the lookup timeout to 1 sec (default 5s)

Posted via web from S. MacKay Smith’s Notes

Advertisements