Tugasnya adalah menyatukan cabang dengan kantor pusat perusahaan, tempat ruang server berada. Fortigate 60E mengatur akses Internet dan bertindak sebagai firewall di kantor pusat, di cabang-cabang itu bertindak sebagai akses Internet Mikrotik dari berbagai model. Itu juga perlu untuk mengkonfigurasi perutean OSPF dinamis dan mengatur terowongan VPN IPsec dengan GRE. Setelah mencari-cari di Internet, saya menemukan beberapa artikel yang tersebar tentang menghubungkan Fortigate ke mikrotik melalui IPsec VPN dan terowongan GRE. Saya memutuskan untuk menggabungkan informasi ini di salah satu artikel saya untuk digunakan sendiri sebagai contekan di masa mendatang. Saya akan menulis tentang perutean dinamis OSPF di artikel berikutnya.
Jadi masukan datanya:
1. Kantor Pusat FortiOS 6.4.5:
IP Publik XXXX (port antarmuka jaringan1)
Jaringan internal 192.168.111.0/24 (port antarmuka jaringan2)
2. Cabang perusahaan Mikrotik RouterOS 6.48.1:
Antarmuka jaringan IP YYYY ether1 publik
Jaringan internal 192.168.112.0/24 (antarmuka jaringan ether2)
Dalam gambar. secara skematis menunjukkan koneksi kantor pusat dan cabang.
Fortigate mikrotik, , IPsec GRE. mikrotik . GRE, Winbox mikrotik Interfaces->GRE Tunnel->+( , ), : - Local Address Y.Y.Y.Y - Remote Address X.X.X.X "keepalive", . , , , . 10 10 . . ., 100 . , . GRE IPsec "Allow Fast Path", "Local Address:" IPsec. “IPsec Secret”, IPsec. , “IPsec Secret”.
IP GRE-. IP->Addresses->+
:
/interface gre
add name=gre-tunnel1 keepalive=10s,10 local-address=Y.Y.Y.Y remote-address=X.X.X.X allow-fast-path=no
/ip address
add address=10.10.10.2/30 interface= gre-tunnel1
IPsec . phase-1, , IP , IP->IPsec->Profiles.
Peer phase-1, IP->IPsec->Peers. name Branch-HQ, FortiGate HQ, profile1, phase-1.
IPsec phase-1.
phase-2, IPsec, IPsec (AH ESP), IPsec SA. IP->IPsec->Proposals
IPsec , IP->IPsec->Policies->General. Peer Branch-HQ, . Src. Address – mikrotik Y.Y.Y.Y, Dst. Address – FortiGate HQ X.X.X.X, GRE Protocol - 47.
Action Proposal – porposal1, .
:
/ip ipsec profile
add dh-group=modp1536,modp2048 enc-algorithm=aes-256 hash-algorithm=sha256 lifetime=24h name=profile1
/ip ipsec peer
add address=X.X.X.X local-address=Y.Y.Y.Y name=Branch-HQ profile=profile1
/ip ipsec proposal
add auth-algorithms=sha256 enc-algorithms= aes-256-cbc lifetime=30m name=proposal1
pfs-group=modp1536
/ip ipsec policy
add peer=Branch-HQ src-address= Y.Y.Y.Y dst-address= X.X.X.X protocol=47 proposal=proposal1
/ip ipsec identity
add peer=Branch-HQ secret=#!@BRaNCH@!#
IP->Firewall->Filter Rules:
:
/ip firewall filter
add chain=input protocol=17 dst-port=500,4500 in-interface=ether1 action=accept
, :
/ip route
add dst-address=192.168.111.0/24 gateway=10.10.10.1
mikrotik , FortiGate.
FortiGate IPsec phase-1 :
config vpn ipsec phase1-interface
edit HQA-Branch
set peertype any
set proposal aes256-sha256
set dpd on-idle
set dhgrp 5 14
set auto-discovery-sender enable
set remote-gw Y.Y.Y.Y
set psksecret #!@BRaNCH@!#
set dpd-retryinterval 5
next
end
Phase-2 , “protocol 47” transport-mode ( ) GRE:
config vpn ipsec phase2-interface
edit "HQA-Branch"
set phase1name "HQA-Branch"
set proposal aes256-sha256
set dhgrp 5 14
set auto-negotiate enable
set encapsulation transport-mode
set protocol 47
next
end
GRE tunnel:
config system gre-tunnel
edit "HQ-Branch"
set interface "HQA-Branch"
set remote-gw Y.Y.Y.Y
set local-gw X.X.X.X
next
end
IP IP :
config system interface
edit "HQ-Branch"
set ip 10.10.10.1 255.255.255.255
set remote-ip 10.10.10.2 255.255.255.252
set interface "HQA-Branch"
next
end
GRE, IPsec, , . , , GRE IPsec. FortiOS IPsec . «» IPsec (, IPsec ).
config firewall policy
edit 2
set name "Enable IPsec"
set srcintf "HQA-Branch"
set dstintf "HQA-Branch"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
port2 GRE :
config firewall policy
edit 3
set name "GRE HQ->Branch"
set srcintf "port2"
set dstintf "HQ-Branch"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
edit 4
set name "GRE Branch->HQ"
set srcintf "HQ-Branch"
set dstintf "port2"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
end
GRE, GRE IPsec. , remote-gw gre-tunnel IPsec. :
config router static
edit 1
set dst Y.Y.Y.Y/30
set device "HQA-Branch"
next
edit 2
set dst 192.168.112.0 255.255.255.0
set device "HQ-Branch"
next
end
Dan sekarang IPsec dan GRE telah meningkat, lalu lintas dari jaringan lokal kantor pusat memasuki jaringan lokal kantor cabang dan sebaliknya.
Menggunakan artikel berikut:
1. Fortinet
Ini adalah karya kedua saya, tolong jangan terlalu banyak menendang.