[svlug] "Mini-DNS" - gethosts

Craig Oda - Personal email craigoda at oda.dhs.org
Mon Jan 21 14:14:02 PST 2002


Might want to read the DNS-HOWTO
http://www.ibiblio.org/pub/Linux/docs/HOWTO/DNS-HOWTO

it is actually fairly straightforward and you have the added advantage of 
letting Windows clients be able to ping, ssh the Linux boxes.  Also, you 
can cache the DNS on your local network, speeding up lookup response.  

Also, when you run dhcpd, I think you have to specify the hardware address 
to a fixed IP address for this to work reliably.  I don't really know how 
dhcpd works, but I think that it needs something like this:

  host linux-client-on-local {
    hardware ethernet FF:FF:8D:FF:FF:7A;
    fixed-address 192.168.0.2
  }

in your /etc/dhcpd.conf file

if you really want to copy /etc/hosts files around, why not use scp 
scripts...
  scp remote:/etc/hosts local:/etc/hosts

You'll need to set up the private and public keys for ssh in order to get 
scp to work without forcing interactive password authentication.

However, it seems easier and more reliable to put a DNS on our DHCP
server.

-- Craig


On Mon, 21 Jan 2002 Gyzmobro at aol.com wrote:

> hello. on my home network, i've setup a linux box to run DHCP to assingn 
> fixed ip numbers based on a client's MAC address. i haven't been able to get 
> DNS running, and i don't think i'd like to do that now anyway. 
> 
> what i'd like to do is write a bash shell script for all the linux DHCP 
> clients that would connect to the DHCP server at boot and get a file in the 
> format of /etc/hosts, created seperately by me on the server, with all the 
> fixed hosts and ip numbers in it that DHCP assigns. the script then would 
> then compare an area of /etc/hosts on the client with the file it pulled from > .....
> my problem is, i don't know how i would tell the script to ftp, for example, 
> to the server and put in a password, get the file, and logout. i'd also like 
> to know some easy to use file comparison utilities.





More information about the svlug mailing list