GithubHelp home page GithubHelp logo

vpolaris / isc-dhcp_with_glass Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 30 KB

DHCP server with fully integrated Web UI powered by Glass

License: GNU General Public License v3.0

Dockerfile 81.70% Shell 18.30%
dhcp-server docker glass isc-dhcp-server podman rsyslogd web-ui

isc-dhcp_with_glass's Introduction

Container for ISC-DHCP with a touch of GLASS

Goal

This project aims to build a full ISC DHCP server with the Web User Interface nammed Glass who provide a convenient way to manage the DHCP server in a single container. The container support amd64 et arm64 architectures. The distribution used to create the container is Fedora 36

You can retreive the container on my Docker HUB. it's built by a Github Action

What the script does ?

  • Pull 2 prebuilt containers (isc-dhcp and rsyslog)
  • Pull a fedora 36 container as helper
  • Use a dedicated directory to build the container image
  • Install Git in the helper
  • Install Node.JS and Glass in /opt of the target directory
  • Copy config and service files inside the directory
  • Use the directoy to build the final image

DHCP Server is chrooted in one single directory : /isc-dhcp providing configuration, PID log device and output file for Rsyslog For more infromation see my helper container used in the dockerfile : Container for ISC-DHCP

Glass Features

  • Manage DHCP configuration with Snapshot each time we modify the dhcpd.conf (backup)
  • Integrated log view with Regex
  • Restart DHCP Server
  • Provide statistics
  • Show active leases
  • Monitoring based on thresholds and send alerts

Th default user is glassadmin/glassadmin

Download

git clone https://github.com/vpolaris/isc-dhcp_with_glass.git
cd isc-dhcp_with_glass

Building

The Dockerfile is set to be used by buildkit by Moby

sudo docker buildx build --platform linux/amd64,linux/arm64 -t f36:glass -f Dockerfile .

Usage

This sample share the configuration from the hosts and the container.

sudo podman run --name glass --net host -d \
--cap-add NET_RAW --cap-add SYS_CHROOT --cap-add SYSLOG \
--volume /etc/dhcp/dhcpd.conf:/isc-dhcpd/etc/dhcpd.conf:ro \
--health-cmd 'CMD-SHELL dhcpd-pools -c /isc-dhcpd/etc/dhcpd.conf -l /isc-dhcpd/leasing/dhcpd.leases || exit 1' \
--health-interval 15m \
--health-start-period 2m \
--restart on-failure \
-t f36:glass

Networking

Expose required port if you don't use the host network (--net host)

Service Port Protocol
DHCP 67 UDP
HTTP 3000 TCP

Firewall rules

For DHCP.

Not so restrictive rule that can be applied easyly.

iptables -I INPUT -i $IFACE -p udp --dport 67:68 --sport  67:68 -j ACCEPT

Where $IFACE is the network adapter listenning the DHCP server

For more details see . https://ixnfo.com/en/iptables-rules-for-dhcp.html

For Glass access

You can have a look to the Github owner of Glass.

https://github.com/Akkadius/glass-isc-dhcp#iptables-recommended

image

isc-dhcp_with_glass's People

Contributors

vpolaris avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.