# Tworzenie obrazu z obsługą zagnieżdżonej wirtualizacji (Nested Virtualization) gcloud compute images create nested-ubuntu-jammy \ --source-image-family=ubuntu-2204-lts \ --source-image-project=ubuntu-os-cloud \ --licenses="https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx" # Skrypt GC do tworzenia VC pod EVE-NG gcloud compute instances create eve-lab \ --project=$(gcloud config get-value project) \ --zone=europe-west2-a \ --machine-type=n2-custom-12-32768 \ --min-cpu-platform="Intel Cascade Lake" \ --maintenance-policy=MIGRATE \ --provisioning-model=STANDARD \ --service-account=1071039553563-compute@developer.gserviceaccount.com \ --tags=http-server,https-server \ --create-disk=auto-delete=yes,boot=yes,device-name=eve-lab,image=nested-ubuntu-jammy,mode=rw,size=100,type=pd-ssd \ --no-shielded-secure-boot \ --no-shielded-vtpm \ --no-shielded-integrity-monitoring \ --reservation-affinity=any # Opcjonalne: Tworzenie reguł zapory, jeśli jeszcze nie istnieją gcloud compute firewall-rules create default-allow-http --allow=tcp:80 --target-tags=http-server && \ gcloud compute firewall-rules create default-allow-https --allow=tcp:443 --target-tags=https-server #Reguły zapory sieciowej (Firewall) do użytku z konsolą natywną gcloud compute firewall-rules create eve-all-out \ --direction=EGRESS \ --priority=1000 \ --network=default \ --action=ALLOW \ --rules=tcp:0-65535 \ --destination-ranges=0.0.0.0/0 gcloud compute firewall-rules create eve-all-in \ --direction=INGRESS \ --priority=1000 \ --network=default \ --action=ALLOW \ --rules=tcp:0-65535 \ --source-ranges=0.0.0.0/0 # Porty dla MIST # 1. Ruch WYCHODZĄCY (Egress) # Obejmuje standardowe porty Mist oraz specyficzne dla EMEA porty logowania i RadSec gcloud compute firewall-rules create allow-mist-emea-egress \ --direction=EGRESS \ --priority=1000 \ --network=default \ --action=ALLOW \ --rules=tcp:443,tcp:2200,tcp:6514,tcp:2083,udp:53,udp:123 \ --destination-ranges=0.0.0.0/0 \ --description="Mist EMEA: Cloud (443), ZTP (2200), Syslog (6514), RadSec (2083)" # 2. Ruch PRZYCHODZĄCY (Ingress) - DOKŁADNE IP DLA MIST EMEA 01 # Adresy IP z których chmura Mist EMEA wysyła Webhooki do Twojego EVE-NG gcloud compute firewall-rules create allow-mist-emea-webhooks \ --direction=INGRESS \ --priority=1000 \ --network=default \ --action=ALLOW \ --rules=tcp:443 \ --source-ranges=3.122.172.223/32,3.121.19.146/32,3.120.167.1/32,35.158.11.14/32,18.196.126.11/32,18.197.35.158/32,3.120.177.10/32,3.121.36.43/32,3.122.122.164/32 \ --target-tags=https-server \ --description="Dopuszczenie Webhooków bezpośrednio z chmury Mist EMEA 01" #Inne # Ishare2 wget -O /usr/sbin/ishare2 https://raw.githubusercontent.com/ishare2-org/ishare2-cli/main/ishare2 && chmod +x /usr/sbin/ishare2 && ishare2 # Rekomendowane obrazy vJunos vSRX3.0 21.3R1.9 (2 vCPU, 4 GB RAM) - 1522 vJunos EX Switch – 23.1R1.8 (~4 vCPU, 8 GB RAM) - 1369 # Zmiana katalogu vSRX mv vsrx30-21.3R1.9 vsrxng-21.3R1.9 # PNET-LAB curl -sSL https://drive.labhub.eu.org/0:/upgrades_pnetlab/focal/install_pnetlab_v6.sh | bash # Lepiej wykonać skrypt z pliku lokalnie. bash install_pnetlab_v6.sh