modified: content/2015-07-02-filtering-aws-resources-with-boto3.rst modified: content/2015-07-04-list-all-installed-package-names-in-python.rst modified: content/2015-10-16-boto3-get-main-route-table.rst modified: content/2015-11-15-migrating-from-wordpress-to-pelican.rst renamed: content/2015-11-29-bind9-on-joyent-triton-large-memory-footprint.rst -> content/2015-11-29-bind9-on-joyent-triton.rst renamed: content/2015-12-16-ubuntu-set-dns-resolver-options.rst -> content/2015-12-16-set-dns-resolver-options.rst
41 lines
966 B
ReStructuredText
41 lines
966 B
ReStructuredText
Set DNS resolver options
|
|
=========================================================
|
|
|
|
:author: Russell Ballestrini
|
|
:slug: set-dns-resolver-options
|
|
:date: 2015-12-16 10:17
|
|
:tags: Operations, Guide
|
|
:status: published
|
|
:summary:
|
|
The right way to persist resolver options across many Linux distributions.
|
|
|
|
I desire the following options in `/etc/resolv.conf`:
|
|
|
|
.. code-block:: bash
|
|
|
|
rotate timeout:1 attempts:1
|
|
|
|
Ubuntu or Debian
|
|
----------------
|
|
|
|
For Ubuntu or Debian based systems, place the options in
|
|
`/etc/resolvconf/resolv.conf.d/base`:
|
|
|
|
.. code-block:: bash
|
|
|
|
rotate timeout:1 attempts:1
|
|
|
|
These options merge with the options from DHCP and end up in `/etc/resolv.conf`.
|
|
|
|
Then restart the host, or at least networking.
|
|
|
|
Redhat or Centos or Fedora
|
|
--------------------------
|
|
|
|
For Redhat, Centos or Fedora, add the following to `/etc/sysconfig/network`:
|
|
|
|
.. code-block:: bash
|
|
|
|
RES_OPTIONS="rotate timeout:1 attempts:1"
|
|
|
|
Then restart the host, or at least networking.
|