# ipdb/cgi-bin/MyIPDB.pm # Contains site-specific functions for IPDB # May override some functions from IPDB.pm, wraps others ### # SVN revision info # $Date: 2016-04-12 22:32:17 +0000 (Tue, 12 Apr 2016) $ # SVN revision $Rev: 844 $ # Last update by $Author: kdeugau $ ### # Copyright (C) 2004-2010 - Kris Deugau # don't remove! required for GNU/FHS-ish install from tarball ##uselib## use IPDB 2.0 qw(:ALL); # DSN, user, and password for database. These **MUST** be set. my $dbname = 'ipdb'; my $dbuser = 'ipdb'; my $dbpass = 'ipdbpwd'; # DB host is optional. my $dbhost = 'localhost'; ##fixme: need better way to export the variables above for db-update sub dbname { $dbname } sub dbuser { $dbuser } sub dbpass { $dbpass } sub dbhost { $dbhost } # ACL for RPC shim. A hash of arrays; the hash keys are the remote system # names, the array contents are the IPs allowed to claim that system name. #%IPDB::rpcacl = ( # cli_test => ['192.168.99.115','209.91.179.62'], # devel => ['10.0.10.5'], # ); # Only you can prevent memory leaks! #$IPDB::maxfcgi = 100; # Quick workaround for fixed web path. Set this to the absolute web path to # your IPDB install, or leave blank for installation at the webroot. $IPDB::webpath = ''; # Set some globals declared in IPDB.pm. Most of these only affect mailNotify(). # Note that while you *can* leave these at defaults, it's probably a Really Bad Idea. #$IPDB::org_name = 'Example Corp'; #$IPDB::smtphost = 'smtp.example.com'; #$IPDB::domain = 'example.com'; #$IPDB::defcustid = '5554242'; #$IPDB::smtpsender = 'ipdb@example.com'; # Globals for db2rwhois.pl #$IPDB::rwhoisDataPath = '/usr/local/rwhoisd/etc/rwhoisd'; #$IPDB::org_street = '123 4th Street'; #$IPDB::org_city = 'Anytown'; #$IPDB::org_prov_state = 'ON'; #$IPDB::org_pocode = 'H0H 0H0'; #$IPDB::org_country = 'CA'; #$IPDB::org_phone = '000-555-1234'; # note: following may also just be a bare email address #$IPDB::org_techhandle = 'ISP-ARIN-HANDLE'; #$IPDB::org_email = 'noc@example.com'; #$IPDB::hostmaster = 'dns@example.com'; # Logging destination. Defaults to local2. See your local syslog docs for valid facilities. # Note that the value here should have the LOG_ prefix removed, and convert to lower-case. # local0 through local7 and user make the most sense. #$IPDB::syslog_facility = 'local2'; # RPC URL for pushing DNS changes out. Blank by default; disables RPC calls for DNS changes when blank. #$IPDB::rpc_url = 'http://dnsadmin.example.com/dns-rpc.cgi'; # Largest inverse CIDR mask length to show per-IP rDNS list # (eg, NetAddr::IP->bits - NetAddr::IP->masklen) # allowing longer than a /27 is probably going to slow things down; longer than /29 will scroll. #$IPDB::maxrevlist = 5; # Show per-IP rDNS list even on pools? #$IPDB::revlistalltypes = 0; ## UI layout for showing subblocks # 1 lists all containers in a group, then all end-use allocations (including pools) in a group # 2 lists all entries in a container in CIDR order # Both show free blocks in a group at the bottom as previously # $IPDB::sublistlayout = 1; ## UI layout for showing VRFs and master blocks # 1 lists VRFs on the index page, and master blocks on a subpage to formally separate them # 2 is a somehat "lazy" layout that brings sublists of master blocks in each VRF (as well # as the "Add master" link and "Delete this VRF" button) onto the index page grouped by VRF #$IPDB::masterswithvrfs = 2; ## VLAN validation mode # Set to 0 to allow alphanumerics and _ . - (VLAN name instead of number) #$IPDB::numeric_vlan = 1; ## Billing return link # Passalong link for allocations initiated by a link in from a billing system #$IPDB::billinglink = 'https://billing.example.com/radius.pl'; ## connectDB_My() # Wrapper for IPDB::connectDB # Takes no arguments, returns whatever IPDB::connectDB returns. sub connectDB_My { return connectDB($dbname, $dbuser, $dbpass, $dbhost); } # end connectDB_My() # Keep Perl from complaining. 1;