-
Notifications
You must be signed in to change notification settings - Fork 0
Looking Glass
Although Hyperglass has a pretty interface, I was never able to get it working, it wouldn't even send requests to the server to run commands. A simpler to set up alternative is the looking-glass project, which is based on PHP and is simpler to configure while still supporting the necessary VyOS platform.
looking-glass is fairly simple to install. First, install the apache2, php7.4, php7.4-xml, and optionally php7.4-sqlite3 packages. Then, git clone or download the files from the repository and move them to /var/www/html/. Navigate to this directory and make a copy of config.php.example without the example extension. Edit this configuration as necessary following the documentation at https://looking-glass.readthedocs.io/en/latest/configuration/.
There are a number of options which should be changed in the configuration file. The below sets the title and a front-cover image, which should be stored in /etc/lg/ and readable by the group www-data.
$config['frontpage']['title'] = 'AS4242421878 Looking Glass';
$config['frontpage']['image'] = '/etc/lg/champlain.png';
$config['frontpage']['disclaimer'] = null;The routers stanzas are the most important, since these specify connection settings for the looking glass. The below configuration sets up passwordless SSH to the router using a key which must be readable by the www-data user or group in /etc/lg/. The type setting tells looking-glass which commands to run to discover the necessary information, and source-interface-id is used as the source for ping or traceroute commands.
$config['routers']['fw-1']['host'] = '172.23.119.65';
$config['routers']['fw-1']['user'] = 'lg';
$config['routers']['fw-1']['private_key'] = '/etc/lg/id_ed25519';
$config['routers']['fw-1']['auth'] = 'ssh-key';
$config['routers']['fw-1']['type'] = 'vyos';
$config['routers']['fw-1']['source-interface-id'] = 'eth2';
$config['routers']['fw-1']['desc'] = 'DN42 Router';Lastly, the following options must be added to support the private ASNs and RFC1918/ULA addresses used by DN42.
$config['misc']['allow_private_asn'] = true;
$config['misc']['allow_private_ip'] = true;The optional antispam feature requires a SQLite database, and can be disabled with $config['antispam']['enabled'] = false;.