C.W.K.
Stream
Lesson 08 of 12 · published

Tailscale HTTPS 인증서

~12 min · tailscale, https, tls, lets-encrypt

Level 0Pinger
0 XP0/101 lessons0/12 achievements
0/150 XP to next level150 XP to go0% complete

네 머신용 진짜 TLS

Tailscale 이 DNS-01 challenge 의 Let's Encrypt 통해 머신 이름에 진짜, 공식 신뢰 TLS 인증서 발급 가능. 즉 머신에 유효 인증서로 HTTPS 서비스 — self-signed 경고 없음, 수동 cert 관리 없음.

Cert 사용 방법

tailscale cert 가 장치의 MagicDNS FQDN 에 .crt.key 작성. nginx, Caddy, Python 앱, TLS 원하는 어떤 거든 줘. Cert 수명 90 일 (Let's Encrypt 표준); Tailscale 이 같은 명령으로 스케줄에 자동 갱신.

Code

Cert 발급 및 사용·bash
# Issue a cert for this device (run as the user that needs the files)
tailscale cert office.tail-net.ts.net

# Output:
#   wrote office.tail-net.ts.net.crt
#   wrote office.tail-net.ts.net.key

# Use with Python's stdlib server
python -m http.server 4443 \
    --bind 0.0.0.0 \
    --certfile office.tail-net.ts.net.crt \
    --keyfile office.tail-net.ts.net.key

# Or with caddy
# caddy reverse-proxy --from https://office.tail-net.ts.net --to localhost:8000

External links

Exercise

Tailscale 장치 하나에서 admin console 에서 HTTPS 활성화 (Settings → Feature Previews). 그다음 tailscale cert <fqdn>. 포트 4443 에 cert+key 와 함께 Python server 시작, 다른 tailnet 장치에서 https://<fqdn>:4443 방문 — 녹색 padlock, 경고 없음.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.