Skip to content

Latest commit

 

History

History
137 lines (104 loc) · 3.31 KB

File metadata and controls

137 lines (104 loc) · 3.31 KB

접속 문제 해결 가이드

현재 상태

  • ✅ 서버 실행 중
  • ✅ 포트 6868 리스닝 중 (0.0.0.0:6868)
  • ✅ 서버 내부에서 접속 가능
  • ❌ 외부에서 접속 불가 (Azure NSG 설정 필요)

해결 방법

1. Azure 네트워크 보안 그룹(NSG) 설정 (가장 중요!)

Azure Portal에서 다음 단계를 따라하세요:

  1. Azure Portal 접속

  2. Virtual Machine 찾기

    • 검색창에서 VM 이름 검색
    • 또는 "Virtual machines" 메뉴에서 찾기
  3. Networking 설정

    • VM 선택 → 왼쪽 메뉴에서 "Networking" 클릭
    • "Network security group" 클릭
  4. Inbound rules 추가

    • "Inbound security rules" 클릭
    • "+ Add" 버튼 클릭
  5. 포트 6868 규칙 추가

    • Name: boltz-frontend
    • Priority: 1000 (또는 사용 가능한 번호)
    • Source: Any (또는 특정 IP)
    • Source port ranges: *
    • Destination: Any
    • Destination port ranges: 6868
    • Protocol: TCP
    • Action: Allow
    • 저장
  6. 포트 6969 규칙 추가 (백엔드용)

    • Name: boltz-backend
    • Priority: 1001
    • Source: Any
    • Source port ranges: *
    • Destination: Any
    • Destination port ranges: 6969
    • Protocol: TCP
    • Action: Allow
    • 저장

2. Azure CLI로 설정 (선택사항)

터미널에서 직접 설정하려면:

# 리소스 그룹과 NSG 이름 확인 필요
az network nsg rule create \
  --resource-group <리소스그룹이름> \
  --nsg-name <NSG이름> \
  --name boltz-frontend \
  --priority 1000 \
  --direction Inbound \
  --access Allow \
  --protocol Tcp \
  --destination-port-ranges 6868

az network nsg rule create \
  --resource-group <리소스그룹이름> \
  --nsg-name <NSG이름> \
  --name boltz-backend \
  --priority 1001 \
  --direction Inbound \
  --access Allow \
  --protocol Tcp \
  --destination-port-ranges 6969

3. Public IP 확인

Azure VM에 Public IP가 있는지 확인:

# Azure CLI로 확인
az vm list-ip-addresses --name <VM이름> --resource-group <리소스그룹이름>

Public IP가 있다면 그 IP로도 접속 가능합니다:

  • http://<Public-IP>:6868

4. 로컬 방화벽 확인 (선택사항)

서버 내부 방화벽도 확인:

# UFW 사용하는 경우
sudo ufw allow 6868/tcp
sudo ufw allow 6969/tcp
sudo ufw status

테스트 방법

서버에서 테스트:

# 진단 스크립트 실행
./check_access.sh

# 직접 테스트
curl http://10.1.0.5:6868

다른 컴퓨터에서 테스트:

  1. 같은 네트워크(VPN 등)에 연결되어 있는지 확인
  2. 브라우저에서 http://10.1.0.5:6868 접속 시도
  3. 또는 Public IP가 있다면 http://<Public-IP>:6868 접속 시도

추가 옵션: ngrok 사용

Azure NSG 설정이 어렵다면 ngrok을 사용할 수 있습니다:

# ngrok 설치
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null
echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list
sudo apt update && sudo apt install ngrok

# ngrok 계정 설정 (무료 계정 생성 필요)
ngrok config add-authtoken <your-token>

# 터널 시작
ngrok http 6868

ngrok이 제공하는 공개 URL을 팀원들에게 공유하면 됩니다.