Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ajpocus/hostgen
Generates entries for /etc/hosts from connected clients.
https://github.com/ajpocus/hostgen
Last synced: about 1 month ago
JSON representation
Generates entries for /etc/hosts from connected clients.
- Host: GitHub
- URL: https://github.com/ajpocus/hostgen
- Owner: ajpocus
- License: bsd-3-clause
- Created: 2010-09-29T00:46:12.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2010-10-16T04:36:31.000Z (over 14 years ago)
- Last Synced: 2024-04-08T18:29:14.908Z (10 months ago)
- Homepage:
- Size: 97.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
-- INTRODUCTION --
This is the README for hostgen, a utility for automatically generating
/etc/hosts files.-- WHERE TO FIND IT --
Hostgen can be found on github, at this address:
http://github.com/ajpocus/hostgen
-- SYSTEM REQUIREMENTS --
Hostgen has been written and tested with Perl 5.12.1. Any version of Perl
after 5.8 should be fine for hostgen. Older versions might be okay, but I'm
not sure. I'd like to know, if you try it.-- USAGE --
On the server, in the directory where hostgen-srv is saved, run:
./hostgen-srv [-o filename] [-p port] &
On each client, run:
./hostgen-cli -s {server IP} [-o filename] [-p port]
The server will write the hosts file to ./hostgen.out. You can specify a
different output file by using "-o". The default port is 12345, but
you can change that with "-p".-- HOW IT WORKS --
Hostgen is fairly simple. The client only has to know the IP of the hostgen
server, and from there the server grabs the IP and hostname of each connected
client. It writes them in the /etc/hosts format to ./hostgen.out, unless the
client already has an entry. In this case the client is notified, the
connection is ended, and the old entry is preserved.-- CAVEATS --
* Hostgen is only practical for small groups of maybe a dozen or two. Every
client has to know the IP of the server, and contact it themselves while
the server is running. Automation is possible with cron, for example, but
this is not optimal.
* Hostgen doesn't write to /etc/hosts. This allows for execution by an
unpriveleged user, but adds a manual step.
* The duplicate entry handling is lacking. It should be finer-grained and
ask about hostname changes.
* The hosts file isn't distributed back to the clients. Right now, there's
no way to cleanly stop the server; the process must be killed.-- AUTHOR --
My name is Austin Pocus, and I wrote hostgen. You can contact me at
ajpocus ( at ) gmail ( dot ) com. I released hostgen under the BSD license.
More information can be found in LICENSE, or at the top of any source file.