Turn mediaserver into a home router
Adds services/router.nix with systemd-networkd (eno1=WAN via DHCP,
eth0=LAN 10.0.0.1/24), nftables (NAT + firewall, default drop on WAN
in), dnsmasq (DHCP only — AdGuard Home keeps :53 for DNS), and sysctl
IP forwarding. NetworkManager is forced off on this host.
Port forwards live in ports.toml at the repo root and are imported via
builtins.fromTOML. Supports single ports, ranges ("26901-26902"), and
"both" protocol. Initial forwards: 22, 80, 443, 26900, 26901-26902.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 09:48:38 +01:00
|
|
|
# ports.toml — WAN → LAN port forwards for the router (services/router.nix)
|
|
|
|
|
#
|
|
|
|
|
# Each [[forward]] block adds a DNAT rule from WAN to the LAN IP below.
|
|
|
|
|
# Fields:
|
|
|
|
|
# name — human label, appears in journal logs
|
|
|
|
|
# port — single port (number), e.g. 443
|
|
|
|
|
# ports — port range as a string, e.g. "26901-26902"
|
|
|
|
|
# protocol — "tcp", "udp", or "both"
|
|
|
|
|
# dest — LAN IP to forward to (optional; defaults to 10.0.0.1)
|
2026-08-15 12:15:54 +01:00
|
|
|
#
|
|
|
|
|
# Editable from the router UI (services/router-ui.nix). Keep parked/commented
|
|
|
|
|
# entries ABOVE the first [[forward]]: in TOML a comment belongs to whatever
|
|
|
|
|
# table precedes it, so anything written below the last [[forward]] is deleted
|
|
|
|
|
# along with that entry the moment the UI removes it.
|
Turn mediaserver into a home router
Adds services/router.nix with systemd-networkd (eno1=WAN via DHCP,
eth0=LAN 10.0.0.1/24), nftables (NAT + firewall, default drop on WAN
in), dnsmasq (DHCP only — AdGuard Home keeps :53 for DNS), and sysctl
IP forwarding. NetworkManager is forced off on this host.
Port forwards live in ports.toml at the repo root and are imported via
builtins.fromTOML. Supports single ports, ranges ("26901-26902"), and
"both" protocol. Initial forwards: 22, 80, 443, 26900, 26901-26902.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 09:48:38 +01:00
|
|
|
|
|
|
|
|
dest_default = "10.0.0.1"
|
|
|
|
|
|
2026-08-15 12:15:54 +01:00
|
|
|
# --- Parked: re-add by moving a block down and uncommenting it ---------------
|
|
|
|
|
#
|
|
|
|
|
# 7DTD — servers disabled in services/game-servers.nix.
|
|
|
|
|
# name = "7DTD game", port = 26900, protocol = "both"
|
|
|
|
|
# name = "7DTD voice/dynamic", ports = "26901-26902", protocol = "udp"
|
|
|
|
|
# name = "7DTD-coop game", port = 26910, protocol = "both"
|
|
|
|
|
# name = "7DTD-coop voice", ports = "26911-26912", protocol = "udp"
|
|
|
|
|
#
|
|
|
|
|
# DR (Dungeon Runners) — services/dr-server.nix is disabled.
|
|
|
|
|
# 2110 tcp, 2603 both, 2604-2605 udp, 2606 tcp
|
|
|
|
|
#
|
|
|
|
|
# WoW Classic — stopped 2026-07-28 (containers stopped, not deleted).
|
|
|
|
|
# name = "WoW Classic realmd", port = 3724, protocol = "tcp"
|
|
|
|
|
# name = "WoW Classic worldserver", port = 8095, protocol = "tcp"
|
|
|
|
|
|
|
|
|
|
# --- Active ------------------------------------------------------------------
|
|
|
|
|
|
Turn mediaserver into a home router
Adds services/router.nix with systemd-networkd (eno1=WAN via DHCP,
eth0=LAN 10.0.0.1/24), nftables (NAT + firewall, default drop on WAN
in), dnsmasq (DHCP only — AdGuard Home keeps :53 for DNS), and sysctl
IP forwarding. NetworkManager is forced off on this host.
Port forwards live in ports.toml at the repo root and are imported via
builtins.fromTOML. Supports single ports, ranges ("26901-26902"), and
"both" protocol. Initial forwards: 22, 80, 443, 26900, 26901-26902.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 09:48:38 +01:00
|
|
|
[[forward]]
|
|
|
|
|
name = "HTTP"
|
|
|
|
|
port = 80
|
|
|
|
|
protocol = "tcp"
|
|
|
|
|
|
|
|
|
|
[[forward]]
|
|
|
|
|
name = "HTTPS"
|
|
|
|
|
port = 443
|
|
|
|
|
protocol = "tcp"
|
|
|
|
|
|
|
|
|
|
[[forward]]
|
|
|
|
|
name = "SSH"
|
|
|
|
|
port = 22
|
|
|
|
|
protocol = "tcp"
|
|
|
|
|
|
2026-08-09 11:57:15 +01:00
|
|
|
# Pelican game-server allocation range (services/pelican.nix). wings publishes
|
|
|
|
|
# each game container's port on the host via the shared docker daemon, so these
|
|
|
|
|
# land on 10.0.0.1 directly. Keep in sync with the node's allocations in the panel.
|
|
|
|
|
[[forward]]
|
|
|
|
|
name = "Pelican game servers"
|
|
|
|
|
ports = "25565-25600"
|
|
|
|
|
protocol = "both"
|