Initial commit: DHCP whitelist service for direct link connections
Features: - Docker-based DHCP server with MAC address whitelisting - Binds to specific ethernet interface only - NO DNS/gateway advertised (direct link only, not a router) - Configurable network parameters (subnet, DHCP range, lease times) - Systemd service integration for Arch/Manjaro - Test environment with isolated network (172.20.0.0/24) - Auto-configuration script to detect network settings - Complete Makefile with management targets Security: - Only responds to whitelisted MAC addresses - deny unknown-clients configuration - Runs in Docker container for isolation Configuration: - Copy .example files to create your config - interface.conf: Network interface to bind to - whitelist.conf: Allowed MAC addresses - network.conf: Network parameters (optional)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
[Unit]
|
||||
Description=DHCP Whitelist Service
|
||||
After=network.target docker.service
|
||||
Requires=docker.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
WorkingDirectory=/opt/dhcp-whitelist
|
||||
Environment="CONFIG_DIR=/etc/dhcp-whitelist"
|
||||
|
||||
# Pre-start: Build the image
|
||||
ExecStartPre=/usr/bin/docker-compose build
|
||||
|
||||
# Start the service
|
||||
ExecStart=/usr/bin/docker-compose up
|
||||
|
||||
# Stop the service
|
||||
ExecStop=/usr/bin/docker-compose down
|
||||
|
||||
# Reload config by restarting containers
|
||||
ExecReload=/usr/bin/docker-compose restart
|
||||
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user