wp.cgi Whois Proxy v1.x Installation Guide # ------------------------------------------ This should work for any unix/linux (or Mac OSX) system (Windoze? You're on your own ... but it could work..) Perl Lib required: Net::DNS 1. Create a directory in which 'nobody' or whatever you use for your unprivileged user ID can write. Somewhere under /var is probably a good choice. 2. Uncompress (e.g.) wp_1.3.tgz into your chosen directory. 3. Edit wp.cgi, wp_config.cgi and acladmin.cgi to make sure the path to your perl interpreter is correct. Edit or remove the BEGIN statement which sends 'FatalsToBrowser' and writes to a specified error log file Nothing else needs editing. 4. Point your browser at this form: http://yoursite/cgi-bin/wp_config.cgi All configuration is done there. The variables written to wp.config are described if you click the Help box. (do NOT edit wp.config directly) 5. Go Configure! (Both acladmin and wp use wp.config to know where they are.) # ------------------------------------------- Next, Click ACLAdmin and add your own netblock to the access control list. # ------------------------------------------- If you customize your paths (beyond simply uncompressing the tgz -- -- which is a good idea! ): 1. You may edit wp.tmpl, which is a perl function, not a template, that produces (validated) HTML 4.01 -- strict for browsers with version > 4 and Transitional for earlier versions. 2. Copy (or link) wp.cgi to your CGI directory, point your browser at it and try a query. # ------------------------------------------- If you use CheckAccess to limit access to your proxy: ##### Don't forget this step! ##### Set up a cron job to *remove* the file named in $AccessDB every 24 hrs or however often you want to reset the access list. # ------------------------------------------- NOTE: DO NOT Edit wp.config! It is auto-generated by wp_config.cgi There is NO NEED to touch wp.cgi or acladmin.cgi (except to adjust the hashbang incantation and the log file location in the BEGIN statement). (note: HTML output can be disabled entirely if $UseHTML=''; but it disables itself automatically with the commandline interface. if $Debug > 0 debugging info will be printed to STDOUT and to your ./error_log (in the BEGIN statement) # ------------------------------------------- Finally, REMOVE or disable wp_config.cgi from any publicly-accessible cgi-dir. # ------------------------------------------- You may want to update two files from time to time: a. your whoislist (a plain text 'database' of tld's and whois servers) and b. ZapTrash.config - a perl function containing a hash whose keys are whois servers and values are begin and end strings to match when removing verbose copyright disclaimers -- IFF ZapTrash is enabled. # =========================================== For an inetd-launched version: # =========================================== === These procedures are untested. YMMV -- a lot. === 0. Define appropriate locations via wp_config.cgi (with full paths) 0.1 Edit (or delete) BEGIN lines of wp.cgi wp_config.cgi, and acladin.cgi to write error logs in appropriate locations (again, with full paths) 1. Copy or link wp.cgi to /usr/local/sbin or wherever you want to put it. 2. Edit inetd.conf (or equivalent) to call wp.cgi. The following examples are for Red Hat 6.x, your own installation may vary. Using TCP wrappers for access control: - Add the following line to inetd.conf: whois stream tcp nowait nobody /usr/sbin/tcpd /usr/local/sbin/wp.cgi - Add the following line to hosts.allow: wp.cgi : ALL : twist /usr/local/sbin/wp.cgi %a ---- Without TCP wrappers for access control: - Add the following line to inetd.conf: whois stream tcp nowait nobody /usr/local/sbin/wp.cgi wp.cgi - run wp_config.cgi and set CheckAccess to 0 (or empty). (not sure this is still necessary..) 4. Force inetd to reread it's config file. 'killall -HUP inetd' works well for some systems. 5. Point your favorite whois client at the system you installed wp.cgi on and try a query. 6. Set up a cron job to remove the file indicated in $AccessDB every 24 hours or however often you want to reset the access list. Don't forget this step! # ---------------------------------------------------------- # ---------------------------------------------------------- Specific OS Installation Instructions: If you have instructions on how to install on a specific OS, send them to whoisproxy(at)yahoo(dot)com and they will be included in the next release of the proxy source.