new z9 ccchh router #98

Merged
bitwhisker merged 47 commits from new_ccchh_router into main 2026-08-07 23:44:27 +02:00
Owner

Linux router with systemd_networkd, nftables, unbound and kea_dhcp

new IP Ranges (10.89.208.0/20):

  • 10.89.208.0/22 Clients
  • 10.89.212.0/24 IoT
  • 10.89.213.0/24 Management/Services
  • 185.161.130.65/28 Public

creates roles:

  • unbound
  • kea_dhcp

Potentially missing:

  • changing IPs in all other configs

do we maybe want to split physical and virtual hosts?

Linux router with systemd_networkd, nftables, unbound and kea_dhcp new IP Ranges (10.89.208.0/20): - 10.89.208.0/22 Clients - 10.89.212.0/24 IoT - 10.89.213.0/24 Management/Services - 185.161.130.65/28 Public creates roles: - unbound - kea_dhcp Potentially missing: - changing IPs in all other configs do we maybe want to split physical and virtual hosts?
rt1(z9 host) unbound(role) kea_dhcp(role): create unbound and kea_dhcp role for rt1
Some checks failed
/ Ansible Lint (push) Failing after 2m30s
/ Ansible Lint (pull_request) Failing after 2m27s
/ build (pull_request) Failing after 2m39s
866005c055
- create unbound role
- create kea_dhcp role
- configure unbound and keadhcp on rt1(z9 host)
ansible lint: brackets are annoying
Some checks failed
/ Ansible Lint (push) Successful in 2m36s
/ Ansible Lint (pull_request) Successful in 2m36s
/ build (pull_request) Failing after 2m40s
28150818a7
june requested review from june 2026-05-24 04:43:53 +02:00
june left a comment

Core configuration looks good, tho I left some comments. Left some more comments on the roles as well.
The kea_dhcp role also is still missing a README, see the following READMEs for good references:

Core configuration looks good, tho I left some comments. Left some more comments on the roles as well. The `kea_dhcp` role also is still missing a README, see the following READMEs for good references: - https://git.hamburg.ccc.de/CCCHH/ansible-infra/src/commit/7832978ff732208f2f29f04ef446c7c51076c6d1/roles/secrets - https://git.hamburg.ccc.de/CCCHH/ansible-infra/src/commit/7832978ff732208f2f29f04ef446c7c51076c6d1/roles/deploy_systemd_resolved_config
.ansible-lint Outdated
@ -1,6 +1,7 @@
skip_list:
- "yaml[line-length]"
- "name[casing]"
- "yaml[brackets]"
Owner

That's not what linting is for.
Either just fix the brackets (you can also run ansible-lint locally to check for the errors) or ignore a specific file, if it doesn't make sense to lint.

That's not what linting is for. Either just fix the brackets (you can also run ansible-lint locally to check for the errors) or ignore a specific file, if it doesn't make sense to lint.
bitwhisker marked this conversation as resolved
@ -14,6 +14,9 @@ all:
yate:
ansible_host: yate.ccchh.net
ansible_user: chaos
rt1:
Owner

It's fine, just feel like rt1 is one of those obscure names again, which gives more trouble than benefit.

It's fine, just feel like `rt1` is one of those obscure names again, which gives more trouble than benefit.
Author
Owner

do you have an idea/a proposal for a better name?
maybe z9-router or something like that?
I would say it would not be a good idea to name it just router,
because of the indirect name collision with the chaosknoten router.

do you have an idea/a proposal for a better name? maybe z9-router or something like that? I would say it would not be a good idea to name it just router, because of the indirect name collision with the chaosknoten router.
Owner

Oh, that totally makes sense. I'm fine with the name, if others really like it, but personally I would prefer something like z9-router indeed.

Oh, that totally makes sense. I'm fine with the name, if others really like it, but personally I would prefer something like `z9-router` indeed.
bitwhisker marked this conversation as resolved
@ -53,3 +69,4 @@
dooris:
rt1:
ansible_pull_hosts:
hosts:
Owner

If we configure ansible-pull variables above, the host should also be added to the relevant host group. (However an ansible-pull age private key is still missing.)

If we configure ansible-pull variables above, the host should also be added to the relevant host group. (However an ansible-pull age private key is still missing.)
bitwhisker marked this conversation as resolved
@ -0,0 +49,4 @@
ct state invalid drop
ct state established,related accept
ip protocol icmp accept
Owner

This seems to be using tabs for some reason, probably best to replace with spaces.
We might want to start using .editorconfig files in the future.

This seems to be using tabs for some reason, probably best to replace with spaces. We might want to start using `.editorconfig` files in the future.
bitwhisker marked this conversation as resolved
@ -0,0 +75,4 @@
udp dport 51820 accept comment "allow WireGuard access"
# Allow DHCP server access.
iifname { $lan_ifs } udp dport 67 accept comment "allow dhcp server access"
Owner

Same indentation problem here.

Same indentation problem here.
bitwhisker marked this conversation as resolved
@ -0,0 +102,4 @@
ct state established,related accept
# Allow internet access.
iifname { $lan_ifs, $if_wg55_management } oifname $wan_ifs accept comment "allow internet access"
Owner

Same indentation problem here.

Same indentation problem here.
bitwhisker marked this conversation as resolved
@ -0,0 +108,4 @@
meta nfproto ipv4 oifname $v4_exposed_ifs accept comment "allow v4 exposed network access"
meta nfproto ipv6 oifname $v6_exposed_ifs accept comment "allow v6 exposed network access"
# Allow clients and managment to most
Owner

"managment" -> "management"
Also "Allow clients and management to lan interfaces." might be a better comment for this rule.

"managment" -> "management" Also "Allow clients and management to lan interfaces." might be a better comment for this rule.
bitwhisker marked this conversation as resolved
@ -0,0 +5,4 @@
[WireGuard]
ListenPort=51820
PrivateKeyFile=/etc/ansible_secrets/wireguard_wg55_privat_key
Owner

wireguard_wg55_privat_key -> wireguard_wg55_private_key

`wireguard_wg55_privat_key` -> `wireguard_wg55_private_key`
bitwhisker marked this conversation as resolved
@ -0,0 +75,4 @@
[WireGuardPeer]
# friendly_name = lilly-lillysLaptop
AllowedIPs = 10.89.214.16/32 #,2a07:c481:1:37::/128
Owner

IPv6 is missing the most significant bits. And is generally commented out weirdly?
#,2a07:c481:1:37::/128 -> ,2a07:c481:1:37::16/128

IPv6 is missing the most significant bits. And is generally commented out weirdly? ` #,2a07:c481:1:37::/128` -> `,2a07:c481:1:37::16/128`
Author
Owner

took that directly from the opnsense config and just converted it to networkd format
and to not produce unexpected behavior I commented the ipv6 out,
because it did not have the important part

took that directly from the opnsense config and just converted it to networkd format and to not produce unexpected behavior I commented the ipv6 out, because it did not have the important part
Owner

Ah, ye, makes sense! Would just assign an IP then as that doesn't hurt and Lilly can choose to use it or not.

Ah, ye, makes sense! Would just assign an IP then as that doesn't hurt and Lilly can choose to use it or not.
bitwhisker marked this conversation as resolved
@ -0,0 +80,4 @@
[WireGuardPeer]
# friendly_name = bitwhisker
AllowedIPs = 10.89.214.17/32,2a07:c481:1:37::a/128
Owner

If we want to count the v6 up in hex (which I think is reasonable as we do the same for the VLAN ID in the prefix), then it should also be done properly.

dec -> hex
-----------
...
15  ->  f # langoor_home
16  -> 10 # lilly-lillysLaptop
17  -> 11 # bitwhisker
18  -> 10 # forestcat
If we want to count the v6 up in hex (which I think is reasonable as we do the same for the VLAN ID in the prefix), then it should also be done properly. ``` dec -> hex ----------- ... 15 -> f # langoor_home 16 -> 10 # lilly-lillysLaptop 17 -> 11 # bitwhisker 18 -> 10 # forestcat ```
Author
Owner

took that directly from the opnsense config and just converted it to networkd format

was considering it, but my reason for not doing that, was because I did not want to change the last part of the IPs that are already in use

took that directly from the opnsense config and just converted it to networkd format was considering it, but my reason for not doing that, was because I did not want to change the last part of the IPs that are already in use
Owner

Ah, I see, yeah, okay. We would have the option now, as we change things anyway, to clean up that configuration, but I'm also fine with keeping it as is for legacy reasons.
Just something to consider.

Ah, I see, yeah, okay. We would have the option now, as we change things anyway, to clean up that configuration, but I'm also fine with keeping it as is for legacy reasons. Just something to consider.
june marked this conversation as resolved
@ -0,0 +17,4 @@
[IPv6SendRA]
UplinkInterface=netwan.400
EmitDomains=true
Domains=ccchh.net
Owner

The search domain would be z9.ccchh.net. Unless it got decided to drop that now.

The search domain would be `z9.ccchh.net`. Unless it got decided to drop that now.
Author
Owner

yes, we said yesterday, that we want to get rid of z9.ccchh.net. and z9. (tld)

yes, we said yesterday, that we want to get rid of z9.ccchh.net. and z9. (tld)
june marked this conversation as resolved
@ -0,0 +4,4 @@
ansible.builtin.systemd_service:
daemon_reload: true
- name: Kea_dhcp4.reloaded
Owner

Called "reloaded" even tho the action is restarted. One of them needs to be adjusted.

Called "reloaded" even tho the action is `restarted`. One of them needs to be adjusted.
bitwhisker marked this conversation as resolved
@ -0,0 +10,4 @@
state: restarted
enabled: true
- name: Kea_dhcp6.reloaded
Owner

Same restarted/reloaded comment as above.

Same restarted/reloaded comment as above.
bitwhisker marked this conversation as resolved
@ -0,0 +16,4 @@
state: restarted
enabled: true
- name: Kea_ctrl.reloaded
Owner

Same restarted/reloaded comment as above.

Same restarted/reloaded comment as above.
bitwhisker marked this conversation as resolved
@ -0,0 +1,8 @@
---
- name: Install Kea on Archlinux
Owner

We don't have any Arch Linux infrastructure, so we don't need this.

We don't have any Arch Linux infrastructure, so we don't need this.
bitwhisker marked this conversation as resolved
@ -0,0 +5,4 @@
when: ansible_facts['distribution'] == "Debian"
ansible.builtin.deb822_repository:
name: "isc-{{ kea_dhcp__version_repo }}"
uris: "https://dl.cloudsmith.io/public/isc/{{ kea_dhcp__version_repo }}/deb/debian"
Owner

Do we have a requirement for the more up-to-date version present in the upstream repository or is the one in the Debian repos sufficient?

Do we have a requirement for the more up-to-date version present in the upstream repository or is the one in the Debian repos sufficient?
Author
Owner

chris wrote this, I don't know why they thought this would be necessary

@c6ristian

chris wrote this, I don't know why they thought this would be necessary @c6ristian
Owner

For Club this properly doesn't matter. This was because the compatibility between different version has history been often Subject to Change. As long as there are no plan to do HA its probably fine.

For Club this properly doesn't matter. This was because the compatibility between different version has history been often Subject to Change. As long as there are no plan to do HA its probably fine.
Owner

Alright, gotcha. Then just using the Debian-packaged version nicely saves us adding a repo.

Alright, gotcha. Then just using the Debian-packaged version nicely saves us adding a repo.
june marked this conversation as resolved
@ -0,0 +16,4 @@
ansible.builtin.apt:
name:
- isc-kea-dhcp4
- isc-kea-dhcp6
Owner

Since we got granular control over whether to use dhcpv4, v6 or the agent, would it make sense to then also granularly install the relevant packages?
I would think Debian would also automatically start the services, which wouldn't make sense, if no sensible v6 config is present.

Since we got granular control over whether to use dhcpv4, v6 or the agent, would it make sense to then also granularly install the relevant packages? I would think Debian would also automatically start the services, which wouldn't make sense, if no sensible v6 config is present.
bitwhisker marked this conversation as resolved
@ -0,0 +1,51 @@
---
- name: Include config vars
tags: [ kea, include_vars ]
Owner

I would rather just stick to only having tags at the playbook level. I don't think this kind granular control for the role is really needed as it the config files also shouldn't trigger a reload, if not changed.

I would rather just stick to only having tags at the playbook level. I don't think this kind granular control for the role is really needed as it the config files also shouldn't trigger a reload, if not changed.
Author
Owner

this was just copied from the fux noc ansible, but I can remove it

this was just copied from the fux noc ansible, but I can remove it
bitwhisker marked this conversation as resolved
@ -0,0 +3,4 @@
tags: [kea, dhcp]
block:
- name: Install Kea on Archlinux
when: ansible_facts['distribution'] == "Archlinux"
Owner

Again, getting rid of the Arch Linux logic also greatly simplifies this file.

Again, getting rid of the Arch Linux logic also greatly simplifies this file.
Author
Owner

this was just copied from the fux noc ansible, but I can remove it

this was just copied from the fux noc ansible, but I can remove it
bitwhisker marked this conversation as resolved
@ -0,0 +18,4 @@
- name: Install stork-agent with aur_pkg_install
ansible.builtin.include_role:
name: aur_pkg_install
Owner

We don't even have this role present in our repo, so just getting rid of the Arch Linux logic probably makes sense.

We don't even have this role present in our repo, so just getting rid of the Arch Linux logic probably makes sense.
bitwhisker marked this conversation as resolved
@ -0,0 +12,4 @@
{% for subnet in kea_dhcp__dhcp6.subnets %}
{
"id": {{ subnet.id }},
"subnet": "{{ subnet.subnet }}",
Owner

Just a nit-pick, but having the indentation be consistent across the dhcp4 and dhcp6 config would be nice.

Just a nit-pick, but having the indentation be consistent across the dhcp4 and dhcp6 config would be nice.
bitwhisker marked this conversation as resolved
@ -0,0 +1,44 @@
### the IP or hostname to listen on for incoming Stork server connections
# STORK_AGENT_HOST=
Owner

Most of the variables here are commented out, so we can just massively simplify this file.
If they are included for documentation purposes, I would rather include a link in the README.

Most of the variables here are commented out, so we can just massively simplify this file. If they are included for documentation purposes, I would rather include a link in the README.
bitwhisker marked this conversation as resolved
@ -0,0 +1 @@
nameserver 127.0.0.1
Owner

Same comment as below: We already have a role for managing the resolv.conf, so rather include that.
See: 7832978ff7/roles/deploy_systemd_resolved_config

Same comment as below: We already have a role for managing the `resolv.conf`, so rather include that. See: https://git.hamburg.ccc.de/CCCHH/ansible-infra/src/commit/7832978ff732208f2f29f04ef446c7c51076c6d1/roles/deploy_systemd_resolved_config
bitwhisker marked this conversation as resolved
@ -0,0 +1,27 @@
- name: unbound.restarted
tags: [ unbound, dns, dns_resolver ]
Owner

Again, same comment as in the kea role, I don't think it makes sense to have granular tags in the role itself.

Again, same comment as in the kea role, I don't think it makes sense to have granular tags in the role itself.
bitwhisker marked this conversation as resolved
@ -0,0 +10,4 @@
- name: install extra dns tooling
become: true
ansible.builtin.package:
name: [ bind ] # the bind package includes tools like dig in archlinux
Owner

There is no bind package on Debian and we already install dig in the base_config role:

There is no `bind` package on Debian and we already install `dig` in the `base_config` role: https://git.hamburg.ccc.de/CCCHH/ansible-infra/src/commit/7832978ff732208f2f29f04ef446c7c51076c6d1/roles/base_config/tasks/main.yaml#L30
bitwhisker marked this conversation as resolved
@ -0,0 +39,4 @@
state: started
enabled: true
- name: disable systemd-resolved
Owner

We have a nice role for managing systemd-resolved already, so no need to duplicate functionality here.
See: 7832978ff7/roles/deploy_systemd_resolved_config

We have a nice role for managing systemd-resolved already, so no need to duplicate functionality here. See: https://git.hamburg.ccc.de/CCCHH/ansible-infra/src/commit/7832978ff732208f2f29f04ef446c7c51076c6d1/roles/deploy_systemd_resolved_config
bitwhisker marked this conversation as resolved
@ -0,0 +1,17 @@
---
- name: install unbound prometheus exporter
become: true
ansible.builtin.package:
Owner

There's no unbound-prometheus-exporter package on Debian.

There's no `unbound-prometheus-exporter` package on Debian.
june marked this conversation as resolved
@ -0,0 +3,4 @@
become: true
ansible.builtin.package:
name: prometheus-unbound-exporter
notify: prometheus-unbound-exporter.enabled
Owner

I would rather move the enable and start logic into the file itself, since that's not really the job of a handler. See the main unbound setup tasks for reference.

I would rather move the enable and start logic into the file itself, since that's not really the job of a handler. See the main unbound setup tasks for reference.
bitwhisker marked this conversation as resolved
@ -0,0 +3,4 @@
server:
{% if unbound_enable_dnssec -%}
# disable chroot because unbound is the only thing running on the VM
# and because it has issues with how archlinux configures the systemd units write protection regarding the anchor file
Owner

Is this still relevant on Debian? Again, we don't use Arch Linux in our infra.

Is this still relevant on Debian? Again, we don't use Arch Linux in our infra.
bitwhisker marked this conversation as resolved
@ -0,0 +12,4 @@
{% endif -%}
# use all CPUs
num-threads: 2
Owner

Are those all the CPUs we use? Might it make sense to have this configurable or at least change the comment?

Are those all the CPUs we use? Might it make sense to have this configurable or at least change the comment?
bitwhisker marked this conversation as resolved
bitwhisker force-pushed new_ccchh_router from 28150818a7
Some checks failed
/ Ansible Lint (push) Successful in 2m36s
/ Ansible Lint (pull_request) Successful in 2m36s
/ build (pull_request) Failing after 2m40s
to 960315d182
Some checks failed
/ build (pull_request) Failing after 2m41s
/ Ansible Lint (push) Failing after 2m44s
/ Ansible Lint (pull_request) Failing after 2m44s
2026-05-26 10:21:42 +02:00
Compare
unbound(role): make unbound thread number configurable
Some checks failed
/ Ansible Lint (pull_request) Failing after 2m34s
/ Ansible Lint (push) Failing after 2m36s
/ build (pull_request) Failing after 2m40s
c051fc6337
Author
Owner

remaning TODOs:

  • deprecate all remaining z9.ccchh.net. and z9. (tld) references
  • check all configurations for old ip ranges and change them
  • fix unbound prometheus exporter debian install
  • maybe rework admin wireguard peer allowed ips
remaning TODOs: - [x] deprecate all remaining z9.ccchh.net. and z9. (tld) references - [x] check all configurations for old ip ranges and change them - [x] fix unbound prometheus exporter debian install - [ ] maybe rework admin wireguard peer allowed ips
unbound(role): move resolvd vars to task
All checks were successful
/ Ansible Lint (pull_request) Successful in 2m37s
/ Ansible Lint (push) Successful in 2m21s
/ build (pull_request) Successful in 29s
57ae1456a0
z9(group): remove all old ip references and change them to new ones
Some checks failed
/ build (pull_request) Failing after 2m46s
/ Ansible Lint (push) Successful in 3m57s
/ Ansible Lint (pull_request) Successful in 4m1s
2c825d2b85
bitwhisker force-pushed new_ccchh_router from 2c825d2b85
Some checks failed
/ build (pull_request) Failing after 2m46s
/ Ansible Lint (push) Successful in 3m57s
/ Ansible Lint (pull_request) Successful in 4m1s
to 1fbc903125
Some checks failed
/ Ansible Lint (push) Successful in 2m26s
/ Ansible Lint (pull_request) Successful in 2m28s
/ build (pull_request) Failing after 2m40s
2026-06-20 18:05:44 +02:00
Compare
z9(pve01): change thinkcccore0 to pve01
Some checks failed
/ Ansible Lint (pull_request) Successful in 2m34s
/ Ansible Lint (push) Successful in 2m37s
/ build (pull_request) Failing after 2m42s
9d5215e6ec
- fix some indentation problems
- fix access control
- fix remote control unix socket and thrust anchor file (because debain
appamour ist annoying)
  - add unbound-anchor package
unbound(role): fix unbound prometheus exporter install on debian
Some checks failed
/ build (pull_request) Failing after 2m46s
/ Ansible Lint (push) Successful in 3m3s
/ Ansible Lint (pull_request) Successful in 3m8s
eb186c4152
- download debian image from github und verify checksum
- setup systemd service unit
unbound(role): fix systemd unit of prometheus exporter
All checks were successful
/ Ansible Lint (pull_request) Successful in 2m42s
/ Ansible Lint (push) Successful in 2m43s
/ build (pull_request) Successful in 33s
724d537cd5
bitwhisker force-pushed new_ccchh_router from 724d537cd5
All checks were successful
/ Ansible Lint (pull_request) Successful in 2m42s
/ Ansible Lint (push) Successful in 2m43s
/ build (pull_request) Successful in 33s
to 8ba3d9145d
Some checks failed
/ Ansible Lint (pull_request) Failing after 31s
/ build (pull_request) Failing after 43s
/ Ansible Lint (push) Failing after 5s
2026-07-31 18:58:25 +02:00
Compare
bitwhisker force-pushed new_ccchh_router from 8ba3d9145d
Some checks failed
/ Ansible Lint (pull_request) Failing after 31s
/ build (pull_request) Failing after 43s
/ Ansible Lint (push) Failing after 5s
to d2f91f2f28
Some checks failed
/ Ansible Lint (pull_request) Failing after 5s
/ Ansible Lint (push) Failing after 6s
/ build (pull_request) Failing after 18s
2026-07-31 21:09:45 +02:00
Compare
z9-router(host): add dhcp and dns for dooris-legacy
Some checks failed
/ build (pull_request) Successful in 53s
/ Ansible Lint (push) Failing after 3m0s
/ Ansible Lint (pull_request) Failing after 3m1s
ab6e812244
z9-router(host): change mac address of yate in dhcp
Some checks failed
/ build (pull_request) Successful in 31s
/ Ansible Lint (pull_request) Failing after 2m41s
/ Ansible Lint (push) Failing after 2m42s
84fe7fa4c0
z9-router(host): move yate from vlan 55 to 52
Some checks failed
/ build (pull_request) Successful in 30s
/ Ansible Lint (push) Failing after 2m38s
/ Ansible Lint (pull_request) Failing after 2m41s
210da2ab4d
june left a comment

Generally looks good and thanks for all the work!
See the attached comments.

Generally looks good and thanks for all the work! See the attached comments.
README.md Outdated
@ -3,3 +3,3 @@
Folgende Geräte und Server werden duch dieses Ansible Repository verwaltet:
* Diverse VMs auf dem ThinkCCCluster
* Diverse VMs auf dem z9 (PVE Cluster)
Owner

This sentence is now grammatically incorrect. Maybe: "Diverse VMs im z9 (PVE Cluster)"?

This sentence is now grammatically incorrect. Maybe: "Diverse VMs im z9 (PVE Cluster)"?
bitwhisker marked this conversation as resolved
@ -41,30 +43,102 @@ pve04 A 10.89.213.14
pbs A 10.89.213.15
AAAA 2a07:c481:1:36::15
unifi A 10.89.213.21
; AAAA 2a07:c481:1:36::21
Owner

If this is commented out, can this be just removed or re-established?

If this is commented out, can this be just removed or re-established?
stb marked this conversation as resolved
@ -44,4 +47,4 @@
;
; Club-Services
Owner

Maybe explicitly call this "Internal Club-Services" now that we have the category "Public Club-Services".

Maybe explicitly call this "Internal Club-Services" now that we have the category "Public Club-Services".
stb marked this conversation as resolved
@ -68,0 +134,4 @@
;SIP-T46S A 10.89.212.227
;SIP-T46S A 10.89.212.230
Owner

I assume these deprecated entries are for documentation purposes?

I assume these deprecated entries are for documentation purposes?
stb marked this conversation as resolved
@ -14,3 +14,3 @@
# replace with the IP address of your resolver
resolver 10.31.208.1;
#resolver 10.31.208.1; # is this needed?
Owner

I'm not quite sure, if this is actually needed for resolving hostnames in the config. If everything works without the resolver config option, then lets just remove it.

I'm not quite sure, if this is actually needed for resolving hostnames in the config. If everything works without the `resolver` config option, then lets just remove it.
stb marked this conversation as resolved
@ -56,3 +39,3 @@
# replace with the IP address of your resolver
resolver 10.31.208.1;
#resolver 10.31.208.1; # is this needed?
Owner

Same here with the resolver.

Same here with the `resolver`.
stb marked this conversation as resolved
@ -0,0 +6,4 @@
# Interfaces
#define if_netwan = "netwan"
Owner

If this isn't in use, it can just be removed.

If this isn't in use, it can just be removed.
stb marked this conversation as resolved
@ -0,0 +49,4 @@
ct state invalid drop
ct state established,related accept
ip protocol icmp accept
Owner

Some spacing seems to be off here.

Some spacing seems to be off here.
stb marked this conversation as resolved
@ -0,0 +103,4 @@
ct state established,related accept
# Allow internet access.
iifname { $lan_ifs, $if_wg56_management } oifname $wan_ifs accept comment "allow internet access"
Owner

Some spacing seems to be off here as well.

Some spacing seems to be off here as well.
stb marked this conversation as resolved
@ -0,0 +7,4 @@
[Network]
#LinkLocalAddressing=no
DHCP=no
#IPv6AcceptRA=no
Owner

I guess those commented out options can just be removed, if they aren't needed.

I guess those commented out options can just be removed, if they aren't needed.
stb marked this conversation as resolved
@ -0,0 +12,4 @@
IPv6SendRA=yes
[Address]
Address=10.89.213.1/24
Owner

This file is commented out in the main netlan.network file and uses the same IP addresses. Maybe just removing it would clear up confusion or are there plans to re-establish it down the line?

This file is commented out in the main `netlan.network` file and uses the same IP addresses. Maybe just removing it would clear up confusion or are there plans to re-establish it down the line?
stb marked this conversation as resolved
@ -0,0 +7,4 @@
- name: Kea_dhcp4.restarted_debian
listen: Kea_dhcp4.restarted
become: true
when: ansible_facts['distribution'] == 'Debian'
Owner

Again, I think rather not having the checks makes more sense for our use case.

Again, I think rather not having the checks makes more sense for our use case.
stb marked this conversation as resolved
@ -0,0 +4,4 @@
register: kea_dhcp__repo
ansible.builtin.deb822_repository:
name: "isc-{{ kea_dhcp__version_repo }}"
uris: "https://dl.cloudsmith.io/public/isc/{{ kea_dhcp__version_repo }}/deb/debian"
Owner

To clarify: I assume the Debian package isn't sufficient then?
(in reference to: #98 (comment))

To clarify: I assume the Debian package isn't sufficient then? (in reference to: https://git.hamburg.ccc.de/CCCHH/ansible-infra/pulls/98#issuecomment-4686)
Author
Owner

yes

yes
bitwhisker marked this conversation as resolved
@ -0,0 +13,4 @@
become: true
ansible.builtin.apt:
name:
- isc-kea-dhcp4
Owner

Again, I think installing this conditionally, if we also deploy the configs conditionally, makes sense.
(in reference to: #98 (comment))

Again, I think installing this conditionally, if we also deploy the configs conditionally, makes sense. (in reference to: https://git.hamburg.ccc.de/CCCHH/ansible-infra/pulls/98#issuecomment-4657)
stb marked this conversation as resolved
@ -0,0 +9,4 @@
owner: root
group: "{{ kea_dhcp__service_group }}"
mode: "u=rw,g=r,o="
validate: "/usr/sbin/kea-dhcp4 -T %s" # does not work with debian apparmor policys
Owner

If this doesn't work on our target platform, than maybe just don't have this check. Does this fail?

If this doesn't work on our target platform, than maybe just don't have this check. Does this fail?
Author
Owner

this does not fail, because we deactivated app armor, this is just a comment, for if some one in the future has this problem

this does not fail, because we deactivated app armor, this is just a comment, for if some one in the future has this problem
stb marked this conversation as resolved
@ -0,0 +13,4 @@
- name: Setup Kea DHCP
block:
- name: Install Kea on Debian
when: ansible_facts['distribution'] == "Debian"
Owner

I would rather remove this check and have it just fail while running the Ansible playbook, rather than installing a broken Kea deployment.

I would rather remove this check and have it just fail while running the Ansible playbook, rather than installing a broken Kea deployment.
stb marked this conversation as resolved
@ -0,0 +2,4 @@
- name: Install stork-agent
block:
- name: Install stork-agent on Debian
when: ansible_facts['distribution'] == "Debian"
Owner

Same here with the distro check.

Same here with the distro check.
stb marked this conversation as resolved
@ -0,0 +6,4 @@
"control-sockets": {{ kea_dhcp__dhcp4['control-sockets'] | to_nice_json | indent(8) }},
"lease-database": {{ kea_dhcp__dhcp4['lease-database'] | to_nice_json | indent(8) }},
{% if kea_dhcp__dhcp4['hooks-libraries'] is defined and kea_dhcp__dhcp4['hooks-libraries'] %}
"hooks-libraries": {{ kea_dhcp__dhcp4['hooks-libraries'] | to_nice_json | indent(8) }},
Owner

This option isn't documented in the README.

This option isn't documented in the README.
stb marked this conversation as resolved
@ -0,0 +11,4 @@
{% if kea_dhcp__dhcp4['option-data'] is defined and kea_dhcp__dhcp4['option-data'] %}
"option-data": {{ kea_dhcp__dhcp4['option-data'] | to_nice_json | indent(8) }},
{% endif %}
"loggers": {{ kea_dhcp__dhcp4['logging'] | to_nice_json | indent(8) }},
Owner

This option isn't documented in the README.

This option isn't documented in the README.
stb marked this conversation as resolved
@ -0,0 +6,4 @@
"control-sockets": {{ kea_dhcp__dhcp6['control-sockets'] | to_nice_json | indent(8) }},
"lease-database": {{ kea_dhcp__dhcp6['lease-database'] | to_nice_json | indent(8) }},
{% if kea_dhcp__dhcp6['hooks-libraries'] is defined and kea_dhcp__dhcp6['hooks-libraries'] %}
"hooks-libraries": {{ kea_dhcp__dhcp6['hooks-libraries'] | to_nice_json | indent(8) }},
Owner

This option isn't documented in the README.

This option isn't documented in the README.
stb marked this conversation as resolved
@ -0,0 +11,4 @@
{% if kea_dhcp__dhcp6['option-data'] is defined and kea_dhcp__dhcp6['option-data'] %}
"option-data": {{ kea_dhcp__dhcp6['option-data'] | to_nice_json | indent(8) }},
{% endif %}
"loggers": {{ kea_dhcp__dhcp6['logging'] | to_nice_json | indent(8) }}{% if kea_dhcp__dhcp6.subnets is defined and kea_dhcp__dhcp6.subnets %},{% endif %}
Owner

This option isn't documented in the README.

This option isn't documented in the README.
stb marked this conversation as resolved
@ -0,0 +1,44 @@
### the IP or hostname to listen on for incoming Stork server connections
Owner

I would just get rid of all the commented out options, if we don't use them anyway (and instead maybe link to a full-fledged config example from the docs or something).
(#98 (comment))

I would just get rid of all the commented out options, if we don't use them anyway (and instead maybe link to a full-fledged config example from the docs or something). (https://git.hamburg.ccc.de/CCCHH/ansible-infra/pulls/98#issuecomment-4660)
stb marked this conversation as resolved
@ -0,0 +1,20 @@
# Unbound DNS resolver
Role fora a validating, recursive, caching DNS resolver based on [Unbound](https://nlnetlabs.nl/projects/unbound/about/).
Owner

Spelling "fora" -> "for".

Spelling "fora" -> "for".
stb marked this conversation as resolved
@ -0,0 +9,4 @@
The following variables can be used to customize this role:
| Variable | Type | Default | Description |
Owner

I think it would be nice to stick to the list format used in all the other roles for the sake of consistency.

I think it would be nice to stick to the list format used in all the other roles for the sake of consistency.
stb marked this conversation as resolved
@ -0,0 +1 @@
nameserver 127.0.0.1
Owner

I would still be in favor of just depending on our deploy_systemd_resolved_config role for managing this.
(#98 (comment))

I would still be in favor of just depending on our `deploy_systemd_resolved_config` role for managing this. (https://git.hamburg.ccc.de/CCCHH/ansible-infra/pulls/98#issuecomment-4668)
stb marked this conversation as resolved
@ -0,0 +4,4 @@
name: unbound.service
state: restarted
- name: unbound.reloaded
Owner

I think this handler isn't in use, is it?

I think this handler isn't in use, is it?
stb marked this conversation as resolved
@ -0,0 +1,55 @@
- name: unbound role main
block:
Owner

If all tasks are in the block, then this doesn't need to be a block.

If all tasks are in the block, then this doesn't need to be a block.
stb marked this conversation as resolved
@ -0,0 +8,4 @@
block:
- name: request github api
ansible.builtin.uri:
url: "{{ prometheus_unbound_exporter_github_api_url }}"
Owner

If we hardcode the version anyway, I think we should first check, if this version is already installed locally and only then hit the GitHub API. This avoids unnecessary steps and also avoids hitting the unreliable GitHub API for every run.
One could either use apt (via a command or facts maybe?) to check for the installed version and only get a new one, if they differ or just keep the latest dep as a sort of canary file or something and only get a new one, if it isn't as expected.
Something similar is done for the Forgejo Runner installation, see 5ecf70ade3/roles/forgejo_runner/tasks/main/01_install.yaml , tho this doesn't use apt, so can't really be adapted.

If we hardcode the version anyway, I think we should first check, if this version is already installed locally and only then hit the GitHub API. This avoids unnecessary steps and also avoids hitting the unreliable GitHub API for every run. One could either use apt (via a command or facts maybe?) to check for the installed version and only get a new one, if they differ or just keep the latest dep as a sort of canary file or something and only get a new one, if it isn't as expected. Something similar is done for the Forgejo Runner installation, see https://git.hamburg.ccc.de/CCCHH/ansible-infra/src/commit/5ecf70ade373737ffef3a9766ab7b70d28fbe9a1/roles/forgejo_runner/tasks/main/01_install.yaml , tho this doesn't use apt, so can't really be adapted.
stb marked this conversation as resolved
@ -0,0 +39,4 @@
access-control: {{ i }} allow
{% endfor -%}
{% for i in unbound_private_domain -%}
Owner

This setting is missing from documentation in the README.

This setting is missing from documentation in the README.
stb marked this conversation as resolved
README.md: correct sentence
Some checks failed
/ build (pull_request) Successful in 32s
/ Ansible Lint (pull_request) Failing after 2m59s
/ Ansible Lint (push) Failing after 3m4s
164c7c1447
Owner

These things need to be added (already applied manually on the router):

nftables:

table inet forward {
    chain forward {
        type filter hook forward priority filter; policy drop;
...
        ip6 saddr { 2a07:c481:0:1::/64 } ip6 daddr { 2a07:c481:1:36::15/128 } accept comment "allow Fux PVE to access CCCHH PBS"
    }
}

und

iifname { $lan_ifs, $if_wg56_management } meta l4proto {tcp, udp } th dport 53 accept comment

Anstatt der firewall freigabe für udp dport 53.

/etc/unbound/unbound.conf

access-control: 2a07:c481:1::/48 allow
--- 21-netlan.51-clients.network~	2026-08-01 22:03:59.000000000 +0000
+++ 21-netlan.51-clients.network	2026-08-02 11:13:08.614677664 +0000
@@ -7,6 +7,8 @@
 
 [Network]
 Description=clients
+DNS=10.89.208.1
+DNS=2a07:c481:1:33::1
 
 # Masquerading done in nftables (nftables.conf).
 IPv6SendRA=yes

Also the same for the other interfaces.

These things need to be added (already applied manually on the router): nftables: ``` table inet forward { chain forward { type filter hook forward priority filter; policy drop; ... ip6 saddr { 2a07:c481:0:1::/64 } ip6 daddr { 2a07:c481:1:36::15/128 } accept comment "allow Fux PVE to access CCCHH PBS" } } ``` und ``` iifname { $lan_ifs, $if_wg56_management } meta l4proto {tcp, udp } th dport 53 accept comment ``` Anstatt der firewall freigabe für udp dport 53. /etc/unbound/unbound.conf ``` access-control: 2a07:c481:1::/48 allow ``` ```diff --- 21-netlan.51-clients.network~ 2026-08-01 22:03:59.000000000 +0000 +++ 21-netlan.51-clients.network 2026-08-02 11:13:08.614677664 +0000 @@ -7,6 +7,8 @@ [Network] Description=clients +DNS=10.89.208.1 +DNS=2a07:c481:1:33::1 # Masquerading done in nftables (nftables.conf). IPv6SendRA=yes ``` Also the same for the other interfaces.
unbound(role): add config flag in README
Some checks failed
/ build (pull_request) Successful in 29s
/ Ansible Lint (push) Failing after 2m43s
/ Ansible Lint (pull_request) Failing after 2m42s
69c36161be
stb approved these changes 2026-08-07 22:51:34 +02:00
Dismissed
stb left a comment

lgtm

lgtm
bitwhisker force-pushed new_ccchh_router from 69c36161be
Some checks failed
/ build (pull_request) Successful in 29s
/ Ansible Lint (push) Failing after 2m43s
/ Ansible Lint (pull_request) Failing after 2m42s
to 4fbac5cfe6
Some checks failed
/ build (pull_request) Successful in 28s
/ Ansible Lint (pull_request) Failing after 2m44s
/ Ansible Lint (push) Failing after 2m45s
2026-08-07 22:56:34 +02:00
Compare
bitwhisker dismissed stb's review 2026-08-07 22:56:34 +02:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

z9-router(host): fix file permissions
Some checks failed
/ build (pull_request) Successful in 29s
/ Ansible Lint (pull_request) Failing after 3m13s
/ Ansible Lint (push) Failing after 3m51s
22ace3c537
stb requested reviews from stb, c6ristian 2026-08-07 23:14:17 +02:00
stb approved these changes 2026-08-07 23:14:51 +02:00
Dismissed
stb left a comment

lgtm

lgtm
z9-router(host): fix nftables
Some checks failed
/ build (pull_request) Successful in 30s
/ Ansible Lint (pull_request) Failing after 2m39s
/ cleanup-staging (pull_request) Successful in 3s
/ build (push) Successful in 27s
/ Ansible Lint (push) Has been cancelled
3ab9f83039
bitwhisker dismissed stb's review 2026-08-07 23:37:01 +02:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

stb requested review from stb 2026-08-07 23:37:59 +02:00
bitwhisker changed title from WIP: new z9 ccchh router to new z9 ccchh router 2026-08-07 23:38:20 +02:00
stb approved these changes 2026-08-07 23:38:22 +02:00
stb left a comment

lgtm

lgtm
c6ristian approved these changes 2026-08-07 23:38:46 +02:00
c6ristian left a comment

miau

miau
bitwhisker scheduled this pull request to auto merge when all checks succeed 2026-08-07 23:41:31 +02:00
bitwhisker scheduled this pull request to auto merge when all checks succeed 2026-08-07 23:41:55 +02:00
bitwhisker deleted branch new_ccchh_router 2026-08-07 23:44:28 +02:00
Sign in to join this conversation.
No description provided.