relay4wd SSH 포트 2222 반영, APISIX 포트22 장애 기록, Teleport passwordless WebAuthn 추가

This commit is contained in:
kappa
2026-03-27 09:32:50 +09:00
parent f7f958e83e
commit 15da06855c
2 changed files with 8 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
--- ---
title: APISIX 설정 및 운영 title: APISIX 설정 및 운영
updated: 2026-03-26 updated: 2026-03-27
--- ---
## 아키텍처 ## 아키텍처
@@ -13,15 +13,16 @@ updated: 2026-03-26
### 서울 relay (relay4wd) ### 서울 relay (relay4wd)
- 용도: 포트 포워딩 게이트웨이 - 용도: 포트 포워딩 게이트웨이
- 호스트: relay4wd (AWS Lightsail, Tailscale 100.103.161.4, 공인 52.79.45.166, Debian 12), Docker APISIX 3.15.0, SSH: admin + lightsail.pem - 호스트: relay4wd (AWS Lightsail, Tailscale 100.103.161.4, 공인 52.79.45.166, Debian 12), Docker APISIX 3.15.0, SSH: admin (포트 2222, Vault CA 인증서)
- Admin API: `http://100.103.161.4:9180` (Tailscale 100.64.0.0/10에서만 접근 가능) - Admin API: `http://100.103.161.4:9180` (Tailscale 100.64.0.0/10에서만 접근 가능)
- Admin Key: `edd1c9f034335f136f87ad84b625c8f1` - Admin Key: `edd1c9f034335f136f87ad84b625c8f1`
- etcd: incus-jp1 db 프로젝트 `etcd-1` (10.253.102.11:2379), prefix `/apisix-sandbox` - etcd: incus-jp1 db 프로젝트 `etcd-1` (10.253.102.11:2379), prefix `/apisix-sandbox`
- 설정 파일: `/opt/apisix/` (config.yaml, docker-compose.yml) - 설정 파일: `/opt/apisix/` (config.yaml, docker-compose.yml)
- 모드: stream only (HTTP proxy 비활성화, 9080 미사용) - 모드: stream only (HTTP proxy 비활성화, 9080 미사용)
- 방화벽: 2201-2299/tcp + 443/tcp 개방, SSH는 Tailscale 경유 - 방화벽: 2201-2299/tcp + 443/tcp 개방, SSH는 Tailscale 경유 포트 2222
- 443 → iptables REDIRECT → 8443 (privileged 포트 우회) - 443 → iptables REDIRECT → 8443 (privileged 포트 우회)
- 2026-03-17 AWS EC2에서 Lightsail nano($5/월)로 이전 - 2026-03-17 AWS EC2에서 Lightsail nano($5/월)로 이전
- **주의**: config.yaml의 stream_proxy.tcp에 privileged 포트(1-1023)를 넣으면 비특권 컨테이너에서 bind 실패로 크래시. 2026-03-27 포트 22 추가로 장애 발생, 제거하여 복구
#### 포트 포워딩 (stream_routes) #### 포트 포워딩 (stream_routes)

View File

@@ -1,6 +1,6 @@
--- ---
title: Teleport (접근 관리) title: Teleport (접근 관리)
updated: 2026-03-26 updated: 2026-03-27
tags: [infra, teleport, k3s, security] tags: [infra, teleport, k3s, security]
--- ---
@@ -48,8 +48,10 @@ teleport.inouter.com (52.79.45.166)
|------|-----| |------|-----|
| 인증 방식 | local (패스워드 + MFA) | | 인증 방식 | local (패스워드 + MFA) |
| MFA | OTP + WebAuthn (secondFactors) | | MFA | OTP + WebAuthn (secondFactors) |
| Passwordless | 활성화 (`authentication.passwordless: true`, `webauthn.rp_id: teleport.inouter.com`) |
| MFA 비활성화 | 불가 — 한번 등록하면 `off`로 변경 시 auth 기동 실패 | | MFA 비활성화 | 불가 — 한번 등록하면 `off`로 변경 시 auth 기동 실패 |
| CLI 로그인 | `tsh login --proxy=teleport.inouter.com --user=admin --auth=local` (OTP 입력) | | CLI 로그인 (패스워드) | `tsh login --proxy=teleport.inouter.com --user=admin --auth=local` (OTP 입력) |
| CLI 로그인 (패스키) | `tsh login --proxy=teleport.inouter.com --auth=passwordless` (FIDO2 키 필요) |
| Touch ID | brew tsh에서 미지원, Teleport Connect 앱에서만 가능 | | Touch ID | brew tsh에서 미지원, Teleport Connect 앱에서만 가능 |
| admin logins | teleport, root (`tctl users update admin --set-logins=teleport,root`) | | admin logins | teleport, root (`tctl users update admin --set-logins=teleport,root`) |