GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DNS-HOSTS (1)

NAME

dns-hosts - generate /etc/hosts entries from DNS tables

CONTENTS

Synopsis
Description
Options
Example
     Makefile

SYNOPSIS

dns-hosts [ option... ][ infile [ outfile ]]
dns-hosts -Help
dns-hosts -VERSion

DESCRIPTION

The dns-hosts program is used to generate the /etc/hosts entries from DNS tables.

If the input file is not named, or the name ’-’ is used, the standard input is read.

If the output file is not named, or the name ’-’ is used, the startdard output is written.

OPTIONS

The following options are understood:
-Delete_Foreign_Names
  This option may be used to delete A and NS records which reference names in domains outside the domain specified in the closest preceeding SOA record.
-Verbose This option may be used to see what dns-hosts deciphers each resource record as.
-Help This option may be used to get more information about how to used th dns-hosts program.
-VERSion This option may be used to see what version of the dns-hosts program is running.
-Idirectory
  This option may be used to set the search path for include files.

[Include document man1/arglex.so]

[Include document man1/exit.so]

EXAMPLE

The idea is that you have all of the information concerning each computer in the one file. This makes it less likely that something will be omitted, and simpler to change if the name or IP address changes.

Given a database file called ‘‘example.com’’ and which contains the following text




[Include document man1/example.so]

You can generate the /etc/ethers file using the following command

% dns-hosts example.com /etc/ethers
%


Here is what you would see as the output



[Include document man1/example.hosts.so]

Note that the output uses relative names.

    Makefile

All of this can be automated using the following makefile fragment:


/etc/hosts: example.com
        dns-hosts example.com $@


By doing this, all you need to do is edit the example.com file, and the use the make(1) command to bring everything up-to-date.

If you were using NIS, NIS+ or LDAP you would update them, rather than the static file.

[Include document man1/copyright.so]

[Include document man1/author.so]

Search for    or go to Top of page |  Section 1 |  Main Index


Reference Manual DNS-HOSTS (1) dnsutl

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.