Tailscale 설치 스크립트
Windows 설치 스크립트
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# tailscale-install-windows.ps1
Write-Host "=== Tailscale 설치 시작 ===" -ForegroundColor Green
# 관리자 권한 확인
$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if (-not $isAdmin) {
Write-Host "경고: 관리자 권한으로 실행해주세요!" -ForegroundColor Red
Write-Host "PowerShell을 관리자 권한으로 다시 시작합니다..." -ForegroundColor Yellow
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
exit
}
# 다운로드 URL
$downloadUrl = "https://pkgs.tailscale.com/stable/tailscale-setup-latest.exe"
$installerPath = "$env:TEMP\tailscale-setup.exe"
# 다운로드
Write-Host "Tailscale 다운로드 중..." -ForegroundColor Yellow
Invoke-WebRequest -Uri $downloadUrl -OutFile $installerPath
# 설치
Write-Host "Tailscale 설치 중..." -ForegroundColor Yellow
Start-Process -FilePath $installerPath -ArgumentList "/quiet" -Wait
# 설치 완료 대기
Start-Sleep -Seconds 3
# Tailscale 시작
Write-Host "Tailscale 시작 중..." -ForegroundColor Yellow
& "C:\Program Files\Tailscale\tailscale.exe" up
Write-Host ""
Write-Host "=== 설치 완료! ===" -ForegroundColor Green
Write-Host ""
Write-Host "유용한 명령어:" -ForegroundColor Cyan
Write-Host " - IP 확인: tailscale ip"
Write-Host " - 상태 확인: tailscale status"
Write-Host " - 연결 종료: tailscale down"
Write-Host ""
Write-Host "시스템 트레이에서 Tailscale 아이콘을 확인하세요." -ForegroundColor Yellow
설치 후 확인 명령어
1
2
3
4
5
6
7
8
# IP 확인
tailscale ip
# 상태 확인
tailscale status
# 연결된 기기들
tailscale status --peers
Windows 제거 스크립트
1
2
3
4
5
6
7
8
9
10
11
12
13
# tailscale-uninstall-windows.ps1
Write-Host "Tailscale 제거 중..." -ForegroundColor Yellow
& "C:\Program Files\Tailscale\tailscale.exe" down
$uninstallPath = "C:\Program Files\Tailscale\uninstall.exe"
if (Test-Path $uninstallPath) {
Start-Process -FilePath $uninstallPath -ArgumentList "/S" -Wait
Write-Host "제거 완료!" -ForegroundColor Green
} else {
Write-Host "Tailscale이 설치되어 있지 않습니다." -ForegroundColor Red
}
Ubuntu 설치 스크립트
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# tailscale-install-windows.ps1
Write-Host "=== Tailscale 설치 시작 ===" -ForegroundColor Green
# 관리자 권한 확인
$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if (-not $isAdmin) {
Write-Host "경고: 관리자 권한으로 실행해주세요!" -ForegroundColor Red
Write-Host "PowerShell을 관리자 권한으로 다시 시작합니다..." -ForegroundColor Yellow
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
exit
}
# 다운로드 URL
$downloadUrl = "https://pkgs.tailscale.com/stable/tailscale-setup-latest.exe"
$installerPath = "$env:TEMP\tailscale-setup.exe"
# 다운로드
Write-Host "Tailscale 다운로드 중..." -ForegroundColor Yellow
Invoke-WebRequest -Uri $downloadUrl -OutFile $installerPath
# 설치
Write-Host "Tailscale 설치 중..." -ForegroundColor Yellow
Start-Process -FilePath $installerPath -ArgumentList "/quiet" -Wait
# 설치 완료 대기
Start-Sleep -Seconds 3
# Tailscale 시작
Write-Host "Tailscale 시작 중..." -ForegroundColor Yellow
& "C:\Program Files\Tailscale\tailscale.exe" up
Write-Host ""
Write-Host "=== 설치 완료! ===" -ForegroundColor Green
Write-Host ""
Write-Host "유용한 명령어:" -ForegroundColor Cyan
Write-Host " - IP 확인: tailscale ip"
Write-Host " - 상태 확인: tailscale status"
Write-Host " - 연결 종료: tailscale down"
Write-Host ""
Write-Host "시스템 트레이에서 Tailscale 아이콘을 확인하세요." -ForegroundColor Yellow
자동 시작 설정
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 부팅 시 자동 시작 활성화
echo "부팅 시 자동 시작 활성화 중..."
sudo systemctl enable tailscaled
sudo systemctl start tailscaled
# 상태 확인
echo ""
echo "=== 설치 및 설정 완료! ==="
echo ""
echo "현재 상태:"
sudo systemctl status tailscaled --no-pager
echo ""
echo "Tailscale IP:"
tailscale ip -4
설치 후 확인 명령어
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# IP 확인
tailscale ip
# 상태 확인
tailscale status
# 연결된 디바이스 목록
tailscale status --peers
# 서비스 상태
sudo systemctl status tailscaled
# 로그 확인
sudo journalctl -u tailscaled -f
ssh서버에서
1
2
tailscale ip
sudo tailscale up --ssh
1
2
3
4
5
6
7
8
# 시스템 업데이트 (권장): 업데이트 확인
sudo apt update
# 시스템 업데이트 (권장): 업그레이드
sudo apt upgrade -y
# 재부팅
sudo reboot
ssh클라이언트에서
1
ssh 유저이름@ip주소
또는
1
2
ssh 유저이름@tailscale호스트명
# 예: ssh 유저이름@my-ubuntu-server
#tailscale #tailscale설치 #tailscale_ssh
이 기사는 저작권자의 CC BY 4.0 라이센스를 따릅니다.