BSD Ports

net-mgmt/klg 1.5_1 DragonFly

PHP-based looking glass for Cisco, Juniper and Quagga/Zebra routers

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
BSD3CLAUSE
Categories
net-mgmt, www
Package size
13.7 KiB, 53.3 KiB installed

Description

klg is a looking glass written in PHP that can access and report back routing information from Cisco, Juniper and Zebra/Quagga routers. It can also lookup AS numbers to names via WHOIS interfaces, and supports friendly BGP community names via MySQL database.

In the other systems

SystemPortVersion
DragonFlynet-mgmt/klg1.5_1
FreeBSDnet-mgmt/klg1.5_1
HardenedBSDnet-mgmt/klg1.5_1
GhostBSDnet-mgmt/klg1.5_1

Install

Binary package:

pkg install klg-php81

From DPorts:

cd /usr/dports/net-mgmt/klg && make install clean

Dependencies

Run dependencies 6

No port depends on this one.

Configuration

No options to configure.

Service scripts
none
Flavors
klg-php82-1.5_1, klg-php83-1.5_1, klg-php84-1.5_1

Message after installing

If this is the first installation, you need to configure a few things first.

1. Create the MySQL database, a klg user, and initialise:
   a) CREATE DATABASE klg;
   b) CREATE USER 'klg'@'localhost' IDENTIFIED BY 'password';
      GRANT ALL ON klg.* TO 'klg'@'localhost';
      FLUSH PRIVILEGES;
   c) import the schema:
      mysql -u klg -p klg < /usr/local/share/klg/klg_schema.sql

2. Edit /usr/local/www/klg/klg/klg_config.php from the template klg_config.php.sample

   You need to specify the MySQL details from above at the top of the file,
   and details of your routers further down.  Follow the comments in the file.

   You may wish to specify the timezone by adding a line similar to this:

      date_default_timezone_set('Europe/London');

3. Edit /usr/local/www/klg/klg/klg_template.html from the template file to suit your
   needs.  Items in this file are substituted upon execution so you can skin
   your looking glass to your site.

4. Example Apache 2.4 configuration:

   This assumes you have already configured Apache to serve .php documents.

   Alias /klg "/usr/local/www/klg/klg/"

   <Directory "/usr/local/www/klg/klg/">
      Require all granted
      AllowOverride None
      Order Allow,deny
      Allow from all
   </Directory>

5. Access your new looking glass:

   http://HOSTNAME/klg/klg.php