feat: DHCP server, no client mode

This commit is contained in:
2026-11-21 01:28:42 +01:00
parent 0492140604
commit 984e01440b
5 changed files with 42 additions and 6 deletions

View File

@@ -2,5 +2,5 @@ set default="0"
set timeout="0"
menuentry "WINF-Photobooth" {
linux /bzImage root=PARTUUID=UUID_TMP rootwait console=tty1
linux /bzImage root=PARTUUID=UUID_TMP rootwait console=tty1 net.ifnames=0
}

View File

@@ -0,0 +1,21 @@
# DHCP server for devices plugged into the photobooth's ethernet port.
# The photobooth is a standalone network host, not a client: no upstream
# DNS, no forwarding.
interface=eth0
except-interface=lo
bind-interfaces
# No upstream resolvers (no client mode anymore)
no-resolv
local=/local/
# Serve the booth's own name over DNS as well (avahi does mDNS)
address=/winf-photobooth.local/192.168.7.1
address=/winf-photobooth/192.168.7.1
# Hand out 192.168.7.100-200 to plugged-in devices, 12h leases
dhcp-range=192.168.7.100,192.168.7.200,255.255.255.0,12h
dhcp-authoritative
dhcp-option=option:router,192.168.7.1
dhcp-option=option:dns-server,192.168.7.1

View File

@@ -0,0 +1,12 @@
# The photobooth is NOT a network client. It runs a DHCP server on its
# ethernet port: plug a device into eth0 and it gets an address from
# 192.168.7.0/24 (see /etc/dnsmasq.conf). The photobooth itself is
# 192.168.7.1.
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.7.1
netmask 255.255.255.0