Gnuru.org
Productive Linux


Subscribe

 Subscribe via Feedburner in a reader

Enter your email address:

Delivered by FeedBurner


Login
Login:
Password:



Don't have an account?
Sign up to Gnuru.org
Forgot your password?

Essential Network Files
29 April 2004 @ 17:37 BST
by Paul

People are sometimes confused about why their network connections aren't working. Here is a brief guide to the basic files that Linux uses for networking(there may be others depending on the distribution you're using):

/etc/hosts
This file contains the IP and names of other hosts. One essential line is for the loopback:
127.0.0.1  localhost
/etc/hostname
This contains the hostname of the computer.
/etc/resolv.conf
This file helps determine how IP addresses should be resolved. It may contain the 'domain' keyword to indicate how short names should be expanded and the 'nameserver' keyword to specify what nameservers the computer should use.
/etc/networks
This lists the networks known to the computer. For example:
loopback 127.0.0.0
localnet 10.0.0.0
/etc/host.conf
This file determines how IP addresses should be resloved. It typically looks something like this:
order hosts, bind
multi on
The 'order' key word may be followed by 'hosts', 'bind' or 'nis'. In this example, the computer will first look in the '/etc/hosts' file before looking up the name using bind.
/etc/hosts.allow
A list of hosts that may access the machine
/etc/hosts.deny
A list of hosts that may not access the machine
Tags: network



Leave a comment:

Are you human?