Guest User

Untitled

a guest
May 25th, 2018
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. gcloud config list project
  2.  
  3. gcloud compute target-vpn-gateways \
  4. create vpn-1 \
  5. --network vpn-network-1 \
  6. --region us-east1
  7.  
  8. gcloud compute target-vpn-gateways \
  9. create vpn-2 \
  10. --network vpn-network-2 \
  11. --region europe-west1
  12.  
  13. # To reserve a Static IP for the vpn-1 gateway, run the following command:
  14. gcloud compute addresses create --region us-east1 vpn-1-static-ip
  15.  
  16. gcloud compute addresses list
  17.  
  18. export STATIC_IP_VPN_1=<Enter IP address for vpn-1 here>
  19.  
  20. To create ESP forwarding for vpn-1, run the following command:
  21.  
  22. gcloud compute \
  23. forwarding-rules create vpn-1-esp \
  24. --region us-east1 \
  25. --ip-protocol ESP \
  26. --address $STATIC_IP_VPN_1 \
  27. --target-vpn-gateway vpn-1
  28.  
  29. The forwarding rules forward traffic arriving on the external IP to the VPN gateway. It connects them together. Create three forwarding rules for the protocols necessary for VPN.
  30.  
  31. To create UDP500 forwarding for vpn-1, run the following command:
  32.  
  33. gcloud compute \
  34. forwarding-rules create vpn-1-udp500 \
  35. --region us-east1 \
  36. --ip-protocol UDP \
  37. --ports 500 \
  38. --address $STATIC_IP_VPN_1 \
  39. --target-vpn-gateway vpn-1
  40.  
  41.  
  42. In the GCP Console, on the Products & Services menu (), click VPC network > External IP addresses.
Add Comment
Please, Sign In to add comment