NTP Aktivieren
sudo nano /etc/systemd/timesyncd.conf
NTP=ntp.uni-osnabrueck.de
timedatectl set-ntp 1
systemctl status systemd-timesyncd
sudo curl -sSL https://install.pi-hole.net | bash
start pi-hole http://192.168.1xx:80/admin
Install Kea dhcp Server
Ubuntu instalieren
NTP Aktivieren
sudo nano /etc/systemd/timesyncd.conf
NTP=ntp.uni-osnabrueck.de
timedatectl set-ntp 1
systemctl status systemd-timesyncd
sudo apt install net-tools
ip address show
sudo snap install curl
Brave installierem curl -fsS https://dl.brave.com/install.sh | sh
Fest IP einstellen
192.168.178.5
Gateway 192.168.178.1
DNS1 213.178.70.1
DNS2 82.97.145.3
hostname -I
ifconfig -a
Kea DHCP
sudo su root
apt update && apt upgrade -y
apt install kea
Passwort für den Control Agenten setzen
// sudo nano /etc/kea/kea-dhcp4.conf
sudo nano /etc/kea/kea-dhcp4.conf
Beispiel
{
"Dhcp4": {
"interfaces-config": {
"interfaces": ["eno1"]
},
"control-socket": {
"socket-type": "unix",
"socket-name": "/run/kea/kea4-ctrl-socket"
},
"lease-database": {
"type": "postgresql",
"name": "kea",
"user": "kea",
"password": "kea",
"host": "localhost"
},
"valid-lifetime": 600,
"max-valid-lifetime": 7200,
// Changes
"subnet4": [{
"id": 1,
"subnet": "192.168.178.0/24",
"pools": [ { "pool": "192.168.178.10 - 192.18.178.14" } ],
"option-data": [{
"name": "routers",
"data": "192.168.178.1"
},
{
"name": "domain-name-servers",
"data": "213.178.70.1, 82.97.145.3"
},
{
"name": "domain-name",
"data": "slubahn.local"
}
]
}]
}
}
kea-shell --host 127.0.0.1 --port 8000 --auth-user kea-api --auth-password $(cat /etc/kea/kea-api-password) --service dhcp4 config-reload
journalctl -u kea-dhcp4-server -e
sudo nano /usr/local/etc/kea/keactrl.conf
dhcp4=yes
dhcp6=no
keactrl status
sudo mv /etc/kea/kea-dhcp4.conf /etc/kea/kea-dhcp4.conf.bak
sudo nano /etc/kea/kea-dhcp4.conf
sudo systemctl start kea-dhcp4
Zum Stoppen verwenden Sie: sudo systemctl stop kea-dhcp4
Zum Neustarten verwenden Sie: sudo systemctl restart kea-dhcp4
sudo su root
su postgres
psql postgres
CREATE USER kea WITH PASSWORD 'kea';
CREATE DATABASE kea;
GRANT ALL PRIVILEGES ON DATABASE kea TO kea;
\c kea
create extension pgcrypto;
exit;
exit
exit
sudo su root
su postgres
psql postgres
ALTER DATABASE kea OWNER TO kea;
exit;
exit
kea-admin db-init pgsql -u kea -p kea -n kea
Install hook libries
sudo su root
apt update && apt upgrade -y
apt install postgresql postgresql-contrib -y
su postgres
psql postgres
CREATE USER stork WITH PASSWORD 'stork';
CREATE DATABASE stork;
GRANT ALL PRIVILEGES ON DATABASE stork TO stork;
\c stork
create extension pgcrypto;
exit;
exit
exit
strg d
reboot
sudo su root
install pgAdmin
Test the stork DB with pqAdmin
Install the Stork Server
sudo su root
curl -1sLf 'https://dl.cloudsmith.io/public/isc/stork/cfg/setup/bash.deb.sh' | sudo bash
sudo apt install isc-stork-server
sudo nano /etc/stork/server.env
STORK_DATABASE_HOST=localhost
STORK_DATABASE_PORT=5432
STORK_DATABASE_NAME=stork
STORK_DATABASE_USER_NAME=stork
STORK_DATABASE_PASSWORD=stork
STORK_REST_HOST=0.0.0.0
STORK_REST_PORT=8080
STORK_LOG_LEVEL=INFO
reboot
cd /usr/lib/
sudo mkdir stork-server
cd stork-server
sudo mkdir hooks
sudo systemctl restart isc-stork-server
sudo systemctl enable isc-stork-server
sudo systemctl start isc-stork-server
sudo systemctl status isc-stork-server
journalctl -u isc-stork-server.service -e
Cannot start the Stork Server: problem initiating database: ERROR #42501 permission ...
sudo -u postgres stork-tool db-create --db-name stork --db-user stork-server
sudo su root
su postgres
psql postgres
ALTER USER stork WITH PASSWORD 'stork';
exit;
sudo systemctl stop isc-stork-server ----> for debugging
reboot
journalctl -u isc-stork-server.service -e
Install the Stork agent only with no errors of the Stork Server
--------------------------------------------------------------------------------------------
cd /usr/share/stork/www
assets/pkgs
curl -o /tmp/isc-stork-agent.deb "localhost:8080/assets/pkgs/isc-stork-agent_1.11.0.230606131857_amd64.deb"
--------------------------------------------------------------------------------------------
stork agent
sudo curl -1sLf 'https://dl.cloudsmith.io/public/isc/stork/cfg/setup/bash.deb.sh' | sudo bash
sudo apt install isc-stork-agent
sudo nano /etc/stork/agent.env
STORK_AGENT_HOST=127.0.0.1
STORK_AGENT_PORT=8081
STORK_AGENT_LISTEN_STORK_ONLY=false
STORK_AGENT_SERVER_URL=http://localhost:8080
STORK_LOG_LEVEL=INFO
STORK_AGENT_DB_URL=postgresql://kea:kea@localhost/kea
sudo systemctl restart isc-stork-agent
sudo systemctl enable isc-stork-agent
sudo systemctl start isc-stork-agent
sudo su stork-agent -s /bin/sh -c 'stork-agent register --server-url http://127.0.0.1:8080'
stork-agent -s /bin/sh -c 'stork-agent register -u http://192.168.178.5:8080'
sudo systemctl status isc-stork-agent
sudo nano /etc/stork/agent.env
http://localhost:8080
Troble
sudo -i -u postgres
psql
sudo systemctl status postgresql
sudo systemctl is-active postgresql
sudo systemctl is-enabled postgresql
sudo pg_isready
systemctl stop firewalld
sudo nano /etc/stork/server.env
sudo -u postgres stork-tool db-create --db-name stork --db-user stork-server
journalctl -u isc-stork-server.service -e
journalctl -u isc-stork-server.service
cd /usr/lib/
sudo mkdir stork-server
cd stork-server
sudo mkdir hooks
curl http://127.0.0.1:8080/api/version
{"date":"2023-01-16 11:06","version":"1.8.0"}
INFO[2025-07-16 13:23:36] main.go:99 Created database and user for the server with the following credentials database_name="stork" password="UD13el8q4HQv9ElOeLagutFZnD+XCaso" user="stork"