Bulut ortamı ile kurum içi ağınız arasında güvenli bir iletişim kanalı oluşturmak için en yaygın yöntemlerden biri Site-to-Site VPN’dir.

Bu makalemde FortiGate güvenlik cihazı ile Microsoft Azure VNet arasında IPsec VPN bağlantısı nasıl kurulacağı adım adım anlatılmaktadır.

Bu yapı sayesinde:

  • Azure’daki sanal makineler şirket içi kaynaklara güvenli şekilde erişebilir.
  • On-premise kullanıcılar Azure’daki servislere dahili ağdaymış gibi ulaşabilir.
  • Yönlendirme için hem statik route hem de BGP dinamik routing kullanılabilir.

Ön Gereksinimler

Kuruluma başlamadan önce aşağıdaki gereksinimler sağlanmalıdır:

  • Azure tarafında:
    • Hazır bir VNet (172.29.0.0/16 örneği)
    • Uygun subnetler, NSG kuralları ve routing tabloları
    • Azure hesabında kaynak oluşturma yetkisi
  • On-premise tarafında:
    • Harici IP’ye sahip bir FortiGate cihazı
    • FortiOS yönetim arayüzüne erişim

Azure Konfigürasyonu

Gateway Subnet Oluşturma

Azure’da VPN Gateway’in çalışabilmesi için VNet içinde özel bir subnet gerekir:

  1. Azure Portal > VNet seç
  2. Subnets > + Gateway subnet
  3. Adres aralığı otomatik önerilir (ör: 172.29.2.0/24)
  4. Subnet adı: GatewaySubnet (zorunlu, değiştirilemez)

Not: Route table veya NSG eklemeniz gerekmez Azure kendi yönetir.

VPN Gateway Oluşturma

  1. Azure Portal > Create resource > “Virtual network gateway”
  2. Parametreleri girin:
    • Name: VNet-GW
    • Region: VNet ile aynı bölge
    • Gateway type: VPN
    • VPN type: Policy-based
    • SKU: Basic
    • Virtual Network: Daha önce oluşturulan VNet
    • Public IP Address: Yeni bir Public IP oluşturun

Kurulum süresi yaklaşık 30-45 dakika sürebilir.

Local Network Gateway Oluşturma

Bu kaynak Azure tarafında FortiGate’inizi temsil eder:

  1. Azure Portal > Create resource > “Local network gateway”
  2. Parametreleri girin:
    • Name: FortiGate-LGW
    • IP Address: FortiGate’in harici IP’si
    • Address Space: FortiGate arkasındaki lokal ağ CIDR (ör: 10.0.1.0/24)
    • (Opsiyonel) BGP: ASN ve peer IP bilgilerini girin

VPN Connection Oluşturma

  1. Azure Portal > VNet Gateway > Connections > Add
  2. Parametreleri girin:
    • Name: FGT-Azure-VPN
    • Connection type: Site-to-site (IPsec)
    • Local Network Gateway: FortiGate-LGW
    • Shared Key (PSK): Güçlü bir şifre (FortiGate tarafında da aynı girilecek)

FortiGate Konfigürasyonu

Phase-1 Interface

Phase-1 IPsec tünelinin temel güvenlik parametrelerini tanımlar.

config vpn ipsec phase1-interface
edit "azurephase1"
set interface "port1"                  # FortiGate’in WAN arayüzü
set local-gw 10.0.0.15                 # NAT arkasında ise yerel IP, değilse gerek yok
set keylife 28800
set peertype any
set proposal aes256-sha256 3des-sha1 aes128-sha1 aes256-sha1
set dhgrp 2
set remote-gw 40.112.93.0              # Azure VPN Gateway public IP
set psksecret <PSK>                    # Azure tarafında girilen Shared Key
set dpd-retryinterval 10
next
end

Phase-2 Interface

Phase-2 hangi ağların tünel üzerinden geçeceğini ve şifreleme detaylarını belirler.

config vpn ipsec phase2-interface
edit "azurephase2"
set phase1name "azurephase1"
set proposal aes256-sha1 3des-sha1 aes256-sha256 aes128-sha1
set pfs disable                        # Policy-based bağlantılarda Azure PFS desteklemez
set auto-negotiate enable
set keylifeseconds 3600
set src-subnet 10.0.1.0 255.255.255.0  # On-premise LAN
set dst-subnet 172.29.0.0 255.255.0.0  # Azure VNet
next
end

Firewall Politikaları

VPN trafiğinin geçmesine izin verin:

config firewall policy
edit 1
set srcintf "azurephase1"
set dstintf "port2"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
edit 2
set srcintf "port2"
set dstintf "azurephase1"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
end

Routing

Statik yönlendirme:

config router static
edit 1
set dst 172.29.0.0 255.255.0.0
set device "azurephase1"
next
end

BGP yönlendirme (opsiyonel):

config router bgp
set as 64521                        # Local ASN
config neighbor
edit "172.0.0.254"                  # Azure BGP peer
set remote-as 64520                 # Azure ASN
set update-source "azurephase1"
next
end
end

Doğrulama

  1. FortiGate IPsec Monitor → Tünelin “up” olduğundan emin olun.
  2. Ping testi: ping 172.29.0.4
  3. Sniffer ile trafik takibi: diagnose sniffer packet any 'icmp' 4
  4. BGP kontrolü: get router info bgp summary get router info routing-table bgp

Sorun Giderme

FortiGate üzerinde debugging açın:

diagnose debug enable
diagnose debug application ike -1

Yaygın hatalar:

  • Yanlış subnet tanımları
  • Azure ile eşleşmeyen Phase-1/Phase-2 parametreleri
  • Local gateway IP yanlış girilmiş olması

Bu makalemde adım adım bir FortiGate cihazı ile Azure VNet arasında Site-to-Site IPsec VPN bağlantısı kurulumunu ele aldık.

  • Statik route veya BGP ile yönlendirme yapılabilir.
  • Doğru yapılandırıldığında şirket içi kaynaklar ve Azure bulutu arasında güvenli, kesintisiz erişim sağlanır.