Description
Solution
PC ==== (port1)[FGT1](port2) ==== (port2)[FGT2](port1) ==== Server
config vpn ipsec phase1
edit "to_FGT2"
set local-gw 192.168.1.1
set proposal 3des-sha1 aes128-sha1 des-md5
set remote-gw 192.168.1.2
set psksecret fortinet
next
end
config vpn ipsec phase2
edit "to_FGT2"
set keepalive enable
set phase1name "to_FGT2"
set proposal 3des-sha1 aes128-sha1
next
end
config firewall policy
edit 1
set srcintf "port1"
set dstintf "port2"
set srcaddr "all"
set dstaddr "all"
set action ipsec
set schedule "always"
set service "ALL"
set inbound enable
set outbound enable
set vpntunnel "to_FGT2"
next
end
config system arp-table
# Server IP/MAC
edit 1
set interface port2
set ip 192.168.1.102
set mac 00:50:56:00:76:04
next
# PC IP/MAC
edit 2
set interface port1
set ip 192.168.1.101
set mac 00:50:56:00:76:03
next
end
config system mac-address-table
# Server MAC
edit 00:50:56:00:76:04
set interface port2
next
# PC MAC
edit 00:50:56:00:76:03
set interface port1
next
end
config vpn ipsec phase1
edit "to_FGT1"
set local-gw 192.168.1.2
set proposal 3des-sha1 aes128-sha1 des-md5
set remote-gw 192.168.1.1
set psksecret fortinet
next
end
config vpn ipsec phase2
edit "to_FGT1"
set keepalive enable
set phase1name "to_FGT1"
set proposal 3des-sha1 aes128-sha1
next
end
config firewall policy
edit 1
set srcintf "port1"
set dstintf "port2"
set srcaddr "all"
set dstaddr "all"
set action ipsec
set schedule "always"
set service "ALL"
set inbound enable
set outbound enable
set vpntunnel "to_FGT1"
next
end
config system arp-table
# Server IP/MAC
edit 1
set interface port1
set ip 192.168.1.102
set mac 00:50:56:00:76:04
next
# PC IP/MAC
edit 2
set interface port2
set ip 192.168.1.101
set mac 00:50:56:00:76:03
next
end
config system mac-address-table
# Server MAC
edit 00:50:56:00:76:04
set interface port1
next
# PC MAC
edit 00:50:56:00:76:03
set interface port2
next
end
Related Articles
Technical Note: Building a Layer-2 VPN with VxLAN over IPsec
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2023 Fortinet, Inc. All Rights Reserved.