📅  最后修改于: 2022-03-11 14:56:39.739000             🧑  作者: Mango
gcloud compute \
forwarding-rules create vpn-1-esp \
--region us-east1 \
--ip-protocol ESP \
--address $STATIC_IP_VPN_1 \
--target-vpn-gateway vpn-1
gcloud compute \
forwarding-rules create vpn-2-esp \
--region europe-west1 \
--ip-protocol ESP \
--address $STATIC_IP_VPN_2 \
--target-vpn-gateway vpn-2
gcloud compute \
forwarding-rules create vpn-1-udp500 \
--region us-east1 \
--ip-protocol UDP \
--ports 500 \
--address $STATIC_IP_VPN_1 \
--target-vpn-gateway vpn-1
gcloud compute \
forwarding-rules create vpn-2-udp500 \
--region europe-west1 \
--ip-protocol UDP \
--ports 500 \
--address $STATIC_IP_VPN_2 \
--target-vpn-gateway vpn-2
gcloud compute \
forwarding-rules create vpn-1-udp4500 \
--region us-east1 \
--ip-protocol UDP --ports 4500 \
--address $STATIC_IP_VPN_1 \
--target-vpn-gateway vpn-1
gcloud compute \
forwarding-rules create vpn-2-udp4500 \
--region europe-west1 \
--ip-protocol UDP --ports 4500 \
--address $STATIC_IP_VPN_2 \
--target-vpn-gateway vpn-2