diff --git a/10-systems/networks/pfsense-router.md b/10-systems/networks/pfsense-router.md index 114b556..afe6d76 100644 --- a/10-systems/networks/pfsense-router.md +++ b/10-systems/networks/pfsense-router.md @@ -73,13 +73,16 @@ A friend of the owner is on the same ISP and the same WAN L2 segment, enabling a direct low-latency peer link. -- Friend WAN: `172.32.2.120`, MAC `24:2f:d0:7e:96:d9` (TP-Link Archer C6, stock firmware; hardware version to be confirmed from the bottom sticker — v2.x Qualcomm Atheros / v3.x MediaTek MT7621 / v4). -- Stock Archer C6 firmware has NO VPN server (no WireGuard, no OpenVPN) — port forwarding only. OpenWrt is supported on all hardware versions (16 MiB flash / 128 MiB RAM), flashable from the stock web UI with the factory image; recovery page exists (power-cycle x4). +- Friend WAN: `172.32.2.120`, MAC `24:2f:d0:7e:96:d9` (TP-Link Archer C6, stock firmware; hardware version to be confirmed from the bottom sticker). +- Stock Archer C6 VPN support depends on hardware version (TP-Link official FAQ 1544, archived 2023-12): **Archer C6 v2 officially supports OpenVPN server** in stock firmware (Advanced > VPN Server > OpenVPN, plus PPTP); Archer A6 v2/v3 also listed. C6 v3 (MediaTek MT7621) and v4 are NOT in the official list — verify in the web UI (Advanced > VPN Server) or product specs. No WireGuard on stock firmware for any C6 version. +- OpenWrt is supported on all C6 hardware versions (16 MiB flash / 128 MiB RAM), flashable from the stock web UI with the factory image; recovery page exists (power-cycle x4). - Friend LAN: `192.168.0.0/24`, gateway `192.168.0.1` (from his tracert to 8.8.8.8). - Identification method: owner read pfSense Web UI firewall log (Status → System Logs → Firewall) while the friend ran a continuous `ping 172.32.2.78`; the log showed a wall of ICMP echo-requests from `172.32.2.120` to `172.32.2.78` blocked by the default deny rule (1000000103) every second. - Our WAN blocks inbound ICMP by default (default deny rule), so the friend's ping times out; outbound pings from our side to `172.32.2.120` also get no replies (his router filters inbound ICMP) — inbound TCP to forwarded ports is NOT filtered by the ISP (verified: other segment neighbors answer on TCP ports). -- Chosen approach (owner decision): SSH port-forward proxy scheme first (no tunnels, stock firmware on both sides); WireGuard (OpenWrt on his C6 or WG on his PC) as an optional upgrade path for UDP/full-network access. -- pfSense WireGuard readiness (verified 2026-10-03): `wg` binary in base system, `/boot/kernel/if_wg.ko` module present (not loaded yet — loads on interface creation), WireGuard built into pfSense 2.7.2 Web UI. Our WAN is DHCP (dhclient on re3) — both endpoints may change IP. +- Candidate approaches (owner decision pending hardware version): + 1. If his C6 has OpenVPN server in stock (v2 or menu present): OpenVPN server on his C6 + pfSense OpenVPN client on our side; static route on his C6 for return traffic to `192.168.1.0/24` for bidirectional access. + 2. SSH port-forward proxy scheme (no tunnels, works on any stock firmware): OpenSSH on his PC + port forward on his C6 (WAN 2222 → his PC 22); pfSense NAT port forward WAN 2200 → our gateway host 22 with source restriction `172.32.2.120/32`. + 3. WireGuard upgrade path: OpenWrt on his C6 or WG on his PC; pfSense side ready (verified 2026-10-03: `wg` binary in base system, `/boot/kernel/if_wg.ko` module present, WireGuard built into pfSense 2.7.2 Web UI). Our WAN is DHCP (dhclient on re3) — both endpoints may change IP. ### Stable identifier and rediscovery diff --git a/90-maintenance/pending-changes/20261003174337-d1fa1713.json b/90-maintenance/pending-changes/20261003174337-d1fa1713.json new file mode 100644 index 0000000..87c506e --- /dev/null +++ b/90-maintenance/pending-changes/20261003174337-d1fa1713.json @@ -0,0 +1,19 @@ +{ + "id": "20261003174337-d1fa1713", + "kind": "doc", + "target": "10-systems/networks/pfsense-router.md", + "summary": "pfSense: correct C6 stock VPN facts — C6 v2 supports OpenVPN server per official TP-Link FAQ", + "reason": "Correction: official TP-Link FAQ 1544 lists Archer C6 v2 (and A6 v2/v3) as supporting OpenVPN server in stock firmware. Previous claim 'stock C6 has NO VPN server' was wrong for v2. Updated candidate approaches: OpenVPN server on his C6 + pfSense client as option 1.", + "payload": { + "content": "---\nowner: gmikcon\nstatus: active\nlast_reviewed: 2026-10-03\nreview_interval: 90d\nconfidence: high\nsource_of_truth: owner-provided-firewall-log-and-macvendors\n---\n\n# pfSense Router\n\nCentral router and firewall for the local network.\n\n## Access\n\n- Web UI: `https://192.168.1.1/`\n- SSH: `ai_agent_ro@192.168.1.1:22`, read-only access for documentation agents.\n- SSH authentication: owner-managed key. The private key `gnexus_book_pfsense_ro` is stored on the owner's PC `gmikcon` (192.168.1.129, dynamic DHCP address) at `~/.ssh/gnexus_book_pfsense_ro`. Agents without direct access can reach pfSense through that PC over SSH (password auth, see gnexus-creds secret `gbook-creds`).\n- Secret values are not stored in this repository.\n\n### Read-only account limitations (verified 2026-09-29)\n\n- `ai_agent_ro` (uid 2000, group nobody) can run basic commands (`date`, `ls`, `id`, `cat /etc/ssh/sshd_config`) but CANNOT read `/var/log/*` — all logs are `root:wheel` mode 600.\n- No `sudo`, no `clog` binary in PATH, no Match/ForceCommand block in sshd_config — the restriction is plain file permissions.\n- WAN outage analysis must therefore use alternative sources: NetworkManager connectivity logs on LAN hosts (`journalctl | grep \"state is now\"`), OpenVPN reconnect logs on tunnel endpoints, or the pfSense Web UI (owner).\n- The default shell for `ai_agent_ro` is `csh`; complex one-liners must be wrapped as `sh -c '...'` (nested quoting is fragile — build the command programmatically).\n\n## Role\n\n- Local network edge.\n- Firewall and routing point for internal infrastructure.\n- DHCP server for `home-lan` and `home-iot-lan`.\n- Local DNS resolver through Unbound.\n- Local NTP endpoint.\n- Part of the path between local infrastructure and services reachable through trusted network paths.\n\n## Platform\n\n- Hostname: `pfSense.home.arpa`.\n- OS: pfSense CE `2.7.2`.\n- Base system observed over SSH: FreeBSD `14.0-CURRENT`, amd64.\n\n## Interfaces\n\n| Interface | Description | Role | Address | MAC | Status |\n| --- | --- | --- | --- | --- | --- |\n| `re0` | `LANTECH` | `home-iot-lan` | `192.168.2.1/24` | `00:e0:4c:68:07:9f` | active, 1000baseT full-duplex |\n| `re1` | none | unused | none | `00:e0:4c:68:39:03` | no carrier |\n| `re2` | `LANMAIN` | `home-lan` | `192.168.1.1/24` | `00:e0:4c:68:35:ba` | active, 1000baseT full-duplex |\n| `re3` | `WAN` | WAN uplink | `172.32.2.78/24` | `70:85:c2:24:ee:4b` | active, 1000baseT full-duplex |\n\n## Routing\n\nObserved routes:\n\n- Default route: `172.32.2.1` through `re3`.\n- `192.168.1.0/24` is directly connected through `re2`.\n- `192.168.2.0/24` is directly connected through `re0`.\n- Host routes for `8.8.8.8` and `2.2.2.2` are present through `re3`.\n\n## WAN L2 Domain (verified 2026-10-03)\n\nThe WAN interface `re3` (172.32.2.0/24) shares a **flat, unfiltered L2 segment with other ISP clients** — it is not an isolated point-to-point uplink.\n\nEvidence from `arp -a` over SSH (`ai_agent_ro`):\n\n- 169 ARP entries on `re3` (including own address 172.32.2.78 and gateway 172.32.2.1 at `d4:01:c3:6b:86:b9`); roughly 160+ distinct neighbor MACs of other ISP clients.\n- Examples: `172.32.2.5 → 54:ef:33:4b:5a:3d`, `172.32.2.46 → 20:32:33:ea:b3:5a`, `172.32.2.104 → 54:ef:33:4b:5a:a3`, `172.32.2.106 → 00:e0:4c:8d:6b:06`, `172.32.2.141 → d4:da:21:1d:ba:f0`, `172.32.2.195 → 48:8f:5a:3b:3c:32`.\n- ICMP ping from pfSense to 20 sampled neighbor addresses (172.32.2.5, .23, .33, .45, .46, .48, .81, .85, .92, .104, .106, .128, .141, .146, .155, .161, .195, .212, .219, .250): 17/20 replied; .106, .141, .219 did not answer ICMP but their MACs were present in ARP — ICMP is partially filtered by client firewalls, ARP is the reliable indicator.\n- Implication: other ISP subscribers are on the same broadcast domain; treat WAN-side exposure seriously (no trusted traffic on 172.32.2.0/24, firewall rules on WAN should assume hostile neighbors).\n\n## Friend Peer Link (verified 2026-10-03)\n\nA friend of the owner is on the same ISP and the same WAN L2 segment, enabling a direct low-latency peer link.\n\n- Friend WAN: `172.32.2.120`, MAC `24:2f:d0:7e:96:d9` (TP-Link Archer C6, stock firmware; hardware version to be confirmed from the bottom sticker).\n- Stock Archer C6 VPN support depends on hardware version (TP-Link official FAQ 1544, archived 2023-12): **Archer C6 v2 officially supports OpenVPN server** in stock firmware (Advanced > VPN Server > OpenVPN, plus PPTP); Archer A6 v2/v3 also listed. C6 v3 (MediaTek MT7621) and v4 are NOT in the official list — verify in the web UI (Advanced > VPN Server) or product specs. No WireGuard on stock firmware for any C6 version.\n- OpenWrt is supported on all C6 hardware versions (16 MiB flash / 128 MiB RAM), flashable from the stock web UI with the factory image; recovery page exists (power-cycle x4).\n- Friend LAN: `192.168.0.0/24`, gateway `192.168.0.1` (from his tracert to 8.8.8.8).\n- Identification method: owner read pfSense Web UI firewall log (Status → System Logs → Firewall) while the friend ran a continuous `ping 172.32.2.78`; the log showed a wall of ICMP echo-requests from `172.32.2.120` to `172.32.2.78` blocked by the default deny rule (1000000103) every second.\n- Our WAN blocks inbound ICMP by default (default deny rule), so the friend's ping times out; outbound pings from our side to `172.32.2.120` also get no replies (his router filters inbound ICMP) — inbound TCP to forwarded ports is NOT filtered by the ISP (verified: other segment neighbors answer on TCP ports).\n- Candidate approaches (owner decision pending hardware version):\n 1. If his C6 has OpenVPN server in stock (v2 or menu present): OpenVPN server on his C6 + pfSense OpenVPN client on our side; static route on his C6 for return traffic to `192.168.1.0/24` for bidirectional access.\n 2. SSH port-forward proxy scheme (no tunnels, works on any stock firmware): OpenSSH on his PC + port forward on his C6 (WAN 2222 → his PC 22); pfSense NAT port forward WAN 2200 → our gateway host 22 with source restriction `172.32.2.120/32`.\n 3. WireGuard upgrade path: OpenWrt on his C6 or WG on his PC; pfSense side ready (verified 2026-10-03: `wg` binary in base system, `/boot/kernel/if_wg.ko` module present, WireGuard built into pfSense 2.7.2 Web UI). Our WAN is DHCP (dhclient on re3) — both endpoints may change IP.\n\n### Stable identifier and rediscovery\n\n- The friend's WAN IP is DHCP-assigned and may change on lease renewal. The MAC `24:2f:d0:7e:96:d9` is the stable identifier. The pfSense WAN DHCP lease file (`/var/db/dhclient.leases.re3`) is root-only readable through `ai_agent_ro`, so lease duration is unknown — assume the friend's lease can change at any time.\n- Rediscovery procedure if the friend's WAN IP changes:\n 1. Preferred: the friend runs a continuous ping to `172.32.2.78`; the owner reads the pfSense firewall log (Status → System Logs → Firewall, filter ICMP) — the source IP of the ICMP wall is his new WAN address.\n 2. Without his cooperation: scan the segment (`nmap -sn 172.32.2.0/24` from a LAN host), then read `arp -a` on pfSense `re3` and match the MAC prefix `24:2F:D0` (TP-Link OUI). Other TP-Link routers in the segment may share the prefix — verify candidates with the ping-trap from step 1.\n- Note: inbound packets do not refresh ARP entries on FreeBSD — ARP snapshots alone cannot distinguish an active pinger from a stale entry; use the firewall log as the source of truth for active traffic.\n\n## Local Services\n\nObserved listening services:\n\n- SSH: `*:22`.\n- Web UI through nginx: `*:80`, `*:443`.\n- DHCPv4 through Kea: `192.168.1.1:67`, `192.168.2.1:67`.\n- DNS resolver through Unbound: `*:53`.\n- Unbound control: `127.0.0.1:953`.\n- Syslog: UDP `*:514`.\n- NTP: UDP `*:123`, including bindings on `192.168.1.1`, `192.168.2.1`, `172.32.2.78`, and `127.0.0.1`.\n\nResolver configuration:\n\n- `127.0.0.1`\n- `8.8.8.8`\n- `2.2.2.2`\n- Search domain: `home.arpa`\n\n## Local Network Topology\n\nThe home network currently consists of two local networks implemented through one custom router with multiple network interfaces.\n\nEach local network goes from the router into a switch and then is distributed through the home. The access layer includes wired TVs, PCs, servers, and Wi-Fi access points.\n\n### Home LAN\n\n- Inventory id: `home-lan`.\n- CIDR: `192.168.1.0/24`.\n- Gateway: `192.168.1.1`.\n- Router interface: `re2` / `LANMAIN`.\n- Main Wi-Fi SSID: `home`.\n- Wi-Fi mode: access points, not a separate routed Wi-Fi network.\n- Access points: 2 nodes.\n- Mesh mode: enabled for the main Wi-Fi nodes.\n\n### Home IoT LAN\n\n- Inventory id: `home-iot-lan`.\n- CIDR: `192.168.2.0/24`.\n- Gateway: `192.168.2.1`.\n- Router interface: `re0` / `LANTECH`.\n- Purpose: service network for smart-home and IoT devices.\n- Wi-Fi mode: access points, not a separate routed Wi-Fi network.\n- IoT Wi-Fi nodes:\n - `home_iot_0`\n - `home_iot_1`\n - `home_iot_2`\n\n### Current And Planned Policy\n\nCurrent policy:\n\n- full access between `home-lan` and `home-iot-lan`;\n- IoT internet access is currently allowed.\n\nPossible future policy:\n\n- isolate the two networks from each other;\n- cut off the IoT network from the internet.\n\n## Dual-Homed Smart Home Server\n\nThe smart-home server is present in both networks:\n\n- `192.168.1.101` on `home-lan`;\n- `192.168.2.101` on `home-iot-lan`.\n\nFurther details still need to be documented: firewall rules, port forwards, VPN routes, DHCP static mappings, and DNS host overrides." + }, + "status": "applied", + "created_at": "2026-10-03T17:43:37Z", + "updated_at": "2026-10-03T17:43:38Z", + "applied_at": "2026-10-03T17:43:38Z", + "validation": { + "status": "ok", + "issue_count": 0, + "issues": [] + } +}