본문 바로가기
IT Information/Fortinet Technical

Technical Note : FortiGate to Juniper SSG VPN

by barefeet1211 2014. 12. 23.
Technical Note : FortiGate to Juniper SSG VPN
Article
Introduction

This article describes how to configure an IPSec VPN on a FortiGate unit to work with a Juniper Networks Secure Services Gateway (SSG). The example shown here is route-based, but a policy-based VPN is also possible.

Components
  • FortiGate unit running FortiOS v3.0 firmware, MR5 or later
  • Juniper Networks SSG with firmware version 6.0.0r3.0
Prerequisites
  • The FortiGate unit and the Juniper SSG unit must be in NAT mode.
Configure FortiGate VPN Phase 1

To configure using the Web-based Manager

  1. Go to VPN > IPSec > Auto-Key and select Phase 1.
  2. Enter the following:
    NameVPN name: toSSG, for example
    Remote GatewayStatic IP Address
    IP Addressthe public IP address of the Juniper appliance,
    172.30.69.108, for example
    Local Interfacethe interface that connects to the remote VPN: WAN1
    ModeMain (default)
    Authentication Method  Preshared Key
    Pre-shared Keysame preshared key configured on the Juniper appliance

  3. Select Advanced and enter the following:
    Enable IPSec Interface Mode  Enable
    P1 Proposal1 - Encryption 3DES, Authentication SHA1 (default)
    Delete proposal 2
    DH Group2
    Keylife28800
    Nat-traversalEnable
    Dead Peer DetectionEnable

  4. Select OK.

To configure using the CLI:

Using the example configuration, enter the following commands:

config vpn ipsec phase1-interface
  edit "toSSG"
    set interface wan1
    set dpd enable
    set dhgrp 2
    set proposal 3des-sha1
    set keylife 28800
    set nattraversal enable
    set remote-gw 172.30.69.108
    set psksecret ENC XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  end
Configure FortiGate VPN Phase 2

To configure using the Web-based Manager

  1. Go to VPN > IPSec > Auto-Key and select Phase 2.
  2. Enter the following:
    NameA name for the VPN Phase 2 configuration: Tunnel-FG-SSG, for example
    Phase 1  Phase 1 configuration name: toSSG

  3. Select Advanced and enter the following:
    P2 Proposal1 - Encryption 3DES, Authentication SHA1
    Delete proposal 2
    Enable replay detection  Enable
    Enable perfect forward secrecy  Enable
    DH Group2
    Keylife1800 seconds
    Autokey Keep AliveDisable

  4. Select OK.

To configure using the CLI

Using the example configuration, enter the following commands:

config vpn ipsec phase2-interface
  edit Tunnel-FG-SSG
    set dhgrp 2
    set keepalive disable
    set phase1name toSSG
    set proposal 3des-sha1
    set pfs enable
    set replay enable
    set keylife-type seconds
    set keylifeseconds 1800
  end
Configure FortiGate Firewall Addresses

Create firewall addresses for the private networks at either end of the VPN.

To configure using the Web-based Manager

  1. Go to Firewall > Address and select Create New.
  2. Enter the following:
    Address NameA name for the address. For example:
    "LocalLAN" for the network behind the FortiGate unit
    "Site2_net" for the network behind the Juniper appliance
    TypeSubnet/IP Range
    Subnet/IP Range  The network address and subnet mask. For example,
    Enter "10.10.10.0 255.255.255.0" for LocalLAN
    Enter "192.168.2.0 255.255.255.0" for Site2_net

  3. Select OK.

To configure using the CLI

Using the example configuration, enter the following commands:
config firewall address
  edit "LocalLAN"
    set subnet 10.10.10.0 255.255.255.0
  next
  edit "Site2_net"
    set subnet 192.168.2.0 255.255.255.0
  end
Configure FortiGate Outgoing Firewall Policy

The outgoing policy allows hosts on the network behind the FortiGate unit to communicate with hosts behind the Juniper appliance.

To configure using the Web-based Manager

  1. Go to Firewall > Policy and select Create New.
  2. Enter the following and select OK:
    Source Interface/ZoneThe interface connected to the local network: internal
    Source AddressThe firewall address of the local network: LocalLAN
    Destination Interface/ZoneThe interface that connects to the remote network: toSSG
    Destination Address The firewall address of the remote network: Site2_net
    Schedulealways
    ServiceANY
    ActionACCEPT

To configure using the CLI

Using the example configuration, enter the following commands:

config firewall policy
  edit 1
    set srcintf internal
    set srcaddr LocalLAN
    set dstintf toSSG
    set dstaddr Site2_net
    set action accept
    set schedule always
    set service ANY
  end
To prevent unencrypted data from leaving the FortiGate, refer to KB article:-
FortiOS Protecting data for muliple subnets when IPSec Tunnel Fails 
Configure FortiGate Incoming Firewall Policy

The incoming policy allows hosts on the network behind the Juniper appliance to communicate with hosts behind the FortiGate unit.

To configure using the Web-based Manager

  1. Go to Firewall > Policy and select Create New.
  2. Enter the following and select OK:
    Source Interface/ZoneThe interface that connects to the remote network: toSSG
    Source AddressThe firewall address of the remote network: Site2_net
    Destination Interface/ZoneThe interface connected to the local network: internal
    Destination Address The firewall address of the local network: LocalLAN
    Schedulealways
    ServiceANY
    ActionACCEPT

To configure using the CLI

Using the example configuration, enter the following commands:

config firewall policy
  edit 2
    set srcintf toSSG
    set srcaddr Site2_net
    set dstintf internal
    set dstaddr LocalLAN
    set action accept
    set schedule always
    set service ANY
  end
Configure Juniper SSG interfaces

This Juniper SSG appliance is configured using its WebUI. Refer to Juniper documentation for detailed information.

To configure Juniper SSG interfaces

  1. Go to Network > Interfaces.
  2. Select Edit for the interface that connects to the LAN.
  3. Enter the following:
    Zone NameTrust
    Static IPSelect
    IP Address/NetmaskEnter the address of the interface that connects to the LAN: 192.168.2.99, for example.

  4. Select Apply.
  5. Select Internet Mode NAT and then select OK.
  6. Go to Network > Interfaces.
  7. Select Edit for the interface that connects to the remote VPN gateway.
  8. Enter the following:
    Zone NameUntrust
    Static IPSelect
    IP Address/NetmaskEnter the address of the remote VPN gateway: 202.85.110.138, for example.

  9. Select Apply.
  10. Select Internet Mode NAT and then select OK.

To configure Juniper SSG tunnel interface

  1. Go to Network > Interfaces.
  2. Select Tunnel IF and then select New.
  3. Enter the following and select Apply:
    Tunnel Interface NameEnter a name: tunnel.1, for example.
    Zone (VR)Select Untrust (trust-vr).
    UnnumberedSelect
    InterfaceSelect the interface that connects to the remote VPN gateway: ethernet3, for example.
Configure Juniper SSG VPN settings

To configure Juniper SSG VPN

  1. Go to VPNs > AutoKey Advanced > Gateway and select New.
  2. Enter the following and select OK:
    Gateway NameEnter a name: toFortiGate, for example.
    Security LevelCustom
    Remote Gateway TypeStatic IP Address
    Static IP AddressThe FortiGate unit VPN gateway address, 172.16.110.138
    Preshared KeyThe same preshared key value as configured on the FortiGate unit.

  3. Select Advanced.
  4. Enter the following and select Return:
    Security LevelCustom
    Phase 1 Proposal3des-sha
    Mode (Initiator)Main (ID Protection)
Configure Juniper SSG routing

You need to configure routing to send and receive traffic for the remote private network through the VPN tunnel.

To configure the routes for VPN traffic

  1. Go to Network > Routing > Routing Entries > trust-vr.
  2. Enter the following and select OK:
    Network Address/Netmask0.0.0.0/0
    Gateway InterfaceThe interface that connects to the remote VPN gateway: ethernet3, for example.
    Gateway IP AddressThe IP address of the remote Gateway Interface, 172.16.110.138, for example.

  3. Go to Network > Routing > Routing Entries > trust-vr.
  4. Enter the following and select OK:
    Network Address/NetmaskThe address of the remote LAN, 192.168.2.0/24 for example.
    Gateway InterfaceThe tunnel interface: Tunnel.1, for example.
    Gateway IP Address0.0.0.0
Configure Juniper SSG firewall policies

To configure firewall addresses

  1. Go to Policy > Policy Elements > Addresses > List > New.
  2. Enter the following, then select OK:
    Address NameA name for the local LAN, Site1_LAN for example.
    IP AddressThe IP Address for the local LAN, 10.10.10.254/24 for example.
    ZoneTrust

  3. Go to Policy > Policy Elements > Addresses > List > New.
  4. Enter the following, then select OK:
    Address NameA name for the remote LAN, Site2_LAN for example.
    IP AddressThe IP Address for the remote LAN, 192.168.2.0/24 for example.
    ZoneUntrust

To configure firewall policies

  1. Go to Policy > Policies.
  2. Enter the following, then select OK:
    FromTrust
    ToUntrust
    NameA name for the policy, Site1toSite2 for example.
    ServiceANY
    ActionPermit

  3. Go to Policy > Policies.
  4. Enter the following, then select OK:
    FromUntrust
    ToTrust
    NameA name for the policy, Site2toSite1 for example.
    ServiceANY
    ActionPermit
Test the VPN from the FortiGate unit
  1. Configure the ping function to originate from the Internal interface.
    execute ping-options source 10.10.10.6
    
  2. Ping the private network behind the Juniper SS unit.
    exec ping 192.168.2.99
    
Test the VPN from the Juniper SSG unit
  1. Ping the private network behind the FortiGate unit.
    ping 10.10.10.6 from ethernet0/0
    
  2. Type the escape sequence to end.
TroubleshootingThere are several tools available to troubleshoot VPNs:

VPN monitors

  • VPN > Monitor on the FortiGate unit.
  • VPNs > Monitor Status on the Juniper SSG unit.

Event Logs

  • Log&Report > Log Access on the FortiGate unit.
  • Reports > System Log > Event on the Juniper SSG unit.

Diagnostic commands

  • FortiGate unit - diag vpn tunnel list
  • Juniper SSG - get sa
Related Articles


출처: http://kb.fortinet.com