curl -fsSL https://tailscale.com/install.sh | sh
tailscale 명령어를 사용할 수 있음.sudo tailscale up --authkey=YOUR_AUTH_KEY
YOUR_AUTH_KEY는 Tailscale Admin Console에서 생성 가능.tailscale ip -4
100.100.10.1
sudo tailscale up
tailscale ip -4
100.100.10.2
ping 테스트ping 100.100.10.2 -c 4
64 bytes from 100.100.10.2: icmp_seq=1 ttl=64 time=10.1 ms
✅ EC2에서 맥북으로 통신 가능!
Request timeout for icmp_seq 1
❌ Tailscale이 정상적으로 실행되지 않았을 가능성이 있음!
✔ 해결 방법: 맥북에서 sudo tailscale up 다시 실행 후 확인.
ping 테스트ping 100.100.10.1 -c 4
uvicorn ai_server:app --host 0.0.0.0 --port 8000
0.0.0.0으로 실행해야 Tailscale 네트워크에서도 접근 가능.lsof -i :8000
uvicorn 12345 username 6u IPv4 0x12345678 0t0 TCP *:8000 (LISTEN)
✅ FastAPI 서버가 실행 중이면 성공!
curl -X POST "http://100.100.10.2:8000/generate" \
-H "Content-Type: application/json" \
-d '{"workflow": {"prompt": "a beautiful sunset"}}'
👉 응답 예시 (성공)
{
"status": "completed",
"image": "http://127.0.0.1:8188/api/view?filename=ComfyUI_00044_.png"
}
✅ 이제 EC2에서 맥북의 AI 서버를 문제없이 호출할 수 있음!