Cloud & Platform
Azure 멀티 OS VM 구축 및 Bastion 기반 보안 접속 실습
Azure 멀티 OS VM 구축 및 Bastion 기반 보안 접속 실습 학습 내용을 정리한 백필 노트입니다.
이 글은 2025년 학습 기록을 블로그 형식으로 정리한 백필 노트입니다.
[실습 00] 리소스 그룹 및 VNet 구성
- 리소스 그룹 생성
- 한국중부:
rg-camp1-krce
- 한국중부:
- 네트워크 구성
vnet-krce: 10.0.0.0/16snet-krce-01: 10.0.1.0/24
VM 구성
(0) Master VM (Windows 11 Pro)
- 이름:
vmkrceMaster00 - OS: Windows 11 Pro, version 24H2 - x64 Gen2
- 크기: Standard_D2s_v3 (2 vCPU, 8 GiB 메모리, ₩121,338/월)
- 리소스 그룹:
rg-camp1-krce - 계정:
tony/ 암호:Pa55w.rd1234 - 디스크: 표준 SSD (LRS)
- 포트: RDP(3389) 허용
- 네트워크:
vnet-krce→snet-krce-01(10.0.1.0/24)- 공용 IP:
pip-vmkrceMaster00
(1) Windows Server 2022 VM (IIS 웹 서버)
- 이름:
vmkrceWinSvr01 - OS: Windows Server 2022 Datacenter: Azure Edition - x64 Gen2
- 크기: Standard_DS1_v2 (1 vCPU, 3.5 GiB 메모리, ₩127,257/월)
- 계정:
tony/ 암호:Pa55w.rd1234 - 디스크: 표준 SSD (LRS)
- 포트: HTTP(80), RDP(3389) 허용
- 네트워크:
- 공용 IP:
pip-vmkrceWinSvr01
- 공용 IP:
IIS 구성 스크립트
Install-WindowsFeature -Name Web-Server -IncludeManagementTools
$env:MyIP = (Get-NetIPConfiguration | Where-Object {$_.IPv4DefaultGateway -ne $null} | Select-Object -ExpandProperty IPv4Address)[0]
Set-Content -Path "C:\inetpub\wwwroot\index.htm" -Value "<html><head><title>Hong's Korea Central Page</title></head><body><font color='blue'>Korea Central : Hello $($env:computername) - IIS Web Server !! <br> Private IP : $($env:MyIP) <br> Public IP : xx.xx.xx.xx </font></body></html>"
(2) Ubuntu 22.04 VM (NGINX 웹 서버)
- 이름:
vmkrceUbunLin02 - OS: Ubuntu Server 22.04 LTS - x64 Gen2
- 크기: Standard_B1ms (1 vCPU, 2 GiB 메모리, ₩25,649/월)
- 계정:
tony - SSH 키: 새 키 쌍 (
vmkrceUbunLin02_key, RSA) - 디스크: 표준 SSD (LRS)
- 포트: HTTP(80), SSH(22) 허용
- 네트워크:
- 공용 IP:
pip-vmkrceUbunLin02
- 공용 IP:
NGINX 설치 및 페이지 구성
# 패키지 소스 업데이트
sudo apt-get -y update
# NGINX 설치
sudo apt-get -y install nginx
# index.html 생성
sudo sh -c 'echo "<html><head><title>Hongs Page</title></head><body><font color="red">Hello host $(hostname) - NGINX Web Server !! <br> Private IP : xx.xx.xx.xx <br> Public IP : xx.xx.xx.xx </font></body></html>" > /var/www/html/index.html'
Bastion 설정 및 접속
서브넷 추가
vnet-krce→ 서브넷 추가:snet-krce-mgmt-00(Azure Bastion 용)
Bastion 접속 방법
- vmkrceMaster00 접속
- 계정:
tony/ 암호:Pa55w.rd1234 - 내부 RDP 접속:
10.0.1.5 - 내부 SSH 접속:
10.0.1.6
- 계정:
- vmkrceWinSvr01 접속
- Bastion을 통해 RDP 접속
- vmkrceUbunLin02 접속
- Bastion을 통해 SSH 접속