[142] | 1 | # ipdb/cgi-bin/MyIPDB.pm
|
---|
| 2 | # Contains site-specific functions for IPDB
|
---|
| 3 | # May override some functions from IPDB.pm, wraps others
|
---|
| 4 | ###
|
---|
| 5 | # SVN revision info
|
---|
| 6 | # $Date: 2015-10-07 22:12:25 +0000 (Wed, 07 Oct 2015) $
|
---|
| 7 | # SVN revision $Rev: 780 $
|
---|
| 8 | # Last update by $Author: kdeugau $
|
---|
| 9 | ###
|
---|
[417] | 10 | # Copyright (C) 2004-2010 - Kris Deugau
|
---|
[142] | 11 |
|
---|
[417] | 12 | # don't remove! required for GNU/FHS-ish install from tarball
|
---|
| 13 | ##uselib##
|
---|
| 14 |
|
---|
[142] | 15 | use IPDB 2.0 qw(:ALL);
|
---|
| 16 |
|
---|
| 17 |
|
---|
[432] | 18 | # DSN, user, and password for database. These **MUST** be set.
|
---|
| 19 | my $dbname = 'ipdb';
|
---|
| 20 | my $dbuser = 'ipdb';
|
---|
| 21 | my $dbpass = 'ipdbpwd';
|
---|
| 22 | # DB host is optional.
|
---|
[659] | 23 | my $dbhost = 'localhost';
|
---|
[432] | 24 |
|
---|
[660] | 25 | # ACL for RPC shim. A hash of arrays; the hash keys are the remote system
|
---|
| 26 | # names, the array contents are the IPs allowed to claim that system name.
|
---|
| 27 | #%IPDB::rpcacl = (
|
---|
| 28 | # cli_test => ['192.168.99.115','209.91.179.62'],
|
---|
| 29 | # devel => ['10.0.10.5'],
|
---|
| 30 | # );
|
---|
[661] | 31 | # Only you can prevent memory leaks!
|
---|
| 32 | #$IPDB::maxfcgi = 100;
|
---|
[517] | 33 |
|
---|
[660] | 34 | # Quick workaround for fixed web path. Set this to the absolute web path to
|
---|
| 35 | # your IPDB install, or leave blank for installation at the webroot.
|
---|
| 36 | $IPDB::webpath = '';
|
---|
| 37 |
|
---|
[416] | 38 | # Set some globals declared in IPDB.pm. Most of these only affect mailNotify().
|
---|
| 39 | # Note that while you *can* leave these at defaults, it's probably a Really Bad Idea.
|
---|
[780] | 40 | #$IPDB::org_name = 'Example Corp';
|
---|
| 41 | #$IPDB::smtphost = 'smtp.example.com';
|
---|
| 42 | #$IPDB::domain = 'example.com';
|
---|
[417] | 43 | #$IPDB::defcustid = '5554242';
|
---|
[780] | 44 | #$IPDB::smtpsender = 'ipdb@example.com';
|
---|
[417] | 45 | # Globals for db2rwhois.pl
|
---|
[420] | 46 | #$IPDB::rwhoisDataPath = '/usr/local/rwhoisd/etc/rwhoisd';
|
---|
[417] | 47 | #$IPDB::org_street = '123 4th Street';
|
---|
| 48 | #$IPDB::org_city = 'Anytown';
|
---|
| 49 | #$IPDB::org_prov_state = 'ON';
|
---|
| 50 | #$IPDB::org_pocode = 'H0H 0H0';
|
---|
| 51 | #$IPDB::org_country = 'CA';
|
---|
| 52 | #$IPDB::org_phone = '000-555-1234';
|
---|
| 53 | # note: following may also just be a bare email address
|
---|
| 54 | #$IPDB::org_techhandle = 'ISP-ARIN-HANDLE';
|
---|
[434] | 55 | #$IPDB::org_email = 'noc@example.com';
|
---|
[437] | 56 | #$IPDB::hostmaster = 'dns@example.com';
|
---|
[416] | 57 |
|
---|
[417] | 58 | # Logging destination. Defaults to local2. See your local syslog docs for valid facilities.
|
---|
| 59 | # Note that the value here should have the LOG_ prefix removed, and convert to lower-case.
|
---|
| 60 | # local0 through local7 and user make the most sense.
|
---|
[780] | 61 | #$IPDB::syslog_facility = 'local2';
|
---|
[417] | 62 |
|
---|
[582] | 63 | # RPC URL for pushing DNS changes out. Blank by default; disables RPC calls for DNS changes when blank.
|
---|
| 64 | #$IPDB::rpc_url = 'http://dnsadmin.example.com/dns-rpc.cgi';
|
---|
[432] | 65 |
|
---|
[674] | 66 | # Largest inverse CIDR mask length to show per-IP rDNS list
|
---|
| 67 | # (eg, NetAddr::IP->bits - NetAddr::IP->masklen)
|
---|
| 68 | # allowing longer than a /27 is probably going to slow things down; longer than /29 will scroll.
|
---|
[780] | 69 | #$IPDB::maxrevlist = 5;
|
---|
[674] | 70 |
|
---|
[780] | 71 | # Show per-IP rDNS list even on pools?
|
---|
| 72 | #$IPDB::revlistalltypes = 0;
|
---|
| 73 |
|
---|
[682] | 74 | ## UI layout for showing subblocks
|
---|
| 75 | # 1 lists all containers in a group, then all end-use allocations (including pools) in a group
|
---|
| 76 | # 2 lists all entries in a container in CIDR order, and puts a secondary summary line under a container entry
|
---|
| 77 | # Both show free blocks in a group at the bottom as previously
|
---|
| 78 | # $IPDB::sublistlayout = 1;
|
---|
| 79 |
|
---|
[691] | 80 | ## VLAN validation mode
|
---|
| 81 | # Set to 0 to allow alphanumerics and _ . - (VLAN name instead of number)
|
---|
| 82 | #$IPDB::numeric_vlan = 1;
|
---|
| 83 |
|
---|
[432] | 84 | ## connectDB_My()
|
---|
| 85 | # Wrapper for IPDB::connectDB
|
---|
| 86 | # Takes no arguments, returns whatever IPDB::connectDB returns.
|
---|
| 87 | sub connectDB_My {
|
---|
| 88 | return connectDB($dbname, $dbuser, $dbpass, $dbhost);
|
---|
| 89 | } # end connectDB_My()
|
---|
| 90 |
|
---|
[142] | 91 | # Keep Perl from complaining.
|
---|
| 92 | 1;
|
---|