mathewbishop / fiberglass

FiberGlass - ISC DHCP Server Interface
MIT License
7 stars 0 forks source link

[npm]() License: MIT

fiberglass logo

FiberGlass is a fork of Chris Miles' (chris.miles.e@gmail.com) Glass web UI for ISC DHCP. FiberGlass includes some additonal features like user authentication, user group authorization, additional configuration options, and more.

Features

See the original README for a full list of the original features of Glass.

FiberGlass adds the following features:

Installation

Only Debian-based distros are currently supported/tested/used. FiberGlass may work on other distros, but we have not tried and the instructions here only cover Debian-based systems.

NOTE: some of these instructions are copied from the original README.

Install NodeJS (If not installed)

FiberGlass runs on the following Node.js major versions:

NOTE: Node.js v18 and later may work, but have not yet been tested.

Node.js v8 and earlier are no longer supported.


To install on Debian and Debian based distros, follow the instructions from nodesource, here.


Install isc-dhcp-server

Make sure the DHCP server is installed

apt install isc-dhcp-server

Install sqlite3 (optional)

You may want to install sqlite3 on the system to have a way of managing the user and session SQLite databases outside the application.

apt install sqlite3

Install FiberGlass (as root)

cd /opt
git clone https://github.com/mathewbishop/fiberglass.git
cd fiberglass
mkdir logs
chmod u+x ./bin/ -R
chmod u+x *.sh

sudo npm install
sudo npm install forever -g

Create the .env file and session secret

Create your glass_config.json file

glass_config.json is used to persist app settings and application config changes you make through the admin UI

Inside the config directory is a file named glass_config.example.json with a default config. Copy this file and rename it to glass_config.json for use in the app.

cp config/glass_config.example.json config/glass_config.json

Start the app

sudo npm start

Apparmor

sed -i '/\/etc\/dhcp\/\*\*/a\ \ \/var\/lib\/dhcp\/\*\* lrw,' /etc/apparmor.d/usr.sbin.dhcpd
sed -i '/\/etc\/dhcp\/\*\*/a\ \ \/opt\/fiberglass\/\*\* lrw,' /etc/apparmor.d/usr.sbin.dhcpd
service apparmor restart

Glass Configuration

Attribution/Credit

Scott Human

GitHub: https://github.com/ekko919

This project was Scott's idea and vision.

Chris Miles' (chris.miles.e@gmail.com)

Author of original glass-isc-dhcp

AdminBSB UI

AdminBSB UI

Jared Hanson (jaredhanson@gmail.com, http://jaredhanson.net)

https://github.com/passport/todos-express-password -- example of implementing passport.js local auth with SQLite

https://www.passportjs.org/tutorials/password/ -- tutorial for implementing passport.js local auth with SQLite