🌐 DNS 관리 시스템

dclub.kr 서브도메인 자동 생성

🖥️ 서버 정보

서버 IP
192.168.45.73
도메인
dclub.kr
운영 체제
Ubuntu Linux
보안 상태
🟢 안전

🖥️ 서버 관리

📁 프로젝트

✨ 새 서브도메인 생성

test.dclub.kr

📦 서비스 카드 등록

대시보드에 표시할 서비스를 등록합니다. 253에서 이전 시 migrate API를 사용하면 자동 등록됩니다.

myapp.dclub.kr

🚀 253 → 73 서비스 이전

파일복사 + npm install + PM2 시작 + nginx + SSL + 카드 자동 등록

📡 API 문서

외부에서 API 호출 시 X-API-Key: dclub-api-key-2025-secure 헤더 필요

🌐 DNS 관리 API

메서드 엔드포인트 설명
GET /api/list DNS 레코드 목록
POST /api/create 서브도메인 생성
POST /api/delete DNS 레코드 삭제
# 서브도메인 생성 curl -X POST https://api.dclub.kr/api/create \ -H "X-API-Key: dclub-api-key-2025-secure" \ -H "Content-Type: application/json" \ -d '{"subdomain":"myapp","server":"253"}' # DNS 목록 조회 curl -H "X-API-Key: dclub-api-key-2025-secure" https://api.dclub.kr/api/list

🔧 Nginx 관리 API

메서드 엔드포인트 설명
GET /api/nginx/sites Nginx 사이트 목록
POST /api/nginx/site Nginx 사이트 생성 (SSL 자동적용)
POST /api/nginx/location location 블록 추가 (/api 등)
DELETE /api/nginx/site/:domain Nginx 사이트 삭제
# Nginx 사이트 생성 (253서버 35000포트로 프록시) curl -X POST https://api.dclub.kr/api/nginx/site \ -H "X-API-Key: dclub-api-key-2025-secure" \ -H "Content-Type: application/json" \ -d '{"domain":"myapp.dclub.kr","target":"192.168.45.253","port":35000}' # /api 경로 추가 curl -X POST https://api.dclub.kr/api/nginx/location \ -H "X-API-Key: dclub-api-key-2025-secure" \ -H "Content-Type: application/json" \ -d '{"domain":"myapp.dclub.kr","location":"/api","target":"192.168.45.253","port":35001}'

🌐 External Domain API

Token auth: X-Nginx-Token: kimtunnel-secret-2024

MethodEndpointDescription
POST /api/nginx/config Create nginx config (external domain)
GET /api/nginx/config/:name Get config content
DELETE /api/nginx/config/:name Delete config
# External domain (mysite.com -> 253:3000) curl -X POST https://api.dclub.kr/api/nginx/config \ -H "X-Nginx-Token: kimtunnel-secret-2024" \ -H "Content-Type: application/json" \ -d '{"name":"mysite","subdomain":"mysite.com","target":"192.168.45.253:3000","ssl":true}' # With websocket support curl -X POST https://api.dclub.kr/api/nginx/config \ -H "X-Nginx-Token: kimtunnel-secret-2024" \ -H "Content-Type: application/json" \ -d '{"name":"myws","subdomain":"ws.mysite.com","target":"192.168.45.253:8080","ssl":true,"websocket":true}'

🚇 Tunnel API

Internal only (192.168.x.x)

MethodEndpointDescription
GET /api/tunnel/list List active tunnels
POST /api/tunnel/register-key Register agent key
POST /api/tunnel/:id/connect Connect domain to tunnel
DELETE /api/tunnel/:id Delete tunnel
GET /api/tunnel/health Tunnel server health
# Register tunnel agent key curl -X POST http://127.0.0.1:50000/api/tunnel/register-key \ -H "Content-Type: application/json" \ -d '{"name":"my-laptop","key":"secret-key-123"}' # Connect tunnel to subdomain curl -X POST http://127.0.0.1:50000/api/tunnel/abc123/connect \ -H "Content-Type: application/json" \ -d '{"subdomain":"mytunnel","ssl":true}'

🔌 Stream API (TCP/UDP)

Port forwarding via nginx stream

MethodEndpointDescription
POST /api/nginx/add-stream Add TCP/UDP port forward
# Forward port 3306 to 253 (MySQL) curl -X POST http://127.0.0.1:50000/api/nginx/add-stream \ -H "Content-Type: application/json" \ -d '{"listen_port":3306,"proxy_pass":"192.168.45.253:3306","description":"MySQL"}' # Forward port 6379 to 253 (Redis) curl -X POST http://127.0.0.1:50000/api/nginx/add-stream \ -H "Content-Type: application/json" \ -d '{"listen_port":6379,"proxy_pass":"192.168.45.253:6379","description":"Redis"}'

🔒 SSL 인증서 API

메서드 엔드포인트 설명
GET /api/ssl/status/:domain SSL 상태 확인
POST /api/ssl/apply 와일드카드 SSL 적용
# SSL 적용 (*.dclub.kr 와일드카드 자동 적용) curl -X POST https://api.dclub.kr/api/ssl/apply \ -H "X-API-Key: dclub-api-key-2025-secure" \ -H "Content-Type: application/json" \ -d '{"domain":"myapp.dclub.kr"}'

⚡ PM2 프로세스 관리 API

메서드 엔드포인트 설명
GET /api/pm2/list?server=253 PM2 프로세스 목록
POST /api/pm2/restart/:name 프로세스 재시작
POST /api/pm2/stop/:name 프로세스 중지
POST /api/pm2/start/:name 프로세스 시작
# PM2 목록 (253서버) curl "http://127.0.0.1:50000/api/pm2/list?server=253" # 프로세스 재시작 curl -X POST "http://127.0.0.1:50000/api/pm2/restart/myapp?server=253"

🔌 포트 관리 API

메서드 엔드포인트 설명
GET /api/port/list 전체 포트 목록
GET /api/port/next?server=253&range=web 다음 사용 가능 포트
POST /api/port/reserve 포트 예약
DELETE /api/port/release/:server/:port 포트 해제
GET /api/port/find?project=xxx 프로젝트로 포트 검색
# 다음 웹 포트 조회 curl -H "X-API-Key: dclub-api-key-2025-secure" \ "https://api.dclub.kr/api/port/next?server=253&range=web" # 포트 예약 curl -X POST https://api.dclub.kr/api/port/reserve \ -H "X-API-Key: dclub-api-key-2025-secure" \ -H "Content-Type: application/json" \ -d '{"server":"253","port":30005,"project":"myapp","desc":"내 앱"}' # 포트 해제 curl -X DELETE -H "X-API-Key: dclub-api-key-2025-secure" \ https://api.dclub.kr/api/port/release/253/30005

📊 포트 범위 규칙

web
30000-39999 (웹 앱)
api
40000-49999 (API 서버)
system
50000-59999 (시스템)
chatbot
53000-53999 (챗봇)

🚀 원클릭 배포 API (★ 추천)

POST /api/deploy

한번의 API 호출로 포트예약 + DNS + Nginx + SSL 전체 자동 설정!

파라미터 필수 설명
subdomain 필수 서브도메인 (예: myapp)
port 필수 메인 포트 번호
project 필수 프로젝트명
server 선택 서버 (기본: 253)
desc 선택 설명
apiPort 선택 API 서버 포트 (있으면 /api 경로 추가)
apiLocation 선택 API 경로 (기본: /api)
# ⭐ 원클릭 배포 (웹만) curl -X POST https://api.dclub.kr/api/deploy \ -H "X-API-Key: dclub-api-key-2025-secure" \ -H "Content-Type: application/json" \ -d '{ "subdomain": "myapp", "port": 35000, "project": "myapp", "desc": "내 앱" }' # ⭐ 원클릭 배포 (웹 + API) curl -X POST https://api.dclub.kr/api/deploy \ -H "X-API-Key: dclub-api-key-2025-secure" \ -H "Content-Type: application/json" \ -d '{ "subdomain": "myapp", "port": 35000, "project": "myapp", "desc": "내 앱", "apiPort": 35001, "apiLocation": "/api" }' # 응답 예시 { "success": true, "domain": "myapp.dclub.kr", "url": "https://myapp.dclub.kr", "message": "배포 완료!", "steps": [ {"step": "포트예약", "status": "ok", "port": 35000}, {"step": "API포트예약", "status": "ok", "port": 35001}, {"step": "DNS등록", "status": "ok", "record": "myapp.dclub.kr → 192.168.45.253"}, {"step": "Nginx설정", "status": "ok"}, {"step": "SSL적용", "status": "ok", "type": "wildcard"} ] }

📚 동호회 생성 가이드

🎯 메인 페이지에서 동호회 만들기

👉 https://dclub.kr 에서 5분 안에 무료로 동호회를 만들 수 있습니다!

1️⃣ 동호회 생성 방법

Step 1: https://dclub.kr 접속
Step 2: 동호회 종류 선택 (스포츠/레저/친목/취미)
Step 3: 동호회 이름 입력 (예: fishing, soccer, book)
Step 4: 동호회 정보 입력 (표시명, 소개, 관리자 이메일)
Step 5: "동호회 만들기" 버튼 클릭 → 완료! 🎉

2️⃣ 생성되는 것들

  • 전용 도메인: yourclub.dclub.kr
  • 관리자 계정: 자동 생성 (이메일 발송)
  • 기본 페이지: 회원가입, 게시판, 갤러리
  • 데이터베이스: 전용 DB 자동 생성

3️⃣ 서브도메인만 생성하기

동호회는 나중에 만들고 도메인만 먼저 확보하고 싶다면:

  • 위의 "서브도메인 생성" 탭 사용
  • 이름 입력 + 서버 선택 → 즉시 생성
  • 나중에 웹사이트 연결 가능

4️⃣ 스크립트로 생성하기 (개발자용)

Bash 스크립트:

cd ~/dclub.kr/server73
./create-subdomain.sh myclub 253
# myclub.dclub.kr → 192.168.45.253

Python 스크립트:

cd ~/dclub.kr/server73
./create_subdomain.py create myclub 192.168.45.253
./create_subdomain.py list
./create_subdomain.py delete myclub

API 호출:

curl -X POST http://dns.dclub.kr/api/create \
-H "Content-Type: application/json" \
-d '{"subdomain":"myclub","server":"253"}'

5️⃣ 서버 IP 매핑

  • 73번: 192.168.45.73 (DNS 마스터 서버)
  • 232번: 192.168.45.232 (웹 서버 1)
  • 253번: 192.168.45.253 (웹 서버 2) ← 동호회는 여기!

6️⃣ 주요 기능

  • ✅ 무제한 서브도메인 생성
  • ✅ 즉시 DNS 전파 (1-5분)
  • ✅ 무료 SSL 인증서 (Let's Encrypt)
  • ✅ 자동 백업 및 모니터링
  • ✅ 완전 무료 영구 제공

7️⃣ 문의 및 지원

메인 페이지: https://dclub.kr
DNS 관리: http://dns.dclub.kr
Gogs 저장소: http://123.212.111.26:3300/kim/dclub.kr
이메일: admin@dclub.kr

💡 팁

  • 동호회 이름은 영문 소문자, 숫자, 하이픈(-)만 사용 가능
  • 짧고 기억하기 쉬운 이름 추천 (예: fish, book, run)
  • 한번 생성된 서브도메인은 즉시 사용 가능
  • SSL 인증서는 첫 접속 시 자동 발급 (1-2분 소요)

📋 등록된 서브도메인

-
전체 도메인
-
서브도메인
로딩 중...

🧪 테스트 페이지 - test.dclub.kr

도메인: http://test.dclub.kr
서버: 192.168.45.253
내용: MCP Server - Main
용도: 테스트 및 데모용 서브도메인

🚀 test.dclub.kr 새 창에서 열기

💡 보안 정책으로 인해 iframe 미리보기가 차단될 수 있습니다. 위 버튼을 클릭하여 새 창에서 열어주세요.

🖥️ Server 253 관리

192.168.45.253 | 서비스 서버 | API로 관리

-
등록된 서비스
-
사용 중 포트
-
다음 웹 포트
🟢
서버 상태

🔧 포트 관리 도구

🖥️ Cockpit 열기 📡 API 직접 호출

⚡ 실행 중인 서비스

로딩 중...

🌐 외부에서 API 사용

# 포트 목록 조회 curl -H "X-API-Key: dclub-api-key-2025-secure" \ https://api.dclub.kr/api/port/list # 다음 사용 가능 포트 (웹 범위) curl -H "X-API-Key: dclub-api-key-2025-secure" \ "https://api.dclub.kr/api/port/next?server=253&range=web" # 포트 예약 curl -X POST -H "X-API-Key: dclub-api-key-2025-secure" \ -H "Content-Type: application/json" \ -d '{"server":"253","port":35000,"project":"myapp","desc":"설명"}' \ https://api.dclub.kr/api/port/reserve # 포트 해제 curl -X DELETE -H "X-API-Key: dclub-api-key-2025-secure" \ https://api.dclub.kr/api/port/release/253/35000

🏠 Server 73 관리

192.168.45.73 | DNS 마스터 / 게이트웨이 | 중앙 관리

-
등록된 서비스
-
사용 중 포트
-
다음 시스템 포트
🟢
서버 상태

🔧 포트 관리 도구

🖥️ Cockpit 열기 📡 API 직접 호출

⚡ 실행 중인 서비스

로딩 중...

🎯 73 서버 역할

🌐 DNS 마스터

PowerDNS 운영, 모든 *.dclub.kr 관리

🚪 게이트웨이

Nginx 리버스 프록시, SSL 인증서 관리

🔐 인증 서버

OAuth 서버, 통합 로그인 (auth.dclub.kr)

📊 모니터링

Grafana, Prometheus, 보안 대시보드