Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ the insecure package, the assertion fails and prompts removal.

**Home router:** Vodafone Station Arris CGA6444VF (`192.168.0.1`). WAN IP:
`91.64.99.245`. No NAT hairpin. DHCP is disabled (pi handles it). Ports 80/443
are port-forwarded to tower (`.10`). The router **blocks LAN→LAN traffic on
port-forwarded ports** — WiFi clients cannot reach tower:80/443 directly.
are port-forwarded to tower (`.10`).

**LAN DHCP + DNS:** served by `pi` via `dnsmasq` (`modules/lan-dns.nix`,
listening on `end0`, static `.18`). Pi auto-upgrades from main nightly — test
Expand All @@ -125,9 +124,6 @@ before merging.
`modules/hosts/tower/configuration.nix` — not a pi DHCP reservation). Tower's NM
profile uses pi (`.18`) for DNS so split-horizon resolution works on tower too.

**Split-horizon DNS targets:** `test/creatures/files/adele.etiennerobert.com`.
Dnsmasq overrides these to **`192.168.0.10` (tower)**.

**Testing the public/external path:** LAN clients resolve these names to tower
directly (split-horizon) and bypass the port-forward, so they can't exercise the
real external path. To test as an outside visitor would (public DNS →
Expand Down
8 changes: 8 additions & 0 deletions modules/hosts/tower/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
ipv4 = {
method = "manual";
address1 = "192.168.0.10/24,192.168.0.1";

# Second address for LAN clients (published by pi's split-horizon
# DNS): the Vodafone Station drops LAN-side traffic from WiFi clients
# to .10 on the port-forwarded ports (80/443), but the filter is keyed
# to the forward's target IP, so the same services on .11 pass. Keep
# the port forwards themselves pointing at .10.
address2 = "192.168.0.11/24";

dns = "192.168.0.18;";
};
};
Expand Down
22 changes: 13 additions & 9 deletions modules/lan-dns.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,19 @@ _: {
"1.1.1.1"
"9.9.9.9"
];
host-record = [
"test.etiennerobert.com,192.168.0.10"
"creatures.etiennerobert.com,192.168.0.10"
"files.etiennerobert.com,192.168.0.10"
"adele.etiennerobert.com,192.168.0.10"
"umami.etiennerobert.com,192.168.0.10"
"images.etiennerobert.com,192.168.0.10"
"rift.etiennerobert.com,192.168.0.10"
"rack.etiennerobert.com,192.168.0.10"
# .11 is tower's second address, required for WiFi clients: the
# Vodafone Station drops LAN-side traffic from its WLAN to the
# port-forward target (.10) on the forwarded ports (80/443), but
# the filter is keyed to that target IP, so .11 passes.
host-record = map (name: "${name}.etiennerobert.com,192.168.0.11") [
"test"
"creatures"
"files"
"adele"
"umami"
"images"
"rift"
"rack"
];
dhcp-range = "192.168.0.50,192.168.0.250,12h";
dhcp-option = [ "option:router,192.168.0.1" ];
Expand Down
Loading