JINIers
[Qwiklabs] VPC Networking Fundamentals 본문
VPC 네트워킹 기초
vpc network > routes > default route(0.0.0.0/0) 확인
vpc network > firewall > default-allow-* 4가지 확인
1. 기본 네트워크 삭제
vpc network 삭제 후 route 확인 > route 확인하면 아무것도 없음!
* vpc 네트워크가 없으면 route도 없음
2. vm 인스턴스 생성 시도
는 안됨
3. 방화벽 규칙으로 자동모드 vpc 네트워크 만들기
** 참고 : https://jiniers.tistory.com/5
- 자동모드 네트워크 만들기
4. vm 인스턴스만들기
4-1.
name = mynet-us-vm
zone = us-central1-c
machine-type=n1-standard-1
> shell 버전
gcloud compute instances create mynet-us-vm --project=qwiklabs-gcp-04-41d4eb86202f --zone=us-central1-c --machine-type=n1-standard-1 --network-interface=network-tier=PREMIUM,subnet=default-network --metadata=enable-oslogin=true --maintenance-policy=MIGRATE --service-account=516715050242-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --create-disk=auto-delete=yes,boot=yes,device-name=mynet-us-vm,image=projects/debian-cloud/global/images/debian-10-buster-v20220118,mode=rw,size=10,type=projects/qwiklabs-gcp-04-41d4eb86202f/zones/us-central1-a/diskTypes/pd-balanced --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any
4-2.
name = mynet-eu-vm
zone = eu-west1-b
machine-type=n1-standard-1
> shell 버전
gcloud compute instances create mynet-eu-vm --project=qwiklabs-gcp-04-41d4eb86202f --zone=europe-west1-b --machine-type=n1-standard-1 --network-interface=network-tier=PREMIUM,subnet=default-network --metadata=enable-oslogin=true --maintenance-policy=MIGRATE --service-account=516715050242-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --create-disk=auto-delete=yes,boot=yes,device-name=mynet-eu-vm,image=projects/debian-cloud/global/images/debian-10-buster-v20220118,mode=rw,size=10,type=projects/qwiklabs-gcp-04-41d4eb86202f/zones/us-central1-a/diskTypes/pd-balanced --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any
5. vm 인스턴스 연결 확인
us-vm ssh > ping -c 3 [eu-vm external ip / internal ip]
* allow-icmp 삭제
internal ping : Os
external ping : X
* allow-custom 삭제
internal ping : X
* allow-ssh 삭제
vm-us ssh 접속불가
'GCP > Qwiklabs' 카테고리의 다른 글
[PCK] Configure Secure RDP using a Windows Bastion Host(미완) (0) | 2022.02.28 |
---|---|
[Qwiklabs]Networking in Google Cloud _User Authentication: Identity-Aware Proxy (0) | 2022.02.28 |
[PCK] Migrate a MySQL Database to Google Cloud SQL (0) | 2022.02.25 |
[PCK] Migrate a MySQL Database to Google Cloud SQL (0) | 2022.02.12 |
[PCK] Build and Deploy a Docker Image to a Kubernetes Cluster (0) | 2022.02.12 |