infra: nas.inouter.com Traefik 리버스 프록시 (LAN-only) 복원

- lan-proxies ns 신설, selector-less Service + EndpointSlice → 192.168.9.100:5000
- IngressRoute web→websecure redirect + websecure tls (wildcard-inouter-tls)
- 2026-04-10 cf-audit-cleanup-1 의 nas.inouter.com 삭제 후 LAN-only 복원
- ExternalName 은 IP 미지원이라 동등 K8s-native 패턴(EndpointSlice) 사용

검증: curl --resolve nas.inouter.com:443:192.168.9.53 → 200 DSM 로그인
This commit is contained in:
heimdall
2026-04-10 09:11:22 +09:00
parent f5264bb4ae
commit 9d71167772
2 changed files with 99 additions and 2 deletions

View File

@@ -155,7 +155,7 @@ bouncer 자동 위젯 6개는 `cs-cf-worker-bouncer` 가 rotate. **수동 편집
| 항목 | 내용 |
|---|---|
| **servidor.it.com zone** | DNS 레코드 0건. 워커 라우트 + Turnstile 위젯만 살아있음. 2026-04-10 kappa 판정 "죽은 도메인 아님" → **유지**. |
| ~~`nas.inouter.com → actions.b-cdn.net`~~ | **2026-04-10 삭제 완료** (cf-audit-cleanup-1). dead 풀존 참조였고 Synology 는 LAN 전용. |
| ~~`nas.inouter.com → actions.b-cdn.net`~~ | **2026-04-10 삭제 완료** (cf-audit-cleanup-1). dead 풀존 참조였고 Synology 는 LAN 전용. → 같은 날 Heimdall 이 K3s `lan-proxies/nas` (Traefik IngressRoute) 로 LAN-only 복원, `*.inouter.com → k3s.inouter.com (192.168.9.53)` 폴백 활용. 상세 [[nas-storage#DSM Reverse Proxy — `nas.inouter.com` (2026-04-10)]] |
| **`*.actions.it.com → actions.b-cdn.net`** | 와일드카드 자체가 dead 풀존 가리킴. proxied=on 이라 CF 가 어디로 보내는지 의문. 일부 서브가 5xx 가능. **미정리** (영향 평가 후 별건). |
| **Worker route `vultr.actions.it.com/*`, `linode.actions.it.com/*`** | `script: null`. 등록만 되고 워커 미연결. (linode.actions.it.com 자체는 BunnyCDN iron-jp 호스트네임으로도 있음 — 중복 의도?) **미정리**. |
| **Turnstile `inouter` (sitekey `…CbmaudAjITah7y7`)** | 이름은 inouter 인데 허용 도메인은 anvil.it.com 단일. legacy 후보. **미정리** (CF 토큰 read-only 라 대시보드 수동 필요). |

View File

@@ -1,6 +1,6 @@
---
title: NAS StorageClass (NFS + iSCSI)
updated: 2026-04-06
updated: 2026-04-10
tags: [infra, k3s, storage, nfs, iscsi, synology]
---
@@ -156,9 +156,106 @@ kr2의 USB 2.5GbE 어댑터(Realtek RTL8157, 0bda:8157)는 커널 기본 `cdc_nc
- Jumbo Frame은 경로 전체(NIC → 스위치 → NIC)가 지원해야 함. 미지원 스위치가 중간에 있으면 프레임 드롭
- `ping -M do -s 8972` 로 end-to-end JF 동작 확인 가능
## DSM Reverse Proxy — `nas.inouter.com` (2026-04-10)
LAN 전용으로 Synology DSM 웹 UI 접근. 2026-04-10 Cloudflare 감사 정리 1차에서 dead 풀존(`actions.b-cdn.net`) 을 가리키던 `nas.inouter.com` CNAME 을 삭제한 뒤, 와일드카드 `*.inouter.com → k3s.inouter.com` (Traefik MetalLB VIP `192.168.9.53`) 로 폴백되도록 두고 K3s 측에 라우트를 신설하여 복원.
| 항목 | 값 |
|---|---|
| Namespace | `lan-proxies` (신규 — LAN-only 리버스 프록시 전용) |
| Service | `nas` (selector 없는 ClusterIP) + EndpointSlice → `192.168.9.100:5000` |
| Backend | Synology DSM HTTP (포트 5000, 평문) |
| Traefik IngressRoute | `nas` (web entrypoint, redirect → https), `nas-tls` (websecure entrypoint) |
| Middleware | `redirect-https` (`redirectScheme.scheme=https permanent=true`) |
| TLS | 기존 wildcard `wildcard-inouter-tls` (cert-manager + emberstack reflector 자동 복제) |
| 외부 노출 | LAN-only — 와일드카드 `*.inouter.com` 가 사설 IP `192.168.9.53` 로 폴백되므로 인터넷 라우팅 없음 |
### ExternalName 대신 Service+EndpointSlice 사용 이유
요구사항은 "ExternalName Service" 였으나 Kubernetes ExternalName 은 RFC1123 DNS 호스트네임만 허용하고 IP(`192.168.9.100`)는 거부. 동등한 K8s-native 패턴인 **selector-less Service + 수동 EndpointSlice** 로 구현. CoreDNS 가 ClusterIP 를 정상 발행하고 kube-proxy 가 EndpointSlice 의 외부 IP 로 분산.
### 매니페스트
원본: `/tmp/nas-reverse-proxy.yaml` (heimdall). 핵심 발췌 — 전체 6 객체.
```yaml
apiVersion: v1
kind: Namespace
metadata:
name: lan-proxies
labels:
purpose: lan-only-reverse-proxy
---
apiVersion: v1
kind: Service
metadata: { name: nas, namespace: lan-proxies }
spec:
type: ClusterIP
ports:
- { name: dsm-http, port: 5000, targetPort: 5000, protocol: TCP }
---
apiVersion: discovery.k8s.io/v1
kind: EndpointSlice
metadata:
name: nas
namespace: lan-proxies
labels: { kubernetes.io/service-name: nas }
addressType: IPv4
ports:
- { name: dsm-http, port: 5000, protocol: TCP }
endpoints:
- addresses: [192.168.9.100]
conditions: { ready: true }
---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata: { name: redirect-https, namespace: lan-proxies }
spec:
redirectScheme: { scheme: https, permanent: true }
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata: { name: nas, namespace: lan-proxies }
spec:
entryPoints: [web]
routes:
- kind: Rule
match: Host(`nas.inouter.com`)
middlewares: [{ name: redirect-https }]
services: [{ name: nas, port: 5000 }]
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata: { name: nas-tls, namespace: lan-proxies }
spec:
entryPoints: [websecure]
routes:
- kind: Rule
match: Host(`nas.inouter.com`)
services: [{ name: nas, port: 5000 }]
tls:
secretName: wildcard-inouter-tls
```
### 검증 (heimdall, 2026-04-10)
```bash
curl -sk --resolve nas.inouter.com:80:192.168.9.53 http://nas.inouter.com/ # → 301 https://nas.inouter.com/
curl -sk --resolve nas.inouter.com:443:192.168.9.53 https://nas.inouter.com/ # → 200, 12094B
# <title>NAS - Synology DiskStation</title>
```
### 주의사항
- **LAN-only**. `*.inouter.com` 가 사설 192.168.9.53 으로 가는 한 외부 인터넷에서는 도달 불가. 외부 노출 시 보안/인증 재검토 필요 (Synology DSM 직노출은 CVE 노출면 큼).
- DSM HTTPS(5001) 도 동일 호스트에서 200 응답하지만 자기서명 인증서 + 이중 TLS 종료라 백엔드는 평문 5000 사용.
- Traefik 리버스 프록시 패턴은 `lan-proxies` ns 에 추가 LAN 서비스(예: 스위치/라우터/NAS 부속 UI) 적층 가능.
## 관련 문서
- [[backup]] — 백업 파이프라인 (NAS 활용)
- [[storage-plan]] — NVMe NAS + iSCSI 기획, 벤치마크 결과
- [[postgresql-ha]] — PostgreSQL HA (Patroni + etcd)
- [[infra-hosts]] — 서버 목록
- [[cert-manager]] — `wildcard-inouter-tls` 발급/복제
- [[cloudflare]] — `nas.inouter.com` DNS 이력