Goolge Cloud Skills Boost

최근글


새댓글


Hot Deal


VPC Network

컨텐츠 정보

본문

``` student_00_807c86d68510@cloudshell:~ (qwiklabs-gcp-04-6e5a41aebf70)$ gcloud compute networks create privatenet --subnet-mode=custom Created [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-04-6e5a41aebf70/global/networks/privatenet]. NAME: privatenet SUBNET_MODE: CUSTOM BGP_ROUTING_MODE: REGIONAL IPV4_RANGE: GATEWAY_IPV4: Instances on this network will not be reachable until firewall rules are created. As an example, you can allow all internal traffic between instances as well as SSH, RDP, and ICMP by running: $ gcloud compute firewall-rules create --network privatenet --allow tcp,udp,icmp --source-ranges $ gcloud compute firewall-rules create --network privatenet --allow tcp:22,tcp:3389,icmp ``` ``` gcloud compute networks subnets create privatesubnet-us --network=privatenet --region=us-central1 --range=172.16.0.0/24 Created [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-04-6e5a41aebf70/regions/us-central1/subnetworks/privatesubnet-us]. NAME: privatesubnet-us REGION: us-central1 NETWORK: privatenet RANGE: 172.16.0.0/24 STACK_TYPE: IPV4_ONLY IPV6_ACCESS_TYPE: INTERNAL_IPV6_PREFIX: EXTERNAL_IPV6_PREFIX: student_00_807c86d68510@cloudshell:~ (qwiklabs-gcp-04-6e5a41aebf70)$ gcloud compute networks subnets create privatesubnet-eu --network=privatenet --region=europe-west1 --range=172.20.0.0/20 Created [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-04-6e5a41aebf70/regions/europe-west1/subnetworks/privatesubnet-eu]. NAME: privatesubnet-eu REGION: europe-west1 NETWORK: privatenet RANGE: 172.20.0.0/20 STACK_TYPE: IPV4_ONLY IPV6_ACCESS_TYPE: INTERNAL_IPV6_PREFIX: ``` ``` student_00_807c86d68510@cloudshell:~ (qwiklabs-gcp-04-6e5a41aebf70)$ gcloud compute firewall-rules create privatenet-allow-icmp-ssh-rdp --direction=INGRESS --priority=1000 --network=privatenet --action=ALLOW --rules=icmp,tcp:22,tcp:3389 --source-ranges=0.0.0.0/0 Creating firewall...working..Created [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-04-6e5a41aebf70/global/firewalls/privatenet-allow-icmp-ssh-rdp]. Creating firewall...done. NAME: privatenet-allow-icmp-ssh-rdp NETWORK: privatenet DIRECTION: INGRESS PRIORITY: 1000 ALLOW: icmp,tcp:22,tcp:3389 DENY: DISABLED: False ```

관련자료

댓글 0
등록된 댓글이 없습니다.
전체 20 / 1 페이지
RSS