Professional Documents
Culture Documents
FortiOS Handbook v3 29 June 2011 01-431-99686-20110629 for FortiOS 4.0 MR3 Copyright 2011 Fortinet, Inc. All rights reserved. No part of this publication including text, examples, diagrams or illustrations may be reproduced, transmitted, or translated in any form or by any means, electronic, mechanical, manual, optical or otherwise, for any purpose, without prior written permission of Fortinet, Inc. Trademarks The symbols and denote respectively federally registered trademarks and unregistered trademarks of Fortinet, Inc., its subsidiaries and affiliates including, but not limited to, the following names: Fortinet, FortiGate, FortiOS, FortiASIC, FortiAnalyser, FortiSwitch, FortiBIOS, FortiLog, FortiVoIP, FortiResponse, FortiManager, FortiWiFi, FortiGuard, FortiReporter, FortiClient, FortiLog, APSecure, ABACAS. Other trademarks belong to their respective owners.
95
97 101 125 137 151
Chapter 2
FortiGate Fundamentals
The Purpose of a Firewall Life of a Packet Firewall components Security Policies Troubleshooting
175
177 189 201 233 245
Chapter 3
System Administration
Basic setup Centralized management Using the CLI Tightening security Best Practices FortiGuard Monitoring Multicast forwarding IPv6 Virtual LANs PPTP and L2TP Session helpers Advanced firewall concepts Advanced concepts
255
257 289 295 315 321 327 337 377 409 433 465 479 489 511
Chapter 4
545
547 555 561 575 591 595
Chapter 5
Troubleshooting
Troubleshooting process Troubleshooting tools Technical Support Organization Overview Troubleshooting connectivity Troubleshooting advanced Troubleshooting get commands Troubleshooting bootup and FSSO
615
617 623 653 665 685 699 759
Chapter 6
UTM Guide
UTM overview Network defense AntiVirus Email filter Intrusion protection Web filter FortiGuard Web Filter Data leak prevention Application control DoS policy Endpoint Control and monitoring Vulnerability Scan Sniffer policy Other UTM considerations
765
767 771 783 799 815 847 861 873 887 899 905 923 933 941
Chapter 7
User Authentication
Introduction to authentication Authentication and User in the web-based manager Authentication servers Users and user groups Configuring authenticated access Certificate-based authentication FSSO integration with Windows AD or Novell Dynamic profiles and end points Monitoring authenticated users Examples and Troubleshooting
951
953 961 985 1003 1023 1041 1059 1099 1133 1135
Chapter 8
IPsec VPNs
IPsec VPN concepts FortiGate IPsec VPN Overview Gateway-to-gateway configurations Hub-and-spoke configurations Dynamic DNS configuration FortiClient dialup-client configurations FortiGate dialup-client configurations Supporting IKE Mode config clients Internet-browsing configuration Redundant VPN configurations Transparent mode VPNs Manual-key configurations IPv6 IPsec VPNs L2TP and IPsec (Microsoft VPN) configurations GRE over IPsec (Cisco VPN) configurations Protecting OSPF with IPsec Auto Key phase 1 parameters Phase 2 parameters Defining VPN security policies Hardware offloading and acceleration Monitoring and troubleshooting VPNs
1153
1155 1163 1167 1183 1197 1211 1229 1237 1241 1245 1269 1277 1279 1291 1303 1313 1321 1337 1343 1349 1355
Chapter 9
SSL VPN
Introduction to SSL VPN Setting up the FortiGate unit Using the web portal Using the SSL VPN tunnel client Examples
1365
1367 1377 1411 1423 1429
1443
1445 1471 1487 1523 1561 1599
1613
1615 1641 1659 1679 1715
1721
1725 1729 1757 1819 1841 1855 1895 1945 1963 1967 1973
1979
1981 1991 2005 2013
2017
2019 2041 2071 2093 2105 2113 2121 2129 2135 2141
2149
2151 2161 2175 2185 2189 2199 2213
2217
2219
2297
2299 2319 2323 2329 2339 2359 2381 2403 2427 2429 2449 2463 2477
2483
2485 2511
Chapter 19 Hardware
FortiGate installation AMC module configuration FortiGate hardware accelerated processing Configuring RAID FortiBridge installation and operation
2527
2529 2541 2545 2569 2575
2607
2609 2631 2646
Index ...................................................................................................2655
Detailed Contents
How this Handbook is organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Chapter 1
95 97
97 97 98
101
Flow-based UTM Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Flow-based web filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Flow-based Data Leak Prevention (DLP) . . . . . . . . . . . . . . . . . . . . . 101 UTM Configuration and Inspection Enhancements. . . . UTM profile and sensor configuration improvements Archive inspection for antivirus profiles . . . . . . . Improved IPS default block rate . . . . . . . . . . . IPS signature rate count threshold . . . . . . . . . . IPS Predefined signature viewer . . . . . . . . . . . Web Filter profiles . . . . . . . . . . . . . . . . . . Web Filtering Overrides . . . . . . . . . . . . . . . Application Control Sensors and filters. . . . . . . . Geography-based filtering for firewall addresses . . DLP document fingerprinting . . . . . . . . . . . . . Internet Content Adaptation Protocol (ICAP). . . . . Profile Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 102 102 103 103 103 103 104 105 105 106 107 108
Modem interface Improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 3G/4G modem list available from FortiGuard . . . . . . . . . . . . . . . . . . . 109
Detailed Contents
WiFi Extensions . . . . . . . . . . . . . . . . . . . . . . . . . WiFi controller redesign . . . . . . . . . . . . . . . . . . . Captive portal enhancements . . . . . . . . . . . . . . . . Rogue AP detection and reporting . . . . . . . . . . . . . . Rogue AP Suppression . . . . . . . . . . . . . . . . . . . On-wire Rogue AP detection . . . . . . . . . . . . . . . . . Custom AP profiles . . . . . . . . . . . . . . . . . . . . . . Distributed ARRP (Automatic Radio Resource Provisioning) WiFi monitor . . . . . . . . . . . . . . . . . . . . . . . . . New WiFi commands. . . . . . . . . . . . . . . . . . . . . Strong Authentication Enhancements . . . . . . . . . . FortiToken support . . . . . . . . . . . . . . . . . . Two-factor authentication . . . . . . . . . . . . . . Enabling two-factor authentication for administrators Multiple authentication group enforcement. . . . . . Dynamic Profiles . . . . . . . . . . . . . . . . . . . Hard-timeout enhancement . . . . . . . . . . . . . PKI certificate authentication enhancement . . . . . NTLM authentication enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
109 109 110 110 110 110 111 111 111 112 112 112 113 115 116 116 116 116 117
New PCI Compliance Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 Endpoint Security enhancements . . . . . . . . . . . . . . . . . . . . . . . . . 117 Network Vulnerability Scan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Feature Improvements to extend IPv6 support . . . . . . . . . . . . . . . . . . . . . 119 Top Session dashboard widget IPv6 support . . . . . . . . . . . . . . . . . . . 119 OSPFv3 NSSA extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Explicit proxy and web caching improvements . . . . . . . Explicit FTP proxy . . . . . . . . . . . . . . . . . . . Form-based user authentication for explicit web proxy Web caching in security policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 120 123 123
125
The FortiGate UTM Weekly Activity Report . . . . . . . . . . . . . . . . . . . . . . 125 Viewing the current and historical reports . . . . . . . . . . . . . . . . . . . . . 127 Creating custom reports from the CLI . . . . . . . . . . . . . . . . . . . . . . . 128 Log Access Improvements . . . . Viewing log messages . . . . Filtering log messages . . . . Downloading log messages . New Unified UTM Log Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 128 129 129 129
SQL logging enabled by default . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Sending DLP archives to multiple FortiAnalyzer units . . . . . . . . . . . . . . . . . 131 Remote logging configuration enhancements . . . . . . . . . . . . . . . . . . . . . 131
10
Detailed Contents
Log and Report Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Logging Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 Log Message Enhancements. . . . . . . . Event logs . . . . . . . . . . . . . . . Traffic logs . . . . . . . . . . . . . . . Chat message log support for MSNP21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 132 133 133
SSL connection encryption level option over OFTP . . . . . . . . . . . . . . . . . . 133 Uploading logs to a FTP server in text format . . . . . . . . . . . . . . . . . . . . . 134 Example for uploading logs to a FTP server in text format. . . . . . . . . . . . . 134 Deleting all local logs, archives and user-configured report templates . . . . . . . . . 135 FortiGuard Analysis and Management Service (FAMS) . . . . . . . . . . . . . . . . 135 FortiAnalyzer with FAMS support . . . . . . . . . . . . . . . . . . . . . . . . . 135 FAMS enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
137
High-level web-based manager menu changes . . . . . . . . . . . . . . . . . . . . 137 New FortiGate Setup Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 FortiExplorer 4.0 enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Dashboard Widgets. . . . . Traffic History. . . . . . System Resources . . . Network Protocol Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 139 139 139 140 140 140 141 141 141 141 141 142 142 142 142 142 143 143 143
Chart display improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Monitoring Improvements. . . . . DHCP Monitor . . . . . . . . Modem Monitor. . . . . . . . Session Monitor . . . . . . . Policy Monitor . . . . . . . . Load Balance Monitor . . . . Traffic Shaper Monitor . . . . AV Monitor . . . . . . . . . . Intrusion Monitor . . . . . . . Web Monitor . . . . . . . . . Email Monitor. . . . . . . . . Archive & Data Leak Monitor . Application Monitor . . . . . . IPsec Monitor. . . . . . . . . SSL-VPN Monitor . . . . . . Web Cache Monitor . . . . .
Filtering web-based manager lists . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Reference count column (object usage visibility) . . . . . . . . . . . . . . . . . . . . 144
FortiOS Handbook v3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
11
Detailed Contents
Configuration Object Tagging and Coloring . . . . . . . . . . . . . Adding tags to configuration objects . . . . . . . . . . . . . . . Example of how to find a security policy using Tag Management Adding tags to predefined signatures and applications . . . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
Security configuration object icons . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 Access to online help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Backing up and restoring configuration files per-VDOM . . . . . . . . . . . . . . . . 149
151
New features for FortiOS 4.0 MR3 Patch 1. . . . . . . . . . . . . . . . . . . . . . . 152 Login grace timer for SSH connections. . . . . . . . . . . . . . . . . . . . . . . . . 153 FortiManager automatic authorization . . . . . . . . . . . . . . . . . . . . . . . . . 153 Dynamic DNS commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 New Diagnose Commands . . . . . . . . . . . . . . . . . . . . . Real-time session, traffic shaper bandwidth and CP6 statistics diag sys session filter proto-state . . . . . . . . . . . . . . . diag log-stats show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 154 154 154 154 154 155 155
New get commands . . . . . . . . . . . . . . . . . . . . . . . . . . . IPsec get commands . . . . . . . . . . . . . . . . . . . . . . . . . Traffic shaper and per-IP shaper . . . . . . . . . . . . . . . . . . . Management checksum configuration information for FortiManager.
MTU configuration support on non-IPsec tunnel interfaces . . . . . . . . . . . . . . 156 Customizing maximum number of invalid firewall authentication attempts . . . . . . . 156 Controlling the connection between a FortiManager unit and a FortiGate unit . . . . . 156 Bringing up or down IPsec tunnels . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Configuring active CPUs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Formatting multiple disk partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Transparent mode port pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 DNS server changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 DHCP Server changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 IP Reservation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Installing firmware on a partition without a reboot . . . . . . . . . . . . . . . . . . . 159 Example of installing a firmware on a partition without rebooting . . . . . . . . . 159 SNMP enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 WAN Opt, Web Cache and Explicit proxy MIBs . . . . . . . . . . . . . . . . . . 160 SNMPv3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
12
Detailed Contents
Replacement message changes . . . . . . . . . . . . . . . . . . . . . . Archive replacement messages and FTP proxy replacement message Successful firewall authentication replacement message . . . . . . . Web filtering disclaimer replacement message . . . . . . . . . . . . Video chat block replacement message . . . . . . . . . . . . . . . . Replacement message images . . . . . . . . . . . . . . . . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
VDOM and global privileges for access profiles . . . . . . . . . . . . . . . . . . . . 162 Example of incorporating the new access profile to existing administrator accounts . 162 HA dynamic weighted load balancing . . . . . . . . . . . . . . . . . . . . . . . . . 163 Configuring weighted-round-robin weights . . . . . . . . . . . . . . . . . . . . . 163 Dynamic weighted load balancing . . . . . . . . . . . . . . . . . . . . . . . . . 165 VRRP virtual MAC address support . . . . . . . . . . . . . . . . . . . . . . . . . . 167 FGCP HA subsecond failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Static Route enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Monitoring ISIS from the Routing Monitor page . . . . . . . . . . . . . . . . . . . . 169 Security Policy and Firewall Object Enhancements . . . Source IP addresses for FortiGate-originating traffic. Local-in security policies . . . . . . . . . . . . . . . Protocol Options . . . . . . . . . . . . . . . . . . . FTPS support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 169 170 170 170
Virtual IP source address filter support . . . . . . . . . . . . . . . . . . . . . . . . . 171 Virtual IP port forwarding enhancements . . . . . . . . . . . . . . . . . . . . . . . . 171 Load balancing HTTP host connections . . . . . . . . . . . . . . . . . . . . . . . . 171 Web Proxy Service and Web Proxy Service Group . . . . . . . . . . . . . . . . . . 171 SSL renegotiation for SSL offloading provides allow/deny client renegotiation . . . . 172 SSL VPN Port forwarding support . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 IKE negotiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 SHA-384 and SHA-512 support for IKE . . . . . . . . . . . . . . . . . . . . . . . . 173 FortiOS Carrier URL extraction feature. . . . . . . . . . . . . . . . . . . . . . . . . 173
Chapter 2
175 177
177 177 178 180 182 183
13
Detailed Contents
NAT vs. Transparent Mode . . . NAT mode . . . . . . . . . Transparent mode . . . . . Operating mode differences
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
Life of a Packet
189
Stateful inspection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 Flow inspection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Proxy inspection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 FortiOS functions and security layers . . . . . . . . . . . . . . . . . . . . . . . . . 191 Packet flow . . . . . . . . . . . . . Packet inspection (Ingress) . . Interface . . . . . . . . . . . . DoS sensor . . . . . . . . . . . IP integrity header checking . . IPsec . . . . . . . . . . . . . . Destination NAT (DNAT) . . . . Routing . . . . . . . . . . . . . Policy lookup . . . . . . . . . . Session tracking . . . . . . . . User authentication. . . . . . . Management traffic . . . . . . . SSL VPN traffic. . . . . . . . . Session helpers . . . . . . . . Flow-based inspection engine . Proxy-based inspection engine. IPsec . . . . . . . . . . . . . . Source NAT (SNAT) . . . . . . Routing . . . . . . . . . . . . . Egress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 192 193 193 193 194 194 194 194 194 195 195 195 195 195 195 196 196 196 196
Example 1: client/server connection . . . . . . . . . . . . . . . . . . . . . . . . . . 196 Example 2: Routing table update . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 Example 3: Dialup IPsec with application control. . . . . . . . . . . . . . . . . . . . 198
Firewall components
Interfaces . . . . . . . . . Physical . . . . . . . Administrative access Wireless . . . . . . . Virtual domains . . . . Virtual LANs . . . . . Zones. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
201
201 201 203 204 204 206 207
14
Detailed Contents
Addressing . . . . . . . . . . . . . . . . . . . . . . . Geography based addressing . . . . . . . . . . . Wildcard masks . . . . . . . . . . . . . . . . . . Fully Qualified Domain Name addresses . . . . . Address groups. . . . . . . . . . . . . . . . . . . DHCP. . . . . . . . . . . . . . . . . . . . . . . . IP pools. . . . . . . . . . . . . . . . . . . . . . . IP Pools for security policies that use fixed ports . Source IP address and IP pool address matching . IPv6. . . . . . . . . . . . . . . . . . . . . . . . . Ports . . . . . . . . . . . . . . . Originating traffic . . . . . . . Receiving traffic . . . . . . . Closing specific ports to traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
208 210 211 211 212 213 216 217 217 218 219 220 220 221 222 223 223 224
Using virtual IPs for port forwarding and destination NAT Inbound connections . . . . . . . . . . . . . . . . . DNAT and virtual IP . . . . . . . . . . . . . . . . . Virtual IP options for port forwarding and DNAT . . .
Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 Custom service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 Schedules . . . . . . . . Schedule groups . . . Schedule expiry . . . Identity-based policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 230 230 230
Security Policies
Creating basic policies . . . . . . Using an interface of any . . Basic accept policy example . Basic deny policy example . . Basic VPN policy example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
233
235 236 236 236 237
Security policy examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 Blocking an IP address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 Scheduled access policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Troubleshooting
245
15
Detailed Contents
Using log messages to view violation traffic . . . . . . . . . . . . . . . . . . . . . . 246 Traffic trace . . . . . . . . . . . . . . . Session table . . . . . . . . . . . . Finding object dependencies . . . . Flow trace . . . . . . . . . . . . . Flow trace output example - HTTP . Packet sniffer . . . . . . . . . Simple trace example . . Simple trace example . . Trace with filters example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 247 249 249 250 252 252 252 253
Chapter 3
255 257
Connecting to the FortiGate unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 Connecting to the web-based manager . . . . . . . . . . . . . . . . . . . . . . 257 Connecting to the CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 Setup Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 FortiExplorer . . . . . . . . . . . . . . . Installation . . . . . . . . . . . . . . Configuration options. . . . . . . . . Updating FortiExplorer and firmware . Configuring NAT mode . . . . . . . . Configure the interfaces . . . . . Configure a DNS . . . . . . . . . Add a default route and gateway . Add security policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 259 259 259 260 260 262 262 263
Configuring transparent mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 Switching to transparent mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 Verifying the configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Additional configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Setting the time and date. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Configuring FortiGuard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 Passwords . . . . . . . . . . Password considerations. Password policy . . . . . Forgotten password? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 269 270 270
16
Detailed Contents
Administrators . . . . . . . . . . . . . . . Administrator profiles . . . . . . . . . . Adding administrators . . . . . . . . . LDAP Admin Access and Authorization Monitoring administrators . . . . . . . Trusted hosts . . . . . . . . . . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
270 271 272 272 274 275 275 276 278 279 279 280 280 281 284 286
Backing up the configuration . . . . . . . . . . . . . . Backup and restore a configuration file using SCP Restoring a configuration. . . . . . . . . . . . . . Configuration revisions . . . . . . . . . . . . . . .
Firmware . . . . . . . . . . . . . . . . . . . . . . . . . . Downloading firmware . . . . . . . . . . . . . . . . . Upgrading the firmware - web-based manager . . . . Upgrading the firmware - CLI. . . . . . . . . . . . . . Installing firmware from a system reboot using the CLI Testing new firmware before installing . . . . . . . . .
Centralized management
289
Adding a FortiGate to FortiManager . . . . . . . . . . . . . . . . . . . . . . . . . . 289 FortiGate configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 FortiManager configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 Configuration through FortiManager . . . . . . . . . . . . . . . . . . . . . . . . . . 291 Configuration and installation status . . . . . . . . . . . . . . . . . . . . . . . . 291 Global objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292 Firmware updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292 FortiGuard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292 Backup and restore configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 Administrative domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
295
295 295 296 297 298
17
Detailed Contents
Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . Help . . . . . . . . . . . . . . . . . . . . . . . . Shortcuts and key commands . . . . . . . . . . . Command abbreviation. . . . . . . . . . . . . . . Environment variables . . . . . . . . . . . . . . . Special characters . . . . . . . . . . . . . . . . . Using grep to filter get and show command output Language support and regular expressions . . . . Screen paging . . . . . . . . . . . . . . . . . . . Baud rate . . . . . . . . . . . . . . . . . . . . . . Editing the configuration file on an external host . . Using Perl regular expressions. . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
307 307 307 307 308 308 309 309 312 312 312 313
Tightening security
Administrators . . . . . . . . . . . . . . Passwords . . . . . . . . . . . . . . Preventing unwanted login attempts . SSH login time out . . . . . . . . . . Administrator lockout . . . . . . . . . Idle time-out . . . . . . . . . . . . . Administrative ports . . . . . . . . . Change the admin username . . . . Segregated administrative roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
315
315 315 315 316 316 316 317 317 317
Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 User lockout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 Interface settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 Rejecting PING requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 Opening TCP 113 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 Obfuscate HTTP headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Best Practices
Hardware . . . . . . . . . . . . . Environmental specifications . Grounding . . . . . . . . . . Rack mount instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
321
321 321 322 322
Shutting down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 Firewall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 Intrusion protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 Antivirus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
18
Detailed Contents
FortiGuard
327
FortiGuard Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 Antivirus and IPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 Manual updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 Automatic updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 Web filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 Email filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 Security tools . . . . . . . . URL lookup . . . . . . . IP and signature lookup Online virus scanner . . Malware removal tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 332 332 332 333 333 333 335 336
Monitoring
337
Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 Widgets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 sFlow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 Logging . . . . . . . . . . . . . . . . . . . . . . . FortiGate memory . . . . . . . . . . . . . . . FortiGate hard disk . . . . . . . . . . . . . . . Syslog server . . . . . . . . . . . . . . . . . . FortiGuard Analysis and Management service. FortiAnalyzer . . . . . . . . . . . . . . . . . . Sending logs using a secure connection . . . . SNMP. . . . . . . . . . . . . Gigabit interfaces. . . . . SNMP agent . . . . . . . SNMP community . . . . Enabling on the interface . Fortinet MIBs . . . . . . .
FortiOS Handbook v3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
339 339 340 340 340 341 342 344 344 345 345 347 347
19
Detailed Contents
SNMP get command syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 Fortinet and FortiGate traps . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 Fortinet and FortiGate MIB fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
Multicast forwarding
377
Sparse mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377 Dense mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 Multicast IP addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 PIM Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 Multicast forwarding and FortiGate units . . . . . . . . . . . . . . . . . . . . . . . . 380 Multicast forwarding and RIPv2 . . . . . . . . . . . . . . . . . . . . . . . . . . 380 Configuring FortiGate multicast forwarding. . . . . . . . . . . . . . . . . . . . . . . 381 Adding multicast security policies . . . . . . . . . . . . . . . . . . . . . . . . . 382 Enabling multicast forwarding . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 Multicast routing examples . . . . . . . . . . . . . . . . . . . . Example FortiGate PIM-SM configuration using a static RP . FortiGate PIM-SM debugging examples . . . . . . . . . . . Example multicast destination NAT (DNAT) configuration . . Example PIM configuration that uses BSR to find the RP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 384 390 395 397
IPv6
IPv6 overview. . . . . . . . . . . . . . Differences between IPv4 and IPv6 IPv6 MTU. . . . . . . . . . . . . . IPv6 address format . . . . . . . . IP address notation. . . . . . . . . Netmasks. . . . . . . . . . . . . . Address scopes . . . . . . . . . . Address types . . . . . . . . . . . IPv6 neighbor discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
409
409 410 410 410 411 412 412 412 416
Transition from IPv4 to IPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 Configuring FortiOS to connect to an IPv6 tunnel provider. . . . . . . . . . . . . . . 417
20
Detailed Contents
FortiGate IPv6 configuration . . . . . . . . . . . . . . . Displaying IPv6 options on the web-based manager. UTM protection for IPv6 networks . . . . . . . . . . Configuring IPv6 interfaces. . . . . . . . . . . . . . Configuring IPv6 routing . . . . . . . . . . . . . . . Configuring IPv6 security policies . . . . . . . . . . Configuring IPv6 DNS . . . . . . . . . . . . . . . . Configuring IPv6 DHCP . . . . . . . . . . . . . . . Configuring IPv6 over IPv4 tunneling . . . . . . . . Configuring IPv6 IPSec VPNs . . . . . . . . . . . . IPv6 troubleshooting . . . . . . . ping6 . . . . . . . . . . . . . diagnose sniffer packet. . . . diagnose debug flow . . . . . IPv6 specific diag commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
420 421 421 421 422 423 423 423 424 424 426 426 429 430 430
Virtual LANs
433
VLAN ID rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 VLAN switching and routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 VLAN layer-2 switching. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 VLAN layer-3 routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 VLANs in NAT/Route mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 Adding VLAN subinterfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 Configuring security policies and routing . . . . . . . . . . . . . . . . . . . . . . 444 Example VLAN configuration in NAT mode General configuration steps . . . . . . Configure the FortiGate unit . . . . . . Configure the VLAN switch. . . . . . . Test the configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 446 446 450 451 452 452 454 460 460 461 462 463 463 464
VLANs in transparent mode . . . . . . . . . VLANs and transparent mode . . . . . . Example of VLANs in transparent mode . Test the configuration . . . . . . . . . . Asymmetric routing . . . . . Layer-2 and Arp traffic . . . Forward-domain solution . . NetBIOS . . . . . . . . . . STP forwarding . . . . . . . Too many VLAN interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
Detailed Contents
465
467 467 468 469
Configuring the FortiGate unit for PPTP VPN . . . . . . . . . . . . . . . . . . . . . 470 PPTP pass through configuration overview . . . . . . . . . . . . . . . . . . . . 470 Configuring the FortiGate unit for PPTP pass through . . . . . . . . . . . . . . . . . 470 Configuring a virtual IP address . . . . . . . . . . . . . . . . . . . . . . . . . . 470 Configuring a port-forwarding security policy. . . . . . . . . . . . . . . . . . . . 471 Testing PPTP VPN connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 Logging VPN events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 Configuring L2TP VPNs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 Network topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474 L2TP configuration overview . . . . . . . . . . . . . . Authenticating L2TP clients . . . . . . . . . . . . Enabling L2TP and specifying an address range . Defining firewall source and destination addresses Adding the security policy . . . . . Configuring a Linux client . . . Monitoring L2TP sessions . . . Testing L2TP VPN connections Logging L2TP VPN events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 476 476 476 477 477 478 478 478
Session helpers
479
Viewing the session helper configuration. . . . . . . . . . . . . . . . . . . . . . . . 480 Changing the session helper configuration . . . . . . . . . . . . . . . . . . . . . . . 480 Changing the protocol or port that a session helper listens on. . . . . . . . . . . 480 Disabling a session helper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482 DCE-RPC session helper (dcerpc) . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 DNS session helpers (dns-tcp and dns-udp) . . . . . . . . . . . . . . . . . . . . . . 483 File transfer protocol (FTP) session helper (ftp) . . . . . . . . . . . . . . . . . . . . 484 H.245 session helpers (h245I and h245O) . . . . . . . . . . . . . . . . . . . . . . . 484 H.323 and RAS session helpers (h323 and ras) . . . . . . . . . . . . . . . . . . . . 484 Alternate H.323 gatekeepers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 Media Gateway Controller Protocol (MGCP) session helper (mgcp) . . . . . . . . . . 485 ONC-RPC portmapper session helper (pmap) . . . . . . . . . . . . . . . . . . . . . 485
22
Detailed Contents
PPTP session helper for PPTP traffic (pptp) . . . . . . . . . . . . . . . . . . . . . . 486 Remote shell session helper (rsh) . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 Real-Time Streaming Protocol (RTSP) session helper (rtsp) . . . . . . . . . . . . . 487 Session Initiation Protocol (SIP) session helper (sip) . . . . . . . . . . . . . . . . . 488 Trivial File Transfer Protocol (TFTP) session helper (tftp) . . . . . . . . . . . . . . . 488 Oracle TNS listener session helper (tns) . . . . . . . . . . . . . . . . . . . . . . . . 488
489
Denial of Service policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 Rearranging policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 Security policy 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 Security policy list details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 DoS Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491 Basic DoS policy example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492 Sniffer Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492 Basic one-armed sniffer policy example . . . . . . . . . . . . . . . . . . . . . . 493 Identity-based Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 Identity-based policy positioning . . . . . . . . . . . . . . . . . . . . . . . . . . 496 Identity-based sub-policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 Local-in policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497 ICMP packet processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498 Session tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498 Viewing session tables in the web-based manager . . . . . . . . . . . . . . . . 498 Viewing session tables in the CLI . . . . . . . . . . . . . . . . . . . . . . . . . 499 Adding NAT security policies in transparent mode . . . . . . . . . . . . . . . . . . . 501 Adding a static NAT virtual IP for a single IP address and port . . . . . . . . . . . . 504 Double NAT: combining IP pool with virtual IP . . . . . . . . . . . . . . . . . . . . . 506 Using VIP range for Source NAT (SNAT) and static 1-to-1 mapping. . . . . . . . . . 508
Advanced concepts
Dual internet connection . . . . . . . Redundant interfaces. . . . . . . Load sharing . . . . . . . . . . . Link redundancy and load sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
511
511 511 513 513
Single firewall vs. multiple virtual domains . . . . . . . . . . . . . . . . . . . . . . . 514 Single firewall vs. vdoms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514 Central NAT table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516
23
Detailed Contents
Modem . . . . . . . . . . . . . . . USB modem port . . . . . . . . Modes . . . . . . . . . . . . . Additional modem configuration Modem interface routing . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
DHCP servers and relays. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520 Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520 Reserving IP addresses for specific clients . . . . . . . . . . . . . . . . . . . . 521 Assigning IP address by MAC address. . . . . . . . . . . . . . . . . . . . . . . . . 522 DNS services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 DNS queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 DNS servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523 Dynamic DNS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525 Aggregate Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525 Port pairing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 IP addresses for self-originated traffic . . . . . . . . . . . . . . . . . . . . . . . . . 528 Administration for schools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528 Security policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528 UTM Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530 Blocking port 25 to email server traffic . . . . . . . . . . . . . . . . . . . . . . . . . 532 Dedicated traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532 Restricting traffic on port 25 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533 Blocking HTTP access by IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 Server load balancing and HTTP cookie persistence fields . . . . . . . . . . . . . . 535 Stateful inspection of SCTP traffic . . . . . . . . . . . Configuring FortiGate SCTP filtering . . . . . . . . Adding an SCTP custom service . . . . . . . . . . Adding an SCTP policy route. . . . . . . . . . . . Changing the session time to live for SCTP traffic . Tag management . . . . . . . Adding and removing tags Reviewing tags . . . . . . Tagging guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 537 538 538 539 539 540 540 541
24
Detailed Contents
Chapter 4
545 547
What is logging? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547 How the FortiGate unit records log messages . . . . . . . . . . . . . . . . . . . 547 Log messages . . . . . . . . . . . . . . Explanation of a log message . . . . Explanation of a debug log message. Viewing log messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 549 550 551
555
SQL overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555 SQLite database tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 SQLite statement examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Distribution of Applications by Type in the last 24 hours . . . . . . . . . . . . . . Top 10 Application Bandwidth Usage Per Hour Summary . . . . . . . . . . . . . Example of how to create a dataset containing attack name instead of attack ID . Troubleshooting SQL issues . . . SQL statement syntax errors . Connection problems. . . . . SQL database error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 556 557 557 558 558 558 558
Log devices
561
Choosing a log device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 Example: Setting up a log device and backup solution . . . . . . . . . . . . . . 562 Configuring the FortiGate unit to store logs on a log device . Logging to the FortiGate units system memory . . . . . Logging to the FortiGate units hard disk . . . . . . . . . Logging to a FortiAnalyzer unit . . . . . . . . . . . . . . Logging to a FortiGuard Analysis server . . . . . . . . . Logging to a Syslog server . . . . . . . . . . . . . . . . Logging to a WebTrends server . . . . . . . . . . . . . Logging to multiple FortiAnalyzer units or Syslog servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563 563 564 565 565 566 567 567
25
Detailed Contents
Testing FortiAnalyzer and FortiGuard Analysis server connections Testing the FortiAnalyzer configuration . . . . . . . . . . . . Testing the FortiGuard Analysis server configuration . . . . . Using diag sys logdisk usage . . . . . . . . . . . . . . . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
Connecting to a FortiAnalyzer unit using Automatic Discovery. . . . . . . . . . . . . 572 Uploading logs to a FortiAnalyzer or a FortiGuard Analysis server . . . . . . . . . . 573
575
575 576 576 577 577 578 578 578 579 579 579 579 580 580 582 582 583 583 584 585 586 586
Configuring logging of FortiGate activity on your FortiGate unit Enabling logging within a firewall policy . . . . . . . . . . Enabling logging of events . . . . . . . . . . . . . . . . . Enabling SQL logging . . . . . . . . . . . . . . . . . . . Configuring IPS packet logging . . . . . . . . . . . . . . Configuring NAC quarantine logging . . . . . . . . . . . .
Viewing log messages and archives . . . . . . . . . . . . . . . . . . Viewing log messages from the web-based manager and CLI . . Downloading log messages and viewing them from your computer Viewing log messages using the log table . . . . . . . . . . . . . Monitoring the recording activity of logs on the FortiGate unit . . .
Customizing the display of log messages . . . . . . . . . . . . . . . . . . . . . . . 586 Filtering and customizing application control log messages example . . . . . . . 587 Alert email messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 Configuring an alert email message . . . . . . . . . . . . . . . . . . . . . . . . 587 Configuring an alert email for notification of FortiGuard license expiry . . . . . . 589
591
Using log messages to help when issues arise . . . . . . . . . . . . . . . . . . . . 591 HA log messages indicate lost neighbor information. . . . . . . . . . . . . . . . 591 Alert email test configuration issues example . . . . . . . . . . . . . . . . . . . 592
26
Detailed Contents
How to use log messages to help verify settings and for testing purposes. Verifying to see if a network scan was performed example . . . . . . Testing for the FortiGuard license expiry log message example. . . . Using diag log test to verify logs are sent to a log device . . . . . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
Reports
Configuring a FortiOS report . . . . . . . . . . . . . . . . . . . Modifying the default FortiOS report . . . . . . . . . . . . . Configuring charts, datasets, themes and styles for a report Configuring a report layout . . . . . . . . . . . . . . . . . . Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . Importing images for the report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
595
596 596 599 602 603 606
Viewing reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606 Report example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607 Report for analyzing web activity on the FortiGate unit . . . . . . . . . . . . . . 607
Chapter 5
615 617
Establish a baseline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617 Define the problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618 Gathering Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618 Search for a solution . . . . . . . . . . . . . . Technical Documentation . . . . . . . . . Release Notes . . . . . . . . . . . . . . . Knowledge Base . . . . . . . . . . . . . . Fortinet Technical Discussion Forums . . . Fortinet Training Services Online Campus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 619 619 619 619 619
Create a troubleshooting plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 Providing Supporting Elements . . . . . . . . . . . . . . . . . . . . . . . . . . 620 Obtain any required additional equipment . . . . . . . . . . . . . . . . . . . . . . . 620 Ensure you have administrator level access to required equipment . . . . . . . . . . 621 Contact Fortinet customer support for assistance . . . . . . . . . . . . . . . . . . . 621
27
Detailed Contents
Troubleshooting tools
FortiOS diagnostics. . . . . . . . Check date and time . . . . . Resource usage . . . . . . . Processes . . . . . . . . . . Proxy operation. . . . . . . . Hardware NIC . . . . . . . . Conserve mode . . . . . . . Traffic trace. . . . . . . . . . Session table . . . . . . . . . Firewall session setup rate . . Finding object dependencies . Flow trace . . . . . . . . . . Packet sniffer . . . . . . . . . Debug command . . . . . . . Other commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
623
623 624 624 625 626 627 630 631 631 634 635 637 641 643 645
FortiGate ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647 Diagnostic commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648 FortiAnalyzer/FortiManager ports . . . . . . . . . . . . . . . . . . . . . . . . . 648 FortiGuard troubleshooting . . . . . . . . . . . . . . Troubleshooting process for FortiGuard updates FortiGuard server settings . . . . . . . . . . . . FortiGuard URL rating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649 649 650 651
653
Fortinet Global Customer Services Organization. . . . . . . . . . . . . . . . . . . . 653 Creating an account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654 Registering a device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654 Reporting problems. . . . . . . . . . . . . Logging online tickets . . . . . . . . . Following up on online tickets . . . . . Telephoning a technical support center Support priority levels. Priority 1 . . . . . Priority 2 . . . . . Priority 3 . . . . . Priority 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 656 659 659 661 661 661 661 661
28
Detailed Contents
Troubleshooting connectivity
Common issues and questions . . . . . . . . . . . . . . . Check hardware connections . . . . . . . . . . . . . Check FortiOS network settings . . . . . . . . . . . . Check CPU and memory resources . . . . . . . . . . Check modem status . . . . . . . . . . . . . . . . . . Run ping and traceroute . . . . . . . . . . . . . . . . Check the logs . . . . . . . . . . . . . . . . . . . . . Verify the contents of the routing table (in NAT mode). Check the bridging information in Transparent mode . Perform a sniffer trace . . . . . . . . . . . . . . . . . Debug the packet flow . . . . . . . . . . . . . . . . . Check number of sessions used by UTM proxy . . . . Examine the firewall session list . . . . . . . . . . . . Other diagnose commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
665
665 666 667 668 669 670 674 674 675 676 678 679 683 684
Troubleshooting advanced
Traffic shaping issues . . . . . . . . . . . . . . . . . . . . . . . . . . . Use traffic shapers to limit traffic in testing . . . . . . . . . . . . . . . Monitoring traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . Displaying configured traffic shaping . . . . . . . . . . . . . . . . . . Troubleshooting protocols and users using traffic shaping. . . . . . . Displaying current bandwidth and dropped packets for a traffic shaper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
685
685 686 686 686 687 688
User and administrator logon issues . . . . . . . . . . . . . . . . . . . . . . . . . . 689 User logon issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 Administrator logon issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691 IPSec VPN issues . . . . . . . . . . . . . . VPN negotiations appear to be slow . . . VPN tunnel proposal will not connect . . Other useful VPN IKE related commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693 693 694 696
699
exec tac report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700 get firewall iprope appctrl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702 get firewall iprope list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 get firewall proute. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704 get firewall shaper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705
29
Detailed Contents
get hardware cpu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707 get hardware nic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708 get hardware memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710 get hardware npu list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711 get hardware npu performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713 get hardware npu status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715 get hardware status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717 get ips session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718 get router info kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719 get router info routing-table all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720 get system arp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721 get system auto-update status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722 get system auto-update versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724 get system ha status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726 get system performance firewall . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728 get system performance status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729 get system performance top . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730 get system session-helper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732 get system session-info full-stat . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 get system session-info list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737 get system session-info ttl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740 get system startup-error-log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741 get system status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742 get test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743 get test urlfilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747 get vpn ipsec stats crypto. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748 get vpn ipsec stats tunnel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749 get vpn ipsec tunnel details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750 get vpn ipsec tunnel summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 752 get vpn status ssl hw-acceleration-status . . . . . . . . . . . . . . . . . . . . . . . 753 get vpn status ssl list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754 get webfilter ftgd-statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755 get webfilter status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757
30
Detailed Contents
759
759 759 759 760 760 760 761 761 761 762 762 762 762 763 763
Chapter 6
765 767
767 767 767 768 768 768 768 768 768
Network defense
Blocking external probes . . . . . Address sweeps . . . . . . . Port scans . . . . . . . . . . Probes using IP traffic options Evasion techniques. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
771
771 771 772 772 774
Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 771
31
Detailed Contents
Defending against DoS attacks. . . . . . . . . . . . . . . The three-way handshake . . . . . . . . . . . . . . SYN flood. . . . . . . . . . . . . . . . . . . . . . . . SYN spoofing. . . . . . . . . . . . . . . . . . . . . . DDoS SYN flood . . . . . . . . . . . . . . . . . . . . Configuring the SYN threshold to prevent SYN floods . SYN proxy . . . . . . . . . . . . . . . . . . . . . . . Other flood types . . . . . . . . . . . . . . . . . . . . Traffic inspection . . . . . . . . IPS signatures . . . . . . . Suspicious traffic attributes. DoS policies . . . . . . . . Application control . . . . . Content inspection and filtering. AntiVirus . . . . . . . . . . FortiGuard Web Filtering . . Email filter . . . . . . . . . DLP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
775 776 776 777 777 778 778 779 779 779 780 780 780 781 781 781 782 782
AntiVirus
Antivirus concepts . . . . . . . . How antivirus scanning works Antivirus scanning order . . . Antivirus databases . . . . . Antivirus techniques . . . . . FortiGuard Antivirus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
783
783 783 784 786 787 787 787 788 788 789 789 790 790 790 791 792 792 793 793 793
Enable antivirus scanning . . . . . . . . . . . . . Viewing antivirus database information . . . . Changing the default antivirus database . . . . Overriding the default antivirus database . . . Adding the antivirus profile to a security policy. Configuring the scan buffer size . . . . . . . . Configuring archive scan depth . . . . . . . . Configuring a maximum allowed file size. . . . Configuring client comforting . . . . . . . . . . Enable the file quarantine . . . . . General configuration steps . . Configuring the file quarantine . Viewing quarantined files. . . . Downloading quarantined files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
32
Detailed Contents
Antivirus examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794 Configuring simple antivirus protection. . . . . . . . . . . . . . . . . . . . . . . 794 Protecting your network against malicious email attachments . . . . . . . . . . . 796
Email filter
799
Email filter concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799 Email filter techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799 Order of spam filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801 Enable email filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802 Configure email traffic types to inspect . . . . . . . . . . . . . . . . . . . . . . . . . 802 Configure the spam action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802 Configure the tag location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803 Configure the tag format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803 Configure FortiGuard email filters . . . . . . . . . Enabling FortiGuard IP address checking . . . Enabling FortiGuard URL checking . . . . . . Enabling FortiGuard phishing URL detection . Enabling FortiGuard email checksum checking Enabling FortiGuard spam submission. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804 804 804 804 805 805 806 806 807 808 809 809 810
Configure local email filters . . . . . . . . . . . . . . Enabling IP address black/white list checking . . Enabling HELO DNS lookup . . . . . . . . . . . Enabling email address black/white list checking Enabling return email DNS checking . . . . . . . Enabling banned word checking . . . . . . . . . How content is evaluated. . . . . . . . . . . . .
Email filter examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812 Configuring simple antispam protection . . . . . . . . . . . . . . . . . . . . . . 812 Blocking email from a user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813
Intrusion protection
815
33
Detailed Contents
Enable IPS scanning . . . . . . . . . . . . . . . . . . General configuration steps . . . . . . . . . . . . Creating an IPS sensor. . . . . . . . . . . . . . . Creating an IPS filter . . . . . . . . . . . . . . . . Updating predefined IPS signatures . . . . . . . . Viewing and searching predefined IPS signatures . Creating a signature entry . . . . . . . . . . . . . Creating a custom IPS signature . . . . . . . . . . Custom signature syntax and keywords . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
IPS processing in an HA cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830 Active-passive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831 Active-active . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831 Configure IPS options . . . . . . . . . . . . Configuring the IPS engine algorithm . . Configuring the IPS engine-count . . . . Configuring fail-open . . . . . . . . . . . Configuring the session count accuracy . Configuring the IPS buffer size . . . . . . Configuring protocol decoders . . . . . . Configuring security processing modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831 831 831 832 832 832 832 833
Enable IPS packet logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 833 IPS examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834 Configuring basic IPS protection . . . . . . . . . . . . . . . . . Using IPS to protect your web server . . . . . . . . . . . . . . Create and test a packet logging IPS sensor . . . . . . . . . . Creating a custom signature to block access to example.com. . Creating a custom signature to block the SMTP vrfy command Configuring a Fortinet Security Processing module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834 835 837 839 840 842
Web filter
847
Web filter concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847 Different ways of controlling access . . . . . . . . . . . . . . . . . . . . . . . . 849 Order of web filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849 Web content filter . . . . . . . . . . . . . . . . . . . . . . . . . . . General configuration steps . . . . . . . . . . . . . . . . . . . Creating a web filter content list . . . . . . . . . . . . . . . . . How content is evaluated. . . . . . . . . . . . . . . . . . . . . Enabling the web content filter and setting the content threshold URL filter . . . . . . . . . . . . URL filter actions . . . . . . General configuration steps Creating a URL filter list . . Configuring a URL filter list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849 850 850 851 851 852 853 855 855 855
34
Detailed Contents
SafeSearch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856 Advanced web filter configuration ActiveX filter . . . . . . . . . Cookie filter. . . . . . . . . . Java applet filter . . . . . . . Web resume download block. Block Invalid URLs . . . . . . HTTP POST action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856 856 856 856 857 857 857
861
Before you begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861 FortiGuard Web Filter and your FortiGate unit . . . . . . . . . . . . . . . . . . . . . 862 Order of web filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 862 Enable FortiGuard Web Filter . . . . . . . . . . . . General configuration steps . . . . . . . . . . . Configuring FortiGuard Web Filter settings . . . Configuring FortiGuard Web Filter usage quotas Checking quota usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 864 864 864 865 867 867 867 867 867 867 868 868 868
Advanced FortiGuard Web Filter configuration . . . . . . . . . . . . . . Provide Details for Blocked HTTP 4xx and 5xx Errors . . . . . . . . Rate Images by URL (blocked images will be replaced with blanks) Allow Websites When a Rating Error Occurs . . . . . . . . . . . . Strict Blocking . . . . . . . . . . . . . . . . . . . . . . . . . . . . Rate URLs by Domain and IP Address . . . . . . . . . . . . . . . Block HTTP Redirects by Rating . . . . . . . . . . . . . . . . . . . Daily log of remaining quota . . . . . . . . . . . . . . . . . . . . .
Add or change FortiGuard Web Filter ratings . . . . . . . . . . . . . . . . . . . . . 868 Create FortiGuard Web Filter overrides . . . . . . . . . . . . . . . . . . . . . . . . 869 Understanding administrative and user overrides . . . . . . . . . . . . . . . . . 869 Customize categories and ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . 869 Creating local categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869 Customizing site ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 870 FortiGuard Web Filter examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 870 Configuring simple FortiGuard Web Filter protection. . . . . . . . . . . . . . . . 870 School district . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871
35
Detailed Contents
873
873 873 873 874 874 874 874 874 874 874 874 875 875
Enable data leak prevention . . . General configuration steps . Creating a DLP sensor . . . . Adding filters to a DLP sensor
DLP document fingerprinting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878 Fingerprinted Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878 File filter. . . . . . . . . . . . . General configuration steps Creating a file filter list . . . Creating a file pattern . . . Creating a file type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880 880 880 881 881
Advanced rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881 Understanding the default advanced rules . . . . . . . . . . . . . . . . . . . . . 881 Creating advanced rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 882 Compound rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883 Understanding the default compound rules . . . . . . . . . . . . . . . . . . . . 883 Creating compound rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883 DLP archiving. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884 DLP examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884 Blocking sensitive email messages . . . . . . . . . . . . . . . . . . . . . . . . 884
Application control
Enable application control . . . . . . . . . . . . General configuration steps . . . . . . . . . Creating an application sensor . . . . . . . . Adding applications to an application sensor. Understanding the default application sensor Viewing and searching the application list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
887
888 888 888 888 891 891
36
Detailed Contents
Application traffic shaping . . . . . . . Enabling application traffic shaping Reverse direction traffic shaping . . Shaper re-use . . . . . . . . . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
Application control monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 894 Enabling application control monitor . . . . . . . . . . . . . . . . . . . . . . . . 894 Application control packet logging . . . . . . . . . . . . . . . . . . . . . . . . . . . 895 Application considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896 IM applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896 Skype. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896 Application control examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896 Blocking all instant messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . 896 Allowing only software updates . . . . . . . . . . . . . . . . . . . . . . . . . . 897
DoS policy
Enable DoS . . . . . . . . . . . . . . . . . Creating and configuring a DoS sensor Creating a DoS policy . . . . . . . . . Apply an IPS sensor to a DoS policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
899
899 899 901 902
905
Endpoint Control overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 905 User experience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 905 Configuration overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907 Configuring FortiClient required version and download location . . . . . . . . . . . . 907 About application detection and control FortiClient application rules . . . . Other application rules . . . . . . . The All application rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 909 909 909 909 910 910 912 912 914
About predefined profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 910 Creating an endpoint control profile . . . . . Setting endpoint FortiClient requirements Setting the default action for applications Adding application detection entries . . . Viewing the application database . . . .
37
Detailed Contents
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
916 916 916 916 918 918 918 918 919 920
Modifying Endpoint Security replacement pages . . . . . . . . . . . . . . . . . . . . 917 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring FortiClient download source and required version Creating an endpoint control profile . . . . . . . . . . . . . . Configuring FortiClient application detection entries . . . . . . Configuring application detection entries for other applications Configuring the firewall policy . . . . . . . . . . . . . . . . .
Vulnerability Scan
Selecting assets to scan . . . . . . . . . . . Discovering assets . . . . . . . . . . . . Adding assets manually . . . . . . . . . Requirements for authenticated scanning Viewing scan results . . . . . . . . . . . Viewing scan logs . . . . . . . . . . Viewing Executive Summary graphs . Creating reports . . . . . . . . . . . Viewing reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
923
923 923 924 926 930 930 931 931 932
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 923
Sniffer policy
933
Sniffer policy concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 933 The sniffer policy list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 933 Before you begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 934 Enable one-arm sniffing . . . . . General configuration steps . Designating a sniffer interface Creating a sniffer policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 935 935 936 936
941
38
Detailed Contents
Conserve mode. . . . . . . . . . . . . . The AV proxy . . . . . . . . . . . . . Entering and exiting conserve mode . Conserve mode effects. . . . . . . . Configuring the av-failopen command
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
SSL content scanning and inspection . . . . . . . . . . . . . . . . . . . . . . . . . 943 Setting up certificates to avoid client warnings . . . . . . . . . . . . . . . . . . . 944 SSL content scanning and inspection settings . . . . . . . . . . . . . . . . . . . 945 Viewing and saving logged packets . . . . . . . . . . . . . . . . . . . . . . . . . . 946 Configuring packet logging options. . . . . . . . . . . . . . . . . . . . . . . . . 947 Using wildcards and Perl regular expressions . . . . . . . . . . . . . . . . . . . . . 948
Chapter 7
951 953
953 953 954 955 956
Types of authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 956 Firewall authentication (identity-based policies) . . . . . . . . . . . . . . . . . . 956 VPN authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 957 Users view of authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 959 Web-based user authentication . . . . . . . . . . . . . . . . . . . . . . . . . . 959 VPN client-based authentication . . . . . . . . . . . . . . . . . . . . . . . . . . 960 FortiGate administrators view of authentication . . . . . . . . . . . . . . . . . . . . 960
961
961 961 963 964 965 966 967 968 968 968
User groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . User Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Firewall user groups . . . . . . . . . . . . . . . . . . . . . . . . . . . Fortinet Single Sign-On (FSSO) user groups . . . . . . . . . . . . . . SSL VPN user groups . . . . . . . . . . . . . . . . . . . . . . . . . . Dynamically assigning VPN client IP addresses from a user group
39
Detailed Contents
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
FortiToken . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 975 FortiToken configuration settings. . . . . . . . . . . . . . . . . . . . . . . . . . 975 Fortinet Single Sign On Agent (FSSO) . . . . . . . . . . . . . . . . . . . . . . . . . 976 Fortinet Single Sign-on Agent configuration settings. . . . . . . . . . . . . . . . 977 PKI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 978 Peer users and peer groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . 980 Monitor . . . . . . . . . . Firewall monitor list . . IM user monitor list . . The Banned User list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 980 980 981 982
Authentication servers
985
RADIUS servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 985 Configuring the FortiGate unit to use a RADIUS server . . . . . . . . . . . . . . 987 LDAP servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Components and topology . . . . . . . . . . . . . . . . . . . . . LDAP Information hierarchy . . . . . . . . . . . . . . . . . . . . Configuring the FortiGate unit to use an LDAP server . . . . . . . Example wildcard admin accounts - CLI . . . . . . . . . . . . Example of LDAP to allow Dial-in through member-attribute - CLI. Troubleshooting LDAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 989 989 990 991 993 995 996
TACACS+ servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 997 Configuring a TACACS+ server on the FortiGate unit . . . . . . . . . . . . . . . 997 FSSO servers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 998 RSA ACE (SecurID) servers . . . . . . . . . . . . . Components . . . . . . . . . . . . . . . . . . . Configuring the SecurID system . . . . . . . . . Using the SecurID user group for authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 998 . 998 . 999 1000
1003
1003 1004 1006 1007 1009 1014
40
Detailed Contents
User groups. . . . . . . . . . . . . . . . . . Firewall user groups . . . . . . . . . . . FSSO user groups . . . . . . . . . . . . Configuring Peer user groups . . . . . . Viewing, editing and deleting user groups
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
1023
Authentication timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1023 Security authentication timeout. . . . . . . . . . . . . . . . . . . . . . . . . . 1023 SSL VPN authentication timeout . . . . . . . . . . . . . . . . . . . . . . . . . 1023 Password policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1024 Authentication protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1025 Authentication in security policies . . . . . . . . Enabling authentication protocols . . . . . . Authentication replacement messages. . . . Access to the Internet . . . . . . . . . . . . Configuring authentication security policies . Identity-based policy . . . . . . . . . . . . . FSSO authentication . . . . . . . . . . . . . NTLM authentication . . . . . . . . . . . . . Certificate authentication . . . . . . . . . . . Dynamic profile . . . . . . . . . . . . . . . . Restricting number of concurrent user logons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1026 1026 1027 1029 1029 1032 1033 1034 1035 1036 1036 1036 1037 1037 1039 1040
VPN authentication . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring authentication of SSL VPN users . . . . . . . . . . Configuring authentication of remote IPsec VPN users . . . . . Configuring authentication of PPTP VPN users and user groups Configuring authentication of L2TP VPN users/user groups . . .
Certificate-based authentication
Certificates overview . . . . . . . . . . . Certificates and protocols . . . . . . IPsec VPNs and certificates . . . . . Certificate types on the FortiGate unit Certificate signing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1041
1042 1042 1043 1043 1044
41
Detailed Contents
Managing X.509 certificates . . . . . . . . . . . . . . . . . . . . . . . . Generating a certificate signing request . . . . . . . . . . . . . . . . Generating certificates with CA software. . . . . . . . . . . . . . . . Obtaining a signed server certificate from an external CA . . . . . . . Installing a CA root certificate and CRL to authenticate remote clients Online updates to certificates and CRLs . . . . . . . . . . . . . . . . Backing up and restoring local certificates . . . . . . . . . . . . . . . Configuring certificate-based authentication . . . . . . . . . Authenticating administrators with security certificates . Authenticating SSL VPN users with security certificates Authenticating IPsec VPN users with security certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
1044 1045 1046 1047 1047 1048 1050 1051 1051 1052 1052
Example Generate a CSR on the FortiGate unit . . . . . . . . . . . . . . . . . 1053 Example Generate and Import CA certificate with private key pair on OpenSSL . 1054 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1054 Generating and importing the CA certificate and private key . . . . . . . . . . 1054 Example Generate an SSL certificate in OpenSSL Assumptions . . . . . . . . . . . . . . . . . . . Generating a CA signed SSL certificate . . . . . Generating a self-signed SSL certificate . . . . . Import the SSL certificate into FortiOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1055 1055 1055 1056 1056
1059
Introduction to FSSO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1059 Using FSSO in a Windows AD environment . . . . . . . . . . . . . . . . . . . 1060 Using FSSO in a Novell eDirectory environment. . . . . . . . . . . . . . . . . 1066 FSSO for Windows AD . . . . . . . . . . FSSO components for Windows AD . Standard versus Advanced mode . . Installing FSSO for Windows AD . . . Updating FSSO with Windows AD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1066 1066 1067 1067 1070 1071 1071 1072 1074 1076 1076 1078 1078 1079 1080
Configuring Fortinet Single Sign On with Windows AD. . . . . . . . Configuring Windows AD server user groups . . . . . . . . . . Configuring Collector agent settings . . . . . . . . . . . . . . . Configuring Directory Access settings . . . . . . . . . . . . . . Configuring the Ignore User List . . . . . . . . . . . . . . . . . Configuring FortiGate group filters . . . . . . . . . . . . . . . . Configuring FSSO ports . . . . . . . . . . . . . . . . . . . . . Configuring alternate user IP address tracking. . . . . . . . . . Viewing FSSO component status . . . . . . . . . . . . . . . . Selecting Domain Controllers and working mode for monitoring.
42
Detailed Contents
FSSO for Novell eDirectory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1080 FSSO components for Novell eDirectory. . . . . . . . . . . . . . . . . . . . . 1080 Installing FSSO for Novell . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1080 Configuring FSSO on FortiGate units . . . . . . . . . . . . . . Configuring LDAP server access. . . . . . . . . . . . . . . Specifying your Collector agents or Novell eDirectory agents Selecting Windows user groups (LDAP only) . . . . . . . . Viewing information imported from the Windows AD server . Creating Fortinet Single Sign-On (FSSO) user groups. . . . Creating security policies. . . . . . . . . . . . . . . . . . . Enabling guest access through FSSO security policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1081 1082 1084 1084 1085 1086 1087 1089
FortiOS FSSO log messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1089 Enabling authentication event logging . . . . . . . . . . . . . . . . . . . . . . 1089 Viewing FSSO log messages . . . . . . . . . . . . . . . . . . . . . . . . . . 1090 Testing FSSO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1092 Troubleshooting FSSO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General troubleshooting tips for FSSO. . . . . . . . . . . . . . . . . . . User status Not Verified on the Collector agent . . . . . . . . . . . . . After initial configuration, there is no connection to the Collector agent . . FortiGate performance is slow on a large network with many users . . . . Users from the Windows AD network are not able to access the network . Users on a particular computer (IP address) can not access the network . Guest users do not have access to network . . . . . . . . . . . . . . . . Cant find the DCagent service . . . . . . . . . . . . . . . . . . . . . . . User logon events not received by FSSO Collector agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1092 1093 1094 1094 1095 1095 1096 1096 1096 1096 1097
1099
1099 1100 1101 1101 1103 1104 1105
Configuring dynamic profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1106 Make dynamic profiles visible . . . . . . . . . . . . . . . . . . . . . . . . . . 1107 RADIUS server configuration for dynamic profiles . . . . . . . . . . . . . . . . 1107 Configuring dynamic profile-based security policies . . . . . . . . . . . . . . . . . 1111 chapter of FortiOS HandbookConfiguration concepts . . . . . . . . . . . . . . 1112
43
Detailed Contents
Configuring end points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring end points - CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . Controlling MMS service access based on a users end point - FortiCarrier Only Blocking access to the network based on end points - FortiOS Carrier only. . . Extracting carrier end points for notifications - FortiOS Carrier only . . . . . . .
Timeout options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1121 Log settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1123 HTTP header options - FortiOS Carrier only . . . . . . . . . . . . . . How FortiOS Carrier applies HTTP header options . . . . . . . . Configuring end point HTTP header options - FortiOS Carrier only Example: How FortiOS Carrier applies end point prefix options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1123 1123 1124 1125
Carrier end point filters and blocking . . . . . . . . . . . . . . . . . . . . . . . . . 1126 Controlling access to MMS services based on a users carrier end point . . . . 1126 Blocking network access for IP addresses based on carrier end points . . . . . 1128 Troubleshooting dynamic profiles . . . . . . . . . . . . . . . . . . . . . . . . . . 1130 General dynamic profile troubleshooting . . . . . . . . . . . . . . . . . . . . . 1131 Dynamic profile related diag commands . . . . . . . . . . . . . . . . . . . . . 1131
1133
Monitoring firewall users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1133 Monitoring SSL VPN users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1133 Monitoring IPsec VPN users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1134
1135
1135 1135 1136 1136 1137 1139 1139 1142 1143 1143 1143 1144 1144 1145 1146 1150
LDAP Dial-in using member-attribute. . . . . . . . . . . . . . . . . . . . . . . . . 1141 Dynamic Profile example . . . . . . . . . . . . . . . . . . . . . . . . Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General configuration . . . . . . . . . . . . . . . . . . . . . . . Configuring RADIUS . . . . . . . . . . . . . . . . . . . . . . . . Configuring FortiGate interfaces . . . . . . . . . . . . . . . . . . Configuring dynamic profile RADIUS server on FortiGate . . . . . Configuring FortiGate regular and dynamic profile security policies Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
44
Detailed Contents
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1151
Chapter 8
1153 1155
IP packets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1155 VPN tunnels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1156 VPN gateways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1157 Clients, servers, and peers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1159 Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1160 Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1160 Phase 1 and Phase 2 settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1161 Phase 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1161 Phase 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1161 Security Association . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1162
1163
About FortiGate VPNs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1163 Different types of VPNs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1163 Planning your VPN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1164 Network topologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1164 Choosing policy-based or route-based VPNs . . . . . . . . . . . . . . . . . . . . 1165 General preparation steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1166 How to use this guide to configure an IPsec VPN . . . . . . . . . . . . . . . . . . 1166
Gateway-to-gateway configurations
1167
Configuration overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1167 General configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1169 Configuring the two VPN peers. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1169 Configuring Phase 1 and Phase 2 for both peers . . . . . . . . . . . . . . . . 1169 Creating security policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1170 How to work with overlapping subnets . . . . . . . . . . . . . . . . . . . . . . . . 1174 Solution for route-based VPN . . . . . . . . . . . . . . . . . . . . . . . . . . 1174 Solution for policy-based VPN . . . . . . . . . . . . . . . . . . . . . . . . . . 1176 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1178
45
Detailed Contents
Hub-and-spoke configurations
Configuration overview . . . . . . . . . . . . . Hub-and-spoke infrastructure requirements Spoke gateway addressing. . . . . . . . . Protected networks addressing . . . . . . Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1183
1183 1184 1184 1184 1185 1185 1185 1186 1187 1188
Configure the hub. . . . . . . . . . . . . . . . . . . . . . . . . . . . Define the hub-spoke VPNs . . . . . . . . . . . . . . . . . . . . Define the hub-spoke security policies . . . . . . . . . . . . . . . Configuring communication between spokes (policy-based VPN) . Configuring communication between spokes (route-based VPN) .
Configure the spokes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1189 Configuring security policies for hub-to-spoke communication. . . . . . . . . . 1189 Configuring security policies for spoke-to-spoke communication . . . . . . . . 1190 Dynamic spokes configuration example . . . . . . . . . . . . . . . . . . . . . . . 1192 Configure the hub (FortiGate_1) . . . . . . . . . . . . . . . . . . . . . . . . . 1192 Configure the spokes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1195
1197
Dynamic DNS over VPN concepts . . . . . . . . . . . . . . . . . . . . . . . . . . 1197 Dynamic DNS (DDNS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1197 Dynamic DNS over VPN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1198 Dynamic DNS topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1199 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1200 General configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1200 Configure the dynamically-addressed VPN peer . . . . . . . . . . . . . . . . . . . 1201 Configuring branch_2 VPN tunnel settings. . . . . . . . . . . . . . . . . . . . 1201 Configuring branch_2 security policies . . . . . . . . . . . . . . . . . . . . . . 1202 Configure the fixed-address VPN peer . . . . . . . . . . . . . . . . . . . . . . . 1206 Configuring branch_1 VPN tunnel settings. . . . . . . . . . . . . . . . . . . . 1206 Configuring branch_1 security policies . . . . . . . . . . . . . . . . . . . . . . 1207 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1209
46
Detailed Contents
1211
1211 1212 1212 1213 1213 1215 1216 1216 1218 1219
FortiClient-to-FortiGate VPN configuration steps . . . . . . . . . . . . . . . . . . 1216 Configure the FortiGate unit . . . . . . . . . . . . . . . . Configuring FortiGate unit VPN settings . . . . . . . . Configuring the FortiGate unit as a VPN policy server . Configuring DHCP service on the FortiGate unit . . . .
Configure the FortiClient Endpoint Security application . . . . . . . . . . . . . . . 1221 Configuring FortiClient to work with VPN policy distribution . . . . . . . . . . . 1221 Configuring FortiClient manually . . . . . . . . . . . . . . . . . . . . . . . . . 1221 Adding XAuth authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1222 FortiClient dialup-client configuration example . . . . . . . . . . . . . . . . . . . . 1223 Configuring FortiGate_1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1223 Configuring the FortiClient Endpoint Security application . . . . . . . . . . . . 1226
1229
Configuration overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1229 FortiGate dialup-client infrastructure requirements . . . . . . . . . . . . . . . 1231 FortiGate dialup-client configuration steps . . . . . . . . . . . . . . . . . . . . . . 1232 Configure the server to accept FortiGate dialup-client connections . . . . . . . . . 1232 Configure the FortiGate dialup client . . . . . . . . . . . . . . . . . . . . . . . . . 1234
1237
Automatic configuration overview . . . . . . . . . . . . . . . . . . . . . . . . . . 1237 IKE Mode Config overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1237 Configuring IKE Mode Config. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1237 Configuring an IKE Mode Config client. . . . . . . . . . . . . . . . . . . . . . 1238 Configuring an IKE Mode Config server . . . . . . . . . . . . . . . . . . . . . 1238 Example: FortiGate unit as IKE Mode Config server . . . . . . . . . . . . . . . . . 1239 Example: FortiGate unit as IKE Mode Config client . . . . . . . . . . . . . . . . . 1240
47
Detailed Contents
Internet-browsing configuration
1241
Configuration overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1241 Creating an Internet browsing security policy . . . . . . . . . . . . . . . . . . . . 1242 Routing all remote traffic through the VPN tunnel . . . . . . . . . . . . . . . . . . 1243 Configuring a FortiGate remote peer to support Internet browsing . . . . . . . 1243 Configuring a FortiClient application to support Internet browsing . . . . . . . . 1244
1245
Configuration overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1245 General configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . 1246 Configure the VPN peers - route-based VPN . . . . . . . . . . . . . . . . . . . . 1247 Redundant route-based VPN configuration example. . . . . . . . . . . . . . . . . 1249 Configuring FortiGate_1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1249 Configuring FortiGate_2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1255 Partially-redundant route-based VPN example. . . . . . . . . . . . . . . . . . . . 1260 Configuring FortiGate_1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1261 Configuring FortiGate_2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1264 Creating a backup IPsec interface . . . . . . . . . . . . . . . . . . . . . . . . . . 1267
1269
Configuration overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1269 Transparent VPN infrastructure requirements . . . . . . . . . . . . . . . . . . 1272 Configure the VPN peers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1273
Manual-key configurations
1277
Configuration overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1277 Specify the manual keys for creating a tunnel . . . . . . . . . . . . . . . . . . . . 1278
1279
Overview of IPv6 IPsec support . . . . . . . . . . . . . . . . . . . . . . . . . . . 1279 Certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1279 Configuring IPv6 IPsec VPNs Phase 1 configuration . . Phase 2 configuration . . Security policies . . . . . Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1280 1280 1280 1280 1280
48
Detailed Contents
Site-to-site IPv6 over IPv6 VPN example. . Configure FortiGate A interfaces . . . . Configure FortiGate A IPsec settings . Configure FortiGate A security policies Configure FortiGate A routing . . . . . Configure FortiGate B . . . . . . . . . Site-to-site IPv4 over IPv6 VPN example. . Configure FortiGate A interfaces . . . . Configure FortiGate A IPsec settings . Configure FortiGate A security policies Configure FortiGate A routing . . . . . Configure FortiGate B . . . . . . . . . Site-to-site IPv6 over IPv4 VPN example. . Configure FortiGate A interfaces . . . . Configure FortiGate A IPsec settings . Configure FortiGate A security policies Configure FortiGate A routing . . . . . Configure FortiGate B . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
1281 1281 1282 1282 1283 1283 1284 1285 1285 1285 1286 1286 1287 1288 1288 1288 1289 1289
1291
1292 1292 1293 1294 1295 1299 1299 1299 1299 1300 1300
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1291
Configuring the Windows PC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1298 Troubleshooting . . . . . . . . . . . . . . . . Quick checks . . . . . . . . . . . . . . . . Mac OS X and L2TP . . . . . . . . . . . . Setting up logging . . . . . . . . . . . . . Understanding the log messages . . . . . Using the FortiGate unit debug commands
1303
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1304 1304 1304 1306 1307 1309
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1303 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
49
Detailed Contents
Configuring the Cisco router . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1309 Troubleshooting . . . . . . . . . . . Quick checks . . . . . . . . . . . Setting up logging . . . . . . . . Understanding the log messages Using diagnostic commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1310 1310 1310 1310 1311
1313
1314 1314 1315 1315
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1313
Creating a redundant configuration. . . . . . . . . . . . . . . . . . . . . . . . . . 1319 Adding the second IPsec tunnel . . . . . . . . . . . . . . . . . . . . . . . . . 1319 Adding the OSPF interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1319
1321
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1321 Defining the tunnel ends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1321 Choosing main mode or aggressive mode . . . . . . . . . . . . . . . . . . . . . . 1322 Choosing the IKE version. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1322 Authenticating the FortiGate unit . . . . . . . . . . . . . . . . . . . . . . . . . . . 1323 Authenticating the FortiGate unit with digital certificates . . . . . . . . . . . . . 1323 Authenticating the FortiGate unit with a pre-shared key . . . . . . . . . . . . . 1324 Authenticating remote peers and clients . . . . . . . . . . . . . . Enabling VPN access for specific certificate holders . . . . . Enabling VPN access by peer identifier . . . . . . . . . . . . Enabling VPN access with user accounts and pre-shared keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1325 1326 1328 1329
Defining IKE negotiation parameters . . . . . . . . . . . . . . . . . . . . . . . . . 1330 Generating keys to authenticate an exchange . . . . . . . . . . . . . . . . . 1331 Defining IKE negotiation parameters . . . . . . . . . . . . . . . . . . . . . . . 1332 Using XAuth authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1334 Using the FortiGate unit as an XAuth server . . . . . . . . . . . . . . . . . . . 1335 Using the FortiGate unit as an XAuth client . . . . . . . . . . . . . . . . . . . 1336
Phase 2 parameters
1337
50
Detailed Contents
Advanced phase 2 settings . P2 Proposal . . . . . . Replay detection . . . . Perfect forward secrecy Keylife . . . . . . . . . Auto-negotiate . . . . . Autokey Keep Alive. . . DHCP-IPsec . . . . . . Quick mode selectors .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
Configure the phase 2 parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 1341 Specifying the phase 2 parameters . . . . . . . . . . . . . . . . . . . . . . . 1341
1343
Defining policy addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1343 Defining VPN security policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1344 Defining an IPsec security policy for a policy-based VPN . . . . . . . . . . . . 1344 Defining security policies for a route-based VPN . . . . . . . . . . . . . . . . 1347
1349
1349 1349 1350 1350 1350
IPsec offloading configuration examples . . . . . . . . . . . . . . . . . . . . . . . 1351 Accelerated route-based VPN configuration . . . . . . . . . . . . . . . . . . . 1351 Accelerated policy-based VPN configuration. . . . . . . . . . . . . . . . . . . 1353
1355
Monitoring VPN connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1355 Monitoring connections to remote peers . . . . . . . . . . . . . . . . . . . . . 1355 Monitoring dialup IPsec connections . . . . . . . . . . . . . . . . . . . . . . . 1355 Monitoring IKE sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1356 Testing VPN connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1357 Testing VPN connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1357 Troubleshooting VPN connections . . . . . . . . . . . . . . . . . . . . . . . . 1358 Logging VPN events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1359 VPN troubleshooting tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1361 General troubleshooting tips . . . . . . . . . . . . . . . . . . . . . . . . . . . 1362 A word about NAT devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1363
FortiOS Handbook v3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
51
Detailed Contents
Chapter 9
1365 1367
1368 1368 1369 1370 1370 1370 1370 1370 1371 1371 1371 1371 1372 1373 1373 1374
1377
SSL VPN and IPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1378 General configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1378 Configuring SSL VPN settings . . . . . . . . . . . . . . . . . . . . . Enabling SSL VPN operation. . . . . . . . . . . . . . . . . . . . Specifying an IP address range for tunnel-mode clients . . . . . Adding WINS and DNS services for clients . . . . . . . . . . . . Setting the idle timeout setting . . . . . . . . . . . . . . . . . . . Setting the client authentication timeout . . . . . . . . . . . . . . Specifying the cipher suite for SSL negotiations . . . . . . . . . Enabling strong authentication through X.509 security certificates Changing the port number for web portal connections . . . . . . Customizing the web portal login page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1378 1379 1379 1380 1381 1381 1381 1382 1383 1383
52
Detailed Contents
Configuring SSL VPN web portals . . Before you begin . . . . . . . . . Configuring tunnel mode settings The Session Information widget . The Bookmarks widget . . . . . . The Connection Tool widget . . . Host checking . . . . . . . . . . Windows OS check . . . . . . . . Configuring cache cleaning . Configuring virtual desktop . . Configuring client OS Check . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
1385 1385 1388 1391 1391 1393 1394 1396 1396 1397 1398
Configuring user accounts and user groups for SSL VPN . . . . . . . . . . . . . . 1399 Creating user accounts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1399 Creating a user group for SSL VPN users . . . . . . . . . . . . . . . . . . . . 1400 Configuring security policies . . . . . . . . . . Configuring firewall addresses . . . . . . . Configuring the SSL VPN security policy. . Configuring the tunnel mode security policy Adding an Internet browsing policy. . . . . Enabling connection to an IPsec VPN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1400 1401 1402 1404 1405 1406
SSL VPN logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1407 Monitoring active SSL VPN sessions. . . . . . . . . . . . . . . . . . . . . . . . . 1409 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1410
1411
Connecting to the FortiGate unit . . . . . . . . . . . . . . . . . . . . . . . . . . . 1411 Web portal overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1412 Applications available in the web portal . . . . . . . . . . . . . . . . . . . . . 1413 Using the Bookmarks widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1413 Adding bookmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1414 Using the Connection Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1415 Tunnel-mode features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1421 Using the SSL VPN Virtual Desktop . . . . . . . . . . . . . . . . . . . . . . . . . 1421 Using FortiClient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1422 FortiClient for Windows configuration . . . . . . . . . . . . . . . . . . . . . . 1422
53
Detailed Contents
1423
1423 1423 1423 1424 1425 1425 1425 1425 1425 1425 1426 1427
Downloading the SSL VPN tunnel mode client . . . . . . . . . . . . . . . . . . . . 1424 Installing the tunnel mode client Windows . . . . . . . . . . Linux . . . . . . . . . . . . MAC OS client . . . . . . . Using the tunnel mode client Windows client . . . . . Linux client . . . . . . . MAC OS X client . . . . . . . . . . . .
Examples
Basic SSL VPN example . . . . . . . . . . . . . . . . . . . . . . . General configuration steps . . . . . . . . . . . . . . . . . . . Creating the firewall addresses . . . . . . . . . . . . . . . . . Enabling SSL VPN and setting the tunnel user IP address range Creating the web portal. . . . . . . . . . . . . . . . . . . . . . Creating the user account and user group . . . . . . . . . . . . Creating the security policies. . . . . . . . . . . . . . . . . . . Add routing to tunnel mode clients . . . . . . . . . . . . . . . . Multiple user groups with different access permissions example General configuration steps . . . . . . . . . . . . . . . . . Creating the firewall addresses . . . . . . . . . . . . . . . Creating the web portals . . . . . . . . . . . . . . . . . . . Creating the user accounts and user groups. . . . . . . . . Creating the security policies. . . . . . . . . . . . . . . . . Create the static route to tunnel mode clients . . . . . . . . Enabling SSL VPN operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1429
1429 1430 1430 1431 1431 1432 1433 1434 1435 1435 1436 1437 1438 1439 1441 1442
54
Detailed Contents
1443 1445
1445 1445 1446 1446 1451 1452 1454 1455 1456 1458 1458 1458 1460 1461 1464
ECMP route failover and load balancing . . . . . . . . . . . . . . . . Route priority . . . . . . . . . . . . . . . . . . . . . . . . . . . Equal-Cost Multi-Path (ECMP) . . . . . . . . . . . . . . . . . . . Configuring interface status detection for gateway load balancing. Configuring spillover or usage-based ECMP. . . . . . . . . . . . Configuring weighted static route load balancing . . . . . . . . .
Static routing tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1465 Policy Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1466 Adding a policy route . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1466 Moving a policy route. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1468 Transparent mode static routing . . . . . . . . . . . . . . . . . . . . . . . . . . . 1469
1471
1471 1471 1472 1474 1474 1474 1477 1479
55
Detailed Contents
1487
1487 1487 1488 1493 1498 1498 1501 1501 1502 1502 1504 1504 1511 1515 1515 1515 1515 1517 1517 1519 1520 1520
Troubleshooting RIP . . . . . . . . . . . . . Routing Loops . . . . . . . . . . . . . . Split horizon and Poison reverse updates Debugging IPv6 on RIPng . . . . . . . .
RIP routing examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1502 Simple RIP example . . . . . . . . . . . . . . . . . . Network layout and assumptions. . . . . . . . . . General configuration steps . . . . . . . . . . . . Configuring the FortiGate units system information Configuring FortiGate unit RIP router information . Configuring other networking devices . . . . . . . Testing network configuration . . . . . . . . . . . RIPng RIP and IPv6 . . . . . . . . . . . . . . . . . Network layout and assumptions. . . . . . . . . . General configuration steps . . . . . . . . . . . . Configuring the FortiGate units system information Configuring RIPng on FortiGate units . . . . . . . Configuring other network devices . . . . . . . . . Testing the configuration . . . . . . . . . . . . . .
1523
BGP background and concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . 1523 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1523 Parts and terminology of BGP . . . . . . . . . . . BGP and IPv6 . . . . . . . . . . . . . . . . . Roles of routers in BGP networks . . . . . . . Confederations . . . . . . . . . . . . . . . . . Network Layer Reachability Information (NLRI) BGP attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1523 1524 1525 1528 1529 1530
How BGP works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1533 IBGP versus EBGP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1533 BGP path determination which route to use. . . . . . . . . . . . . . . . . . 1533 Troubleshooting BGP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1536 Clearing routing table entries. . . . . . . . . . . . . . . . . . . . . . . . . . . 1536 Route flap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1536
56
Detailed Contents
BGP routing examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1540 Dual-homed BGP example . . . . . . . . Network layout and assumptions. . . General configuration steps . . . . . Configuring the FortiGate unit . . . . Configuring other networking devices Testing this configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1540 1542 1543 1544 1552 1552
Redistributing and blocking routes in BGP . . . . . . . . . . . . . . . . . . . . . . 1553 Network layout and assumptions. . . . . . . . . . . . . . . . . . . . . . . . . 1554
1561
1561 1561 1561 1567 1572 1572 1572 1572 1573 1573 1573 1574 1575 1575 1577 1577 1579 1585 1585 1586 1586 1588 1588 1591 1595 1595
Troubleshooting OSPF . . . . . . . . . . . . . . Clearing OSPF routes from the routing table. Checking the state of OSPF neighbors . . . Passive interface problems. . . . . . . . . . Timer problems. . . . . . . . . . . . . . . . Bi-directional Forwarding Detection (BFD) . . Authentication issues. . . . . . . . . . . . . DR and BDR election issues . . . . . . . . . Basic OSPF example . . . . . . . . . . . . . Network layout and assumptions. . . . . General configuration steps . . . . . . . Configuring the FortiGate units. . . . . . Configuring OSPF on the FortiGate units Configuring other networking devices . . Testing network configuration . . . . . . Advanced inter-area OSPF example . . . . . Network layout and assumptions. . . . . General configuration steps . . . . . . . Configuring the FortiGate units. . . . . . Configuring OSPF on the FortiGate units Configuring other networking devices . . Testing network configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Controlling redundant links by cost . . . . . . . . . . . . . . . . . . . . . . . . . . 1596 Adjusting the route costs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1597 Verifying route redundancy. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1598
57
Detailed Contents
1599
IS-IS background and concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . 1599 Background. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1599 How IS-IS works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1599 Troubleshooting IS-IS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1601 Routing Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1601 Split horizon and Poison reverse updates . . . . . . . . . . . . . . . . . . . . 1603 Simple IS-IS example. . . . . . . . . . . . . . . . . . . . . . . . . General configuration steps . . . . . . . . . . . . . . . . . . . Configuring FortiGate hostnames, interfaces, and default routes Configuring FortiGate unit IS-IS router information . . . . . . . Configuring other networking devices . . . . . . . . . . . . . . Testing network configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1604 1605 1605 1610 1612 1612
1613 1615
1616 1616 1616 1616 1617 1617 1617 1618 1620 1621 1627 1631 1633 1634 1634 1635 1636 1637 1637
58
Detailed Contents
1641
1641 1641 1642 1645 1647 1648 1649 1649 1650 1650 1651 1653 1655 1658
1659
1659 1660 1660 1661 1661 1662 1663 1663 1664 1664 1664 1665 1665 1666 1666 1671 1675 1676
Example of VDOMs in Transparent mode . . Network topology and assumptions . . . General configuration steps . . . . . . . Configuring common items . . . . . . . . Creating virtual domains . . . . . . . . . Configuring the Company_A VDOM . . . Configuring the Company_B VDOM . . . Configuring the VLAN switch and router . Testing the configuration . . . . . . . . .
59
Detailed Contents
Inter-VDOM routing
Benefits of inter-VDOM routing . . . . . . . . . . Freed-up physical interfaces . . . . . . . . . More speed than physical interfaces . . . . . Continued support for secure firewall policies Configuration flexibility . . . . . . . . . . . . Getting started with VDOM links Viewing VDOM links . . . . Creating VDOM links . . . . Deleting VDOM links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1679
1679 1679 1680 1680 1680 1681 1681 1682 1684 1684 1685 1685 1686 1687
Inter-VDOM configurations . . . . . . . Standalone VDOM configuration . . Independent VDOMs configuration. Management VDOM configuration . Meshed VDOM configuration. . . .
Dynamic routing over inter-VDOM links . . . . . . . . . . . . . . . . . . . . . . . 1688 HA virtual clusters and VDOM links . . . . . . . . . . . . . . . . . . . . . . . . . 1689 What is virtual clustering? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1689 Example of inter-VDOM routing . . . . . . . Network topology and assumptions . . . General configuration steps . . . . . . . Creating the VDOMs . . . . . . . . . . . Configuring the physical interfaces. . . . Configuring the VDOM links . . . . . . . Configuring the firewall and UTM settings Testing the configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1691 1691 1692 1692 1693 1694 1696 1713
1715
1715 1715 1715 1715 1715 1716 1716 1716
FortiGate unit running very slowly . . . . . . . . . . . . . Too many VDOMs . . . . . . . . . . . . . . . . . . . One or more VDOMs are consuming all the resources Too many UTM features in use . . . . . . . . . . . .
General VDOM tips and troubleshooting . . . . . . . . . . . . . . . . . . . . . . . 1716 Perform a sniffer trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1716 Debug the packet flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1718
60
Detailed Contents
1721 1725
FortiGate Cluster Protocol (FGCP) . . . . . . . . . . . . . . . . . . . . . . . . . . 1725 TCP session synchronization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1726 VRRP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1726
1729
1729 1731 1731 1731 1731 1731 1732
Configuring a FortiGate unit for FGCP HA operation. . . . . . . . . . . . . . . . . 1732 Connecting a FortiGate HA cluster . . . . . . . . . . . . . . . . . . . . . . . . 1734 Active-passive and active-active HA . . . . . . . . . . . . . . . . . . . . . . . . . 1735 Active-passive HA (failover protection). . . . . . . . . . . . . . . . . . . . . . 1735 Active-active HA (load balancing and failover protection) . . . . . . . . . . . . 1736 Identifying the cluster and cluster units . Group name . . . . . . . . . . . . Password . . . . . . . . . . . . . . Group ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1736 1737 1737 1737 1738 1739 1740 1743 1745 1745 1745 1746 1747 1748 1748 1749
Device failover, link failover, and session failover . . . . . . . . . . . . . . . . . . 1737 Primary unit selection. . . . . . . . . . . . . . . . . . . . Primary unit selection and monitored interfaces . . . . Primary unit selection and age . . . . . . . . . . . . . Primary unit selection and device priority . . . . . . . Primary unit selection and FortiGate unit serial number Points to remember about primary unit selection . . .
HA override . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Override and primary unit selection . . . . . . . . . . . . . . . . . . . . . Controlling primary unit selection using device priority and override. . . . . Points to remember about primary unit selection when override is enabled . Configuration changes can be lost if override is enabled . . . . . . . . . . Override and disconnecting a unit from a cluster . . . . . . . . . . . . . .
FortiGate HA compatibility with PPPoE and DHCP . . . . . . . . . . . . . . . . . 1749 Hard disk configuration and HA . . . . . . . . . . . . . . . . . . . . . . . . . . . 1750
FortiOS Handbook v3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
61
Detailed Contents
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
1757
About the procedures in this chapter . . . . . . . . . . . . . . . . . . . . . . . . . 1757 Example: NAT/Route mode active-passive HA configuration . . . . . . . . . . . . 1757 Example NAT/Route mode HA network topology . . . . . . . . . . . . . . . . 1758 General configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . 1758 Configuring a NAT/Route mode active-passive cluster of two FortiGate-620B units web-based manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1759 Configuring a NAT/Route mode active-passive cluster of two FortiGate-620B units CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1763 Example: Transparent mode active-active HA configuration . . . . . . . . . . . . . 1768 Example Transparent mode HA network topology . . . . . . . . . . . . . . . . 1769 General configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . 1769 Configuring a Transparent mode active-active cluster of two FortiGate-620B units web-based manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1770 Configuring a Transparent mode active-active cluster of two FortiGate-620B units - CLI 1774 Example: advanced Transparent mode active-active HA configuration . . . . . . . 1780 Example Transparent mode HA network topology . . . . . . . . . . . . . . . . 1780 Configuring a Transparent mode active-active cluster of three FortiGate-5005FA2 units - web-based manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1781 Configuring a Transparent mode active-active cluster of three FortiGate-5005FA2 units - CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1783 Example: converting a standalone FortiGate unit to a cluster . . . . . . . . . . . . 1788 Example: adding a new unit to an operating cluster . . . . . . . . . . . . . . . . . 1790 Example: replacing a failed cluster unit. . . . . . . . . . . . . . . . . . . . . . . . 1791 Example: HA and 802.3ad aggregated interfaces . . . . . . . . . . . . . . . . . . 1792 HA interface monitoring, link failover, and 802.3ad aggregation . . . . . . . . . 1792 HA MAC addresses and 802.3ad aggregation . . . . . . . . . . . . . . . . . . 1792 Link aggregation, HA failover performance, and HA mode . . . . . . . . . . . 1793 General configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . 1793 Configuring active-passive HA cluster that includes aggregated interfaces - web-based manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1794 Configuring active-passive HA cluster that includes aggregate interfaces - CLI . 1798
62
Detailed Contents
Example: HA and redundant interfaces . . . . . . . . . . . . . . . . . . . . . . . 1803 HA interface monitoring, link failover, and redundant interfaces . . . . . . . . . 1804 HA MAC addresses and redundant interfaces . . . . . . . . . . . . . . . . . . 1804 Connecting multiple redundant interfaces to one switch while operating in activepassive HA mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1804 Connecting multiple redundant interfaces to one switch while operating in active-active HA mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1804 General configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . 1805 Configuring active-passive HA cluster that includes redundant interfaces - web-based manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1805 Configuring active-passive HA cluster that includes redundant interfaces - CLI . 1809 Troubleshooting HA clusters . . . . . . . . . . . . Before you set up a cluster . . . . . . . . . . . Troubleshooting the initial cluster configuration More troubleshooting information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1814 1814 1814 1816
1819
1819 1819 1820 1820 1821
Configuring HA for virtual clustering . . . . . . . . . . . . . . . . . . . . . . . . . 1821 Example: virtual clustering with two VDOMs and VDOM partitioning . . . . . . . . 1823 Example virtual clustering network topology . . . . . . . . . . . . . . . . . . . 1823 General configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . 1824 Configuring virtual clustering with two VDOMs and VDOM partitioning - web-based manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1825 Configuring virtual clustering with two VDOMs and VDOM partitioning - CLI . . 1829 Example: inter-VDOM links in a virtual clustering configuration . . . . . . . . . . . 1836 Configuring inter-VDOM links in a virtual clustering configuration . . . . . . . . 1837 Troubleshooting virtual clustering . . . . . . . . . . . . . . . . . . . . . . . . . . 1838
1841
Full mesh HA overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1841 Full mesh HA and redundant heartbeat interfaces . . . . . . . . . . . . . . . . 1842 Full mesh HA, redundant interfaces and 802.3ad aggregate interfaces . . . . . 1843
63
Detailed Contents
Example: full mesh HA configuration . . . . . . . . . . . . . . . . . . . . . . . . . 1843 FortiGate-620B full mesh HA configuration . . . . . . . . . . . . . . . . . . . 1844 Full mesh switch configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 1844 Full mesh network connections . . . . . . . . . . . . . . . . . . . . . . . . . 1844 How packets travel from the internal network through the full mesh cluster and to the Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1845 Configuring FortiGate-620B units for HA operation - web-based manager . . . 1845 Configuring FortiGate-620B units for HA operation - CLI . . . . . . . . . . . . 1849 Troubleshooting full mesh HA . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1853
Operating a cluster
1855
Operating a cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1855 Operating a virtual cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1856 Managing individual cluster units using a reserved management interface . . . . . 1857 Configuring the reserved management interface and SNMP remote management of individual cluster units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1858 The primary unit acts as a router for subordinate unit management traffic . . . . . . 1862 Cluster communication with RADIUS and LDAP servers . . . . . . . . . . . . 1863 Clusters and FortiGuard services. . . . . . FortiGuard and active-passive clusters FortiGuard and active-active clusters . FortiGuard and virtual clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1863 1863 1863 1864
Clusters and logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1864 Viewing and managing log messages for individual cluster units . . . . . . . . 1864 HA log messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1866 Example log messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1866 Fortigate HA message "HA master heartbeat interface <intf_name> lost neighbor information". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1869 Clusters and SNMP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SNMP get command syntax for the primary unit . . . . . . . . . . . . . SNMP get command syntax for any cluster unit . . . . . . . . . . . . . Getting serial numbers of cluster units . . . . . . . . . . . . . . . . . . SNMP get command syntax - reserved management interface enabled . . . . . . . . . . . . . . . . . . . . 1871 1871 1873 1874 1874
Clusters and file quarantine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1874 Cluster members list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1876 Virtual cluster members list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1877 Viewing HA statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1878 Changing the HA configuration of an operating cluster. . . . . . . . . . . . . . . . 1879 Changing the HA configuration of an operating virtual cluster . . . . . . . . . . . . 1880 Changing the subordinate unit host name and device priority . . . . . . . . . . . . 1880
64
Detailed Contents
Upgrading cluster firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1881 Changing how the cluster processes firmware upgrades . . . . . . . . . . . . 1881 Synchronizing the firmware build running on a new cluster unit . . . . . . . . . 1882 Downgrading cluster firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1882 Backing up and restoring the cluster configuration . . . . . . . . . . . . . . . . . . 1883 Monitoring cluster units for failover . . . . . . . . . . . . . . . . . . . . . . . . . . 1884 Viewing cluster status from the CLI. . . . . . . . . . . . . . . . . . . Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About the HA cluster index and the execute ha manage command Managing individual cluster units. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1884 1886 1889 1891
Disconnecting a cluster unit from a cluster . . . . . . . . . . . . . . . . . . . . . . 1892 Adding a disconnected FortiGate unit back to its cluster . . . . . . . . . . . . . . . 1893
1895
1895 1896 1896 1896 1897
About active-active failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1897 Device failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1897 HA heartbeat and communication between cluster units . . . . . . . . Heartbeat interfaces . . . . . . . . . . . . . . . . . . . . . . . . Connecting HA heartbeat interfaces . . . . . . . . . . . . . . . . Heartbeat interfaces and FortiGate switch interfaces . . . . . . . Heartbeat packets and heartbeat interface selection . . . . . . . Interface index and display order. . . . . . . . . . . . . . . . . . HA heartbeat interface IP addresses. . . . . . . . . . . . . . . . Heartbeat packet Ethertypes . . . . . . . . . . . . . . . . . . . . Modifying heartbeat timing . . . . . . . . . . . . . . . . . . . . . Enabling or disabling HA heartbeat encryption and authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1898 1899 1900 1900 1900 1901 1901 1902 1903 1905
Cluster virtual MAC addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1905 Changing how the primary unit sends gratuitous ARP packets after a failover . 1906 How the virtual MAC address is determined . . . . . . . . . . . . . . . . . . . 1907 Displaying the virtual MAC address . . . . . . . . . . . . . . . . . . . . . . . 1908 Diagnosing packet loss with two FortiGate HA clusters in the same broadcast domain 1910
65
Detailed Contents
Synchronizing the configuration . . . . . . . . . . . . . . . . . . . . Disabling automatic configuration synchronization. . . . . . . . . Incremental synchronization . . . . . . . . . . . . . . . . . . . . Periodic synchronization . . . . . . . . . . . . . . . . . . . . . . Console messages when configuration synchronization succeeds Console messages when configuration synchronization fails . . . Comparing checksums of cluster units . . . . . . . . . . . . . . . How to diagnose HA out of sync messages . . . . . . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
Synchronizing routing table updates . . . . . . . . . . . . . . . . . . . . . . . . . 1918 Configuring graceful restart for dynamic routing failover . . . . . . . . . . . . . 1918 Controlling how the FGCP synchronizes routing updates . . . . . . . . . . . . 1919 Synchronizing IPsec VPN SAs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1920 Link failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . If a monitored interface on the primary unit fails . . . . . . . If a monitored interface on a subordinate unit fails . . . . . . How link failover maintains traffic flow . . . . . . . . . . . . Recovery after a link failover . . . . . . . . . . . . . . . . . Testing link failover . . . . . . . . . . . . . . . . . . . . . . Updating MAC forwarding tables when a link failover occurs Multiple link failures . . . . . . . . . . . . . . . . . . . . . Example link failover scenarios . . . . . . . . . . . . . . . Remote link failover. . . . . . . . . . . . . . . . . . . . . Adding HA remote IP monitoring to multiple interfaces Changing the ping server failover threshold . . . . . . Monitoring multiple IP addresses from one interface. . Flip timeout . . . . . . . . . . . . . . . . . . . . . . . Detecting HA remote IP monitoring failovers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1921 1923 1923 1924 1925 1925 1925 1926 1926 1927 1929 1930 1931 1931 1931
Session failover (session pick-up) . . . . . . . . . . . . . . . . . . . . . . . . . . 1932 Improving session synchronization performance. . . . . . . . . . . . . . . . . 1932 Session failover not supported for all sessions. . . . . . . . . . . . . . . . . . 1933 SIP session failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1934 Session failover and explicit web proxy, WCCP, and WAN optimization sessions . . 1935 Session failover and SSL offloading and HTTP multiplexing. . . . . . . . . . . 1935 IPsec VPN and SSL VPN sessions . . . . . . . . . . . . . . . . . . . . . . . 1935 PPTP and L2TP VPN sessions . . . . . . . . . . . . . . . . . . . . . . . . . 1935 Session failover and UDP, ICMP, multicast and broadcast packets . . . . . . . 1935 FortiOS Carrier GTP session failover . . . . . . . . . . . . . . . . . . . . . . 1936 Active-active HA subordinate units sessions can resume after a failover . . . . 1936 WAN optimization and HA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1936 Failover and attached network equipment . . . . . . . . . . . . . . . . . . . . . . 1937 Monitoring cluster units for failover . . . . . . . . . . . . . . . . . . . . . . . . . . 1937
66
Detailed Contents
NAT/Route mode active-passive cluster packet flow . Packet flow from client to web server . . . . . . Packet flow from web server to client . . . . . . When a failover occurs . . . . . . . . . . . . . . Transparent mode active-passive cluster packet flow Packet flow from client to mail server . . . . . . Packet flow from mail server to client . . . . . . When a failover occurs . . . . . . . . . . . . . . Failover performance . . . . . . Device failover performance Link failover performance . Reducing failover times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
1937 1938 1938 1939 1939 1940 1941 1941 1942 1942 1942 1942
1945
1945 1946 1947 1947 1947
. 1948
Configuring load balancing settings . . . . . . . . . . . . . . . . . . . . . . . . . 1949 Selecting a load balancing schedule . . . . . . . . . . . . . . . . . . . . . . . 1949 Load balancing UTM sessions and TCP sessions . . . . . . . . . . . . . . . . 1949 Configuring weighted-round-robin weights . . . . . . . . . . . . . . . . . . . . 1950 Dynamically optimizing weighted load balancing according to how busy cluster units are . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1951 NAT/Route mode active-active cluster packet flow. Packet flow from client to web server . . . . . Packet flow from web server to client . . . . . When a failover occurs . . . . . . . . . . . . . Transparent mode active-active cluster packet flow Packet flow from client to mail server . . . . . Packet flow from mail server to client . . . . . When a failover occurs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1955 1955 1956 1958 1958 1959 1960 1960
1963
Troubleshooting layer-2 switches. . . . . . . . . . . . . . . . . . . . . . . . . . . 1963 Forwarding delay on layer 2 switches . . . . . . . . . . . . . . . . . . . . . . 1964 Failover issues with layer-3 switches . . . . . . . . . . . . . . . . . . . . . . . . . 1964
67
Detailed Contents
Changing spanning tree protocol settings for some switches . . . . . . . . . . . . 1964 Spanning Tree protocol (STP) . . . . . . . . . . . . . . . . . . . . . . . . . . 1965 Bridge Protocol Data Unit (BPDU) . . . . . . . . . . . . . . . . . . . . . . . . 1965 Failover and attached network equipment . . . . . . . . . . . . . . . . . . . . . . 1965 Ethertype conflicts with third-party switches . . . . . . . . . . . . . . . . . . . . . 1965 LACP, 802.3ad aggregation and third-party switches . . . . . . . . . . . . . . . . 1966
VRRP
1967
Adding a VRRP virtual router to a FortiGate interface . . . . . . . . . . . . . . 1968 VRRP virtual MAC address . . . . . . . . . . . . . . . . . . . . . . . . . . . 1968 Configuring VRRP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1969 Example VRRP configuration: two FortiGate units in a VRRP group . . . . . . 1969 Example VRRP configuration: VRRP load balancing two FortiGate units and two VRRP groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1971 Optional VRRP configuration settings . . . . . . . . . . . . . . . . . . . . . . 1972
1973
Notes and limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1974 Configuring session synchronization . . . . . . . . . . . . . . . . . . . . . . . . . 1974 Configuring the session synchronization link . . . . . . . . . . . . . . . . . . . . . 1975 Basic example configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1976
1979 1981
Quality of Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1981 Traffic policing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1982 Bandwidth guarantee, limit, and priority interactions . . . . . . . . . . . . . . . . . 1983 FortiGate traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1984 Through traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1984 Important considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1988
1991
68
Detailed Contents
Shared policy shaping . . . . . . . . . . Per policy . . . . . . . . . . . . . . . All policies . . . . . . . . . . . . . . Maximum and guaranteed bandwidth Traffic priority . . . . . . . . . . . . . VLAN, VDOM and virtual interfaces .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
Per-IP shaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1993 Application control shaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1994 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1994 Shaping order of operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1995 Enabling in the security policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1995 Reverse direction traffic shaping . . . . . . . . . . . . . . . . . . . . . . . . . 1996 Application control shaper . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1996 Type of Service priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1996 TOS in FortiOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1998 Differentiated Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1998 DSCP examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1999 Tos and DSCP mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2003
Examples
2005
QoS using priority from security policies . . . . . . . . . . . . . . . . . . . . . . . 2005 Sample configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2006 QoS using priority from ToS or differentiated services . . . . . . . . . . . . . . . . 2007 Sample configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2008 Example setup for VoIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2008 Creating the traffic shapers. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2009 Creating security policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2010
Troubleshooting
Shaper diagnose commands . . . . . . . TOS command . . . . . . . . . . . . Shared shaper . . . . . . . . . . . . Per-IP shaper. . . . . . . . . . . . . Packet loss with statistics on shapers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2013
2013 2013 2014 2014 2015
Packet lost with the debug flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2015 Session list details with dual traffic shaper . . . . . . . . . . . . . . . . . . . . . . 2015 Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2016
69
Detailed Contents
2017 2019
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2019 MMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2019 GTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2019 MMS background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2020 MMS content interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2020 How MMS content interfaces are applied . . . . . . . . . . . . . . . . . . . . 2021 How FortiOS Carrier processes MMS messages . . . . . . . . . . . . . . . . . . 2023 FortiOS Carrier and MMS content scanning . . . . . . . . . . . . . . . . . . . 2023 FortiOS Carrier and MMS duplicate messages and message floods . . . . . . 2028 MMS protection profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2030 Bypassing MMS protection profile filtering based on users carrier end points . . . . 2031 Applying MMS protection profiles to MMS traffic . . . . . . . . . . . . . . . . . . . 2031 GTP basic concepts . . . . PDP Context . . . . . . GPRS security . . . . . Parts of a GTP network Radio access . . . . . . Transport . . . . . . . . Billing and records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2031 2032 2033 2034 2035 2035 2036
GPRS network common interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . 2037 Packet flow through the GPRS network . . . . . . . . . . . . . . . . . . . . . . . 2038
2041
2041 2050 2052 2054 2055 2056 2058 2059
2071
Why scan MMS messages for viruses and malware? . . . . . . . . . . . . . . . . 2071 Example: COMMWARRIOR . . . . . . . . . . . . . . . . . . . . . . . . . . . 2071
70
Detailed Contents
MMS virus scanning . . . . . . . . . . . . . . . . . . . . . . . . MMS virus monitoring . . . . . . . . . . . . . . . . . . . . . MMS virus scanning blocks messages (not just attachments) . Scanning MM1 retrieval messages. . . . . . . . . . . . . . . Configuring MMS file filtering. . . . . . . . . . . . . . . . . . Removing or replacing blocked messages . . . . . . . . . . . Carrier Endpoint Block . . . . . . . . . . . . . . . . . . . . . MMS Content Checksum. . . . . . . . . . . . . . . . . . . . Passing or blocking fragmented messages . . . . . . . . . . Client comforting . . . . . . . . . . . . . . . . . . . . . . . . Server comforting . . . . . . . . . . . . . . . . . . . . . . . Handling oversized MMS messages . . . . . . . . . . . . . . MM1 sample messages . . . . . . . . . . . . . . . . . . . . Configuring MMS virus scanning . . . . . . . . . . . . . . . . MMS file filtering . . . . . . . . . . . . . . . . . . . . . . . . Built-in patterns and supported file types. . . . . . . . . . MMS file filtering blocks messages (not just attachments) . Configuring MMS file filtering. . . . . . . . . . . . . . . . Configuring sender notifications . . . . . . . . . . . . . . MMS content-based Antispam protection . . . . . Overview . . . . . . . . . . . . . . . . . . . . Scores and thresholds . . . . . . . . . . . . . Configuring content-based antispam protection Configuring sender notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
2072 2073 2073 2073 2073 2074 2074 2076 2077 2077 2078 2078 2079 2080 2082 2082 2085 2085 2086 2088 2088 2089 2089 2089
MMS DLP archiving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2091 Configuring MMS DLP archiving . . . . . . . . . . . . . . . . . . . . . . . . . 2091 Viewing DLP archives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2092
2093
Setting message flood thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . 2094 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2094 Flood actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2095 Notifying administrators of floods . . . . . . . . . . . . . . . . . . . . . . . . . . . 2095 Example three flood threshold levels with different actions for each threshold . . 2096 Notifying message flood senders and receivers . . . . . . . . . . . . . . . . . . . 2098 Responses to MM1 senders and receivers . . . . . . . . . . . . . . . . . . . 2098 Forward responses for MM4 message floods . . . . . . . . . . . . . . . . . . 2099 Viewing DLP archived messages. . . . . . . . . . . . . . . . . . . . . . . . . . . 2100 Order of operations: flood checking before duplicate checking . . . . . . . . . . . 2100 Bypassing message flood protection based on users carrier end points . . . . . . 2100 Configuring message flood detection. . . . . . . . . . . . . . . . . . . . . . . . . 2100
71
Detailed Contents
Sending administrator alert notifications . . . . . . . . . . . . . . . . . . . . . . . 2102 Configuring how and when to send alert notifications . . . . . . . . . . . . . . 2102 Configuring who to send alert notifications to . . . . . . . . . . . . . . . . . . 2104
2105
Using message fingerprints to identify duplicate messages . . . . . . . . . . . . . 2106 Messages from any sender to any recipient . . . . . . . . . . . . . . . . . . . . . 2106 Setting duplicate message thresholds . . . . . . . . . . . . . . . . . . . . . . . . 2106 Duplicate message actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2107 Notifying duplicate message senders and receivers . . . . . . . . . . . . . . . . . 2107 Responses to MM1 senders and receivers . . . . . . . . . . . . . . . . . . . 2107 Forward responses for duplicate MM4 messages . . . . . . . . . . . . . . . . 2108 Viewing DLP archived messages. . . . . . . . . . . . . . . . . . . . . . . . . . . 2109 Order of operations: flood checking before duplicate checking . . . . . . . . . . . 2109 Bypassing duplicate message detection based on users carrier end points. . . . . 2109 Configuring duplicate message detection . . . . . . . . . . . . . . . . . . . . . . 2109 Sending administrator alert notifications . . . . . . . . . . . . . . . . . . . . . . . 2110 Configuring how and when to send alert notifications . . . . . . . . . . . . . . 2110 Configuring who to send alert notifications to . . . . . . . . . . . . . . . . . . 2112
2113
Changing replacement messages . . . . . . . . . . . . . . . . . . . . . . . . . . 2113 Multimedia content for MMS replacement messages . . . . . . . . . . . . . . . . 2114 MMS replacement message types . . . . . . . . . . . . . . . . . . . . . . . . . . 2116 Replacement message tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2116 Replacement message groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2118
2121
2121 2121 2122 2122 2122
Configuring General Settings on the FortiOS Carrier unit . . . . . . . . . . . . . . 2123 Configuring Encapsulated Filtering in FortiOS Carrier . . . . . . . . . . . . . . . . 2123 Configuring Encapsulated IP Traffic Filtering . . . . . . . . . . . . . . . . . . 2123 Configuring Encapsulated Non-IP End User Address Filtering . . . . . . . . . 2124 Configuring the Protocol Anomaly feature in FortiOS Carrier . . . . . . . . . . . . 2125
FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
72
Detailed Contents
Configuring Anti-overbilling in FortiOS Carrier . . . . . . . . . . . . . . . . . . . . 2125 Overbilling in GPRS networks . . . . . . . . . . . . . . . . . . . . . . . . . . 2125 Anti-overbilling with FortiOS Carrier . . . . . . . . . . . . . . . . . . . . . . . 2126 Logging events on the FortiOS Carrier unit. . . . . . . . . . . . . . . . . . . . . . 2126
2129
2129 2129 2130 2130
Configuring message type filtering in FortiOS Carrier . . . . . . . . . . . . . . . . 2131 Message Type Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2131
2135
IMSI on carrier networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2135 Other identity and location based information elements . . . . . . . . . . . . . . . 2136 When to use APN, IMSI, or advanced filtering . . . . . . . . . . . . . . . . . . 2138 Configuring APN filtering in FortiOS Carrier . . . . . . . . . . . . . . . . . . . . . 2138 Configuring IMSI filtering in FortiOS Carrier . . . . . . . . . . . . . . . . . . . . . 2139 Configuring advanced filtering in FortiOS Carrier . . . . . . . . . . . . . . . . . . 2140
Troubleshooting
2141
FortiOS Carrier diagnose commands. . . . . . . . . . . . . . . . . . . . . . . . . 2141 GTP related diagnose commands . . . . . . . . . . . . . . . . . . . . . . . . 2141 Applying Intrusion and Prevention System (IPS) signatures to IP packets within GTP-U tunnels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2142 GTP packets are not moving along your network . . . . . . . . . . Attempt to identify the section of your network with the problem. Ensure you have an APN configured. . . . . . . . . . . . . . . Check the logs and adjust their settings if required . . . . . . . Check the routing table. . . . . . . . . . . . . . . . . . . . . . Perform a sniffer trace . . . . . . . . . . . . . . . . . . . . . . Generate specific packets to test the network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2143 2143 2143 2143 2144 2145 2147
73
Detailed Contents
2149 2151
2151 2151 2152 2152 2152 2152 2152 2153 2153 2153 2153 2154 2154 2155 2156 2156 2156 2156 2158 2158
Security . . . . . . . . . . . . . . . . . . . . . Whether to broadcast SSID . . . . . . . . Encryption . . . . . . . . . . . . . . . . . Separate access for employees and guests Captive portal. . . . . . . . . . . . . . . . Power. . . . . . . . . . . . . . . . . . . . Monitoring for rogue APs . . . . . . . . . . Wireless networking equipment FortiWiFi units . . . . . . . FortiAP units . . . . . . . . Third-party WAPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2154
Deployment considerations. . . . . Types of wireless deployment . Deployment methodology . . . Single access point networks . Multiple access point networks .
2161
2161 2162 2162 2163
Setting your geographic location . . . . . . . . . . . . . . . . . . . . . . . . . . . 2163 Creating a custom AP Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2163 Defining a wireless network interface (SSID). Configuring DHCP for WiFi clients . . . . Configuring security . . . . . . . . . . . Adding a MAC filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2164 2165 2166 2169
74
Detailed Contents
Configuring user authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . 2170 WPA-Enterprise authentication. . . . . . . . . . . . . . . . . . . . . . . . . . 2170 Creating a wireless user group . . . . . . . . . . . . . . . . . . . . . . . . . . 2170 Configuring firewall policies for the SSID . . . . . . . . . . . . . . . . . . . . . . . 2171 Customizing captive portal pages . . . . . . . . . . . . . . . . . . . . . . . . . . 2172 Modifying the login page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2172 Modifying the login failed page . . . . . . . . . . . . . . . . . . . . . . . . . . 2173 Configuring the built-in access point on a FortiWiFi unit . . . . . . . . . . . . . . . 2174
2175
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2175 Network topology for managed APs . . . . . . . . . . . . . . . . . . . . . . . . . 2175 Discovering and authorizing APs . . . . . . . . . . . . . . . . . . . . . . . . . . . 2176 Configuring a managed AP. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2178 Updating FortiAP unit firmware. . . . . . . . . . . . . . . . . . . . . . . . . . 2179 Advanced WiFi controller discovery . . . . . Controller discovery methods . . . . . . Connecting to the FortiAP CLI . . . . . . Configuring a FortiWiFi unit as a WiFi AP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2181 2181 2182 2183
2185
2185 2186 2186 2187
2189
Windows XP client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2189 Windows 7 client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2193 Mac OS client. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2194 Linux client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2195 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2197 Checking that the client has received IP address and DNS server information . 2197
75
Detailed Contents
2199
2199 2199 2200 2201 2202 2204 2204 2204 2204 2205 2206 2208 2209 2211
A more complex example. . . . . . . . . . . . . . . . . . . Scenario . . . . . . . . . . . . . . . . . . . . . . . . . Configuration . . . . . . . . . . . . . . . . . . . . . . . Configuring authentication for employee wireless users . Configuring authentication for guest wireless users . . . Configuring the SSIDs . . . . . . . . . . . . . . . . . . Configuring the custom AP profile . . . . . . . . . . . . Configuring firewall policies . . . . . . . . . . . . . . . Connecting the FortiAP units . . . . . . . . . . . . . . .
Reference
2213
2217 2219
2220 2220 2221 2221 2222 2223 2225 2227 2227 2229 2229 2231 2232 2234 2234 2236 2239
SIP messages and media protocols . . . . . . . . . . SIP request messages . . . . . . . . . . . . . . . SIP response messages . . . . . . . . . . . . . . SIP message start line . . . . . . . . . . . . . . . SIP headers . . . . . . . . . . . . . . . . . . . . The SIP message body and SDP session profiles . Example SIP messages . . . . . . . . . . . . . .
The SIP session helper . . . . . . . . . . . . . . . . . . . . . . . . SIP session helper configuration overview . . . . . . . . . . . . Configuration example: SIP session helper in Transparent Mode SIP session helper diagnose commands. . . . . . . . . . . . .
76
Detailed Contents
The SIP ALG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SIP ALG configuration overview . . . . . . . . . . . . . . . . . . . Conflicts between the SIP ALG and the session helper . . . . . . . Stateful SIP tracking, call termination, and session inactivity timeout SIP and RTP/RTCP . . . . . . . . . . . . . . . . . . . . . . . . . How the SIP ALG creates RTP pinholes . . . . . . . . . . . . . . . Configuration example: SIP in Transparent Mode . . . . . . . . . . RTP enable/disable (RTP bypass) . . . . . . . . . . . . . . . . . . Opening and closing SIP register and non-register pinholes. . . . . Accepting SIP register responses . . . . . . . . . . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
2239 2241 2244 2245 2247 2247 2248 2251 2251 2252
How the SIP ALG performs NAT . . . . . . . . . . . . . . . . . . . . . . . . . . . 2253 Source address translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2253 Destination address translation . . . . . . . . . . . . . . . . . . . . . . . . . 2254 Call Re-invite messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2254 How the SIP ALG translates IP addresses in SIP headers . . . . . . . . . . . 2254 How the SIP ALG translates IP addresses in the SIP body . . . . . . . . . . . 2257 SIP NAT scenario: source address translation (source NAT) . . . . . . . . . . 2258 SIP NAT scenario: destination address translation (destination NAT) . . . . . . 2259 SIP NAT configuration example: source address translation (source NAT) . . . 2262 SIP NAT configuration example: destination address translation (destination NAT). . 2264 Additional SIP NAT scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . 2267 NAT with IP address conservation . . . . . . . . . . . . . . . . . . . . . . . . 2270 Controlling how the SIP ALG NATs SIP contact header line addresses . . . . . 2271 Controlling NAT for addresses in SDP lines . . . . . . . . . . . . . . . . . . . 2272 Translating SIP session destination ports . . . . . . . . . . . . . . . . . . . . 2272 Translating SIP sessions to multiple destination ports . . . . . . . . . . . . . . 2274 Enhancing SIP pinhole security . . . . . . . . . . . . . . . . . . . . . . . . . . . 2275 Hosted NAT traversal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2277 Configuration example: Hosted NAT traversal for calls between SIP Phone A and SIP Phone B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2278 Hosted NAT traversal for calls between SIP Phone A and SIP Phone C . . . . 2281 Restricting the RTP source IP . . . . . . . . . . . . . . . . . . . . . . . . . . 2282 SIP over IPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2282 Deep SIP message inspection . . . . . . . . . . . . . . . . Actions taken when a malformed message line is found. Logging and statistics . . . . . . . . . . . . . . . . . . Recommended configurations . . . . . . . . . . . . . . Configuring deep SIP message inspection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2283 2283 2284 2284 2285
Blocking SIP request messages . . . . . . . . . . . . . . . . . . . . . . . . . . . 2287 SIP rate limiting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2288 Limiting the number of SIP dialogs accepted by a security policy . . . . . . . . 2290 SIP logging and DLP archiving . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2290
77
Detailed Contents
SIP and HA: session failover and geographic redundancy . . . . . . . . . . . . . . 2290 SIP geographic redundancy . . . . . . . . . . . . . . . . . . . . . . . . . . . 2291 Support for RFC 2543-compliant branch parameters . . . . . . . . . . . . . . 2292 SIP and IPS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2292 SIP debugging . . . . . . . . SIP debug log format . . . SIP-proxy filter per VDOM SIP-proxy filter command SIP debug log filtering . . SIP debug setting . . . . SIP test commands. . . . Display SIP rate-limit data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2293 2293 2294 2294 2294 2295 2295 2296
2297
WAN optimization, web cache, explicit proxy, and WCCP concepts 2299
WAN optimization topologies . . . . . . . . . . . . . . . . . . Basic WAN optimization topologies . . . . . . . . . . . . Out-of-path topology . . . . . . . . . . . . . . . . . . . . Topology for multiple networks . . . . . . . . . . . . . . . WAN optimization with web caching . . . . . . . . . . . . WAN optimization and web caching with FortiClient peers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2300 2300 2301 2302 2303 2304
Explicit Web proxy topologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2305 Explicit FTP proxy topologies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2306 Web caching topologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2307 WCCP topologies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2309 WAN optimization client/server architecture . . . . . . WAN optimization peers . . . . . . . . . . . . . . Peer-to-peer and active-passive WAN optimization WAN optimization and the FortiClient application . Operating modes and VDOMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2309 2311 2311 2311 2312
WAN optimization tunnels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2312 Tunnel sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2313 Protocol optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2314 Byte caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2315 WAN optimization and HA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2315 WAN optimization, web caching and memory usage. . . . . . . . . . . . . . . . . 2315 Monitoring WAN optimization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2316
78
Detailed Contents
2319
Formatting the hard disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2319 Configuring WAN optimization and Web cache storage . . . . . . . . . . . . . . . 2320 Changing the amount of space allocated for WAN optimization and Web cache storage 2320 Adjusting the relative amount of disk space available for byte caching and web caching 2320
2323
Basic WAN optimization peer requirements . . . . . . . . . . . . . . . . . . . . . 2323 Accepting any peers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2323 How FortiGate units process tunnel requests for peer authentication . . . . . . . . 2324 Configuring peers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2325 Configuring authentication groups . . . . . . . . . . . . . . . . . . . . . . . . . . 2326 Secure tunneling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2328
2329
WAN optimization rules, security policies, and UTM protection . . . . . . . . . . . 2329 WAN optimization transparent mode . . . . . . . . . . . . . . . . . . . . . . . . . 2330 WAN optimization rule list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2330 How list order affects rule matching . . . . . . . . . . . . . . . . . . . . . . . 2332 Moving a rule to a different position in the rule list . . . . . . . . . . . . . . . . 2333 WAN optimization address formats. . . . . . . . . . . . . . . . . . . . . . . . . . 2333 Configuring WAN optimization rules . . . . . . . . . . . . . . . . . . . . . . . . . 2334 Processing non-HTTP sessions accepted by an HTTP rule . . . . . . . . . . . 2336 Processing unknown HTTP sessions . . . . . . . . . . . . . . . . . . . . . . 2337
2339
2339 2339 2340 2340 2342 2343
79
Detailed Contents
Example: Active-passive WAN optimization . . . . . . . . . . . . . . . . . . Network topology and assumptions . . . . . . . . . . . . . . . . . . . . General configuration steps . . . . . . . . . . . . . . . . . . . . . . . . Configuring basic active-passive WAN optimization - web-based manager Configuring basic active-passive WAN optimization - CLI . . . . . . . . . Testing and troubleshooting the configuration . . . . . . . . . . . . . . .
. . . . . .
. . . . . .
. . . . . .
Example: Adding secure tunneling to an active-passive WAN optimization configuration . 2353 Network topology and assumptions . . . . . . . . . . . . . . . . . . . . . . . 2353 General configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . 2353 Configuring WAN optimization with secure tunneling - web-based manager . . 2354 Configuring WAN optimization with secure tunneling - CLI . . . . . . . . . . . 2356
Web caching
2359
Web caching in security policies . . . . . . . . . . . . . . . . . . . . . . . . . . . 2360 Example: Web caching of Internet content for users on an internal network. . . 2360 Web Caching only WAN optimization . . . . . . . . . . . . . . . . . . . . . . . . 2363 Example: Web Cache Only WAN optimization . . . . . . . . . . . . . . . . . . 2363 Web caching for active-passive WAN optimization. . . . . . . . . . . . . . . . . . 2368 Example: Active-passive Web Caching . . . . . . . . . . . . . . . . . . . . . 2368 Web caching for peer-to-peer WAN optimization. . . . . . . . . . . . . . . . . . . 2373 Example: Peer-to-peer web caching . . . . . . . . . . . . . . . . . . . . . . . 2373 Exempting web sites from web caching . . . . . . . . . . . . . . . . . . . . . . . 2376 Changing web cache settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2377 Web Cache monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2380
2381
2381 2381 2382 2383 2390 2393 2400
80
Detailed Contents
2403
2404 2404 2405 2406 2407 2408 2408 2410 2410 2411
Example: SSL offloading and reverse proxy web caching for an Internet web server using static one-to-one virtual IPs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2412 Network topology and assumptions . . . . . . . . . . . . . . . . . . . . . . . 2412 General configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . 2413 Configuration steps - web-based manager. . . . . . . . . . . . . . . . . . . . 2414 Configuration steps - CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2416 Example: SSL offloading and reverse proxy web caching for an Internet web server using a port forwarding virtual IP for HTTPS traffic . . . . . . . . . . . . . . . . . . . . . 2418 Network topology and assumptions . . . . . . . . . . . . . . . . . . . . . . . 2418 General configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . 2420 Configuration steps - web-based manager. . . . . . . . . . . . . . . . . . . . 2420 Configuration steps - CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2423
2427
Configuring FortiClient WAN optimization . . . . . . . . . . . . . . . . . . . . . . 2427 FortiClient configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . 2428 FortiGate unit configuration steps . . . . . . . . . . . . . . . . . . . . . . . . 2428
2429
2431 2433 2434 2434 2434 2435 2435 2435 2436
Proxy chaining . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding a web proxy forwarding server . . . . . . . . . . . . . Web proxy forwarding server monitoring and health checking . Adding proxy chaining to an explicit web proxy security policy
81
Detailed Contents
Explicit web proxy authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . 2437 IP-Based authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2437 Per session authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2438 UTM features and the explicit web proxy . . . . . . . . . . . . . . . . . . Explicit web proxy sessions and protocol options . . . . . . . . . . . Explicit web proxy sessions web filtering and FortiGuard web filtering Explicit web proxy sessions and antivirus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2439 2439 2440 2440
Example: users on an internal network browsing the Internet through the explicit web proxy with web caching, RADIUS authentication, web filtering and virus scanning. . . . . 2441 General configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . 2441 Configuring the explicit web proxy - web-based manager . . . . . . . . . . . . 2442 Configuring the explicit web proxy - CLI . . . . . . . . . . . . . . . . . . . . . 2444 Testing and troubleshooting the configuration . . . . . . . . . . . . . . . . . . 2445 Explicit proxy sessions and user limits . . . . . . . . . . . . . . . . . . . . . . . . 2446
2449
How to use the explicit FTP proxy to connect to an FTP server . . . . . . . . . . . 2450 Configuration overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2452 Restricting the IP address of the explicit FTP proxy . . . . . . . . . . . . . . . 2455 Restricting the outgoing source IP address of the explicit FTP proxy . . . . . . 2455 UTM features and the explicit FTP proxy. . . . . . . . . . . . . . . . . . . . . . . 2455 Explicit FTP proxy sessions and protocol options . . . . . . . . . . . . . . . . 2455 Explicit FTP proxy sessions and antivirus . . . . . . . . . . . . . . . . . . . . 2456 Example: users on an internal network connecting to FTP servers on the Internet through the explicit FTP with RADIUS authentication and virus scanning . . . . . . . . . . 2456 General configuration steps . . . . . . . . . . . . . . . . . . . . . . . . . . . 2457 Configuring the explicit FTP proxy - web-based manager . . . . . . . . . . . . 2457 Configuring the explicit FTP proxy - CLI . . . . . . . . . . . . . . . . . . . . . 2458 Testing and troubleshooting the configuration . . . . . . . . . . . . . . . . . . 2459 Explicit FTP proxy sessions and user limits . . . . . . . . . . . . . . . . . . . . . 2462
FortiGate WCCP
2463
WCCP service groups, service numbers, service IDs and well known services . . . 2464 Example WCCP server and client configuration for caching HTTP sessions (service ID = 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2464 Example WCCP server and client configuration for caching HTTPS sessions . 2465 Example WCCP server and client configuration for caching HTTP and HTTPS sessions 2466 Other WCCP service group options . . . . . . . . . . . . . . . . . . . . . . . 2466 WCCP configuration overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2467
82
Detailed Contents
Example: caching HTTP sessions on port 80 using WCCP . . . . . . . . . . . . . 2468 Configuring the WCCP server (WCCP_srv) . . . . . . . . . . . . . . . . . . . 2469 Configuring the WCCP client (WCCP_client) . . . . . . . . . . . . . . . . . . 2470 Example: caching HTTP sessions on port 80 and HTTPS sessions on port 443 using WCCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2471 Configuring the WCCP server (WCCP_srv) . . . . . . . . . . . . . . . . . . . 2471 Configuring the WCCP client (WCCP_client) . . . . . . . . . . . . . . . . . . 2472 WCCP packet flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2473 Configuring the forward and return methods and adding authentication . . . . . . . 2473 WCCP Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2474 Troubleshooting WCCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2474 Real time debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2474 Application debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2474
WAN optimization, web cache, explicit proxy and WCCP get and diagnose commands 2477
get test {wa_cs | wa_dbd | wad | wad_diskd | wccpd} <test_level> . . . . . . . . . 2477 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2477 diagnose wad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2480 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2480 diagnose wacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2482 diagnose wadbd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2482 diagnose debug application {wa_cs | wa_dbd | wad | wad_diskd | wccpd} [<debug_level>] 2482
2483 2485
2485 2486 2486 2487 2488 2488 2489 2491 2491 2491 2492 2493
83
Detailed Contents
Basic load balancing configuration example . . . . . . . . . . . . . . . . . . . . . 2493 HTTP and HTTPS load balancing, multiplexing, and persistence HTTP and HTTPS multiplexing. . . . . . . . . . . . . . . . HTTP and HTTPS persistence . . . . . . . . . . . . . . . . HTTP host-based load balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2497 2497 2497 2499
SSL/TLS load balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2501 SSL offloading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2501 IP, TCP, and UDP load balancing . . . . . . . . . . . . . . . . . . . . . . . . . . 2509
2511
Example: HTTP load balancing to three real web servers . . . . . . . . . . . . . . 2511 Web-based manager configuration. . . . . . . . . . . . . . . . . . . . . . . . 2512 CLI configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2514 Example: Basic IP load balancing configuration . . . . . . . . . . . . . . . . . . . 2516 Example: Adding a server load balance port forwarding virtual IP . . . . . . . . . . 2517 Example: Weighted load balancing configuration . . . . . . . . . . . . . . . . . . 2518 Web-based manager configuration. . . . . . . . . . . . . . . . . . . . . . . . 2518 CLI configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2520 Example: HTTP and HTTPS persistence configuration . . . . . . . . . . . . . . . 2521 CLI configuration: adding persistence for a specific domain . . . . . . . . . . . 2524
2527 2529
Mounting the FortiGate unit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2529 Desk or table mounting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2529 Rack mounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2529 Plugging in the FortiGate unit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2538 Connecting to the network . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2538 Turning off the FortiGate unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2538 Further configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2539
2541
Configuring AMC modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2541 Auto-bypass and recovery for AMC bridge module . . . . . . . . . . . . . . . 2542 Enabling or disabling bypass mode for AMC bridge modules . . . . . . . . . . . . 2543
84
Detailed Contents
2545
How hardware acceleration alters packet flow . . . . . . . . . . . . . . . . . . . . 2545 Network processors overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2547 Network processor models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2547 Determining the network processors installed on your FortiGate unit . . . . . . 2548 Content processors overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2548 Determining the content processor in your FortiGate unit . . . . . . . . . . . . 2549 Security processing modules overview . . . . . . . . . . . . . Security processor module models. . . . . . . . . . . . . Displaying information about security processing modules Setting switch-mode mapping on the ADM-XD4 . . . . . . Configuring traffic offloading . . . . . . . . . . . . . . . Session fast path requirements . . . . . . . . . . . Packet fast path requirements . . . . . . . . . . . . Fast path connections for specific FortiGate models. Session offloading in HA active-active configuration . Configuring traffic shaping offloading . . . . . . . . Checking that traffic is offloaded . . . . . . . . . . . Disabling offloading . . . . . . . . . . . . . . . . . Multicast offloading / acceleration . . . . . . . . . . Configuring IPsec VPN offloading . . . . . . . . . . . IPsec offloading requirements . . . . . . . . . . . Configuring HMAC check offloading . . . . . . . . Configuring VPN encryption/decryption offloading . Examples of ASM-FB4 accelerated VPNs . . . . . Configuring IPS offloading . . . . . . . . . . . . . . Configuring pre-IPS anomaly detection . . . . . Configuring policy-based IPS on SP modules . . Configuring interface-based IPS on SP modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2550 2550 2550 2551 2551 2551 2552 2553 2554 2555 2556 2556 2556 2557 2557 2558 2558 2558 2562 2562 2563 2563
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2563 Accelerated tunnel mode IPsec . . . . . . . . . . . . . . . . . . . . . . . . . 2564 Accelerated interface mode IPsec . . . . . . . . . . . . . . . . . . . . . . . . 2566
Configuring RAID
2569
RAID levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2569 Configuring a RAID array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2570 Checking the status of a RAID array . . . . . . . . . . . . . . . . . . . . . . . . . 2571
85
Detailed Contents
Rebuilding a RAID array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2571 Why rebuild a RAID array? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2572 How to rebuild the RAID array . . . . . . . . . . . . . . . . . . . . . . . . . . 2572
2575
Example FortiBridge application . . . . . . . . . . . . . . . . . . . . . . . . . . . 2575 Connecting the FortiBridge unit . . . . . . . . . . . . . . . . . . . . . . . . . 2576 Normal mode operation. . . . . . . . . . . . . . . . . . How the FortiBridge unit monitors the FortiGate unit. Probes and FortiGate firewall policies . . . . . . . . Enabling probes to detect FortiGate hardware failure Enabling probes to detect FortiGate software failure. Probe interval and probe threshold. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2578 2578 2579 2580 2581 2581
Bypass mode operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2581 FortiBridge power failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2582 Example FortiGate HA cluster FortiBridge application . . . . . . . . . . . . . . . . 2582 Connecting the FortiBridge-2002 (copper gigabit ethernet) . . . . . . . . . . . 2583 Connecting the FortiBridge-2002F (fiber gigabit ethernet) . . . . . . . . . . . . 2584 Example configuration with other FortiGate interfaces . . . . . . . . . . . . . . . . 2584 Completing the basic FortiBridge configuration . . . . . . Adding an administrator password . . . . . . . . . . . Changing the management IP address . . . . . . . . Changing DNS server IP addresses . . . . . . . . . . Changing the default gateway and adding static routes Allowing management access to the EXT1 interface . Changing the system time and date . . . . . . . . . . Adding administrator accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2587 2587 2587 2588 2588 2589 2589 2589
Resetting to the factory default configuration. . . . . . . . . . . . . . . . . . . . . 2590 Installing FortiBridge unit firmware . . . . . . . . . . . . . . . . . . . . . . . . . . 2590 Changing firmware versions . . . . . . . . . . . . . . . . . . . . . . . . . . . 2590 Installing firmware from a system reboot . . . . . . . . . . . . . . . . . . . . . 2592 Example network configuration . . . . . . . . . . . Configuring FortiBridge probes. . . . . . . . . Probe settings . . . . . . . . . . . . . . . . . Enabling probes . . . . . . . . . . . . . . . . Verifying that probes are functioning . . . . . . Tuning the failure threshold and probe interval Configuring FortiBridge alerts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2595 2596 2597 2598 2599 2600 2600
Recovering from a FortiGate failure . . . . . . . . . . . . . . . . . . . . . . . . . 2603 Manually switching between FortiBridge operating modes . . . . . . . . . . . . . . 2604 Backing up and restoring the FortiBridge configuration . . . . . . . . . . . . . . . 2604
FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
86
Detailed Contents
2607 2609
Introduction to FIPS-CC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2609 Security level summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2609 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2609 Overview of Common Criteria compliant operation. . . . . . . . . . . . . . . . . . 2610 Use of non-FIPS-CC compliant features . . . . . . . . . . . . . . . . . . . . . 2610 Effects of FIPS-CC compliant mode . . . . . . . . . . . . . . . . . . . . . . . 2610 Initial configuration of the FortiGate unit . . . . . . . . . . . Installing the unit . . . . . . . . . . . . . . . . . . . . . Configuration of units with AMC cards . . . . . . . . . . Registering the unit. . . . . . . . . . . . . . . . . . . . Downloading and installing FIPS-CC compliant firmware Verifying the firmware version of the unit. . . . . . . . . A note about non FIPS-CC functionality . . . . . . . . . Enabling FIPS-CC mode . . . . . . . . . . . . . . . . . Configuring interfaces . . . . . . . . . . . . . . . . . . FIPS-CC mode status indicators . . . . . . . . . . . . . Administration . . . . . . . . . . . . . . . . . . . . . . . Administrator roles . . . . . . . . . . . . . . . . . . . Administrator accounts and profiles . . . . . . . . . . Remote access requirements . . . . . . . . . . . . . Disclaimer access banner . . . . . . . . . . . . . . . Administrator account lockout settings . . . . . . . . . Scheduled administrator access . . . . . . . . . . . . Using custom administrator access keys (certificates) . Enabling multiple virtual domain configuration . . . . . Configuration backup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2613 2613 2613 2613 2613 2614 2614 2615 2616 2616 2617 2617 2617 2618 2619 2619 2619 2619 2620 2620
Firewall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2621 Firewall policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2621 Firewall authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2621 Logging . . . . . . . . . . . . . . . . . . . . . . . . . . Logging to external devices . . . . . . . . . . . . . Required logging settings . . . . . . . . . . . . . . Excluding specific logs . . . . . . . . . . . . . . . . Viewing log messages from the web-based manager Viewing log messages from the CLI . . . . . . . . . Backing up log messages . . . . . . . . . . . . . . Viewing log file information . . . . . . . . . . . . . . Deleting filtered log messages . . . . . . . . . . . . Deleting rolled log files . . . . . . . . . . . . . . . .
FortiOS Handbook v3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
2621 2622 2622 2622 2623 2623 2624 2625 2625 2625
87
Detailed Contents
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
Error modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2628 FIPS Error mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2628 CC Error mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2629 Disabling FIPS-CC mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2629
2631
2631 2631 2631 2632 2634 2634 2635 2635 2635 2635 2635 2636 2636
Firewall policies for the CDE network . . . . . . . Controlling the source and destination of traffic Controlling the types of traffic in the CDE . . . The default deny policy. . . . . . . . . . . . .
Wireless network security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2636 Scanning for rogue access points . . . . . . . . . . . . . . . . . . . . . . . . 2636 Securing a CDE network WAP . . . . . . . . . . . . . . . . . . . . . . . . . . 2637 Protecting stored cardholder data . . . . . . . . . . . . . . . . . . . . . . . . . . 2638 Protecting communicated cardholder data . . . . . . . . . . . . . . . . . . . . . . 2638 Configuring IPsec VPN security . . . . . . . . . . . . . . . . . . . . . . . . . 2638 Configuring SSL VPN security . . . . . . . . . . . . . . . . . . . . . . . . . . 2639 Protecting the CDE network from viruses . Enabling FortiGate antivirus protection. Configuring antivirus updates . . . . . Enforcing firewall use on endpoint PCs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2639 2639 2640 2640
Monitoring the network for vulnerabilities. . . . . . . . . . . . . . . . . . . . . . . 2640 Using the FortiOS Network Vulnerability Scan feature . . . . . . . . . . . . . . 2640 Monitoring with other Fortinet products . . . . . . . . . . . . . . . . . . . . . 2641 Restricting access to cardholder data . . . . . . . . . . . . . . . . . . . . . . . . 2641
88
Detailed Contents
Controlling access to the CDE network. . . . . . . . Password complexity and change requirements . Password non-reuse requirement . . . . . . . . Administrator lockout requirement . . . . . . . . Administrator timeout requirement . . . . . . . . Administrator access security . . . . . . . . . . Remote access security . . . . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
Appendix
Document conventions . . . . . . . . IP addresses . . . . . . . . . . . Example Network configuration . Cautions, Notes and Tips . . . . Typographical conventions . . . . CLI command syntax conventions Entering FortiOS configuration data Entering text strings (names). . Entering numeric values . . . . Selecting options from a list . . Enabling or disabling options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2646
2646 2646 2648 2649 2650 2650 2652 2652 2653 2653 2653
Registering your Fortinet product. . . . . . . . . . . . . . . . . . . . . . . . . . . 2653 Fortinet products End User License Agreement . . . . . . . . . . . . . . . . . . . 2653 Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2654 Documentation . . . . . . . . . . . . . . . . . . . . Fortinet Tools and Documentation CD . . . . . . Fortinet Knowledge Base . . . . . . . . . . . . Comments on Fortinet technical documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2654 2654 2654 2654
Index
2655
89
Detailed Contents
90
Introduction
This FortiOS Handbook v3 is the definitive guide to configuring and operating FortiOS 4.0 MR3. It contains concept and feature descriptions, as well as configuration examples worked out in detail for the web-based manager and the CLI. This document also contains operating and troubleshooting information. This is the third version of the handbook. This version is still a work in progress but includes many improvements, corrections and additions. Among the additions are new chapters that describe troubleshooting and FortiGate hardware (including hardware installation, hardware acceleration, RAID, and FortiBridge). The new compliances and certifications chapter describes FortiOS PCI support and FIPS/CC support. New sections include more information about VRRP, SNMP, sFlow, advanced static routing, and more information about deploying wireless networks. This introduction describes the following topics: How this Handbook is organized Document conventions Entering FortiOS configuration data Registering your Fortinet product Fortinet products End User License Agreement Training Documentation Customer service and technical support
91
Chapter 5, Troubleshooting describes concepts of troubleshooting and solving issues that may occur with FortiGate units. Chapter 6, UTM Guide describes the Unified Threat Management (UTM) features available on your FortiGate unit, including antivirus, intrusion prevention system (IPS), anomaly protection (DoS), one-armed IPS (sniffer policies), web filtering, email filtering, data leak prevention (DLP), and application control. Also included is how to use the Endpoint features of FortiOS: endpoint Network Access Control (NAC), endpoint application detection, endpoint monitoring, and network vulnerability scanning. The chapter includes step-by-step instructions showing how to configure each feature. Example scenarios are included, with suggested configurations. Chapter 7, User Authentication defines authentication and describes the FortiOS options for configuring authentication for FortiOS. Chapter 8, IPsec VPNs provides a general introduction to IPsec VPN technology, explains the features available with IPsec VPN and gives guidelines to decide what features you need to use, and how the FortiGate unit is configured to implement the features. Chapter 9, SSL VPN provides a general introduction to SSL VPN technology, explains the features available with SSL VPN and gives guidelines to decide what features you need to use, and how the FortiGate unit is configured to implement the features. Chapter 10, Advanced Routing provides detailed information about FortiGate dynamic routing including common dynamic routing features, troubleshooting, and each of the protocols including RIP, BGP, and OSPF. Chapter 11, Virtual Domains describes FortiGate Virtual Domains (VDOMs) and is intended for administrators who need guidance on solutions to suit different network needs and information on basic and advanced configuration of VDOMs. Virtual Domains (VDOMs) multiply the capabilities of your FortiGate unit by using virtualization to partition your resources. Chapter 12, High Availability describes FortiGate HA, the FortiGate Clustering Protocol (FGCP), FortiGate support of VRRP, and FortiGate standalone TCP session synchronization. Chapter 13, Traffic Shaping describes how to configure FortiOS traffic shaping. Chapter 14, FortiOS Carrier describes FortiOS Carrier dynamic profiles and groups, Multimedia messaging service (MMS) protection, and GPRS Tunneling Protocol (GTP) protection. Chapter 15, Deploying Wireless Networks describes how to configure wireless networks with FortiWiFi, FortiGate, and FortiAP units. Chapter 16, VoIP Solutions: SIP describes FortiOS SIP support. Chapter 17, WAN Optimization, Web Cache, Explicit Proxy, and WCCP describes how FortiGate WAN optimization, web caching, and web proxy work and also describes how to configure these features. Chapter 18, Load Balancing describes firewall HTTP, HTTPS, SSL or generic TCP/UDP or IP server load balancing. Chapter 19, Hardware describes how to mount, connect power, and turn on your FortiGate unit. Other topics include descriptions and configuration instructions for FortiGate accelerated hardware processing, RAID, and FortiBridge protection. Chapter 20, Certifications and Compliances explains how Fortinet products can help you comply with the Payment Card Industry Data Security standard and also describe FortiOS FIPS/CC support.
92
93
94
95
96
Before installing any firmware image, you should back up the current FortiGate configuration file. This ensures that you have a current configuration file if the upgrade is not successful. You are also ensuring that all configuration settings are available if there are some that are not carried forward.
FortiOS Handbook v3: Whats New 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
97
To back up your configuration file - web-based manager 1 Log into the web-based manager and go to System > Dashboard > Status and in the System Information Widget select Backup beside System Configuration. 2 Select where to save configuration file. 3 If you want to encrypt your configuration file to save VPN certificates, select Encrypt configuration file and enter and confirm a password. An encrypted configuration file can only be opened by uploading it to the same FortiGate unit and entering this password. 4 Select Backup and save the configuration file. To restore your configuration file - web-based manager You may need to restore your configuration file if you have experienced problems during a firmware upgrade. 1 Log into the web-based manager and go to System > Dashboard > Status and in the System Information Widget select Restore beside System Configuration. 2 Select to configuration file to restore. 3 If the configuration file is encrypted, enter the password. 4 Select Restore to restore the configuration to the one of the saved the configuration file. The FortiGate unit uploads and installs the configuration. 5 Clear your browsers cache after the installation process is finished. After a few minutes you can log back into the web-based manager.
98
Note: You have only three seconds to press any key. If you do not press a key soon enough, the FortiGate unit reboots and you must log in and repeat the execute reboot command.
Y
6 If you successfully interrupt the startup process, a message similar to the following appears: [G]: Get firmware image from TFTP server [F]: Format boot device [B]: Boot with backup firmware and set as default [C]: Configuration and information [Q]: Quit menu and continue to boot with default firmware [H]: Display this list of options. Enter G, F, Q, or H: 7 Type G to get the new firmware image from the TFTP server. The following message appears: Enter TFTP server address [192.168.1.168]: 8 Type the address of the TFTP server and press Enter. The following message appears: Enter Local Address [192.168.1.168]: 9 Type an IP address of the FortiGate unit to connect to the TFTP server. The IP address must be on the same network as the TFTP server, but make sure you do not use the IP address of another device on the network. The following message appears: Enter File Name [image.out]: 10 Enter the firmware image file name and press Enter. The TFTP server uploads the firmware image file to the FortiGate unit and the following appears: Save as Default firmware/Backup firmware/Run image without saving: [D/B/R] 11 Type R. The firmware image is installed to system memory and the FortiGate unit starts running the new firmware image, but with its current configuration. 12 When you are done, reboot the FortiGate unit and it will resume using the previous firmware image.
99
100
101
You can enable flow-based DLP in any DLP Sensor by setting the Inspection Method to Flow-based Detection. Flow-based DLP can be enabled in some DLP sensors and not others, allowing you to apply flow-based DLP to some traffic and proxy-based DLP to other traffic.
In the upper-right corner of the Configuration Settings page there is a drop-down list, Create New icon and View List icon. These are shown in Figure 1. You can use them in the following ways: Create a new profile or sensor by selecting Create New. View a specific profile or sensor by selecting it from the drop-down list. View the profiles or sensors that you have created by selecting View List. Remove the current profile or sensor that you are viewing by selecting Delete.
View List icon Create New icon Drop-down list for viewing a specific profile or sensor
The actual configuration operations for all UTM profiles and sensors has also been modified to make configuration of sensors and profiles faster and more effective.
102
From the CLI you can select options to block all encrypted archives, block corrupted archives, block multipart archives, and write log messages whenever an archive file is received that cannot be virus scanned. The following is an example. config antivirus profile edit av_1 config http set options block-encrypted-archive block-corruptedarchive block-multipart-archives log-unhandled-archive end
103
Figure 2: The default configuration settings on the Edit Web Filter Profile page
Previous web filter profiles are carried forward and those settings are merged into the new redesign. If you want to view the previous settings in FortiOS 4.0 MR3, use the show webfilter profile <name> command to view the entire previous settings. Depending on what settings you need to configure within the web filter profile, you may need to have access to both the CLI and web-based manager. The FortiGuard Web Filtering, FortiGuard Web Filtering Overrides and web content filtering are now configured in the CLI. In a web filter profile, you can also include keywords that may appear in a search engine that a user enters in a search engine. These keywords are logged in the web filter log. The keywords are entered, separated with a comma, in the Search Engine Keyword Filter field.
104
In the above command syntax, you see the commands old-profile and new-profile and its these commands that control how the override rule is applied. For example, if a user is browsing using a session that contains an old web filter profile applied, then the new-profile is used instead. If a user browses using a session that has a profile other an old profile, their profile will not be changed to a new profile. A user may be able to create a new override rule if the configuration permits it; however, only one override rule is allowed per user/profile pair. With a web filter profile-based override, you can modify the URL filter list or add local ratings to deal with the extraction of offsite URLs. However, the function of this new override may change a users FortiGuard categories, URL-filter list and so on. When upgrading, existing web-filter profiles are carried forward but will not work until the administrator modifies them to the new settings. Any existing rules, both user and administrative, are not carried forward because there is no way to change the old override type to profiles for each rule without running out of profiles. This concerns only administrative overrides.
105
config firewall address edit <addr_name> set type geography set country BR end In the command you set the country to the two-letter abbreviation for the country name. In the example, BR is the abbreviation for Brazil. You can use the following command to view information about geography-based addressing. The command does not display information about the entire address database, but displays country and address information for the countries that have been added to firewall addresses. diagnose firewall ipgeo {country-list | ip-list | ip2country} Where: country-list lists all of the countries that have been added to a firewall address. ip-list lists the IP addresses of a specified country or all of the countries added to firewall addresses. ip2country displays the country of origin for a specified IP address. The address must be assigned to one of the countries that has been added to a firewall address. For example, use the following command to view the countries that have been added to a firewall address. The example command output shows that a firewall address has been added for Brazil. diagnose firewall ipgeo country-list Total countries loaded:1 BR
106
Note: DLP document fingerprinting is available only on FortiGate models with hard drives.
107
request-server icap_server response enable response-failure error response-path 1225 response-server 172.16.122.151 streaming-content-bypass enable
4 In the config firewall policy command, apply the ICAP profile to policy 1: config firewall policy edit 1 set icap-profile icap_profile_1 end
Troubleshooting ICAP
You can use the following diagnose commands when troubleshooting ICAP. diag system icap server list <name> Displays a list of all servers or specified servers. diag system icap profile list <name> Displays information concerning total sent and responses, last connection attempts and host-bypass count.
Profile Group
The Profile Group feature is now included in the web-based manager. This feature was previously only found in the CLI. Profile groups are groups of UTM profiles and sensors, which includes protocol options, and are often applied to security policies. By configuring a group of profiles and sensors, you can easily apply them to a security policy at once, instead of enabling them one at a time. In UTM Profiles > Profile Group > Profile Group, you can create profile groups and view the selected profiles from within the group, either when creating a new group or editing an existing one. You can view the profile or sensor that you are including in the group by selecting the View icon. You can also create a new profile or sensor from within the page by selecting the Create New icon (the plus sign icon).
Note: In this release, profile groups cannot be applied to security policies within the webbased manager, only in the CLI.
108
WiFi Extensions
The External Modem section of the page allows you to configure the external modem or USB modem. When you select Configure Modem, you are automatically redirected to the Modem Configuration Settings page. This page displays the supported modems under the Supported section, and the Custom section displays the external modems that you have configured. By selecting Update Now, you can easily update the list of supported modems from FortiGuard.
WiFi Extensions
FortiOS 4.0 MR3 includes many improvements and changes to the WiFi controller feature (formerly the wireless controller feature). Among the highlights are automatic AP provisioning (channel, power, etc.) using distributed ARRP, Rogue AP on wire detection, Rogue AP Suppression, Unified FortiWifi and FortiAP management, support for new FortiAP models, and the addition of the WiFi controller feature to FortiWiFi units.
Within the WiFi Network menu, instead of configuring a virtual access point, you configure an SSID. The SSID can easily be configured to be up or down, using the Administrative Status option within the SSID. When configuring an SSID from the web-based manager you can choose from any of the following consolidated security options:
SSID security option WPA/WPA2-Personal Descriptions Supports both WPA and WPA2 for personal use. Select this option and add a 8 to 63 character preshared key.
109
WiFi Extensions
WPA/WPA2-Enterprise Supports both WPA and WPA2 for enterprises. Select this option and select a RADIUS server or authentication group to use to authenticate connections to the SSID. Captive Portal Supports captive portal authentication. Select this option and select user groups that can authenticate with the captive portal. You can also configure the appearance of the captive portal page.
Configure an SSID from the CLI using the config wireless-controller vap command. From the CLI the following additional security options are available: open wep128 wep64 wpa-only-enterprise wpa-only-personal wpa2-only-enterprise wpa2-only-personal
Rogue AP Suppression
Rogue AP suppression is now supported on the FortiWiFi and FortiAP units. This feature is available only when there is at least one radio signal dedicated to Rogue AP detection. On a FortiWiFi unit, this feature is available only when in dedicated detection mode. Rogue AP suppression is also not available for background Rogue AP scans.
110
WiFi Extensions
The on-wire scan feature is enabled in Wireless Controller > Wireless Network > Rogue AP Settings. You must select the check box beside Enable On-Wire Rogue AP Detection Technique so that the feature is enable.
Custom AP profiles
Previously, there were AP profiles that you could configure from within the Wireless Controller menu. These profiles are still available, however, to view them in the web-based manager you must enable the feature using the following command. config system global set gui-ap-profile enable end Under Managed Access Points, the previous AP Profile menu has been replaced with the Custom AP Profile menu that contains a selection of default AP profiles. These default profiles have been designed to be a good starting point for many wireless network applications using FortiWiFi or FortiAP units. You can customize the default profiles for your needs and create new profiles.
Log messages are recorded to reflect when the channel was changed by the FortiAP unit, and debug logs are also recorded to reflect the decision of the distributed ARRP algorithm for all runs. The ARRP algorithm is automatically on by default if multiple channels are selected in the web-based manager. If a single channel is selected, the ARRP algorithm becomes benign.
WiFi monitor
The WiFi Monitor menu is new for Wireless Controller in this release. It merges the previous monitoring menus into the new Monitor menu. There are two submenus, Client Monitor and Rogue AP Monitor. The Client Monitor submenu allows you to view information about wireless clients of your managed access points. On the Client Monitor page, several columns have changed, as well as a new column added, called Auth. The following columns are no longer available on the page: Bandwidth Rx Bandwidth Tx Idle Time
Previously, the Client Monitor was available in Wireless Controller > Wireless Client > Wireless Client.
FortiOS Handbook v3 Whats New 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
111
The Rogue AP Monitor allows you to view information about access points that may be rogue APs. Several columns have been removed. There are two new columns, Manufacturer and Security Mode. From the monitor you can also mark and suppress APs.
FortiToken support
The FortiToken-200 device provides time-based, one-time passwords (OTP) that are based on the OATH standard. Using FortiToken allows organizations to deploy a twofactor authentication solution that reduces the risk of compromise created by alternative single-factor authentication systems relying on, for example, static passwords. The FortiToken enables administrators with the need for two-factor authentication to offer enhanced security for both remote and on-premise users. The FortiToken-200 is a part of Fortinets broad multi-factor authentication product strategy; it ensures that only authorized individuals access your organizations sensitive information; enabling business, protecting your data, lowering IT costs, and boosting user productivity. The FortiToken-200 provides a secure one-time password (OTP) that is entered along with regular login credentials whenever authentication is required. Each FortiToken device contains a serial number (located on the back of the device), a six-digit LCD display, and a small button. The serial number is used to activate the hardware token generator. When you press the small button, the LCD displays a six-digit token password code that is used in two-factor authentication. Two-factor authentication is authentication that requires an additional password or code that a user must enter to successfully authenticate in addition to their own user name and password. The FortiToken device must be activated and synchronized with the FortiGate unit before it can be used for authentication purposes. The FortiToken behaves as follows:
112
FortiTokens serial number is added in the list in User > FortiToken > FortiToken. This serial number is a number containing 16 case-sensitive characters which is located on the back of the device. The serial number is used only in this way. The FortiToken is activated by selecting Activate on the FortiToken page. During the activation process the serial number is encrypted and sent to FortiGuard where it is verified as a valid FortiToken, and then activates the FortiToken on the FortiGate unit. If you have a file containing the seed used to generate a token password code, you can import that file to the FortiGate unit from User > FortiToken > FortiToken.
Synchronize the FortiToken by selecting Synchronize on the FortiToken page. This synchronizes the FortiTokens system time with the units system time so that both contain the same time period. The correct time period is necessary to verify that the token password code that is being used by a user is valid. If you have more than one FortiToken device, you must enter each one in User > FortiToken > FortiToken; then select each one in the list and for each one activate and synchronize. FortiOS does not support the activation and synchronization of multiple FortiTokens at one time. For example, you cannot select four FortiTokens and then select Activate and immediately after select Synchronization. FortiToken is assigned to a user (for example a local user in User > User > User) user logs in with the token password code they received in an email or text message on their mobile phone
The token password code that is generated is from a seed that is unique within each FortiToken. When a user uses the correct token code for the current time period, that token code provides proof that the user is in possession of the physical FortiToken. The token code changes every 60 seconds on the FortiToken device, to prevent replay attacks. For example, a person steals some of a users token code to reuse at a later time.
Two-factor authentication
Two-factor authentication provides a way to minimize security breaches due to stolen user credentials. Two-factor authentication requires the authenticating client to provide additional credentials beside a user name and password. You can add two-factor authentication to PKI users. SMS and Email token authentication is also supported. SSL VPN two-factor authentication supports FortiTokens. Two-factor authentication is available for FortiGate administrators, local users and PKI users. In User > FortiToken > FortiToken, the token password code from FortiToken is entered into the list by selecting Create New. You must activate and synchronize FortiToken so that you can use the generated token password code. After synchronizing the token password code, you can then apply it where two-factor authentication is available within FortiOS. For example, FortiGate administrators can have the two-factor authentication enabled for their account in System > Admin > Administrators. When FortiToken is used in a third-party IPsec client configuration, each user that has two-factor authentication enabled and configured must use the token password code when only a password is supported to gain access. This authentication using only a password is not supported when the password and token password code are sent in CHAP or MS-CHAP form, and the local user is authenticated using a remote server. This is because FortiOS is unable to extract back both the password and the token password code.
113
The company has purchased a FortiToken-200 for each employee that will be required to authenticate using two-factor authentication. The employees that will be logging in using two-factor authentication will be using SSL VPN. Each employee already has their own user account configured from a previous setup. You are only enabling two-factor authentication and notifying them of this new, additional log in credential. To activate each FortiToken 1 Log in to the web-based manager of the FortiGate unit. 2 Go to User > FortiToken > FortiToken. 3 On the FortiToken page, enter the serial number of the first FortiToken, and repeat until all FortiTokens are entered. 4 Select OK. 5 For the first FortiToken in the list on the FortiToken page, select it and then select Activate. 6 After completing the activation, select the first FortiToken in the list and then select Synchronization. 7 Repeat steps 5 and 6 until all FortiTokens are synchronized. The FortiTokens are now synchronized. Users can now be configured with the two-factor authentication. In the following procedure, the token password codes will be sent to users to their email accounts. To configure employees with two-factor authentication 1 In the web-based manager, go to the location of the employees account. For example, User > User > User. 2 In the first employees account, select Enable Two-factor Authentication. 3 Under Deliver Token Code by, select FortiToken and then select the FortiToken serial number of the FortiToken that the person will be using. 4 Select Email to and then enter the sales persons email address. For example, sales_1@example.com 5 Select OK. 6 Repeat steps 3 and 4 to complete the rest of the employees two-factor authentication settings. The following procedure sends the token password code to the FortiGate administrators mobile phone.
114
To configure the FortiGate administrator with two-factor authentication 1 In the web-based manager, go to System > Admin > Administrators. 2 Edit the 51B_admin FortiGate administrator account. 3 In the Edit Administrator page, select Enable Two-factor Authentication. 4 Under Deliver Token Code by, select FortiToken and then select the FortiToken serial number that the administrator will be using. 5 Select SMS. 6 Select the mobile provider from the drop-down list beside (Mobile Provider). 7 Enter the FortiGate administrators phone number in the field beside (Phone Number). 8 Select OK. A text message containing the token password code is sent to their phone.
115
Dynamic Profiles
The Dynamic Profile feature, previously only found in FortiOS Carrier, is now available for all FortiGate models. Using the dynamic profile feature a FortiGate unit can dynamically assign a UTM profile group to a user authenticated with a RADIUS server. Dynamically assigning a UTM profile group means you can dynamically assign different levels of UTM inspection, web access and other UTM features. For information about dynamic profiles, see the Authentication chapter of the FortiOS Handbook.
Hard-timeout enhancement
The new authentication hard-timeout feature ensures that users will always need to authenticate whenever their time expires. The timeout behavior is configure in the following ways: When the timeout behavior is set to be a hard timeout, this option forces all of the users sessions to immediately end when the authentication timeout expires. This causes the user to re-authenticate. When the timeout behavior is set to be a hard timeout new sessions, this option keeps all existing sessions but forces new sessions on the same user, which that user then has to re-authenticate.
The following are the new commands you can use to configure authentication hardtimeout. config user setting set auth-timeout <number_minutes> set auth-timeout-type {idle-timeout | hard-timeout | newsession} end
116
edit <group_name> config match edit <group> set server-name <server_name> set group-name <group_name> The following is an example of how to configure this user group matching feature. config user group edit sslvpn set sslvpn-portal full-access set member vmlg test config match edit 1 set server-name vmlg set group-name cn=Internet,ou=test,dc=ay,dc=fortinet,dc=com next edit 2 set server-name test set group-name CN=qa,OU=T1359,DC=AY,DC=FORTINET,DC=COM end end end
117
Endpoint profiles include the warn option, which displays a block page but allows a user to choose to continue or not, as well as sends the information back to the client. Previously, when the FortiGate unit blocks a client, the unit quarantines the user but no information was sent back to the client. With this new option, within FortiClient, you can view a list of applications that the FortiGate unit requested, any applications that caused the client to be blocked by the unit, and any applications that cause a user to continue on even though a block page was triggered. The Client Installers submenu provides information regarding FortiClient installation, version enforcement, and FortiGuard availability for updating to a recent FortiClient Endpoint versions. The Profile submenu provides configuration settings for endpoint profiles which are then applied to firewall policies. The settings within application sensor were merged into the settings that are available in the Profile submenu.
Asset Definition
The Asset Definition menu allows adding ranges, discovering assets or start scans. Ranges can easily be added by selecting Create New on the Asset Definition page. Assets are still configured the same as they were previously, but you can now add an IP address range to be scanned. When a scan is being performed, the activity icon in the Scan Activity column displays the progress. The scans results appear in the Discovered Hosts for <network> window. You can scroll down the list to view all discovered assets.
Scan Schedule
The Scan Schedule menu allows you to see the status of a scan (or to start a scan), the schedule settings, the type of vulnerability scan mode, and advanced settings as well. The scheduled scan applies to all assets or asset groups that are currently enabled. The types of scans that you can schedule are quick, standard and full. Quick scanning examines a set of the most commonly used ports for vulnerabilities. Standard scanning examines a larger number of application ports, covering many known applications. This scanning covers TCP, Service Discovery and OS Discovery but UDP is disabled. The full scan scans the full port range 1-65535 and looks for applications running on non-standard ports, examining them for vulnerabilities. The advanced options that are available are as follows: Enable TCP Port Scan Enable Service Detection Enable OS Detection Enable UDP Port Scan All Host assets are discovered as specified in the asset definition All discovered hosts are scanned for the configured sensors, port scans and so on.
118
all IP Range assets are discovered as specified in the asset definition authentication is not available, reducing scan capabilities these IP ranges should be converted to Host assets as needed to perform a full scan
scanning will run for each unique IP in the list, and up to the maximum number of IP addresses supported, per-platform. logs are recorded about the scanning activity
Vulnerability Result
The Vulnerability Result menu allows you to view, in both graphical and tabular form, the results of the network scan. Platforms that do not have SQL logging enabled, or no SQL logging available, will only have the graphical representation. When viewing the table containing vulnerabilities, a table similar to the log viewer table, appears at the left side of the page.
119
120
FTP users connect to the explicit proxy and then connect through the proxy to remote FTP servers. To enable the explicit FTP proxy go to System > Network > Explicit Proxy and select Enable Explicit FTP Proxy and select Apply. Then go to System > Network > Interface, select the Interface on which to enable the explicit FTP proxy and select Enable Explicit FTP Proxy. Enter the following command to enable the explicit FTP proxy from the CLI: config ftp-proxy explicit set status enable end Enter the following command to enable the explicit FTP proxy on the internal interface: config system interface edit internal set explicit-ftp-proxy enable end Once the explicit FTP proxy is enabled on an interface you must create security policies with the ftp-proxy as the source interface to allow explicit FTP proxy traffic. For example, to allow FTP connections from the internal network to an FTP server on the Internet, enable the explicit FTP proxy on the FortiGate internal interface and add ftp-proxy to wan1 security policies. To connect to an FTP server through the explicit FTP proxy The following steps are required when a user starts an FTP client to connect to an FTP server through the explicit FTP proxy. Any RFC-compliant FTP client can be used. 1 The user connects to the explicit FTP proxy by starting an FTP session with the explicit proxy. In this example, the IP address of the FortiGate interface on which the explicit FTP proxy is enabled is 10.31.101.100. For example: ftp 10.31.101.100 2 The explicit FTP proxy responds with a welcome message and requests the users FTP proxy user name and password and a username and address of the FTP server to connect to: Connected to 10.31.101.100. 220 Welcome to Fortigate FTP proxy Name (10.31.101.100:user): You can change the message by editing the FTP Proxy replacement message. 3 At the prompt the user enters their FTP proxy username and password and a username and address for the FTP server. The FTP server address can be a domain name or numeric IP address. This information is entered using the following syntax: <proxy-user>:<proxy-password>:<server-user>@<server-address> For example, if the proxy username and password are p-name and p-pass and a valid username for the FTP server is s-name and the servers IP address is ftp.example.com the syntax would be: p-name:p-pass:s-name@ftp.example.com
Note: If the FTP proxy accepts anonymous logins p-name and p-pass can be any characters.
121
4 The FTP proxy forwards the connection request, including the user name, to the FTP server. 5 If the user name is valid for the FTP server it responds with a password request prompt. 6 The FTP proxy relays the password request to the FTP client. 7 The user enters the FTP server password and the client sends the password to the FTP proxy. 8 The FTP proxy relays the password to the FTP server. 9 The FTP server sends a login successful message to the FTP proxy. 10 The FTP proxy relays the login successful message to the FTP client. 11 The FTP client starts the FTP session. All commands entered by the client are relayed by the proxy to the server. Replies from the server are relayed back to the FTP client.
122
123
124
125
By default the UTM Weekly Activity Report is generated and saved weekly and from any report access page you can select Historical Reports to view previously generated reports. From the Historical reports list you can also download the reports in PDF format and delete them. You can modify the default FortiGate UTM Weekly Activity Report to meet your requirements from any report page by selecting Edit. When you select Edit, the page refreshes in Editing mode. In editing mode can change the content and the appearance of the report pages, change the data displayed on individual report pages and add or delete report pages. A modified report must be saved using the Save icon. Any modifications that are not saved, are lost. A report consists of text, charts and images. Text elements are used to add titles and descriptive text to the report. Images are used to add graphics to the report. Charts and used to add text and graphical data to the report. You can add a bar chart, line chart, pie chart and table chart. When you add a chart you can customize its appearance as well as the data that the chart displays. To customize the data displayed you can choose for hundreds of predefined reports. Each report includes formatting settings and settings to extract data from the FortiGate log database. FortiOS 4.0 MR3 includes the following new reports: traffic.bandwidth.apps.app_cat traffic.bandwidth.app_cats.user traffic.bandwidth.users traffic.sessions.apps.app_cat traffic.sessions.app_cats.user traffic.sessions.users traffic.bandwidth.apps.user traffic.bandwidth.users.app traffic.bandwidth.app_cats traffic.sessions.apps.user traffic.sessions.users.app traffic.sessions.app_cats traffic.bandwidth.wanopt web.allowed-request.sites.user web.allowed-request.users.web_cat web.allowed-request.web_cats web.blocked-request.sites.user web.blocked-request.users.web_cat web.blocked-request.web_cats web.requests.phrases.user web.requests.users.phrase web.requests.phrases web.allowed-request.users.site web.allowed-request.sites web.blocked-request.users.site
FortiOS Handbook v3 Whats New 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
126
web.blocked-request.sites web.bandwidth.sites.user web.bandwidth.users.site web.bandwidth.sites web.bandwidth.stream-sites.user web.bandwidth.users.stream-site web.bandwidth.stream-sites email.request.timeperiods.sender email.request.senders email.bandwidth.timeperiods.sender email.bandwidth.senders email.request.timeperiods.receiver email.request.receivers virus.count.viruses.user virus.count.users.virus virus.count.viruses virus.count.users virus.count.viruses.protocol virus.count.protocols attack.count.critical-attacks.user attack.count.users.critical-attack attack.count.critical-attacks attack.count.attacks.user attack.count.users.attack attack.count.attacks vpn.bandwidth.static-tunnels.user vpn.bandwidth.users.static-tunnel vpn.bandwidth.static-tunnels vpn.bandwidth.ssl-sources.user vpn.bandwidth.users.ssl-source vpn.bandwidth.ssl-sources vpn.bandwidth.dynamic-tunnels.user vpn.bandwidth.users.dynamic-tunnel vpn.bandwidth.dynamic-tunnels
127
Historical Reports page Lists all generated reports. You can remove generated reports from this page or return to the previous page, the Viewing default layout page. Return to Layout Delete When selected, you are automatically redirected to the Viewing default layout page. Removes a report from within the list. To remove multiple reports from within the list, on the page, in each of the rows of the reports you want removed, select the check box and then select Delete. To remove all reports from the list, on the page, select the check box in the check box column, and then select Delete. The report name that the FortiGate unit gave the report. This name is in the format <scheduletype>-<report_title>-<yyyy-mm-dd>-<start_time>. For example, Once-examplereport_1-2010-09-12-103044, which indicates that the report titled examplereport_1 was scheduled to generate only once and did on September 12 at 10:30 am. The hour format is hh:mm:ss. The time when the report began generating. The format is yyyy-mm-dd hh:mm:ss. The time when the report finished generating. The format is yyyy-mm-dd hh:mm:ss. The size of the report after it was generated. The size is in bytes. The other type of format you chose the report to be in, for example PDF. When you select PDF in this column, the PDF opens up within the page. You can download the PDF to your local PC from this page as well.
Report File
128
Figure 4: Viewing event log messages with the default Bottom viewing option selected
At the bottom of the list of logs on the page, before page controls, the Log location: <log_storage_device> indicates where the logs are being stored, such as the local hard disk or memory.
129
Figure 5: The UTM page in Log&Report > Log Access > UTM
When viewing logs in Raw format, the downloaded UTM log file is called ulog and contains all the UTM-related log types, such as virus and attack. There is no log field called UTM Type in the log message when viewing them in the Raw format. The type and subtype fields indicate which log file the log message is associated with. For example, type=virus and subtype=filename.
If you decide you would rather enable SQL logging later, select Remind me Later, which will prompt you when you log into the web-based manager again. When SQL is enabled from the window, the FortiGate unit converts an previous logs to SQL format, and all log categories are that were previously enabled for disk logging are written in SQL format.
130
When configuring logging to a FortiAnalyzer unit, you can control the buffer rate to the FortiAnalyzer unit. This is available only in the CLI. The buffer size is between 20 to 20 000.
Note: Previously, you could upload logs to an AMC disk; however, this feature has been removed because of the new feature of remotely storing and uploading logs to a FortiAnalyzer unit and FAMS server.
131
Logging Monitor
The Logging Monitor allows you to view the log activity that is being recorded by the FortiGate unit. The information displays as a bar chart and contains information regarding the total number of logs recorded by the unit on each day of the week. For example, on Wednesday of this week there were a total of 30 log entries recorded by the event log. When you select a bar in the bar chart, you are automatically redirected to the Log Activity for <day of week> page. On this page you can view the logs for that day and the number of entries for that log file that occurred. For example, you select Wednesdays bar on the Logging Monitor page; you are redirected to the Log Activity for Wednesday page, where the logs for that day display. When you want to return to the Logging Monitor page, select Return.
Event logs
There are two new subtypes that have been added to the event log file, config and dns. The following explains each one. A new subtype was added to event logs, called DNS. This new log message provides information about any DNS look-up that occurred. The option is enabled within the Event Log page (DNS lookup event), or within the CLI. There is only one log message that occurs within the event log. The following is an example of an event-dns log message. 2010-08-13 20:05:43 log_id=0108050000 type=event subtype=dns vd=root pri=information policyid=1 src=172.16.120.166 dst=10.10.1.10 src-intf=internal dst_intf=wan1 user=user1 group=group123 dns_name=xx.example.com dns_ip=172.55.154.199 The event-config log messages provides detailed information about what setting was changed by a user. For example, a user disabled the explicit web proxy event on the Event Log page. You can enable this subtype within the Event Log page, by selecting Configuration change event, or in the CLI. By default, this option is disabled. The following is an example of an event-config log message: 2010-09-15 10:15:55 log_id=010 type=event subtype=config vd=root pri=information vd=root user=admin ui=GUI(10.10.10.1) action=edit cfg_tid=1179790 cfg_path=log.eventfilter cfg_attr=wan-opt[enable->disable] msg=Edit log.eventfilter
132
Within the event log file, a log message containing information about an explicit web proxy event is recorded when enabled in Log&Report > Log Config > Event Log. The check box beside Explicit web proxy event must be selected so that this log can be recorded by the unit. This option is also available in the CLI.
Event-system
There are now two specific log messages that indicate when the system starts up and when it shuts down. These log messages are included in the event-system logs, and log message 20202 indicates when the system started up, and log message 20203 indicates when the system shut down. The following are examples of these two event-system log messages: 2010-09-12 10:24:02 log_id=0100020203 type=event subtype=system vd=root pri=information action=daemon-shutdown daemon=getty pid=68 msg= Daemon getty shut down 2010-09-12 10:24:02 log_id=0100020203 type=event subtype=system vd=root pri=information action=daemon-startup daemon=cauploadd pid=94 msg Daemon cauploadd started.
Traffic logs
There are two new enhancements for traffic logs. Additional information has been added to other-traffic logs and a new subtype introduced. The new webproxy-traffic subtype for traffic logs indicates activity regarding web proxy traffic that was detected using a webproxy security policy.
Other-traffic logs
When viewing other-traffic logs in the web-based manager, you will see additional information such as IM and P2P application information, as well as two icons in the status field that indicate the status of the traffic logs of 6 and 5. The status icons that appear in the web-based manager are a green check mark or a circle with a line through it. When you move your mouse over the icon, it indicates what the icon is, either accept (which is the green check mark), or deny (the circle with a line through it).
133
end config log fortianalyzer3 setting set enc-algorithm {default | high | low | end config log fortianalyzer override-setting set enc-algorithm {default | high | low | end config log fortiguard setting set enc-algorithm {default | high | low | end config system central-management set enc-algorithm {default | high | low | end config log disk setting set upload-ssl-conn {default | high | low end
When you select the default option, you are choosing to have the SSL communication encryption with high and medium encryption algorithms.
134
uploadip 172.16.120.154 uploadport 443 uploaduser user_1 uploadpass 123456789 uploaddir c:\logs_fgt50B uploadtype appctrl attack dlp event spamfilter traffic virus webfilter set uploadzip enable set upload-format text set uploadsched enable set uploadtime 7 set drive-standby-time 19800 set upload-delete-files disable set sql-max-size 65536 set sql-max-size-action overwrite set sql-oldest-entry 1024 end
FAMS enhancements
The FortiGate unit can now be configured to upload recently recorded logs to the FAMS servers on a regular basis, similar to how the unit uploads logs to the FortiAnalyzer unit on a regular basis. When you are configuring to upload logs to FAMS, you can also test the connection between FAMS and the FortiGate unit by selecting Test Connectivity, in Log&Report > Log Config > Log Settings. The FAMS server stores the logs for archival usage. The FortiGate unit stores the logs locally either in system memory or disk, and then uploads the logs to the FAMS server.
135
136
137
138
Dashboard Widgets
Dashboard Widgets
There are several enhancements to dashboard widgets in this release, as well as a new widget called Network Protocol Usage. You can view dashboard widgets from System > Dashboard > Status.
Traffic History
The Traffic History widget has been enhanced, allowing you to customize which line charts contain a specified time period range. For example, the second line chart displays the last seven days of traffic information. You can choose to have the time period display in days, minutes or hours. You must enter a time period that is either in minutes or days, such as 10 minutes or 30 days. If you choose to enter zero, that specific time period is disabled.
System Resources
The System Resource widget now only displays information concerning the CPU and memory usage amounts. You can view this information either in real-time or current information, or historical. If you want to view the information in historical view, you can also change the type of fill-line color.
139
Monitoring Improvements
Monitoring Improvements
In each menu in the web-based manager, there is now a Monitor submenu containing one or multiple submenus that allow you to view the activity of a specific feature that is currently being monitored by the FortiGate unit. The information displayed is usually in a table or graphical format, providing a more user-friendly display of the monitored information. The information is displayed in a similar manner as to how widgets display their information in charts or lists on a dashboard in System > Dashboard. You must enable logging for certain features since the information that is compiled for certain Monitor submenus only comes from logs. These features are the UTM Monitor submenus, security policy (Policy Monitor), and the Logging Monitor submenu.
DHCP Monitor
The DHCP Monitor is available from System > Monitor > DHCP Monitor. Using this monitor you can view the DHCP servers and relays that are being monitored by the FortiGate unit. On the DHCP Monitor page, you can also add IP addresses from the page to the IP reservation list. The IP reservation list is a list of reserved IP addresses on a DHCP network for a user who wants to always assign that same IP address to one of the DHCP networks hosts. On the DHCP Monitor page, you can also refresh the information to ensure current information displays on the page.
Modem Monitor
The Modem monitor is available from System > Monitor > Modem Monitor. Using this monitor, you can view the units modem status and activity. The information on the page is displayed in a bar chart as well as in a table, located below the bar chart. On the Modem Monitor page, you can refresh the information to ensure current information displays on the page. You can also reset the information, which removes the information from the page and starts the monitoring process again.
140
Monitoring Improvements
Session Monitor
The Session Monitor is available from Policy > Monitor > Session Monitor. Using this monitor you can view all of the sessions that are currently being monitored by the FortiGate unit. On the Session Monitor page, you can filter the information, delete a session, or refresh the list. This monitoring submenu is similar to the widget, Top Sessions, which is still available in System > Dashboard. The session information that displays in the widget can also be seen within the Session Monitor submenu. On the Session Monitor page, you can refresh the information to ensure current information displays on the page. You can also filter the information using Filter Settings. If you want to delete a session, select the Delete icon in the row of the session you want removed.
Policy Monitor
The Policy Monitor submenu is available from Policy > Monitor > Policy Monitor. Using this monitor you to view the top security policy usage by the FortiGate unit. The information displays in a bar chart and details such as action and packets, are displayed in a table below the bar chart. On the Policy Monitor page, you can refresh the information to ensure current information displays on the page. You can also reset the information, which removes the information from the page and starts the monitoring process again.
AV Monitor
The AV Monitor is available from UTM Profiles > Monitor > AV Monitor. Using this monitor you can view activity concerning viruses detected by the FortiGate unit. This information displays on the AV Monitor page in a bar chart as well as in a table located below the bar chart. On the AV Monitor page, you can refresh the information to ensure current information displays on the page. You can also reset the information, which removes the information from the page and starts the monitoring process again.
141
Monitoring Improvements
Intrusion Monitor
The Intrusion Monitor is available from UTM Profiles > Monitor > Intrusion Monitor. Using this monitor you can view the attack activity detected by the FortiGate unit. This information displays on the Intrusion Monitor page, in a bar chart as well as in a table located below the bar chart. On the Intrusion Monitor page, you can refresh the information to ensure current information displays on the page. You can also reset the information, which removes the information from the page and starts the monitoring process again.
Web Monitor
The Web Monitor is available from UTM Profiles > Monitor > Web Monitor. Using this monitor you can view the web activity detected by the FortiGate unit. This information displays on the Web Monitor page, in a pie chart and bar chart. The total HTTP requests information displays in the pie chart and the blocked HTTP requests display in a bar chart. The total number of web requests display at the bottom of the charts, in Total Web Requests (HTTP): <number>. On the Web Monitor page, you can refresh the information to ensure current information displays on the page. You can also reset the information, which removes the information from the page and starts the monitoring process again.
Email Monitor
The Email Monitor is available from UTM Profiles > Monitor > Email Monitor. Using this monitor you can view the email activity detected by the FortiGate unit. This information displays on the Email Monitor page, similar to how the Web Monitor page displays its monitoring information, the total number of emails in a pie chart and the blocked emails in a bar chart. The total number of emails is located at the bottom of the charts, in Total Emails: <number>. On the Email Monitor page, you can refresh the information to ensure current information displays on the page. You can also reset the information, which removes the information from the page and starts the monitoring process again.
Application Monitor
The Application Monitor is available from UTM Profiles > Monitor > Application Monitor. Using this monitor you can view the application usage detected by the FortiGate unit. This information displays in a bar chart. On the Application Monitor page, you can refresh the information to ensure current information displays on the page. You can also reset the information, which removes the information from the page and starts the monitoring process again.
142
IPsec Monitor
The IPsec Monitor is available from VPN > Monitor > IPsec Monitor. Using this monitor you can view the activity on IPsec VPN tunnels. The page also shows the start and stop of tunnel activity. The list includes both dial-up IPsec users as well as static IP or Dynamic DNS VPNs. The list provides status and IP addressing information about VPN tunnels, which VPN tunnels are active or non-active, connecting to remote peers that have static IP addresses or domain names. If you want, you can also start and stop individual tunnels from the list as well.
SSL-VPN Monitor
The SSL Monitor is available from VPN > Monitor > SSL-VPN Monitor. Using this monitor you can view the activity of SSL VPN sessions. The list displays the user name of the remote user, the IP address of the remote client, and the time the connection was made. You can also see which services are being provided, and delete an active web or tunnel session from the unit.
143
You must select OK when you are ready to apply the filters, otherwise the filter settings will not be applied to the information on the page. You can modify or remove a filter at any time.
Figure 10: Example of adding a log field from the Field drop-down list when filtering log messages
144
The Ref. column helps you to determine the object that is being referenced, and where it is referenced in. The Ref. column also helps you when you need to remove an object but are unable to because it is being referenced. When you select the number within the reference count column, the Object Usage window appears, showing you exactly where the object is referenced within an object type. An object type in this usage is the location of where an object is referenced in. For example, in Figure 12 the Object Usage window shows that the firewall address all is referenced within seven object types; in the default antivirus profile, it referenced once in a security policy. By selecting on the View the list page for these objects icon, you are automatically redirected to the page where the entry is referenced in. When you see the Expand Arrow beside some of the object types, it means that you can either view the location of the object in that particular object type, or modify the object type.
Figure 12: Two views of the Object Usage window, one without any expanded object types, and one with an object type expanded showing the available icons
View the details for this object icon Edit this object icon
145
The Object Usage window also provides a way to view the settings for an object, as seen in Figure 13.
Figure 13: The Object Usage window displaying the object type table
Tip: If you have selected View the list page for these objects, and are on the page where the entry is referenced, you can go back to the previous location by selecting the back option on your browser.
146
The Tag Management page also provides a way to easily locate a specific object, such as a security policy, because of how tags work. For example, an SSL VPN security policy is tagged with the keywords ssl vpn, SSL VPN, remote, and ssl branch office; from the Tag Management page, enter ssl and the tags for that security policy appear; select one of the tags and within the Object Usage window, select to go to the SSL VPN security policy. You can view detailed information about what object is using a tag by selecting one of the tags in the rectangular area that contains a gray background. The Object Usage window appears, which displays similar information as when you select a number in the Ref. column.
Figure 14: Tag Management page with the option to remove four unused tags
147
2 For the first security policy, select it in the row to highlight it. 3 Select the down arrow beside Edit, and then select Add Tags. 4 In the Add Tags window, enter remote ssl, ssl vpn, remote, intranet, non-public, internal and then select the plus sign. By selecting the plus sign, the tag is automatically added. If you do not select the plus sign, the tag is not added and you have to enter the tag again. 5 Select OK. 6 In the second security policy, select it in the row to highlight it. 7 Select the down arrow beside Edit, and then select Add Tags. 8 In the Add Tags window, enter internet, ssl vpn, remote, public, external and then select the plus sign. 9 Select OK. To search for a security policy from Tag Management 1 Go to System > Config > Tag Management. 2 On the Tag Management page, enter remote in the Type to find tags: search field. The tag appears in the rectangular box with the gray background. 3 Select remote to view where the tag is currently being used. 4 In the Object Usage window, select the View the list page for these objects icon in the row of the Object Type. You are redirected to the Policy > Policy > Policy, where you can select the security policy and then make changes to that policy.
148
These icons also include representing an action within the Action column in security policies. For example, for a deny security policy the Action column on the IPv6 Policy page shows a red circle with a line through it. The following table explains the security policy configuration object icons that you can customize the color for.
Table 1: Security policy configuration object icons Icon Definition Allow Deny IPsec SSL VPN IP/Netmask IP Range IPv6 Address FQDN Address Address group Icon Definition Recurring schedule One-time schedule Schedule group Pre-defined service Custom Service Service Group Virtual IP Virtual Server Virtual IP Group
149
150
151
152
LDAP group checking is now supported using the following command. You can set LDAP group checking to perform group object checking or user attribute checking. config user ldap edit new_ldap set group-member-check {group-object | user-attr} set unsupported-ssl {bypass | block} FortiOS Carrier supports GTPv1 release 7.15.0 and GTPv1 release 8.12.0
153
154
tx packets: 0 bytes: 0 errors: 0 dpd: enabled/unnegotiated selectors name: 'phase2' auto-negotiate: disable mode: tunnel src: 0:0.0.0.0/0.0.0.0:0 dst: 0:0.0.0.0/0.0.0.0:0 The get vpn ipsec stats tunnel command gives statistics about the total number of IPSec tunnels and their types, including the number of selectors, how many are up, and any errors. The following get commands for IPsec are now removed: get vpn status concentrators get vpn status ike config get vpn status ike errors get vpn status ike routers get vpn status ike status detailed get vpn status ike status summary get vpn status ipsec get vpn status tunnel stat get vpn status tunnel dialup-list get vpn status tunnel number The following commands were changed: get vpn status ike gateway is replaced by get vpn ike gateway get vpn status tunnel list is replaced by get vpn ipsec tunnel summary and get vpn ipsec tunnel details get vpn status tunnel name is replaced by get vpn ipsec tunnel name get vpn status ike crypto is replaced by get vpn ipsec stats crypto
155
156
157
For example, a FortiGate unit has three ports, where port 1 and port 2 are paired together, because the two networks only need to communicate with each other. If packet arrives on port 1, the FortiGate unit needs to figure out whether the packet goes to port 2 or port 3. With port pairing configured, it is more simple. If packet arrives on port 1, then the FortiGate automatically directs the packet to port 2. The opposite is also true in the other direction. This can be ideal when to groups only need to transfer data between each other. To configure port pairing - web-based manager 1 Go to System > Network > Interface. 2 Select the arrow next to the Create New button and select Port Pair. 3 Enter a Name for the port pair. 4 Select the physical or virtual ports from the Available Members list and select the rightfacing arrow to add the ports to the Selected Members. There can be only two ports added. 5 Select OK. To configure port pairing - CLI config system port-pair edit <pair_name> set member <port_names> end When configuring security policies with the port pairs, selecting the Source Interface automatically populates the Destination Interface, and vice versa. All other aspects of the security policy configuration remain the same.
158
IP Reservation
The IP Reservation feature allows you to reserve an IP address that is on a DHCP network for a user who wants to always assign that same IP address to one of the DHCP networks hosts. The IP Reservation menu, System > Network > IP Reservation, allows you to reserve specific IP addresses. When you are configuring these IP addresses, you also include the MAC address of that DHCP host so that the FortiGate unit can use it to lookup the IP address in the IP reservation table, which is sent back to the DHCP client. You can also select the type of IP address, if its an IPsec or regular IP address.
159
SNMP enhancements
The following procedure assumes that you are already in System > Maintenance > Firmware. To install the new firmware from the partition 1 On the Firmware page, select the check box in the row of the firmware image FortiOS 4.0 MR3. 2 Select the Upgrade icon, located above the table. The following message appears: The page at http://172.16.177.153 says: System will reboot immediately and the current non-active partition will be set as the default boot partition. Continue? 3 Select OK. The Boot alternate firmware page appears with the following message: Please wait for system reboot to the new partition. Refresh your browser after a few minutes. The unit reboots with the FortiOS 4.0 MR3 as the firmware image actively running on the unit.
SNMP enhancements
The SNMP feature contains several enhancements, as well as changes to the SNMP menu in the web-based manager. Previously, for SNMP OIDs in FortiOS 4.0, the FortiOS OIDs were re-numbered so that each separate Fortinet product has its own root in the FortiOS OID space. SNMP 3.0 OIDs were still supported in FortiOS 4.0; however, both types of OIDs appear during an SNMP walk. In FortiOS 4.0 MR3 release, they are no longer supported so that only 4.0 SNMP OIDs appear.
Note: IPv6 is now supported for SNMP.
SNMPv3
SNMPv3 is now supported. Within the SNMP configuration settings, you can configure SNMPv3 users, and include the events as well. The SNMP menu (System > Config > SNMP) provides all the configuration settings to create multiple SNMPv3 users. Each user can have multiple events enabled for them, as well as their specific security level. Multiple notification hosts can also be configured for each user. SNMPv3 is usually included for additional security and remote configuration enhancements to SNMP. SNMPv3 provides confidentiality, integrity and authentication. For additional information about SNMPv3, see RFC 3411-3418.
160
Endpoint NAC download portal and recommendation portal replacement messages are also updated to the new color scheme and image embedding feature. HTTP replacement messages are also updated.
161
162
2 Enter the following command within the global VDOM: config system accprofile 3 Modify the vdom access profile first: edit vdom set scope vdom next The admin_vdom account will now be only able to access VDOMs within the configuration. 4 Enter the following commands to modify the global access profile: edit global set scope global set admingrp read-write set authgrp read-write set endpoint-control-grp read-write set fwgrp read-write set loggrp read set mntgrp read-write set netgrp read-write set routegrp read-write set sysgrp read-write set updategrp read-write set utmgrp read-write set vpngrp read-write set wanoptgrp read-write end 5 Enter the following command to apply the new global access profile to the existing admin_global administrator account: config system admin edit admin_global set accprofile global end You can verify that the access profiles have their global and VDOM privileges by going to System > Admin > Administrators and viewing the Scope column. In the Scope column, admin_vdom contains VDOM: vdom_1, and in the admin_global.
163
The priority of a cluster unit is determined by its device priority, the number of monitored interfaces that are functioning, its age in the cluster and its serial number. Priorities are used to select a primary unit and to set an order of all of the subordinate units. Thus the priority order of a cluster unit can change depending on configuration settings, link failures and so on. Since weights are also set using this priority order the weights are independent of specific cluster units but do depend on the role of the each unit in the cluster. You can use the following command to display the priority order of units in a cluster. The following example displays the priority order for a cluster of 5 FortiGate-620B units: get system ha status Model: 620 Mode: a-p Group: 0 Debug: 0 ses_pickup: disable Master:150 head_office_cla FG600B3908600825 0 Slave :150 head_office_clb FG600B3908600705 1 Slave :150 head_office_clc FG600B3908600702 2 Slave :150 head_office_cld FG600B3908600605 3 Slave :150 head_office_cle FG600B3908600309 4 number of vcluster: 1 vcluster 1: work 169.254.0.1 Master:0 FG600B3908600825 Slave :1 FG600B3908600705 Slave :2 FG600B3908600702 Slave :3 FG600B3908600605 Slave :4 FG600B3908600309 The cluster units are listed in priority order starting at the 6th output line. The primary unit always has the highest priority and is listed first followed by the subordinate units in priority order. The last 5 output lines list the cluster units in vcluster 1 and are not always in priority order. The default static weight for each cluster unit is 40. This means that sessions are distributed evenly among all cluster units. You can use the set weight command to change the static weights of cluster units to distribute sessions to cluster units depending on their priority in the cluster. The weight can be between 0 and 255. Increase the weight to increase the number of connections processed by the cluster unit with that priority. You set the weight for each unit separately. For the example cluster of 5 FortiGate-620B units you can set the weight for each unit as follows: config system ha set mode a-a set schedule weight-roud-robin set weight 0 5 set weight 1 10 set weight 2 15 set weight 3 20 set weight 4 30 end If you enter the get command to view the HA configuration the output for weight would be: weight 5 10 15 20 30 40 40 40 40 40 40 40 40 40 40 40 This configuration has the following results if the output of the get system ha status command is that shown above:
164
The first five connections are processed by the primary unit (host name head_office_cla, priority 0, weight 5). From the output of the The next 10 connections are processed by the first subordinate unit (host name head_office_clb, priority 1, weight 10) The next 15 connections are processed by the second subordinate unit (host name head_office_clc, priority 2, weight 15) The next 20 connections are processed by the third subordinate unit (host name head_office_cld, priority 3, weight 20) The next 30 connections are processed by the fourth subordinate unit (host name head_office_cle, priority 4, weight 30)
165
set smtp-proxy-threshold <weight> <low> <high> end For each option, the weight range is 0 to 255 and the default weight is 5. The low and high watermarks are a percent (0 to 100). The default low and high watermarks are 0 which means they are disabled. The high watermark must be greater than the low watermark. For CPU and memory usage the low and high watermarks are compared with the percentage CPU and memory use of the cluster unit. For each of the UTM proxies the high and low watermarks are compared to a number that represents percent of the max number of proxy sessions being used by a proxy. This number is calculated using the formula: proxy usage = (current sessions * 100) / max sessions where: current sessions is the number of active sessions for the proxy type. max sessions is the session limit for the proxy type. The session limit depends on the FortiGate unit and its configuration. You can use the following command to display the maximum and current number of sessions for a UTM proxy: get test {ftpd | http | imap | nntp | pop3 | smtp} 4
Use the following command to set the CPU usage threshold weight to 30, low watermark to 60, and high watermark to 80. This command also sets the memory usage threshold weight to 10, low watermark to 60, and high watermark to 90. config system ha set mode a-a
FortiOS Handbook v3 Whats New 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
166
62
0_
ha
_1
62
0_
ha _2
62
0_
ha
_3
set schedule weight-round-robin set cpu-threshold 30 60 80 set memory-threshold 10 60 90 end The static weights for the cluster units remain at the default values of 40. Since this command changes the mode to a-a and the schedule to weight-round-robin the weight settings a synchronized to all cluster units.
Note: For FortiOS 4.0 MR3, the static weights assigned to cluster units using the set weight have changed. The default value is 40 and the range is now 0 to 255.
As a result of this configuration, if the CPU usage of 620_ha_1 reaches 80% the static weight for 620_ha_1 is reduced from 40 to 10 and correspondingly fewer sessions are load balanced to it. If the memory usage of this same cluster unit also reaches 90% the static weight further reduces to 0 and no new sessions are load balanced to it. If the memory usage of a 620_ha_2 reaches 90% the static weight of 620_ha_2 reduces to 30 and 30 and fewer new sessions are load balanced to it. Now that you have set the basic weighted load balancing configuration for the cluster you can configure different settings on each cluster unit. For example, to set the HTTP usage threshold weight to 20, low watermark to 60, and high watermark to 90 for 620_ha_2 use the execute ha manage command to log into the 620_ha_2 CLI. Then enter the following command: config system ha set http-proxy-threshold 20 60 90 end To set the pop3 usage threshold weight to 20, low watermark to 60, and high watermark to 90 for 620_ha_3 use the execute ha manage command to log into the 620_ha_3 CLI. Then enter the following command: config system ha set pop3-proxy-threshold <weight> <low> <high> end
167
If the VRRP virtual router ID is 200 the virtual MAC would be 00-00-5E-00-01-c8.
The VRRP virtual MAC address feature is disabled by default. Wen you enable the feature on a FortiGate interface, all of the VRRP routers added to that interface use their own VRRP virtual MAC address. Each virtual MAC address will be different because each virtual router has its own ID. Use the following command to enable the VRRP virtual MAC address on the port2 interface and add a VRRP virtual router with ID 5, IP address 10.31.101.120 and priority 255. config system interface edit port2 set vrrp-virtual-mac enable config vrrp edit 5 set vrip 10.31.101.120 set priority 255 end end The port2 interface will now accept packets sent to the MAC address 00-00-5E-00-01-05.
Subsecond failover can accelerate HA failover depending on the FortiGate unit HA and hardware configuration and the network configuration. Network devices that respond slowly to an HA failover can prevent this feature from reducing failover times to less than a second. Also, subsecond failover can normally only be achieved for a cluster of two units operating in Transparent mode with only two interfaces connected to the network. For best subsecond failover results, the recommended heartbeat interval is 100ms and the recommended lost heartbeat threshold is 5. config system ha set hb-lost-threshold 5 set hb-interval 1 end
168
Figure 16: The Static Route page with the priority and distance columns displayed
When configuring a static route (or when modifying its settings), you can now include a comment within the static route. If you want to configure the priority and/or distance within a static route, you must select Advanced... to display priority and distance options.
Example of using the source IP address feature to track logs at a syslog server
Management wants to be able to track logs at a syslog server. There are five log devices; two FortiAnalyzer units that are being used for archival purposes, and three Syslog servers that store all other log files. All log devices have been configured and you must edit the existing Syslog server configuration for the Syslog server that management wants tracked, syslog_2. The source IP address is 172.20.120.155.
169
To include the source IP address to track logs in the existing configuration 1 Log in to the CLI. 2 Enter the following command: config log syslog2 setting 3 In the syslog_2 configuration, enter the following commands: set source-ip 172.20.120.155 end 4 View the services for syslog_2 using the following command: get system source-ip status
Protocol Options
When accessing Policy > Policy > Protocol Options, you will notice that you are directed to the Edit Protocol Options page. This page is referred to as the Configuration Settings page, similar to how the UTM profiles and sensors are accessed. A default protocol options list is available as well as your configured protocol options lists. You can create a new protocol option list from the Configuration Settings page by selecting the Create New icon. If you want to view a list of all protocol option lists, select the View List icon. You can access a protocol option list at any time on the Settings page by selecting one from the drop-down list beside the Create New icon.
FTPS support
FTPS is now supported within the Protocol Options page as well as within the UTM features. This support extends the SSL proxy so that decrypted FTPS data can be examined by the proxies.
170
171
IKE negotiation
The IKE negotiation process now provides options for how the negotiation is controlled when there is no traffic, as well as how long the FortiGate unit waits for the negotiation to occur. Within the CLI, two new commands help you to configure the negotiationtimeout (which is new) and auto-negotiation which now replaces autokeepalive or set keepalive {enable | disable}. The auto-negotiation command controls whether IKE is negotiation even when there is no traffic. This command would usually be used where there is multiple redundant or overlapping tunnels and there is a need to have the primary connection established. When enabled, the FortiGate unit keeps trying to negotiation IKE event if the link is down and traffic is flowing over a secondary tunnel. For auto-negotiation, if the previous configuration has DPD enabled, the upgrade process automatically enables auto-negotiation so that the behavior is the same as previously configuration. The negotiation-timeout command controls how long the FortiGate unit waits for IKE to negotiate, similar to the web-based managers timeout settings. The default time is 30 seconds. If DPD was enabled in a previous configuration, the negotiate-timeout settings will be that of the dpd-retrycount and dpd-retryinterval so that the FortiGate unit will time out connections at the same rate as they would have in the previous build.
172
You can also use the CLI command redirect-no-content which behaves in the following way: enabled if extracted URL is blocked by this feature, the HTTP response contains no content, for example message body is no present. disabled the value from Blocked Page redirect header name configuration includes both the redirect header and the message body.
173
174
175
176
Firewall features
The FortiGate unit provides unified threat management by including a rich feature set to protect your network from unwanted attacks. This section provides an overview of what the FortiGate unit can protect against. Each of these elements are configured and added to security policies as a means of instructing the FortiGate unit what to do when encountering an security threat.
Antivirus
Antivirus is a group of features that are designed to prevent unwanted and potentially malicious files from entering your network. These features all work in different ways, whether by checking for a file size, name, type, or the presence of a virus or grayware signature. The antivirus scanning routines used are designed to share access to the network traffic. This way, each individual feature does not have to examine the network traffic as a separate operation, reducing overhead significantly. For example, if you enable file filtering and virus scanning, the resources used to complete these tasks are only slightly greater than enabling virus scanning alone. Two features do not require twice the resources.
177
Firewall features
Antivirus scanning function includes various modules and engines that perform separate tasks. The FortiGate unit performs antivirus processing in the following order: File size File pattern File type Virus scan Grayware Heuristics
If a file fails any of the tasks of the antivirus scan, no further scans are performed. For example, if the file fakefile.exe is recognized as a blocked pattern, the FortiGate unit will send the recipient a message informing them that the original message had a virus, and the file will be deleted or quarantined. The virus scan, grayware, heuristics, and file type scans will not be performed as the file is already been determined to be a threat and has been dealt with. For more information on FortiGate antivirus processes, features and configuration, see the UTM chapter.
Web Filtering
Web filtering is a means of controlling the content that an Internet user is able to view. With the popularity of web applications, the need to monitor and control web access is becoming a key component of Secure Content Management systems that employ antivirus, web filtering, and messaging security. Important reasons for controlling web content include: Lost productivity because employees are accessing the web for non-business reasons. Network Congestion - valuable bandwidth is being used for non-business purposes and legitimate business applications suffer. Loss or exposure of confidential information through chat sites, non-approved email systems, instant messaging, and peer-to-peer file sharing. Increased exposure to web-based threats as employees surf non-business related web sites. Legal liability when employees access/download inappropriate and offensive material. Copyright infringement caused by employees downloading and/or distributing copyrighted material.
As the number and severity of threats increase on the web, the risk potential is increasing within a company's network as well. Casual non-business related web surfing has caused many businesses countless hours of legal litigation as hostile environments have been created by employees who download and view offensive content.web-based attacks and threats are also becoming increasingly sophisticated. New threats and web-based applications that are causing additional problems for corporations include: Spyware/Grayware Phishing Instant Messaging Peer-to-Peer File Sharing Streaming Media Blended Network Attacks
178
Firewall features
Application control
Using the application control UTM feature, your FortiGate unit can detect and take action against network traffic depending on the application generating the traffic. Application control is a user-friendly and powerful way to use Intrusion Protection features to log and manage the behavior of application traffic passing through the FortiGate unit. Application control uses IPS protocol decoders that can analyze network traffic to detect application traffic even if the traffic uses non-standard ports or protocols. The FortiGate unit can recognize the network traffic generated by a large number of applications. You can create application control lists that specify the action to take with the traffic of the applications you need to manage and the network on which they are active, and then add application control lists to the security policies that control the network traffic you need to monitor.
Spyware/Grayware
Spyware is also known as Grayware. Spyware is a type of computer program that attaches itself to a users operating system. It does this without the users consent or knowledge. It usually ends up on a computer because of something the user does such as clicking on a button in a popup window. Spyware can do a number of things such as track the users Internet usage, cause unwanted popup windows, and even direct the user to a host web site. It is estimated that 80% of all personal computers are infected with spyware. For further information, visit the FortiGuard Center. Some of the most common ways of grayware infection include: Downloading shareware, freeware or other forms of file-sharing services Clicking on pop-up advertising Visiting legitimate web sites infected with grayware
Phishing
Phishing is the term used to describe social engineering attacks that use web technology to trick users into revealing personal or financial information. Phishing attacks use web sites and emails that claim to be from legitimate financial institutions to trick the viewer into believing that they are legitimate. Although phishing is initiated by spam email, getting the user to access the attackers web site is always the next step.
179
Firewall features
Pharming
Pharming is a next generation threat that is designed to identify, and extract financial, and other key pieces of information for identity theft. Pharming is much more dangerous than Phishing because it is designed to be completely hidden from the end user. Unlike phishing attacks that send out spam email requiring the user to click to a fraudulent URL, Pharming attacks require no action from the user outside of their regular web surfing activities. Pharming attacks succeed by redirecting users from legitimate web sites to similar fraudulent web sites that have been created to look and feel like the authentic web site.
Instant messaging
Instant Messaging presents a number of problems. Instant Messaging can be used to infect computers with spyware and viruses. Phishing attacks can be made using Instant Messaging. There is also a danger that employees may use instant messaging to release sensitive information to an outsider.
Peer-to-peer
Peer-to-Peer networks are used for file sharing. Such files may contain viruses. Peer-to-Peer applications take up valuable network resources and lower employee productivity but also has legal implications with the downloading of copyrighted material. Peer-to-Peer file sharing and applications can also be used to expose company secrets.
Streaming media
Streaming media is a method of delivering multimedia, usually in the form of audio or video to Internet users. The viewing of streaming media has increased greatly in the past few years. The problem with this is the way it impacts legitimate business.
Antispam/Email Filter
The FortiGate unit performs email filtering (formerly called antispam) for IMAP, POP3, and SMTP email. Email filtering includes both spam filtering and filtering for any words or files you want to disallow in email messages. If your FortiGate unit supports SSL content scanning and inspection you can also configure spam filtering for IMAPS, POP3S, and SMTPS email traffic.
180
Firewall features
You can configure the FortiGate unit to manage unsolicited commercial email by detecting and identifying spam messages from known or suspected spam servers. The FortiGuard Antispam Service uses both a sender IP reputation database and a spam signature database, along with sophisticated spam filtering tools, to detect and block a wide range of spam messages. Using FortiGuard Antispam protection profile settings you can enable IP address checking, URL checking, E-mail checksum check, and Spam submission. Updates to the IP reputation and spam signature databases are provided continuously via the global FortiGuard distribution network. From the FortiGuard Antispam Service page in the FortiGuard center you can use IP and signature lookup to check whether an IP address is blacklisted in the FortiGuard antispam IP reputation database, or whether a URL or email address is in the signature database.
181
Firewall features
Intrusion Protection
The FortiGate Intrusion Protection system combines signature detection and prevention with low latency and excellent reliability. With intrusion Protection, you can create multiple IPS sensors, each containing a complete configuration based on signatures. Then, you can apply any IPS sensor to each protection profile. The FortiGate intrusion protection system protects your network from outside attacks. Your FortiGate unit has two techniques to deal with these attacks. Anomaly-based defense is used when network traffic itself is used as a weapon. A host can be flooded with far more traffic than it can handle, making the host inaccessible. The most common example is the denial of service attack, in which an attacker directs a large number of computers to attempt normal access of the target system. If enough access attempts are made, the target is overwhelmed and unable to service genuine users. The attacker does not gain access to the target system, but it is not accessible to anyone else. The FortiGate unit DoS feature will block traffic over a certain threshold from the attacker, allowing connections from other legitimate users. Signature-based defense is used against known attacks or vulnerability exploits. These often involve an attacker attempting to gain access to your network. The attacker must communicate with the host in an attempt to gain access, and this communication will include particular commands or sequences of commands and variables. The IPS signatures include these command sequences, allowing the FortiGate unit to detect and stop the attack. The basis of signature-based intrusion protection are the IPS signatures, themselves. Every attack can be reduced to a particular string of commands or a sequence of commands and variables. Signatures include this information so your FortiGate unit knows what to look for in network traffic. Signatures also include characteristics about the attack it describes. These characteristics include the network protocol in which it will appear, the vulnerable operating system, and the vulnerable application. Before examining network traffic for attacks, the FortiGate will identify each protocol appearing in the traffic. Attacks are protocol-specific so your FortiGate unit conserves resources by looking for attacks only in the protocols used to transmit them. For example, the FortiGate unit will only examine HTTP traffic for the presence of a signature describing an HTTP attack. Once the protocol decoders separate the network traffic by protocol, the IPS engine examines the network traffic for the attack signatures. The IPS engine does not examine network traffic for all signatures, however. You must first create an IPS sensor and specify which signatures are included. You do not have to choose each signature you want to include individually, however. Instead, filters are used to define the included signatures. IPS sensors contain one or more IPS filters. A filter is simply a collection of signature attributes you specify. The signatures that have all of the attributes specified in a filter are included in the IPS signature. For example, if your FortiGate unit protects a Linux server running the Apache web server software, you could create a new filter to protect it. Set OS to Linux, and Application to Apache and the filter will include only the signatures applicable to both Linux and Apache. If you wanted to scan for all the Linux signatures and all the Apache signatures, you would create two filters, one for each. For more information on FortiGate IPS processes, features and configuration, see the UTM chapter.
182
Firewall features
Traffic Shaping
Traffic shaping, when included in a security policy, controls the bandwidth available to, and sets the priority of the traffic processed by, the policy. Traffic shaping makes it possible to control which policies have the highest priority when large amounts of data are moving through the FortiGate unit. For example, the policy for the corporate web server might be given higher priority than the policies for most employees computers. An employee who needs extra high speed Internet access could have a special outgoing policy set up with higher bandwidth. Traffic shaping is available for security policies whose Action is ACCEPT, IPSEC, or SSLVPN. It is also available for all supported services, including H.323, TCP, UDP, ICMP, and ESP Traffic shaping cannot increase the total amount of bandwidth available, but you can use it to improve the quality of bandwidth-intensive and sensitive traffic. The bandwidth available for traffic set in a traffic shaper is used to control data sessions for traffic in both directions. For example, if guaranteed bandwidth is applied to an internal and an external FTP policy, and a user on an internal network uses FTP to put and get files, both the put and get sessions share the bandwidth available to the traffic controlled by the policy. Once included in a security policy, the guaranteed and maximum bandwidth is the total bandwidth available to all traffic controlled by the policy. If multiple users start multiple communications session using the same policy, all of these communications sessions must share from the bandwidth available for the policy. However, bandwidth availability is not shared between multiple instances of using the same service if these multiple instances are controlled by different policies. For example, you can create one FTP policy to limit the amount of bandwidth available for FTP for one network address and create another FTP policy with a different bandwidth availability for another network address Traffic shaping attempts to normalize traffic peaks/bursts to prioritize certain flows over others. But there is a physical limitation to the amount of data which can be buffered and to the length of time. Once these thresholds have been surpassed, frames and packets will be dropped, and sessions will be affected in other ways. For example, incorrect traffic shaping configurations may actually further degrade certain network flows, since the excessive discarding of packets can create additional overhead at the upper layers that may be attempting to recover from these errors. A basic traffic shaping approach is to prioritize certain traffic flows over other traffic whose potential discarding is less advantageous. This would mean that you accept sacrificing certain performance and stability on low-priority traffic, in order to increase or guarantee performance and stability to high-priority traffic. If, for example, you are applying bandwidth limitations to certain flows, you must accept the fact that these sessions can be limited and therefore negatively impacted. Traffic shaping applied to a security policy is enforced for traffic which may flow in either direction. Therefore a session which may be set up by an internal host to an external one, through an Internal-to-External policy, will have traffic shaping applied even if the data stream flows external to internal. One example may be an FTP get or a SMTP server connecting to an external one, in order to retrieve email.
183
Note that traffic shaping is effective for normal IP traffic at normal traffic rates. Traffic shaping is not effective during periods when traffic exceeds the capacity of the FortiGate unit. Since packets must be received by the FortiGate unit before they are subject to traffic shaping, if the FortiGate unit cannot process all of the traffic it receives, then dropped packets, delays, and latency are likely to occur. For more information on traffic shaping, see the Traffic Shaping chapter.
NAT mode
In NAT mode, the FortiGate unit is visible to the network that it is connected to. All of its interfaces are on different subnets. Each interface that is connected to a network must be configured with an IP address that is valid for that subnetwork. You would typically use NAT mode when the FortiGate unit is deployed as a gateway between private and public networks. In its default NAT mode configuration, the FortiGate unit functions as a firewall. Security policies control communications through the FortiGate unit to both the Internet and between internal networks. In NAT mode, the FortiGate unit performs network address translation before IP packets are sent to the destination network. For example, a company has a FortiGate unit as their interface to the Internet. The FortiGate unit also acts as a router to multiple sub-networks within the company.
Figure 17: FortiGate unit in NAT mode
172 .20 WA traf NAT .12 N 1 fic po 0.1 b l 29 i ext etw cies ern ee c o al n n in ntr etw tern ollin ork al a g s. nd P 10. ort 2 10. 10.
P tr olic inte affic ies c rna betw ontr l ne ee ollin two n g rks k . r o etw N 2 / 4 l na 10.0 r e . Int .10 10
184
In this situation, as shown in Figure 17, the FortiGate unit is set to NAT mode. Using this mode, the FortiGate unit can have a designated port for the Internet, in this example, wan1 with an address of 172.20.120.129, which is the public IP address. The internal network segments are behind the FortiGate unit and invisible to the public access, for example port 2 with an address of 10.10.10.1. The FortiGate unit translates IP addresses passing through it to route the traffic to the correct subnet or the Internet.
nt Se et k c Pa Inte rna l
When the web server sends the response, it sends it to what it believes to be the originating address, the FortiGate wan1 address, 172.20.120.129. When the FortiGate unit receives the information, it determines where it should go by looking at its session information. Using security policies, it determines that the information should be going to the originating user at 10.10.10.2. The FortiGate changes the destination IP to the correct user and delivers the packet.
20 0. .2 2 50 0. 2. .1 17 .10 n: 0 io : 1 at ce tin ur es o D S
WA N
1 2
d ive ce Re cket Pa
20 0. 9 .2 12 50 0. 2. 12 17 0. n: .2 io 72 at 1 tin e: es rc D ou S
185
Figure 19: Web server sends to FortiGate external address and translated to internal address
C tP en .2 Cli 0.10 .1 10 d ive ce et e R ck Pa Inte rna l WA N
1 2
Throughout this exchange, which occurs in nanoseconds, and because of network address translation, the web server does not know that the originating address is really 10.10.10.2, but 172.20.120.129.
.2 10 0 0. . 2 .1 20 10 0 . n: . 5 io 72 at 1 tin e: es r c D ou S
nt Se et k c Pa
er erv 20 S . b 0 We 50.2 2. 7 1
Transparent mode
In Transparent mode, the FortiGate unit is invisible to the network. All of its interfaces are on the same subnet and share the same IP address. To configure the FortiGate unit for your network, all you have to do is configure a management IP address and a default route. You would typically use the FortiGate unit in Transparent mode on a private network behind an existing firewall or behind a router. In Transparent mode, the FortiGate unit also functions as a firewall. Security policies control communications through the FortiGate unit to the Internet and internal network. No traffic can pass through the FortiGate unit until you add security policies.
186
For example, the company has a router or other firewall in place. The network is simple enough that all users are on the same internal network. They need the FortiGate unit to perform antispam, antivirus and intrusion protection and similar traffic scanning. In this situation, as shown in Figure 20, the FortiGate unit is set to transparent mode. The traffic passing through the FortiGate unit does not change the addressing from the router to the internal network. Security policies and protection profiles define the type of scanning the FortiGate unit performs on traffic entering the network.
Figure 20: FortiGate unit in transparent mode
20
4.2
3.1
.5 10 .10
By default when shipped, the FortiGate unit operates in NAT mode. To use the FortiGate unit in Transparent mode, you need to switch its mode. When switched to a different mode, the FortiGate unit does not need to be restarted; the change is automatic. In the following example, the steps change the FortiGate unit to Transparent mode with an IP of 10.11.101.10, netmask of 255.255.255.0 and a default gateway of 10.11.101.1 To enable Transparent mode - web-based manager 1 Go to System > Dashboard > Status. 2 Select the [Change] link for Operation Mode and select Transparent from the dropdown list. 3 Enter the Management IP address and netmask 10.11.101.10 255.255.255.0. 4 Enter the Default Gateway address of 10.11.101.1. 5 Select Apply. To enable Transparent mode - CLI config system settings set opmode transparent set manageip 10.11.101.10 255.255.255.0 set gateway 10.11.101.1 end
v3 FortiGate Fundamentals 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
G ic bl pu to k ay or ew tw at ne
.10 .2 WA N1 Inte rna
187
For information on unique Transparent mode firewall configurations, see Advanced firewall concepts on page 489.
Note: This guide and its examples are constructed with the FortiGate unit running in NAT mode, unless otherwise noted.
188
Life of a Packet
Directed by security policies, a FortiGate unit screens network traffic from the IP layer up through the application layer of the TCP/IP stack. This chapter provides a general, high-level description of what happens to a packet as it travels through a FortiGate security system. The FortiGate unit performs three types of security inspection: stateful inspection, that provides individual packet-based security within a basic session state flow-based inspection, that buffers packets and uses pattern matching to identify security threats proxy-based inspection, that reconstructs content passing through the FortiGate unit and inspects the content for security threats.
Each inspection component plays a role in the processing of a packet as it traverses the FortiGate unit en route to its destination. To understand these inspections is the first step to understanding the flow of the packet.
Stateful inspection
With stateful inspection, the FortiGate unit looks at the first packet of a session to make a security decision. Common fields inspected include TCP SYN and FIN flags to identity the start and end of a session, the source/destination IP, source/destination port and protocol. Other checks are also performed on the packed payload and sequence numbers to verify it as a valid communication and that the data is not corrupted or poorly formed. The FortiGate unit makes the decision to drop, pass or log a session based on what is found in the first packet of the session. If the FortiGate unit decides to drop or block the first packet of a session, then all subsequent packets in the same session are also dropped or blocked without being inspected. If the FortiGate unit accepts the first packet of a session, then all subsequent packets in the same session are also accepted without being inspected.
189
Flow inspection
Life of a Packet
1 3 2
SY N, IP, TC 1 P 2
3
nt Se et ck Pa
1 3 2
ed eiv t c Re cke Pa
Flow inspection
With flow inspection, the FortiGate unit samples multiple packets in a session and multiple sessions, and uses a pattern matching engine to determine the kind of activity that the session is performing and to identify possible attacks or viruses. For example, if application control is operating, flow inspection can sample network traffic and identify the application that is generating the activity. Flow-based antivirus can sample network traffic and determine if the content of the traffic contains a virus, IPS can sample network traffic and determine if the traffic constitutes an attack. The security inspection occurs as the data is passing from its source to its destination. Flow inspection identifies and blocks security threats in real time as they are identified.
Figure 22: Flow inspection of packets through the FortiGate unit
3 2
nt Se et ck Pa
1 2
d ive ce et e R ck Pa
Flow-based inspections typically require less processing than proxy-based inspection, and therefore flow-based antivirus performance can be better than proxy-based antivirus performance. However, some threats can only be detected when a complete copy of the payload is obtained so, proxy-based inspection tends to be more accurate and complete than flow-based inspection.
190
Life of a Packet
Proxy inspection
Proxy inspection
With flow inspection, the FortiGate unit will pass all the packets between the source and destination, and keeps a copy of the packets in its memory. It then uses a reconstruction engine to build the content of the original traffic. The security inspection occurs after the data has passed from its source to its destination. Proxy inspection examines the content contained a content protocol session for security threats. Content protocols include the HTTP, FTP, and email protocols. Security threats can be found in files and other content downloaded using these protocols. With proxy inspection, the FortiGate unit downloads the entire payload of a content protocol sessions and re-constructs it. For example, proxy inspection can reconstruct an email message and its attachments. After a satisfactory inspection the FortiGate unit passes the content on to the client. If proxy inspection detects a security threat in the content, the content is removed from the communication stream before the it reaches its destination. For example, if proxy inspection detects a virus in an email attachment, the attachment is removed from the email message before its sent to the client. Proxy inspection is the most thorough inspection of all, although it requires more processing power, and this may result in lower performance. If you enable ICAP in a security policy, HTTP traffic intercepted by the policy is transferred to the ICAP servers in the ICAP profile added to the policy. The FortiGate unit is the surrogate, or middle-man, and carries the ICAP responses from the ICAP server to the ICAP client; the ICAP client then responds back, and the FortiGate unit determines the action that should be taken with these ICAP responses and requests.
Figure 23: Proxy inspection of packets through the FortiGate unit
1 3 2
nt Se et ck Pa
1 3 2
d ive ce et e R ck Pa
191
Packet flow
Life of a Packet
Table 2: FortiOS security functions and security layers Security Function Firewall IPsec VPN Traffic Shaping User Authentication Management Traffic SSL VPN Intrusion Prevention Flow-based Antivirus Application Control VoIP inspection Proxy Antivirus Email Filtering Web Filtering (Antispam) Data Leak Prevention Stateful Flow Proxy
9 9 9 9 9 9 9 9 9 9 9 9 9 9
Packet flow
After the FortiGate units external interface receives a packet, the packet proceeds through a number of steps on its way to the internal interface, traversing each of the inspection types, depending on the security policy and UTM profile configuration. The diagram in Figure 24 on page 193 is a high level view of the packets journey. The description following is a high-level description of these steps as a packet enters the FortiGate unit towards its destination on the internal network. Similar steps occur for outbound traffic.
192
Life of a Packet
Packet flow
Packet
Session Helpers
Management Traffic
SSL VPN
User Authentication
Traffic Shaping
Session Tracking
Policy Lookup
No (Fast Path)
UTM
Yes
No
Flow-based Antivirus
Application Control
IPS
Yes
VoIP Inspection Data Leak Prevention
Email Filter
Web Filter
Antivirus
ICAP
IPsec
NAT (SNAT)
3
Routing Interface
1 2
Packet
Interface
Ingress packets are received by a FortiGate interface.The packet enters the system, and the interface network device driver passes the packet to the Denial of Service (DoS) sensors, if enabled, to determine whether this is a valid information request or not.
DoS sensor
DoS scans are handled very early in the life of the packet to determine whether the traffic is valid or port of a DoS attack. Unlike signature-based IPS which inspects all the packets within a certain traffic flow, the DoS module inspects all traffic flows but only tracks packets that can be used for DoS attacks (for example TCP SYN packets), to ensure they are within the permitted parameters. Suspected DoS attacks are blocked, other packets are allowed.
193
Packet flow
Life of a Packet
IPsec
If the packet is an IPsec packet, the IPsec engine attempts to decrypt it. The IPsec engine applies the correct encryption keys to the IPsec packet and sends the unencrypted packet to the next step. IPsec is bypassed when for non-IPsec traffic and for IPsec traffic that cannot be decrypted by the FortiGate unit.
Routing
The routing step determines the outgoing interface to be used by the packet as it leaves the FortiGate unit. In the previous step, the FortiGate unit determined the real destination address, so it can now refer to its routing table and decide where the packet must go next. Routing also distinguishes between local traffic and forwarded traffic and selects the source and destination interfaces used by the security policy engine to accept or deny the packet.
Policy lookup
The policy look up is where the FortiGate unit reviews the list of security policies which govern the flow of network traffic, from the first entry to the last, to find a match for the source and destination IP addresses and port numbers. The decision to accept or deny a packet, after being verified as a valid request within the stateful inspection, occurs here. A denied packet is discarded. An accepted packet will have further actions taken. If IPS is enabled, the packet will go to Flow-based inspection engine, otherwise it will go to the Proxy-based inspection engine. If no other UTM options are enabled, then the session was only subject to stateful inspection. If the action is accept, the packet will go to Source NAT to be ready to leave the FortiGate unit.
Session tracking
Part of the stateful inspection engine, session tracking maintains session tables that maintain information about sessions that the stateful inspection module uses for maintaining sessions, NAT, and other session related functions.
194
Life of a Packet
Packet flow
User authentication
User authentication added to security policies is handled by the stateful inspection engine, which is why Firewall authentication is based on IP address. Authentication takes place after policy lookup selects a security policy that includes authentication. This is also known as identify-based policies. Authentication also takes place before UTM features are applied to the packet.
Management traffic
This local traffic is delivered to the FortiGate unit TCP/IP stack and includes communication with the web-based manager, the CLI, the FortiGuard network, log messages sent to FortiAnalyzer or a remote syslog server, and so on. Management traffic is processed by applications such as the web server which displays the FortiOS web-based manager, the SSH server for the CLI or the FortiGuard server to handle local FortiGuard database updates or FortiGuard Web Filtering URL lookups.
Session helpers
Some protocols include information in the packet body (or payload) that must be analyzed to successfully process sessions for this protocol. For example, the SIP VoIP protocol uses TCP control packets with a standard destination port to set up SIP calls. To successfully process SIP VoIP calls, FortiOS must be able to extract information from the body of the SIP packet and use this information to allow the voice-carrying packets through the firewall. FortiOS uses session helpers to analyze the data in the packet bodies of some protocols and adjust the firewall to allow those protocols to send packets through the firewall.
Once the packet has passed the flow-based engine, it can be sent to the proxy inspection engine or egress.
195
Life of a Packet
IPsec
If the packet is transmitted through an IPsec tunnel, it is at this stage the encryption and required encapsulation is performed. For non-IPsec traffic (TCP/UDP) this step is bypassed.
Routing
The final routing step determines the outgoing interface to be used by the packet as it leaves the FortiGate unit.
Egress
Upon completion of the scanning at the IP level, the packet exits the FortiGate unit.
196
Life of a Packet
Response from web server 1 Web Server sends response packet to client. 2 Packet intercepted by FortiGate unit interface 2.1 Link level CRC and packet size checking. 3 IP integrity header checking. 4 DoS sensor. 5 Proxy inspection 5.1 Antivirus scanning. 6 Source NAT. 7 Stateful Policy Engine 7.1 Session Tracking 8 Next hop route 9 Interface transmission to network 10 Packet returns to client
Figure 25: Client/server connection
3 2 1
FortiGate Unit
IP Integrity Header checking NAT (DNAT)
DoS Sensor
Session Tracking
User Authentication
Policy Lookup
Routing
Antivirus
Web Filter
FortiGuard
NAT (SNAT)
Routing
Packet Exits
Internet
Web Server
Packet Enters
NAT (SNAT)
Session Tracking
Routing
3 2
197
Life of a Packet
Packet
FortiGate Unit
Interface (Link layer) DoS Sensor IP Integrity Header checking Management Traffic
Routing Table
Routing Module
198
Life of a Packet
8 Flow inspection engine 8.1 IPS 8.2 Application control 9 Source NAT 10 Routing 11 Interface transmission to network 12 Packet forwarded to internal server Response from server 1 Server sends response packet 2 Packet intercepted by FortiGate unit interface 2.1 Link level CRC and packet size checking 3 IP integrity header checking. 4 DoS sensor 5 Flow inspection engine 5.1 IPS 5.2 Application control 6 Stateful policy engine 6.1 Session tracking 7 Next hop route 8 IPsec 8.1 Encrypts packet 9 Routing 10 Interface transmission to network 11 Encrypted Packet returns to internet
199
Life of a Packet
FortiGate Unit
Interface (Link layer) DoS Sensor IP Integrity Header checking IPsec NAT
Packet decryption
Application Control
IPS
Session Tracking
Packet Exits
Source NAT Routing Interface (Link layer)
3 2 1
Internal Server
Destintion NAT DoS Sensor IP Integrity Header checking Interface (Link layer)
3 2 1
Response Packet
Packet Enters
Application Control IPS Session Tracking Next Hop Route
Packet encryption
3 2
200
Firewall components
The FortiGate units primary purpose is to act as a firewall to protect your networks from unwanted attacks and to control the flow of network traffic. The FortiGate unit does this through the use of security policies. The policies you create review the traffic passing through the device to determine if the traffic is allowed into or out of the network, if it is normal network traffic or encrypted VPN or SSL VPN traffic, where it is going and how it should be handled. Every security policy uses similar components. This section briefly describes these components. The following topics are included in this section: Interfaces Addressing Ports Services Schedules UTM profiles
Interfaces
Interfaces, both physical and virtual, enable traffic to flow to and from the internal network, and the Internet and between internal networks. The FortiGate unit has a number of options for setting up interfaces and groupings of subnetworks that can scale to a companys growing requirements.
Physical
FortiGate units have a number of physical ports where you connect Ethernet or optical cables. Depending on the model, they can have anywhere from four to 40 physical ports. Some units have a grouping of ports labelled as internal, providing a built-in switch functionality. In FortiOS, the port names, as labeled on the FortiGate unit, appear in the web-based manager in the Unit Operation the Dashboard. They also appear when you are configuring the interfaces, by going to System > Network > Interface. As shown below, the FortiGate-60C has eight interfaces
Figure 28: FortiGate-60C physical interfaces
201
Interfaces
Firewall components
Normally the internal interface is configured as a single interface shared by all physical interface connections - a switch. The switch mode feature has two states - switch mode and interface mode. Switch mode is the default mode with only one interface and one address for the entire internal switch. Interface mode allows you to configure each of the internal switch physical interface connections separately. This enables you to assign different subnets and netmasks to each of the internal physical interface connections. The larger FortiGate units can also include Advanced Mezzanine Cards (AMC), which can provide additional interfaces (ethernet or optical), with throughput enhancements for more efficient handling of specialized traffic. These interfaces appear in FortiOS as port amc/sw1, amc/sw2 and so on. In the following illustration, the FortiGate-3810A has three AMC cards installed: two single-width (amc/sw1, amc/sw2) and one double-width (amc/dw).
202
Firewall components
Interfaces
For more information on configuring physical ports, see Addressing on page 208.
Administrative access
Interfaces, especially the public-facing ports can be potentially accessed by those who you may not want access to the FortiGate unit. When setting up the FortiGate unit, you can set the type of protocol an administrator must use to access the FortiGate unit. The options include: HTTPS HTTP SSH TELNET PING SNMP
You can select as many, or as few, even none, that are accessible by an administrator.
Example
This example adds an IPv4 address 172.20.120.100 to the WAN1 interface as well as the administrative access to HTTPS and SSH. As a good practice, set the administrative access when you are setting the IP address for the port. To add an IP address on the WAN1 interface - web-based manager 1 Go to System > Network > Interface. 2 Select the WAN1 interface row and select Edit. 3 Select the Addressing Mode of Manual. 4 Enter the IP address for the port of 172.20.120.100/24. 5 For Administrative Access, select HTTPS and SSH. 6 Select OK.
203
Interfaces
Firewall components
To create IP address on the WAN1 interface - CLI config system interface edit wan1 set ip 172.20.120.100/24 set allowaccess https ssh end
Note: When adding to, or removing a protocol, you must type the entire list again. For example, if you have an access list of HTTPS and SSH, and you want to add PING, typing: set allowaccess ping ...only PING will be set. In this case, you must type... set allowaccess https ssh ping
Wireless
A wireless interface is similar to a physical interface only it does not include a physical connection. The FortiWiFi units enables you to add multiple wireless interfaces that can be available at the same time (the FortiWiFi-30B can only have one wireless interface). On FortiWiFi units, you can configure the device to be either an access point, or a wireless client. As an access point, the FortiWiFi unit can have up to four separate SSIDs, each on their own subnet for wireless access. In client mode, the FortiWiFi only has one SSID, and is used as a receiver, to enable remote users to connect to the existing network using wireless protocols. Wireless interfaces also require additional security measures to ensure the signal does not get hijacked and data tampered or stolen.
Virtual domains
Virtual domains (VDOMs) are a method of dividing a FortiGate unit into two or more virtual units that function as multiple independent units. A single FortiGate unit is then flexible enough to serve multiple departments of an organization, separate organizations, or to act as the basis for a service providers managed security service.
Note: Some smaller FortiGate units do not support virtual domains.
VDOMs provide separate security domains that allow separate zones, user authentication, security policies, routing, and VPN configurations. By default, each FortiGate unit has a VDOM named root. This VDOM includes all of the FortiGate physical interfaces, modem, VLAN subinterfaces, zones, security policies, routing settings, and VPN settings. When a packet enters a VDOM, it is confined to that VDOM. In a VDOM, you can create security policies for connections between Virtual LAN (VLAN) subinterfaces or zones in the VDOM. Packets do not cross the virtual domain border internally. To travel between VDOMs, a packet must pass through a firewall on a physical interface. The packet then arrives at another VDOM on a different interface, but it must pass through another firewall before entering the VDOM. Both VDOMs are on the same FortiGate unit. Inter-VDOMs change this behavior in that they are internal interfaces; however their packets go through all the same security measures as on physical interfaces.
204
Firewall components
Interfaces
Example
This example shows how to enable VDOMs on the FortiGate unit and the basic and create a VDOM accounting on the DMZ2 port and assign an administrator to maintain the VDOM. First enable Virtual Domains on the FortiGate unit. When you enable VDOMs, the FortiGate unit will log you out. To enable VDOMs - web-based manager 1 Go to System > Dashboard > Status. 2 In the System Information widget, select Enable for Virtual Domain. The FortiGate unit logs you out. Once you log back in, you will notice that the menu structure has changed. This reflects the global settings for all Virtual Domains. To enable VDOMs - CLI config system global set vdom-admin enable end Next, add the VDOM called accounting. To add a VDOM - web-based manager 1 Go to System > VDOM > VDOM, and select Create New. 2 Enter the VDOM name accounting. 3 Select OK. To add a VDOM - CLI config vdom edit <new_vdom_name> end With the Virtual Domain created, you can assign a physical interface to it, and assign it an IP address. To assign physical interface to the accounting Virtual Domain - web-based manager 1 Go to System > Network > Interface. 2 Select the DMZ2 port row and select Edit. 3 For the Virtual Domain drop-down list, select accounting. 4 Select the Addressing Mode of Manual. 5 Enter the IP address for the port of 10.13.101.100/24. 6 Set the Administrative Access to HTTPS and SSH. 7 Select OK. To assign physical interface to the accounting Virtual Domain - CLI config global config system interface edit dmz2 set vdom accounting set ip 10.13.101.100/24 set allowaccess https ssh next end
205
Interfaces
Firewall components
Virtual LANs
The term VLAN subinterface correctly implies the VLAN interface is not a complete interface by itself. You add a VLAN subinterface to the physical interface that receives VLAN-tagged packets. The physical interface can belong to a different VDOM than the VLAN, but it must be connected to a network route that is configured for this VLAN. Without that route, the VLAN will not be connected to the network, and VLAN traffic will not be able to access this interface.The traffic on the VLAN is separate from any other traffic on the physical interface. FortiGate unit interfaces cannot have overlapping IP addressesthe IP addresses of all interfaces must be on different subnets. This rule applies to both physical interfaces and to virtual interfaces such as VLAN subinterfaces. Each VLAN subinterface must be configured with its own IP address and netmask. This rule helps prevent a broadcast storm or other similar network problems. Any FortiGate unit, with or without VDOMs enabled, can have a maximum of 255 interfaces in Transparent operating mode. In NAT/Route operating mode, the number can range from 255 to 8192 interfaces per VDOM, depending on the FortiGate model. These numbers include VLANs, other virtual interfaces, and physical interfaces. To have more than 255 interfaces configured in Transparent operating mode, you need to configure multiple VDOMs with many interfaces on each VDOM.
Example
This example shows how to add a VLAN, vlan_accounting on the FortiGate unit internal interface with an IP address of 10.13.101.101. To add a VLAN - web-based manager 1 Go to System > Network > Interface and select Create New. The Type is by default set to VLAN. 2 Enter a name for the VLAN to vlan_accounting. 3 Select the Internal interface. 4 Enter the VLAN ID. The VLAN ID is a number between 1 and 4094 that allow groups of IP addresses with the same VLAN ID to be associated together. 5 Select the Addressing Mode of Manual. 6 Enter the IP address for the port of 10.13.101.101/24. 7 Set the Administrative Access to HTTPS and SSH. 8 Select OK. To add a VLAN - CLI config system interface edit VLAN_1 set interface internal set type vlan set vlanid 100 set ip 10.13.101.101/24 set allowaccess https ssh next end
206
Firewall components
Interfaces
Zones
Zones are a group of one or more FortiGate interfaces, both physical and virtual, that you can apply security policies to control inbound and outbound traffic. Grouping interfaces and VLAN subinterfaces into zones simplifies the creation of security policies where a number of network segments can use the same policy settings and protection profiles. When you add a zone, you select the names of the interfaces and VLAN subinterfaces to add to the zone. Each interface still has its own address and routing is still done between interfaces, that is, routing is not affected by zones. Security policies can also be created to control the flow of intra-zone traffic. For example, in the illustration below, the network includes three separate groups of users representing different entities on the company network. While each group has its own set of port and VLANs, in each area, they can all use the same security policy and protection profiles to access the Internet. Rather than the administrator making nine separate security policies, he can add the required interfaces to a zone, and create three policies, making administration simpler.
Figure 32: Network zones
Zone 1 policies
Zo
Zone 3
ne
2p
oli
cie
s
Zone 2 Internal ports 1, 2, 3
You can configure policies for connections to and from a zone, but not between interfaces in a zone. Using the above example, you can create a security policy to go between zone 1 and zone 3, but not between WAN2 and WAN1, or WAN1 and DMZ1.
policies
207
Addressing
Firewall components
Example
This example explains how to set up a zone on the FortiGate unit to include the Internal interface and a VLAN. To create a zone - web-based manager 1 Go to System > Network > Interface. 2 Select the arrow on the Create New button and select Zone. 3 Enter a zone name of Zone_1. 4 Select the Internal interface and the virtual LAN interface vlan_accounting from the previous section. 5 Select OK. To create a zone - CLI config system zone edit Zone_1 set interface internal VLAN_1 end
Addressing
Firewall addresses and address groups define network addresses that you can use when configuring a security policies source and destination address fields. The FortiGate unit compares the IP addresses contained in packet headers with security policy source and destination addresses to determine if the security policy matches the traffic. Addressing in security policies can be IPv4 addresses and address ranges, IPv6 addresses, and fully qualified domain names (FQDNs). A firewall address can contain one or more network addresses. Network addresses can be represented by an IP address with a netmask, an IP address range, or a fully qualified domain name (FQDN). When representing hosts by an IP address with a netmask, the IP address can represent one or more hosts. For example, a firewall address can be: a single computer, such as 192.45.46.45 a subnetwork, such as 192.168.1.0 for a class C subnet 0.0.0.0, which matches any IP address
The netmask corresponds to the subnet class of the address being added, and can be represented in either dotted decimal or CIDR format. The FortiGate unit automatically converts CIDR formatted netmasks to dotted decimal format. Example formats: netmask for a single computer: 255.255.255.255, or /32 netmask for a class A subnet: 255.0.0.0, or /8 netmask for a class B subnet: 255.255.0.0, or /16 netmask for a class C subnet: 255.255.255.0, or /24 netmask including all IP addresses: 0.0.0.0 x.x.x.x/x.x.x.x, such as 192.168.1.0/255.255.255.0 x.x.x.x/x, such as 192.168.1.0/24
208
Firewall components
Addressing
Note: An IP address 0.0.0.0 with netmask 255.255.255.255 is not a valid firewall address.
When representing hosts by an IP Range, the range indicates hosts with continuous IP addresses in a subnet, such as 192.168.1.[2-10], or 192.168.1.* to indicate the complete range of hosts on that subnet. Valid IP Range formats include: x.x.x.x-x.x.x.x, such as 192.168.110.100-192.168.110.120 x.x.x.[x-x], such as 192.168.110.[100-120] x.x.x.*, such as 192.168.110.*
When representing hosts by a FQDN, the domain name can be a subdomain, such as mail.example.com. A single FQDN firewall address may be used to apply a security policy to multiple hosts, as in load balancing and high availability (HA) configurations. FortiGate units automatically resolve and maintain a record of all addresses to which the FQDN resolves. Valid FQDN formats include: <host_name>.<second_level_domain_name>.<top_level_domain_name>, such as mail.example.com <host_name>.<top_level_domain_name>
Caution: Be cautious when employing FQDN firewall addresses. Using a fully qualified domain name in a security policy, while convenient, does present some security risks, because policy matching then relies on a trusted DNS server. Should the DNS server be compromised, security policies requiring domain name resolution may no longer function properly.
Example
This example adds an IPv4 firewall address for guest users of 10.13.101.100 address the port1 interface. To add a firewall IP address to the port1 interface - web-based manager 1 Go to Firewall > Address > Address and select Create New. 2 For the Address Name, enter Guest. 3 Leave the Type as Subnet/IP Range. 4 Enter the IP address of 10.13.101.100/24. 5 For the Interface, select port1. 6 Select OK. To add a firewall IP address to the port1 interface- CLI config firewall address edit Guest set type ipmask set subnet 10.13.101.100/24 set associated-interface port1 end
209
Addressing
Firewall components
Example
This example adds an IPv4 firewall address range for guest users with the range of 10.13.101.100 to 10.13.101.110 addresses on any interface. By setting the interface to Any, the address range is not bound to a specific interface on the FortiGate unit. To add a firewall IP address to the port1 interface - web-based manager 1 Go to Firewall > Address > Address and select Create New. 2 For the Address Name, enter Guest. 3 Leave the Type as Subnet/IP Range. 4 Enter the IP address range of 10.13.101.[100-110]. 5 For the Interface, select Any. 6 Select OK. To add a firewall IP address to the port1 interface - CLI config firewall address edit Guest set type iprange set start-ip 10.13.101.100 set end-ip 10.13.101.110 end
210
Firewall components
Addressing
You can use a diagnose command to view more information about geography-based addressing. The command displays country and address information for the countries that have been added to firewall addresses. diagnose firewall ipgeo {country-list | ip-list | ip2country} Where: country-list shows all of the countries that have been added to a firewall address. ip-list shows the IP addresses of a specified country or all of the countries added to firewall addresses. ip2country shows the country of origin for a specified IP address. The address must be assigned to one of the countries that has been added to a firewall address.
Wildcard masks
Wildcard masks, are common with OSPF and Cisco routers. The use of wildcard masks is most prevalent when building Access Control Lists (ACLs) on Cisco routers. ACLs are filters and make use of wildcard masks to define the scope of the address filter. Masks are used with IP addresses to specify what addresses are permitted and denied. To configure IP addresses on interfaces, the netmask starts with 255. For example, to filter a subnetwork 10.1.1.0 which has a Class C mask of 255.255.255.0, the ACL will require the scope of the addresses to be defined by a wildcard mask which, in this example is 0.0.0.255. When the value of the mask is shown in binary (0s and 1s), the results determine which address bits are the do and dont care bits for processing the traffic. A zero is the do care bit and the one is a dont care bit. This is also known as an inverse mask. For example, an address of 1.1.1.0, and a netmask of 0.0.0.255 would appear in binary as an address of 00000001.00000001.00000001.00000000 and a netmask of 00000000.00000000.00000000.11111111 Based on the binary mask, it can be seen that the first three octets of the address must match the given binary network address exactly (00000001.00000001.00000001). The last set of numbers is made of don't cares (all ones). As such, all traffic that begins with 1.1.1. matches since the last octet o the netmask is don't care. All IP addresses 1.1.1.1 through 1.1.1.255 are acceptable. Wildcard masks are configured in the CLI: config firewall address set type wildcard set wildcard 1.1.1.0/0.0.0.255 end
211
Addressing
Firewall components
Caution: Be cautious when employing FQDN firewall addresses. Using a fully qualified domain name in a security policy, while convenient, does present some security risks, because policy matching then relies on a trusted DNS server. Should the DNS server be compromised, security policies requiring domain name resolution may no longer function properly.
You specify the TTL time in the CLI only. For example, to set the TTL for 30 minutes on an FQDN of www.example.com on port 1, enter the following commands: config firewall address edit FQDN_example set type fdqn set associated-interface port 1 set fqdn www.example.com set cache-ttl 1800 end
Address groups
Similar to zones, if you have a number of addresses or address ranges that require the same security policies, you can put them into address groups, rather than creating multiple similar policies. Because security policies require addresses with homogenous network interfaces, address groups should contain only addresses bound to the same network interface, or to Any addresses whose selected interface is Any are bound to a network interface during creation of a security policy, rather than during creation of the firewall address. For example, if address 1.1.1.1 is associated with port1, and address 2.2.2.2 is associated with port2, they cannot be in the same group. However, if 1.1.1.1 and 2.2.2.2 are configured with an interface of Any, they can be grouped, even if the addresses involve different networks. You cannot mix IPv4 firewall addresses and IPv6 firewall addresses in the same address group.
Example
This example creates an address group accounting, where addresses for User_1 and User_2 have port association of Any. It is recommended to add the addresses you want to add to the group before setting up the address group. To create an address group - web-based manager 1 Go to Firewall > Address > Group, and select Create New. 2 Enter the Group Name of accounting. 3 From the Available Addresses list, select an address and select the down-arrow button to move the address name to the Members list. 4 Repeat step three as many times as required. You can also hold the SHIFT key to select a range of address names from the list. 5 Select OK. To create an address group - CLI config firewall addrgrp edit accounting set member User_1 set member User_2
v3 FortiGate Fundamentals 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
212
Firewall components
Addressing
end
DHCP
The Dynamic Host Configuration Protocol (DHCP) enables hosts to automatically obtain an IP address from a DHCP server. Optionally, hosts can also obtain default gateway and DNS server settings.
Note: DHCP is not available when the FortiGate unit is operating in Transparent mode.
On FortiGate 30B, 50 and 60 series units, a DHCP server is configured, by default, on the Internal interface, as follows:
IP Range Netmask Default gateway Lease time DNS Server 1 192.168.1.110 to 192.168.1.210 255.255.255.0 192.168.1.99 7 days 192.168.1.99
A FortiGate interface can provide the following DHCP services: Basic DHCP servers with up to three IP address ranges per server IPSec DHCP servers for IPSec (VPN) connections DHCP relay for regular Ethernet or IPSec (VPN) connections
An interface cannot provide both a server and a relay for connections of the same type. You can configure one or more DHCP servers on any FortiGate interface. A DHCP server dynamically assigns IP addresses to hosts on the network connected to the interface. The host computers must be configured to obtain their IP addresses using DHCP. The IP range of each DHCP server must match the network address range. The routers must be configured for DHCP relay.
DHCP options
When adding a DHCP server, you have the ability to include DHCP codes and options. The DHCP options are BOOTP vendor information fields that provide additional vendor-independent configuration parameters to manage the DHCP server. For example, you may need to configure a FortiGate DHCP server that gives out a separate option as well as an IP address. For example, an environment that needs to support PXE boot with Windows images. The option numbers and codes are specific to the particular application. The documentation for the application will indicate the values to use. Option codes are represented in a option value/HEX value pairs. The option is a value 1 and 255. You can add up to three DHCP code/option pairs per DHCP server. To configure option 252 with value http://192.168.1.1/wpad.dat - web-based manager 1 Go to System > Network > DHCP Server and select Create New. 2 Select a Mode of Server. 3 Select the blue arrow to expand the Advanced options. 4 Select Options. 5 Enter a Code of 252.
213
Addressing
Firewall components
6 Enter the Options of 687474703a2f2f3139322e3136382e312e312f777061642e646174. In the CLI, use the commands: config system dhcp server edit <dhcp_server_number> set option1 252 687474703a2f2f3139322e3136382e312e312f777061642e646174 end For detailed information about DHCP options, see RFC 2132, DHCP Options and BOOTP Vendor Extensions.
Example
This example sets up a DHCP server on the Internal interface for guests with an IP range of 10.13.101.100 to 10.13.101.110, a default gateway of 10.13.101.2 and address lease of 5 days. To configure a DHCP server on the internal interface - web-based manager 1 Go to Go to System > Network > DHCP Server and select Create New. 2 Select the Interface of Internal. 3 Select the Mode of Server. 4 Enter the IP Range of 10.13.101.100 to 10.13.101.110. 5 Enter a Netmask of 255.255.255.0. 6 Enter a Default Gateway of 10.10.101.2. 7 Select the blue arrow to expand the Advanced options. 8 Set a Lease Time of five days. 9 Select OK. To configure a DHCP server on the internal interface - CLI config system dhcp server edit 1 config ip-range edit 1 set start-ip 10.13.101.100 set end-ip 10.13.101.105 end set server-type regular set interface internal set netmask 255.255.255.0 set default-gateway 10.13.101.2 set lease-time 432000 end A FortiGate interface can also be configured as a DHCP relay. The interface forwards DHCP requests from DHCP clients to an external DHCP server and returns the responses to the DHCP clients. The DHCP server must have appropriate routing so that its response packets to the DHCP clients arrive at the FortiGate unit.
214
Firewall components
Addressing
Example
This example sets up a DHCP relay on the internal interface from the DHCP server located at 172.20.120.55. The FortiGate unit will send a request for an IP address from the defined DHCP server and forward it to the requesting connection. To configure a DHCP relay on the internal interface - web-based manager 1 Go to System > Network > DHCP Server and select Create New. 2 Select the internal interface and select the Mode of Relay. 3 Select the Type of Regular. 4 Enter the DHCP Server IP address of 172.20.120.55. 5 Select OK. To configure a DHCP relay on the internal interface - CLI config system interface edit internal set dhcp-relay-service enable set dhcp-relay-type regular set dhcp-relay-ip 172.20.120.55 end
215
Addressing
Firewall components
To reserve an IP from an assigned list 1 Go to System > Network > DHCP Server. 2 Select the DHCP server from the list. 3 Select IP Reservation and select Add from DHCP Client List. 4 When the DHCP Client List window appears, select the check boxes beside the IP addresses and select Add to Reserved.
IP pools
An IP pool defines a single IP address or a range of IP addresses. A single IP address in an IP pool becomes a range of one IP address. For example, if you enter an IP pool as 1.1.1.1, the IP pool is actually the address range, 1.1.1.1 to 1.1.1.1. Use IP pools to add NAT policies that translate source addresses to addresses randomly selected from the IP pool, rather than the IP address assigned to that FortiGate interface. If a FortiGate interface IP address overlaps with one or more IP pool address ranges, the interface responds to ARP requests for all of the IP addresses in the overlapping IP pools. For example, consider a FortiGate unit with the following IP addresses for the port1 and port2 interfaces: port1 IP address: 1.1.1.1/255.255.255.0 (range is 1.1.1.0-1.1.1.255) port2 IP address: 2.2.2.2/255.255.255.0 (range is 2.2.2.0-2.2.2.255) IP_pool_1: 1.1.1.10-1.1.1.20 IP_pool_2: 2.2.2.10-2.2.2.20 IP_pool_3: 2.2.2.30-2.2.2.40 (1.1.1.0-1.1.1.255) and (1.1.1.10-1.1.1.20) = 1.1.1.10-1.1.1.20 (2.2.2.0-2.2.2.255) & (2.2.2.10-2.2.2.20) = 2.2.2.10-2.2.2.20 (2.2.2.0-2.2.2.255) & (2.2.2.30-2.2.2.40) = 2.2.2.30-2.2.2.40 The port1 interface answers ARP requests for 1.1.1.10-1.1.1.20 The port2 interface answers ARP requests for 2.2.2.10-2.2.2.20 and for 2.2.2.302.2.2.40
The port1 interface overlap IP range with IP_pool_1 is: The port2 interface overlap IP range with IP_pool_2 is: The port2 interface overlap IP range with IP_pool_3 is: And the result is:
Select NAT in a security policy and then select Dynamic IP Pool. Select an IP pool to translate the source address of packets leaving the FortiGate unit to an address randomly selected from the IP pool. IP pools cannot be set up for a zone. IP pools are connected to individual interfaces.
Example
This example sets up an IP Pool with an address range of 10.13.101.100 to 10.13.101.110 for guest accounts on the network. To configure an IP Pool - web-based manager 1 Go to Firewall > Virtual IP > IP Pool and select Create New. 2 Enter the Name of Guest.
v3 FortiGate Fundamentals 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
216
Firewall components
Addressing
3 Enter the IP Range/Subnet of 10.13.101.100-10.13.101.110. 4 Select OK. To configure an IP Pool - CLI config firewall ippool edit Guest set startip 10.13.101.100 set endip 10.13.101.110 end
Scenario 2: The number of source addresses is more than that of IP pool addresses In this case, the FortiGate unit translates IP addresses using a wrap-around mechanism.
217
Addressing
Firewall components
If you enable fixedport in such a case, the FortiGate unit preserves the original source port. But conflicts may occur since users may have different sessions using the same TCP 5 tuples.
Original address 192.168.1.1 192.168.1.2 ...... 192.168.1.10 192.168.1.11 192.168.1.12 192.168.1.13 ...... Change to 172.16.30.10 172.16.30.11 ...... 172.16.30.19 172.16.30.10 172.16.30.11 172.16.30.12 ......
Scenario 3: The number of source addresses is fewer than that of IP pool addresses In this case, some of the IP pool addresses are used and the rest of them are not be used.
Original address 192.168.1.1 192.168.1.2 192.168.1.3 No more source addresses Change to 172.16.30.10 172.16.30.11 172.16.30.12 172.16.30.13 and other addresses are not used
IPv6
Internet Protocol version 6 (IPv6) is the next-generation version of IP addressing, to eventually replace IPv4. IPv6 was developed because there is a concern that in the near future, the available addresses for the IPv4 infrastructure will be exhausted. The IPv6 infrastructure will supplement, and eventually, replace the IPv4 standard. Where IPv4 uses 32 bit addressing, IPv6 uses 128 bit addressing, effectively providing trillions upon trillions of unique addresses, whereas IPv4 can have a a little over 4 billion. With this larger address space, allocating addresses and routing traffic becomes easier, and network address translation (NAT) becomes virtually unnecessary. Where IPv4 addresses are written numerals separated by a decimal, the IPv6 address is written with hexadecimal digits separated by a colon. For example, fe80:218:8bff:fe84:4223. By default, the FortiGate unit is not enabled to use IPv6 addressing. To enable this feature, go to System > Admin > Settings and select IPv6 Support on GUI. When enabled you can use IPv6 addressing on any of the address-dependant components of the FortiGate unit, including security policies, interface addressing, DNS servers. IPv6 addressing can be configured on the web-based manager and in the CLI. For further information on IPV6 in FortiOS, see IPv6 on page 409.
218
Firewall components
Ports
Example
This example adds an IPv6 address 2001:db8:0:1234:0:567:1:1 for the WAN1 interface as well as the administrative access to HTTPS and SSH. As a good practice, set the administrative access when you are setting the IP address for the port. To add an IP address for the WAN1 interface - web-based manager 1 Go to System > Network > Interface. 2 Select WAN1 row and select Edit. 3 Select the Addressing Mode of Manual. 4 Enter the IPv6 Address of 2001:db8:0:1234:0:567:1:1. 5 For Administrative Access select HTTPS and SSH. 6 Select OK. To create IP address for the WAN1 interface - CLI config system interface edit wan1 config ipv6 set ip6-address 2001:db8:0:1234:0:567:1:1 set ip6-allowaccess https ssh end end
Example
This example adds an IPv6 firewall address for guest users of 2001:db8:0:1234:0:567:1:1. To add a firewall IPv6 address - web-based manager 1 Go to Firewall > Address > Address. 2 On the Create New button, click the down arrow on the right. If there is no arrow, ensure you have enabled IPv6 by going to System > Admin > Settings and select IPv6 Support on GUI. 3 Select IPv6 Address. 4 For the Address Name, enter Guest. 5 Enter the IP address of 2001:db8:0:1234:0:567:1:1/128. 6 Select OK. To add a firewall IPv6 address - CLI config firewall address6 edit Guest set ip6 2001:db8:0:1234:0:567:1:1/128 end
Ports
A port is a type of address used by specific applications and processes. The FortiGate unit uses a number of port assignments to send and receive information for basic system operation and communication by default.
219
Ports
Firewall components
Originating traffic
Function DNS lookup; RBL lookup FortiGuard Antispam or Web Filtering rating lookup FDN server list Source and destination port numbers vary by originating or reply traffic. NTP synchronization SNMP traps Port(s) UDP 53 UDP 53 or UDP 8888 UDP 53 (default) or UDP 8888, and UDP 1027 or UDP 1031 UDP 123 UDP 162
Syslog UDP 514 All FortiOS versions can use syslog to send log messages to remote syslog servers. Note: If a secure connection has been configured between a FortiGate and a FortiAnalyzer, Syslog traffic will be sent into an IPSec tunnel. Data will be exchanged over UDP 500/4500, Protocol IP/50. Configuration backup to FortiManager unit or FortiGuard Analysis and Management Service SMTP alert email; encrypted virus sample auto-submit LDAP or PKI authentication TCP 22 TCP 25 TCP 389 or TCP 636
FortiGuard Antivirus or IPS update TCP 443 When requesting updates from a FortiManager unit instead of directly from the FDN, this port must be reconfigured as TCP 8890. FortiGuard Analysis and Management Service FortiGuard Analysis and Management Service log transmission (OFTP) SSL management tunnel to FortiGuard Analysis and Management Service FortiGuard Analysis and Management Service contract validation Quarantine, remote access to logs & reports on a FortiAnalyzer unit, device registration with FortiAnalyzer units (OFTP) RADIUS authentication TCP 443 TCP 514 TCP 541 TCP 10151 TCP 514 TCP 1812
Receiving traffic
When operating in the default configuration, FortiGate units do not accept TCP or UDP connections on any port except the default internal interface, which accepts HTTPS connections on TCP port 443.
Function FortiGuard Antivirus and IPS update push The FDN sends notice that an update is available. Update downloads then occur on standard originating ports for updates. SSH administrative access to the CLI; remote management from a FortiManager unit Telnet administrative access to the CLI; HA synchronization (FGCP L2) Changing the telnet administrative access port number also changes the HA synchronization port number. HTTP administrative access to the web-based manager Port(s) UDP 9443
TCP 22 TCP 23
TCP 80
HTTPS administrative access to the web-based manager; remote TCP 443 management from a FortiManager unit; user authentication for policy override
220
Firewall components
Ports
SSL management tunnel from FortiGuard Analysis and Management Service TCP 541 (FortiOS v3.0 MR6 or later) HA heartbeat (FGCP L2) TCP 703 User authentication keep alive and logout for policy override (default value of TCP 1000 port for HTTP traffic) This port is closed until enabled by the auth-keepalive command. User authentication keepalive and logout for policy override (default value of port for HTTPS traffic) This port is closed until enabled by the auth-keepalive command. Windows Active Directory (AD) Collector Agent User authentication for policy override of HTTP traffic FortiClient download portal This feature is available on FortiGate-1000A, FortiGate-3600A, and FortiGate-5005FA2. User authentication for policy override of HTTPS traffic VPN settings distribution to authenticated FortiClient installations SSL VPN HA TCP 1003
Port 113
TCP port 113 (Ident/Auth) is an exception to the above rule. By default, FortiGate units receiving an IDENT request on this port respond with a TCP RST, which resets the connection. This prevents delay that would normally occur if the requesting host were to wait for the connection attempt to time out. This port is less commonly used today. If you do not use this service, you can make your FortiGate unit less visible to probes. You can disable TCP RST responses to IDENT requests and subject those requests to security policies, and thereby close this port. For each network interface that should not respond to ident requests on TCP port 113, enter the following CLI commands: config system interface edit <port_name> set ident-accept enable end For example, to disable ident responses on a network interface names port1, enter the following commands: config system interface edit port1 set ident-accept enable end
221
Firewall components
Port 541
By default, FortiGate units use this port to initiate an SSL-secured management tunnel connection to centralized device managers such as the FortiGuard Analysis and Management Service. If you do not use centralized management you can make your FortiGate unit less visible to probes. You can disable the management tunnel feature, and thereby close this port using the following CLI command: config sys central-management set status disable end
Virtual IPs can specify translations of packets port numbers and/or IP addresses for both inbound and outbound connections. In Transparent mode, virtual IPs are available from the FortiGate CLI.
Example
This simple example adds a virtual IP of 10.13.100.1 that allows users on the Internet to connect to a web server on the DMZ IP address of 192.168.1.1. In the example, the wan1 interface of the FortiGate unit is connected to the Internet and the dmz1 interface is connected to the DMZ network. To add a static NAT virtual IP for a single IP address - web-based manager 1 Go to Firewall > Virtual IP > Virtual IP and select Create New. 2 For the Name, enter Static_NAT. 3 Select the External interface of wan1 4 Enter the External IP Address of 10.13.100.1. 5 Enter the Mapped IP Address of 192.168.1.1. 6 Select OK.
222
Firewall components
To add a static NAT virtual IP for a single IP address - CLI config firewall vip edit Static_NAT set extintf wan1 set extip 10.13.100.1 set mappedip 192.168.1.1 end
Inbound connections
Virtual IPs can be used in conjunction with security policies whose Action is not DENY to apply bidirectional NAT, also known as inbound NAT. When comparing packets with the security policy list to locate a matching policy, if a security policys Destination Address is a virtual IP, FortiGate units compare a packets destination address to the virtual IPs external IP address. If they match, the FortiGate unit applies the virtual IPs inbound NAT mapping, which specifies how the FortiGate unit translates network addresses and/or port numbers of packets from the receiving (external) network interface to the network interface connected to the destination (mapped) IP address or IP address range. In addition to specifying IP address and port mappings between interfaces, virtual IP configurations can optionally bind an additional IP address or IP address range to the receiving network interface. By binding an additional IP address, you can configure a separate set of mappings that the FortiGate unit can apply to packets whose destination matches that bound IP address, rather than the IP address already configured for the network interface.
For inbound traffic, DNAT translates packets destination address to the mapped private IP address, but does not translate the source address. The private network is aware of the sources public IP address. For reply traffic, the FortiGate unit translates packets private network source IP address to match the destination address of the originating packets, which is maintained in the session table. You can define alternate IP addresses for the reply traffic. When configuring the VIP addresses, you can define alternate source addresses for the return traffic. When configuring the VIP, select the Source Address Filter option and enter the IP address or address range. The CLI command is: config firewall vip edit local-vip set src-filter 172.20.120.129/24, 172.20.120.3-172.20.120.10 set extip x.x.x.x set mappedip y.y.y.y set port-forward enable ... end This enables packets from different sources to be translated to different VIP (or ports). By default, the source filter is set to 0.0.0.0, or all source IPs.
223
Firewall components
Static NAT
Static NAT with Static, one-to-one NAT mapping with port forwarding: an external IP address is Port Forwarding always translated to the same mapped IP address, and an external port number is always translated to the same mapped port number. If using IP address ranges, the external IP address range corresponds to a mapped IP address range containing an equal number of IP addresses, and each IP address in the external range is always translated to the same IP address in the mapped range. If using port number ranges, the external port number range corresponds to a mapped port number range containing an equal number of port numbers, and each port number in the external range is always translated to the same port number in the mapped range. Server Load Balancing Dynamic, one-to-many NAT mapping: an external IP address is translated to one of the mapped IP addresses, as determined by the selected load balancing algorithm for more even traffic distribution. The external IP address is not always translated to the same mapped IP address. Server load balancing requires that you configure at least one real server, but can use up to eight. Real servers can be configured with health check monitors. Health check monitors can be used to gauge server responsiveness before forwarding packets.
Server Load Dynamic, one-to-many NAT mapping with port forwarding: an external IP Balancing with address is translated to one of the mapped IP addresses, as determined by the Port Forwarding selected load balancing algorithm for more even traffic distribution. The external IP address is not always translated to the same mapped IP address. Server load balancing requires that you configure at least one real server, but can use up to eight. Real servers can be configured with health check monitors. Health check monitors can be used to gauge server responsiveness before forwarding packets.
A typical example of static NAT is to allow client access from a public network to a web server on a private network that is protected by a FortiGate unit. Reduced to its essence, this example involves only three hosts, as shown in Figure 33: the web server on a private network, the client computer on another network, such as the Internet, and the FortiGate unit connecting the two networks. When a client computer attempts to contact the web server, it uses the virtual IP on the FortiGate units external interface. The FortiGate unit receives the packets. The addresses in the packets are translated to private network IP addresses, and the packet is forwarded to the web server on the private network.
224
Firewall components
The packets sent from the client computer have a source IP of 192.168.37.55 and a destination IP of 192.168.37.4. The FortiGate unit receives these packets at its external interface, and matches them to a security policy for the virtual IP. The virtual IP settings map 192.168.37.4 to 10.10.10.42, so the FortiGate unit changes the packets addresses. The source address is changed to 10.10.10.2 and the destination is changed to 10.10.10.42. The FortiGate unit makes a note of this translation in the firewall session table it maintains internally. The packets are then sent on to the web server.
Figure 34: Example of packet address remapping during NAT from client to server 0.2 2 0.1 10.4 1 . . 0 0 P 1 .1 e I IP 10 1 c r u 3 So ation 2 n sti NA De T
Note that the client computers address does not appear in the packets the server receives. After the FortiGate unit translates the network addresses, there is no reference to the client computers IP address, except in its session table. The web server has no indication that another network exists. As far as the server can tell, all packets are sent by the FortiGate unit.
v3 FortiGate Fundamentals 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
IP r 42 ve 0 . er .1 S 10 .
10
wit
ha
vir
tua
l IP
1 3 2
225
Firewall components
When the web server replies to the client computer, address translation works similarly, but in the opposite direction. The web server sends its response packets having a source IP address of 10.10.10.42 and a destination IP address of 10.10.10.2. The FortiGate unit receives these packets on its internal interface. This time, however, the session table is used to recall the client computers IP address as the destination address for the address translation. In the reply packets, the source address is changed to 192.168.37.4 and the destination is changed to 192.168.37.55. The packets are then sent on to the client computer. The web servers private IP address does not appear in the packets the client receives. After the FortiGate unit translates the network addresses, there is no reference to the web servers network. The client has no indication that the web servers IP address is not the virtual IP. As far as the client is concerned, the FortiGate units virtual IP is the web server.
Figure 35: Example of packet address remapping during NAT from server to client .42 .10 10.2 0 . .1 10 .10 IP P 10 1 e I urc n 3 So inatio 2 t s De NA T
wit
ha
vir
tua
l IP
1 3 2
In the previous example, the NAT check box is checked when configuring the security policy. If the NAT check box is not selected when building the security policy, the resulting policy does not perform full NAT; instead, it performs destination network address translation (DNAT). For inbound traffic, DNAT translates packets destination address to the mapped private IP address, but does not translate the source address. The web server would be aware of the clients IP address. For reply traffic, the FortiGate unit translates packets private network source IP address to match the destination address of the originating packets, which is maintained in the session table.
Outbound connections
Virtual IPs can also affect outbound NAT, even though they are not selected in an outbound security policy. If no virtual IPs are configured, FortiGate units apply traditional outbound NAT to connections outbound from private network IP addresses to public network IP addresses. However, if virtual IP configurations exist, FortiGate units use virtual IPs inbound NAT mappings in reverse to apply outbound NAT, causing IP address mappings for both inbound and outbound traffic to be symmetric. For example, if a network interfaces IP address is 10.10.10.1, and its bound virtual IPs external IP is 10.10.10.2, mapping inbound traffic to the private network IP address 192.168.2.1, traffic outbound from 192.168.2.1 will be translated to 10.10.10.2, not 10.10.10.1.
v3 FortiGate Fundamentals 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
226
Firewall components
Services
Note: A virtual IP setting with port forwarding enabled does not translate the
source address of outbound traffic. If both virtual IP (without port forwarding) and IP Pools are enabled, IP Pools is preferred for source address translation of outbound traffic.
Virtual IP and virtual server names must be different from firewall address or address group names.
Services
Services represent typical traffic types and application packets that pass through the FortiGate unit. Firewall services define one or more protocols and port numbers associated with each service. Security policies use service definitions to match session types. You can organize related services into service groups to simplify your security policy list. Many well-known traffic types have been predefined in firewall services and protocols on the FortiGate unit. These predefined services and protocols are defaults, and cannot be edited or removed. However, if you require different services, you can create custom services. To view the predefined servers, go to Firewall > Service > Predefined.
Custom service
Should there be a service that does not appear on the list, or you have a unique service or situation, you can create your own custom service. You need to know the port(s), IP addresses or protocols the particular service or application uses to create the custom service.
Example
This example creates a custom service for the Widget application, which communicates on TCP port 9620 for source traffic and between ports 4545 and 4550 for destination traffic.
227
Schedules
Firewall components
To create a custom service - web-based manager 1 Go to Firewall > Service > Custom and select Create New. 2 Enter the following and select Add:
Name Protocol Type Protocol Source Port Low Hi Destination Port Low High 4545 4550 9620 9620 Widget TCP/UDP/SCTP TCP
Schedules
When you add security policies on a FortiGate unit, those policies are always on, policing the traffic through the device. Firewall schedules control when policies are in effect, that is, when they are on. You can create one-time schedules which are schedules that are in effect only once for the period of time specified in the schedule. You can also create recurring schedules that are in effect repeatedly at specified times of specified days of the week. You can create a recurring schedule that activates a policy during a specified period of time. For example, you might prevent game playing during office hours by creating a recurring schedule that covers office hours.
If a recurring schedule has a stop time that is earlier than the start time, the schedule will take effect at the start time but end at the stop time on the next day. You can use this technique to create recurring schedules that run from one day to the next. For example, to prevent game playing except at lunchtime, you might set the start time for a recurring schedule at 1:00 p.m. and the stop time at 12:00 noon. To create a recurring schedule that runs for 24 hours, set the start and stop times to 00.
Example
This example creates a schedule for surfing the Internet at lunch time. The company restricts the amount of surfing on company time, but over lunch, the restrictions are lifted. For this schedule, a security policy would be created to enable all services for a limited amount of time. This example sets up the time frame. To create a recurring firewall schedule - web-based manager 1 Go to Firewall > Schedule > Recurring, and select Create New. 2 Enter the schedule Name of Lunch-Surfing.
228
Firewall components
Schedules
3 Select the days of the week this schedule is employed. In this case, Monday through Friday. 4 Select the Start Hour of 12. 5 Select the Stop Hour of 01. 6 Select OK. To create a recurring firewall schedule - CLI config firewall schedule recurring edit Lunch-Surfing
set day monday tuesday wednesday thursday friday
Example
This example creates a one-time schedule for a security policy. In this example, a company is shut down over the Christmas holidays. To prevent employees from coming to work to use the internet connection, the company sets up a one-time security policy to block most internet traffic during this time period. A schedule needs to be created to limit internet traffic between December 25 and January 1. To create a one-time firewall schedule - web-based manager 1 Go to Firewall > Schedule > One-time, and select Create New. 2 Enter the schedule Name of Xmas-Shutdown. 3 Enter the following and select OK.
/Start Year Month Day Hour Minute Stop Year Month Day Hour Minute 2010 01 01 23 00 2009 12 25 00 00
To create a firewall schedule - CLI config firewall schedule onetime edit Xmas-Shutdown
set start 00:00 2009/12/25
229
Schedules
Firewall components
Schedule groups
You can organize multiple firewall schedules into a schedule group to simplify your security policy list. For example, instead of having five identical policies for five different but related firewall schedules, you might combine the five schedules into a single schedule group that is used by a single security policy. Schedule groups can contain both recurring and one-time schedules. Schedule groups cannot contain other schedule groups.
Example
This example creates a schedule group for the schedules created in the previous schedule examples. The schedule group enables you to have one security policy that covers both schedules, rather than creating two separate policies. To create a firewall schedule group - web-based manager 1 Go to Firewall > Schedule > Group, and select Create New. 2 Enter the group Name of Schedules. 3 From the Available Schedules list, select the Lunch-Surfing schedule and select the down-arrow button to move the address name to the Members list. 4 From the Available Schedules list, select the Xmas-Shutdown schedule and select the down-arrow button to move the address name to the Members list. 5 Select OK. To create a recurring firewall schedule - CLI config firewall schedule group edit Schedules set member Lunch-Surfing Xmas-Shutdown end
Schedule expiry
The schedule in a security policy enables certain aspects of network traffic to occur for a specific length of time. What it does not do however, is police that time. That is, the policy is active for a given time frame, and as long as the session is open, traffic can continue to flow. For example, in an office environment, Skype use is allowed between noon and 1pm. During that hour, any Skype traffic continues. As long as that session is open, after the 1pm end time, the Skype conversations can continue, yet new sessions will be blocked. Ideally, the Skype session should close at 1pm. Using a CLI command you can set the schedule to terminate all sessions when the end time of the schedule is reached. Within the config firewall command enter the command: set schedule-timeout enable By default, this is set to disable.
Identity-based policies
It is important to note that this setting is similar to the termination time of an identity-based policy, also known as an authentication policy. These can be used together. If user authentication is used, FortiOS will use the Hard Timeout option. With a combination of the schedule timeout and the authentication timeout, FortiOS will use whichever time is shorter.
v3 FortiGate Fundamentals 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
230
Firewall components
UTM profiles
For example, Example.com has a schedule policy to use P2P applications between 12:00 and 1:00, and a user authentication timeout of 30 minutes. With user authentication, if a user logs in at 12:15, their authentication time will log them off at 12:45 (30 minutes later). If they log in at 12:45, the firewall schedule will log them out at 1:00 (15 minutes later). Equally, if no authentication is used, and a user logs in at 12:45, the schedule will log them out at 1:00 (45 minutes later). If they log in at 12:55, they will also be logged out at 1:00 (5 minutes later). The following table illustrates this point:
Authentication Yes Session Start 12:15 12:45 No 12:15 12:55 Session end 30 minutes (expire at 12:45 - authentication timeout of 30 minutes) 15 minutes (expire at 1:00 - end of the firewall schedule) 45 minutes (expire at 1:00 - end of firewall schedule) 5 minutes (expire at 1:00 - end of firewall schedule)
For more information on authentication policies, see the System Administration Guide chapter of The Handbook.
UTM profiles
Where security policies provide the instructions to the FortiGate unit as to what traffic is allowed through the device, the Unified Threat Management (UTM) profiles provide the screening that filters the content coming and going on the network. The UTM profiles enable you to instruct the FortiGate unit what to look for in the traffic that you dont want, or want to monitor, as it passes through the device. A UTM profile is a group of options and filters that you can apply to one or more firewall policies. UTM profiles can be used by more than one security policy. You can configure sets of UTM profiles for the traffic types handled by a set of security policies that require identical protection levels and types, rather than repeatedly configuring those same UTM profile settings for each individual security policy. For example, while traffic between trusted and untrusted networks might need strict antivirus protection, traffic between trusted internal addresses might need moderate antivirus protection. To provide the different levels of protection, you might configure two separate protection profiles: one for traffic between trusted networks, and one for traffic between trusted and untrusted networks. UTM profiles are available for various unwanted traffic and network threats. Each are configured separately and can be used in different groupings as needed. You configure UTM profiles in the UTM menu and applied when creating a security policy by selecting the UTM profile type.
231
UTM profiles
Firewall components
For both categories, you create a unique set of criteria for the profile or sensor and select it for the security policy. When traffic passes through the FortiGate unit, the FortiGate unit compares the traffic information to see if the policy is valid. If it is, it then applies the profiles and sensors to the traffic to determine if the traffic is an attack, virus, spam or unwanted web content and either blocks or allows the traffic through depending on how the sensor or policy was configured. FortiOS includes a selection default UTM profiles and sensors. The defaults provide varying levels of security from very strict, monitoring or blocking everything, to very light allowing most traffic through. You can use these default protection profiles as is to quickly configure your network security or as the bases for creating your own.
Example
This example creates an antivirus profile that will scan all email traffic for viruses. The new profile will be called email_scan. To create a antivirus profile for email - web-based manager 1 Go to UTM Profiles > AntiVirus > Profile and select the plus sign in the upper right corner of the window. 2 Enter the Name of email_scan. 3 For the Virus Scan row, select IMAP, POP3 and SMTP. 4 Select OK. To create a antivirus profile for email - CLI config antivirus profile edit email_scan config imap set options scan end config smtp set options scan end config pop3 set options scan end end
232
Security Policies
Security policies control all traffic attempting to pass through the FortiGate unit, between FortiGate interfaces, zones, and VLAN subinterfaces. Security policies are instructions the FortiGate unit uses to decide connection acceptance and packet processing for traffic attempting to pass through. When the firewall receives a connection packet, it analyzes the packets source address, destination address, and service (by port number), and attempts to locate a security policy matching the packet. Security policies can contain many instructions for the FortiGate unit to follow when it receives matching packets. Some instructions are required, such as whether to drop or accept and process the packets, while other instructions, such as logging and authentication, are optional. Policy instructions may include network address translation (NAT), or port address translation (PAT), or by using virtual IPs or IP pools to translate source and destination IP addresses and port numbers. Policy instructions may also include UTM profiles, which can specify application-layer inspection and other protocol-specific protection and logging, as well as IPS inspection at the transport layer. This chapter describes what security policies are and how they affect all traffic to and from your network. It also describes how to configure some key policies; these are basic policies you can use as a building block to more complex policies, but they enable you to get the FortiGate unit running on the network quickly. This chapter contains the following topics: Policy order Creating basic policies Security policy examples
You configure security policies to define which sessions will match the policy and what actions the FortiGate unit will perform with packets from matching sessions. Sessions are matched to a security policy by considering these features of both the packet and policy: Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule and time of the sessions initiation Service and the packets port numbers.
If the initial packet matches the security policy, the FortiGate unit performs the configured Action and any other configured options on all packets in the session. Packet handling actions can be ACCEPT, DENY, IPSEC or SSL-VPN.
233
Policy order
Security Policies
ACCEPT policy actions permit communication sessions, and may optionally include other packet processing instructions, such as requiring authentication to use the policy, or specifying one or more UTM profiles to apply features such as virus scanning to packets in the session. An ACCEPT policy can also apply interface-mode IPSec VPN traffic if either the selected source or destination interface is an IPSec virtual interface. DENY policy actions block communication sessions, and you can optionally log the denied traffic. If no security policy matches the traffic, the packets are dropped, therefore it is not required to configure a DENY security policy in the last position to block the unauthorized traffic. A DENY security policy is needed when it is required to log the denied traffic, also called violation traffic. IPSEC and SSL-VPN policy actions apply a tunnel mode IPSec VPN or SSL VPN tunnel, respectively, and may optionally apply NAT and allow traffic for one or both directions. If permitted by the firewall encryption policy, a tunnel may be initiated automatically whenever a packet matching the policy arrives on the specified network interface, destined for the local private network.
Create security policies based on traffic flow. For example, a policy for POP3, where the email server is outside of the internal network, traffic should be from an internal interface to an external interface rather than the other way around. It is typically the user on the network requesting email content from the email server and thus the originator of the open connection is on the internal port, not the external one of the email server. This is also important to remember when view log messages as to where the source and destination of the packets can seem backwards.
Policy order
Each time a FortiGate unit receives a connection attempting to pass through one of its interfaces, the unit searches its security policy list for a matching security policy. The search begins at the top of the policy list and progresses in order towards the bottom. The FortiGate unit evaluates each policy in the security policy list for a match until a match is found. When the FortiGate unit finds the first matching policy, it applies the matching policys specified actions to the packet, and disregards subsequent security policies. Matching security policies are determined by comparing the security policy and the packets: source and destination interfaces source and destination firewall addresses services time/schedule.
If no policy matches, the connection is dropped. As a general rule, you should order the security policy list from most specific to most general because of the order in which policies are evaluated for a match, and because only the first matching security policy is applied to a connection. Subsequent possible matches are not considered or applied. Ordering policies from most specific to most general prevents policies that match a wide range of traffic from superseding and effectively masking policies that match exceptions. For example, you might have a general policy that allows all connections from the internal network to the Internet, but want to make an exception that blocks FTP. In this case, you would add a policy that denies FTP connections above the general policy.
234
Security Policies
}Exception
}General
FTP connections would immediately match the deny policy, blocking the connection. Other kinds of services do not match the FTP policy, and so policy evaluation would continue until reaching the matching general policy. This policy order has the intended effect. But if you reversed the order of the two policies, positioning the general policy before the policy to block FTP, all connections, including FTP, would immediately match the general policy, and the policy to block FTP would never be applied. This policy order would not have the intended effect.
Figure 37: Example: Blocking FTP Incorrect policy order
}Exception
}General
Similarly, if specific traffic requires authentication, IPSec VPN, or SSL VPN, you would position those policies above other potential matches in the policy list. Otherwise, the other matching policies would always take precedence, and the required authentication, IPSec VPN, or SSL VPN might never occur.
Note: A default security policy may exist which accepts all connections. You can move, disable or delete it. If you move the default policy to the bottom of the security policy list and no other policy matches the packet, the connection will be accepted. If you disable or delete the default policy and no other policy matches the packet, the connection will be dropped.
You can arrange the security policy list to influence the order in which policies are evaluated for matches with incoming traffic. When more than one policy has been defined for the same interface pair, the first matching security policy will be applied to the traffic session.
235
Security Policies
edit 1 set srcintf internal set scraddr 10.13.20.22 set dstintf wan1 set dstaddr all set action accept set schedule always set service http end
236
Security Policies
To create a basic deny policy for FTP - web-based manager 1 Go to Policy > Policy > Policy and select Create New. 2 Enter the following and select OK:
Source interface/Zone Source address Destination interface/Zone Destination address Schedule Service Action Internal 10.13.20.22 WAN1 172.20.120.141 always FTP DENY
edit 1 set srcintf internal set srcaddr 10.13.20.22 set dstintf wan1 set dstaddr 172.20.120.141 set action deny set schedule always set service ftp end
237
Security Policies
edit 1 set srcintf internal set srcaddr 10.13.20.22 set dstintf wan1 set dstaddr 172.20.120.141 set action allow set schedule always set service any set vpntunnel Head_Office end
Blocking an IP address
This example describes how to create a security policy to block a specific IP address. Any traffic from the configured IP address will be dropped at the point of hitting the FortiGate unit. To block an IP address, you need to create an address entry before creating a security policy to block the address.
Add an Address
First create the address which the FortiGate will identify to be blocked. In this example, the address will be 172.20.120.29 for the address name of Blocked_IP. To add an address entry - web-based manager 1 Go to Firewall Objects > Address > Address and select Create New. 2 Enter a Name of Blocked_IP. 3 Enter the IP address and subnet of 172.20.120.29/255.255.255.255. The subnet is set to 255.255.255.255 to block the specific address. If you wanted to block the entire subnet enter 172.20.120.0/255.255.255.0. To add an address entry - web-based CLI config firewall address edit Blocked_IP set subnet 172.20.120.29/32 end
238
Security Policies
To add a security policy - web-based manager 1 Go to Policy > Policy > Policy and select Create New. 2 Complete the following and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action WAN1 Blocked_IP Internal All Always ALL DENY
3 Move the security policy to the top of the policy list. To add a security policy - web-based CLI config firewall policy edit 1 set srcintf wan1 set srcaddr Blocked_IP set dstintf Internal set dstaddr all set action deny set schedule always set service any end
It should be noted that a security policy is inactive outside of its schedule and that the schedule relies upon the date/time that is configured on the FortiGate unit. In this example all users are connected to the Internal interface and that the Internet access is connected to WAN1.
239
Security Policies
240
Security Policies
241
Security Policies
Source Interface/Zone Source Address Destination Address Schedule Service Action NAT Comments
Internal All All week-end ALL Accept Select to Enable. Week-end policy.
3 Select Create New. 4 Complete the following for the administrator access policy and select OK:
Source Interface/Zone Source Address Destination Address Schedule Service Action NAT Comments Internal Admin_PCs All Always ALL Accept Select to Enable. Admin PCs no restriction.
5 Select Create New. 6 Complete the following for the lunch-time surfing policy and select OK
:
Source Interface/Zone Source Address Destination Address Schedule Service Action NAT Comments
Internal All All lunch-time ALL Accept Select to Enable. Lunch-time policy.
7 Select Create New. 8 Complete the following for the overnight policy and select OK
:
242
Security Policies
NAT Comments
9 Select Create New. 10 Complete the following for the web site access policy and select OK
:
Source Interface/Zone Source Address Destination Address Schedule Service Action NAT Comments
Internal All All Always ALL Accept Select to Enable. Access to the example.com websites policy.
To create the security policies - CLI config firewall policy edit 1 set srcintf internal set dstintf wan1 set srcaddr all set dstaddr all set action accept set comments week-end policy set schedule week-end set service ANY set nat enable next edit 2 set srcintf internal set dstintf wan1 set srcaddr Admin_PCs set dstaddr all set action accept set comments Admin PCs no restriction set schedule always set service ANY set nat enable next edit 3 set srcintf internal set dstintf wan1 set srcaddr all set dstaddr all set action accept set comments lunch time policy set schedule lunch-time set service ANY set nat enable next
v3 FortiGate Fundamentals 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
243
Security Policies
edit 4 set srcintf internal set dstintf wan1 set srcaddr all set dstaddr all set action accept set comments late evening to early morning policy set schedule late evening to early morning set service ANY set nat enable next edit 5 set srcintf internal set dstintf wan1 set srcaddr all set dstaddr example.com example2.com set action accept set schedule always set service ANY set nat enable next end
244
Troubleshooting
When the security policies are in place and traffic is not flowing, or flowing more than it should, there may be an issue with the one or more security policies. This chapter outlines some troubleshooting tips and steps to diagnose where the traffic is not getting through, or letting too much traffic through. For more troubleshooting options and methods, see the Troubleshooting Guide chapter of The Handbook. This chapter includes the topics: Basic policy checking Verifying traffic Using log messages to view violation traffic Traffic trace Packet sniffer
Verifying traffic
With many security policies in place, you may want to verify that traffic is being affected by the policy. There is a simple way to get a quick visual confirmation within the web-based manager. This is done by adding a counter column to the security policy table. These steps are only available in the web-based manager.
245
Troubleshooting
To view the traffic count on security policies 1 Go to Policy > Policy > Policy. 2 Select Column Settings in the upper right of the window. 3 From Available fields list, select Count. 4 Select the right-facing arrow to add it to the Show these fields column. 5 Select OK. As packets hit this policy, the count will appear in the column in kilobytes.
Note: For accelerated traffic, NP2 ports the count does not reflect the real traffic count. Only the start of a session packet will be counted. For non-accelerated traffic, all packets are counted.
246
Troubleshooting
Traffic trace
edit 1 set srcintf internal set srcaddr 10.13.20.22 set dstintf wan1 set dstaddr 172.20.120.141 set action deny set schedule always set service http set logtraffic enable end The following is a sample syslog message from a logged traffic violation.
Warning 10.160.0.110 date=2009-09-14 time=10:16:25 devname=FG300A3906550380 device_id=FG300A3906550380 log_id=0022000003 type=traffic subtype=violation pri=warning fwver=040000 status=deny vd="root" src=10.160.1.10 srcname=10.160.1.10 src_port=0 dst=4.2.2.1 dstname=10.2.2.1 dst_port=0 service=8/icmp proto=1 app_type=N/A duration=0 rule=3 policyid=1 sent=0 rcvd=0 vpn="N/A" src_int="port2" dst_int="port1" SN=12215 user="N/A" group="N/A" carrier_ep="N/A"
Traffic trace
Traffic tracing enables you to follow a specific packet stream. View the characteristics of a traffic session though specific security policies using the CLI command diagnose system session, trace per-packet operations for flow tracing using diagnose debug flow and trace per-Ethernet frame using diagnose sniffer packet.
Session table
The FortiGate session table can be viewed from the web-based manager or the CLI. The most useful troubleshooting data comes from the CLI. The session table in web-based manager also provides some useful summary information, particularly the current policy number that the session is using. Sessions only are appear if a session was established. If a packet is dropped, then no session will appear in the table. Using the CLI command diagnose debug flow can be used to identify why the packet was dropped. To view the session table in the web-based manager 1 Go to System > Dashboard > Status. 2 Select Add Content > Top Sessions. 3 In the Top Sessions pane, select Details. The Policy ID displays which security policy matches the session. The sessions that do not have a Policy ID entry originate from the FortiGate unit. To view the session table in the CLI diagnose sys session list The session table output using the CLI is very verbose. You can use filters to display only the session data of interest. An entry is placed in the session table for each traffic session passing through a security policy.
247
Traffic trace
Troubleshooting
Sample output
session info: proto=6 proto_state=05 expire=89 timeout=3600 flags=00000000 av_idx=0 use=3 bandwidth=204800/sec guaranteed_bandwidth=102400/sec traffic=332/sec prio=0 logtype=session ha_id=0 hakey=4450 tunnel=/ state=log shape may_dirty statistic(bytes/packets/err): org=3408/38/0 reply=3888/31/0 tuples=2 orgin->sink: org pre->post, reply pre->post oif=3/5 gwy=192.168.11.254/10.0.5.100 hook=post dir=org act=snat 10.0.5.100:1251>192.168.11.254:22(192.168.11.105:1251) hook=pre dir=reply act=dnat 192.168.11.254:22>192.168.11.105:1251(10.0.5.100:1251) pos/(before,after) 0/(0,0), 0/(0,0) misc=0 domain_info=0 auth_info=0 ftgd_info=0 ids=0x0 vd=0 serial=00007c33 tos=ff/ff Filter options enable you to view specific information from this command: diagnose sys session filter <option> The <option> values available include the following: clear dport dst negate policy proto sport src vd clear session filter dest port destination IP address inverse filter policy ID protocol number source port source IP address index of virtual domain. -1 matches all
Even though UDP is a sessionless protocol, the FortiGate unit still keeps track of the following two different states: UDP reply not seen with a value of 0 UDP reply seen with a value of 1
Meaning Session is being logged. Session is originated from or destined for local stack. Session is created by a firewall session helper. Session is created by a policy. For example, the session for ftp control channel will have this state but ftp data channel will not. This is also seen when NAT is enabled. Session will be checked by IPS signature. Session will be checked by IPS anomaly. Session is being bridged (TP) mode.
The table below shows the firewall session states from the session table:
State log local ext may_dirty
ndr nds br
248
Troubleshooting
Traffic trace
Sample output
entry entry entry entry entry entry entry entry used used used used used used used used by by by by by by by by table table table table table table table table firewall.address:name '10.98.23.23_host firewall.address:name 'NAS' firewall.address:name 'all' firewall.address:name 'fortinet.com' firewall.vip:name 'TORRENT_10.0.0.70:6883' firewall.policy:policyid '21' firewall.policy:policyid '14' firewall.policy:policyid '19'
In this example, the interface has dependent objects, including four address objects, one VIP, and three security policies.
Flow trace
To trace the flow of packets through the FortiGate unit, use the command diagnose debug flow trace start Follow the packet flow by setting a flow filter using the command: diagnose debug flow filter <option> Filtering options include: addr clear daddr dport negate port proto saddr IP address clear filter destination IP address destination port inverse filter port protocol number source IP address
249
Traffic trace
Troubleshooting
sport vd
Enable the output to in the console: diagnose debug flow show console enable Start flow monitoring with a specific number of packets using the command: diagnose debug flow trace start <N> Stop flow tracing at any time using: diagnose debug flow trace stop
Sample output
This an example shows the flow trace for the device at the IP address 203.160.224.97. diag debug enable diag debug flow filter addr 203.160.224.97 diag debug flow show console enable diag debug flow show function-name enable diag debug flow trace start 100
250
Troubleshooting
Traffic trace
Found existing session ID. Identified as the reply direction: id=20085 trace_id=210 func=resolve_ip_tuple_fast line=2727 msg="Find an existing session, id-00000e90, reply direction" Apply destination NAT to inverse source NAT action: id=20085 trace_id=210 func=__ip_session_run_tuple line=1516 msg="DNAT 192.168.11.59:31925>192.168.3.221:1487" Lookup for next-hop gateway address for reply traffic: id=20085 trace_id=210 func=vf_ip4_route_input line=1543 msg="find a route: gw-192.168.3.221 via port5" ACK received:
id=20085 trace_id=211 func=resolve_ip_tuple_fast line=2700 msg="vd-root received a packet(proto=6, 192.168.3.221:1487->203.160.224.97:80) from port5."
Match existing session in the original direction: id=20085 trace_id=211 func=resolve_ip_tuple_fast line=2727 msg="Find an existing session, id-00000e90, original direction" Apply source NAT: id=20085 trace_id=211 func=__ip_session_run_tuple line=1502 msg="SNAT 192.168.3.221->192.168.11.59:31925" Receive data from client: id=20085 trace_id=212 func=resolve_ip_tuple_fast line=2700 msg="vd-root received a packet(proto=6, 192.168.3.221:1487->203.160.224.97:80) from port5." Match existing session in the original direction: id=20085 trace_id=212 func=resolve_ip_tuple_fast line=2727 msg="Find an existing session, id-00000e90, original direction" Apply source NAT: id=20085 trace_id=212 func=__ip_session_run_tuple line=1502 msg="SNAT 192.168.3.221->192.168.11.59:31925" Receive data from server: id=20085 trace_id=213 func=resolve_ip_tuple_fast line=2700 msg="vd-root received a packet(proto=6, 203.160.224.97:80->192.168.11.59:31925) from port6." Match existing session in reply direction: id=20085 trace_id=213 func=resolve_ip_tuple_fast line=2727 msg="Find an existing session, id-00000e90, reply direction" Apply destination NAT to inverse source NAT action: id=20085 trace_id=213 func=__ip_session_run_tuple line=1516 msg="DNAT 192.168.11.59:31925>192.168.3.221:1487"
251
Packet sniffer
Troubleshooting
Packet sniffer
The packet sniffer in the FortiGate unit can sniff traffic on a specific Interface or on all Interfaces. There are 3 different Level of Information, a.k.a. Verbose Levels 1 to 3, where verbose 1 shows less information and verbose 3 shows the most information. Verbose levels in detail: 1Print header of packets 2Print header and data from the IP header of the packets 3Print header and data from the Ethernet header of the packets 4Print header of packets with interface name 5Print header and data from IP of packets with interface name 6Print header and data from ethernet of packets with interface
diagnose sniffer packet <interface> <'filter'> <verbose> <count>
All Packet sniffing commands are in the format: ... where... <interface> <verbose> <count> <'filter'> can be an Interface name or any for all Interfaces. An interface can be physical, VLAN, IPsec interface, Link aggregated or redundant. the level of verbosity as described above. the number of packets the sniffer reads before stopping. is a very powerful filter functionality which will be described below.
The none variable means no filter applies, 1 means verbose level 1 and 3 means catch 3 packets and stop. The resulting output is
192.168.0.1.22 -> 192.168.0.30.1144: psh 2859918764 ack 1949135261 192.168.0.1.22 -> 192.168.0.30.1144: psh 2859918816 ack 1949135261 192.168.0.30.1144 -> 192.168.0.1.22: ack 2859918884
The sniffer has caught some packets in the middle of a communication. Because the 192.168.0.1 IP address uses port 22 (192.168.0.1.22) this particular sniff is from a SSH Session.
In this example, the sniffer captures a TCP session being set up. 192.168.0.30 is attempting to connect to 192.168.0.1 on Port 80 with a SYN and gets a SYN ACK returned. The session is acknowledged and established after the 3-way TCP handshake.
252
Troubleshooting
Packet sniffer
With information level set to verbose 1, the source and destination IP address is visible, as well as source and destination port. The corresponding Sequence numbers is also visible.
Note: If you do not enter a <count> value, for example as above, 3, the sniffer will continue to run until you stop it.
Verbose level 3 includes the previous information as well as Ethernet (Ether Frame) information. This is the format that technical support will usually request when attempting to analyze a problem. A script is available on the Fortinet Knowledge Base (fgt2eth.pl), which will convert a captured verbose 3 output, into a file that can be read and decoded by Ethereal.
Assuming there is a lot of traffic, this filter command will only display traffic (but all traffic) from the source IP 192.168.0.130 to the destination IP 192.168.0.1. It will not show traffic to 192.168.0.130 (for example the ICMP reply) because the command included: 'src host 192.168.0.130 and dst host 192.168.0.1' Additional information such as ICMP or DNS queries from a PC are included. If you only require a specific type of traffic, for example, TCP traffic only, you need to change the filter command as below:
253
Packet sniffer
Troubleshooting
diagnose sniffer packet internal 'src host 192.168.0.130 and dst host 192.168.0.1 and tcp' 1
Though ICMP (ping) was also running, the trace only shows the TCP part. The destination IP is 192.168.0.1.23, which is IP 192.168.0.1 on port 23 - a Telnet session.
254
255
256
Basic setup
The FortiGate unit requires some basic configuration to add it to your network. These basic steps include assigning IP addresses, adding routing and security policies. Until the administrator completes these steps inter-network and internet traffic will not flow through the device. There are two methods of configuring the FortiGate unit: either the web-based manager or the command line interface (CLI). This chapter will step through both methods to complete the basic configurations to put the device on your network. Use whichever you are most comfortable with. This chapter also provides guidelines for password and administrator best practices as well as how to upgrade the firmware. This section includes the following topics: Connecting to the FortiGate unit Setup Wizard FortiExplorer Configuring NAT mode Configuring transparent mode Verifying the configuration Additional configuration Passwords Administrators Backing up the configuration Firmware Controlled upgrade
257
Setup Wizard
Basic setup
To connect to the web-based manager 1 Set the IP address of the management computer to the static IP address 192.168.1.2 with a netmask of 255.255.255.0. 2 Using the Ethernet cable, connect the internal or port 1 interface of the FortiGate unit to the computer Ethernet connection. 3 Start your browser and enter the address https://192.168.1.99. (remember to include the s in https://). To support a secure HTTPS authentication method, the FortiGate unit ships with a self-signed security certificate, which is offered to remote clients whenever they initiate a HTTPS connection to the FortiGate unit. When you connect, the FortiGate unit displays two security warnings in a browser. The first warning prompts you to accept and optionally install the FortiGate units selfsigned security certificate. If you do not accept the certificate, the FortiGate unit refuses the connection. If you accept the certificate, the FortiGate login page appears. The credentials entered are encrypted before they are sent to the FortiGate unit. If you choose to accept the certificate permanently, the warning is not displayed again. Just before the FortiGate login page is displayed, a second warning informs you that the FortiGate certificate distinguished name differs from the original request. This warning occurs because the FortiGate unit redirects the connection. This is an informational message. Select OK to continue logging in. 4 Type admin in the Name field and select Login.
Setup Wizard
For the FortiGate-50B, 60C and 80C series, FortiOS includes a wizard to step you through the basic configuration of the FortiGate unit. The Setup Wizard will configure your FortiGate unit from factory default settings. If you set your management computer to the default IP address of the FortiGate unit, 192.168.1.99, and connect it to the FortiGate unit, when the device starts it will automatically launch the wizard. A Wizard button also appears in the web-based manager. Use this button to update the configuration if required. Because the wizard configures from a default setting, it will reset the FortiGate unit to its factory defaults before beginning. The wizard will prompt you to save the existing configuration before proceeding.
FortiExplorer
FortiExplorer is a software tool for easy configuration of a new FortiGate unit, or simple updates to existing FortiGate units on a Microsoft Windows or Mac OS computer. FortiExplorer is included with the FortiGate-60C series of devices, as well as is available from the Fortinet web site.
258
Basic setup
FortiExplorer
FortiExplorer uses a USB connection to the FortiGate unit, rather than using a console cable or Ethernet connection. The USB connection does not replace the other options, but adds another option when configuring the FortiGate unit.
Installation
FortiExplorer is available for Microsoft Windows XP, Windows 7, and Mac OS X. The software is available on the Tools and Documentation CD included with your FortiGate unit, or is available for download from the Fortinet web site at http://www.fortinet.com/resource_center/product_demos.html.
Apple Macintosh OS X
To install FortiClient on Mac OS X 1 Double-click the .dmg file and drag the FortiExplorer program file into the Applications folder. 2 Connect the USB cable to the FortiGate unit and the management computer. 3 Double-click the FortiExplorer icon to launch the application.
Configuration options
With FortiExplorer, you are provided a number of options on how to configure the FortiGate unit, depending on your level of comfort with various interfaces. The options available are: the configuration wizard, which guides you through the basic configuration of IP addresses, passwords and security policies the web-based manager, which when chosen, appears within the FortiExplorer window. the command line interface (CLI), which when chosen, appears within the FortiExplorer window.
259
Basic setup
You can also use FortiExplorer to check for new firmware for a FortiGate unit. To check for new firmware, select the FortiGate unit from the Device list and select Check for Update.
To configure interface for manual addressing - web-based manager 1 Go to System > Network > Interface. 2 Select an interface and select Edit. 3 Enter the IP address and netmask for the interface. 4 Select OK. To configure an interface for manual addressing - CLI config system interface edit <interface_name> set mode static set ip <interface_ipv4mask> end To configure DHCP addressing - web-based manager 1 Go to System > Network > Interface. 2 Select the Edit icon for an interface. 3 Select DHCP and complete the following:
Distance Enter the administrative distance, between 1 and 255 for the default gateway retrieved from the DHCP server. The administrative distance specifies the relative priority of a route when there are multiple routes to the same destination. A lower administrative distance indicates a more preferred route.
Retrieve default gateway Enable to retrieve a default gateway IP address from the DHCP server. from server Override internal DNS Enable to use the DNS addresses retrieved from the DHCP server instead of the DNS server IP addresses on the DNS page on System > Network > Options. You should also enable Obtain DNS server address automatically in System > Network > Options.
4 Select OK.
260
Basic setup
Note: For more information on DHCP, see DHCP servers and relays on page 520.
To configure DHCP addressing - CLI config system interface edit <interface_name> set mode dhcp set distance <integer> set defaultgw enable end To configure PPPoE addressing - web-based manager 1 Go to System > Network > Interface. 2 Select an interface and select Edit. 3 Select PPPoE, and complete the following:
Username Password Unnumbered IP Enter the username for the PPPoE server. This may have been provided by your Internet Service Provider. Enter the password for the PPPoE server for the above user name. Specify the IP address for the interface. If your Internet Service Provider has assigned you a block of IP addresses, use one of these IP addresses. Alternatively, you can use, or borrow, the IP address of a configured interface on the router. You may need to do this to minimize the number of unique IP addresses within your network. If you are borrowing an IP address, remember the interface must be enabled, and the Ethernet cable connected to the FortiGate unit. Initial discovery timeout in seconds. The amount of time to wait before starting to retry a PPPoE discovery. To disable the discovery timeout, set the value to 0. Initial PPPoE Active Discovery Terminate (PADT) timeout in seconds. Use this timeout to shut down the PPPoE session if it is idle for this number of seconds. Your Internet Service Provider must support PADT. To disable the PADT timeout, set the value to 0. Enter the administrative distance, between 1 and 255, for the default gateway retrieved from the DHCP server. The distance specifies the relative priority of a route when there are multiple routes to the same destination. A lower distance indicates a more preferred route.
Distance
Retrieve default gateway Enable to retrieve a default gateway IP address from the DHCP server. The default gateway is added to the static routing table. from server Override internal DNS Enable to use the DNS addresses retrieved from the DHCP server instead of the DNS server IP addresses on the DNS page on System > Network > Options. On FortiGate-100A units and lower, you should also enable Obtain DNS server address automatically in System > Network > Options.
4 Select OK. To configure PPPoE addressing - CLI config system interface edit <interface_name> set mode pppoe set username <pppoe_username> set password <pppoe_password> set ipunnumbered <unnumbered_ipv4>
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
261
Basic setup
Configure a DNS
A DNS server is a public service that converts symbolic node names to IP addresses. A domain name server (DNS) implements the protocol. In simple terms, it acts as a phone book for the Internet. A DNS server matches domain names with the computer IP address. This enables you to use readable locations, such as fortinet.com when browsing the Internet. The FortiGate unit includes default DNS server addresses. However, these should be changed to those provided by your Internet Service Provider. The defaults are DNS proxies and are not as reliable as those from your ISP. To configure DNS settings - web-based manager 1 Go to System > Network > DNS. 2 Enter the IP address of the primary DNS server. 3 Enter the IP address of the secondary DNS server. 4 Select Apply.
Note: For more information on DNS servers see DNS services on page 522.
To configure DNS server settings - CLI config system dns set primary <dns_ipv4> set secondary <dns_ipv4> end
262
Basic setup
3 In the Gateway field, type the IP address of the next-hop router where outbound traffic is directed. 4 If the FortiGate unit reaches the next-hop router through a different interface (compared to the interface that is currently selected in Device, select the name of the interface from the Device drop-down list. 5 Select OK. To modify the default gateway - CLI config router static edit <sequence_num> set gateway <gateway_address_ipv4> set device <interface_name> end
To add an outgoing traffic security policy - CLI config firewall policy edit <interface_name> set srcintf <name_str> set srcaddr <name_str> set dstintf <name_str> set dstaddr <name_str> set schedule always
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
263
Basic setup
set service ANY set action accept end To add an incoming traffic security policy - web-based manager 1 Go to Policy > Policy > Policy. 2 Select Create New. 3 Set the following and select OK.
Source Interface Source Address Select the port connected to the Internet. All
Destination Interface Select the port connected to the network. Destination Address All Schedule Service Action always Any Accept
To add an incoming traffic security policy - CLI config firewall policy edit <interface_name> set srcintf <name_str> set srcaddr <name_str> set dstintf <name_str> set dstaddr <name_str> set schedule always set service ANY set action accept end To create an incoming traffic security policy, you use the same commands with the addresses reversed. security policy configuration is the same in NAT and transparent mode. These policies allow all traffic through. No UTM profiles have been configured or applied. Ensure you create additional security policies to accommodate your network requirements.
264
Basic setup
4 Enter the Management IP/Netmask address and the Default Gateway address. The default gateway IP address is required to tell the FortiGate unit where to send network traffic to other networks. 5 Select Apply. To switch to transparent mode config system settings set opmode transparent set manageip <manage_ipv4> set gateway <gw_ipv4> end
Configure a DNS
A DNS server is a service that converts symbolic node names to IP addresses. A domain name server (DNS) implements the protocol. In simple terms, it acts as a phone book for the Internet. A DNS server matches domain names with the computer IP address. This enables you to use readable locations, such as fortinet.com when browsing the Internet. DNS server IP addresses are typically provided by your Internet Service Provider. For further DNS configuration and concepts, see DNS services on page 522. To configure DNS server settings - web-based manager 1 Go to System > Network > DNS. 2 Enter the IP address of the primary DNS server. 3 Enter the IP address of the secondary DNS server. 4 Select Apply. To configure DNS server settings - CLI config system dns set primary <dns_ipv4> set secondary <dns_ipv4> end
265
Basic setup
To add an outgoing traffic security policy - web-based manager 1 Go to Policy > Policy > Policy. 2 Select Create New. 3 Set the following and select OK.
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action Select the port connected to the network. All Select the port connected to the Internet. All always Any Accept
To add an outgoing traffic security policy - CLI config firewall policy edit <policy_number> set srcintf <name_str> set srcaddr <name_str> set dstintf <name_str> set dstaddr <name_str> set schedule always set service ANY set action accept end To add an incoming traffic security policy - web-based manager 1 Go to Policy > Policy > Policy. 2 Select Create New. 3 Set the following and select OK.
Source Interface Source Address Select the port connected to the Internet. All
Destination Interface Select the port connected to the network. Destination Address All Schedule Service Action always Any Accept
266
Basic setup
To add an incoming traffic security policy - CLI config firewall policy edit <policy_number> set srcintf <name_str> set srcaddr <name_str> set dstintf <name_str> set dstaddr <name_str> set schedule always set service ANY set action accept end To create an incoming traffic security policy, you use the same commands with the addresses reversed. Security policy configuration is the same in NAT/Route mode and transparent mode. These policies allow all traffic through. No UTM profiles have been configured or applied. Ensure you create additional security policies to accommodate your network requirements.
Additional configuration
Once the FortiGate unit is connected and traffic can pass through, several more configuration options are available. While not mandatory, they will help to ensure better control with the firewall.
267
Additional configuration
Basic setup
Set the time and date - CLI config system global set timezone <zone_value> set dst enable end execute date [<date_str>] execute time [<time_str>]
Note: If you choose the option Automatically adjust clock for daylight saving changes, the system time must be manually adjusted after daylight saving time ends.
For the NTP server, you can identify a specific port/IP address for this self-originating traffic. The configuration is performed in the CLI with the command set source-ip. For example, to set the source IP of NTP to be on the DMZ1 port with an IP of 192.168.4.5, the commands are: config system ntp set ntpsyn enable
set syncinterval 5 set source-ip 192.168.4.5
end
Configuring FortiGuard
The FDN is a world-wide network of FortiGuard Distribution Servers (FDS). When the FortiGate unit connects to the FDN, it connects to the nearest FDS. To do this, all FortiGate units are programmed with a list of FDS addresses sorted by nearest time zone according to the time zone configured for the FortiGate unit. Before you can begin receiving updates, you must register your FortiGate unit from the Fortinet web page. After which, you need to configure the FortiGate unit to connect to the FortiGuard Distribution Network (FDN) to update the antivirus, antispam and IPS attack definitions.
268
Basic setup
Passwords
3 Select Update Now to update the antivirus definitions. If the connection to the FDN is successful, the web-based manager displays a message similar to the following: Your update request has been sent. Your database will be updated in a few minutes. Please check your update page for the status of the update. After a few minutes, if an update is available, the FortiGuard Center Services information on the Dashboard lists new version information for antivirus definitions. The System Status page also displays new dates and version numbers for the antivirus definitions. Messages are recorded to the event log indicating whether or not the update was successful or not.
Note: Updating antivirus definitions can cause a very short disruption in traffic currently being scanned while the FortiGate unit applies the new signature database. Schedule updates when traffic is light, for example overnight, to minimize any disruption.
Passwords
The FortiGate unit ships with a default empty password, that is, there is no password. You will want to apply a password to prevent anyone from logging into the FortiGate unit and changing configuration options. To change the administrator password - web-based manager 1 Go to System > Admin > Administrators. 2 Select the admin account and select Change Password. 3 Enter a new password and select OK. Set the admin password - CLI config system admin edit admin set password <admin_password> end
Password considerations
When changing the password, consider the following to ensure better security. Do not make passwords that are obvious, such as the company name, administrator names or other obvious word or phrase. Use numbers in place of letters, for example, passw0rd. Alternatively, spell words with extra letters, for example, password. Administrative passwords can be up to 256 characters. Include a mixture of letters, numbers, and upper and lower case. Use multiple words together, or possibly even a sentence, for example keytothehighway, or with a combination of the above suggestions. Use a password generator. Change the password regularly and always use a code unique (not a variation of the existing password by adding a 1 to it, for example password, password1).
269
Administrators
Basic setup
Write the password down and store it in a safe place away from the management computer, in case you forget it. Alternatively, ensure at least two people know the password in the event that one person becomes ill, is away on vacation or leaves the company. Alternatively have two different admin logins.
Password policy
The FortiGate unit includes the ability to enforce a password policy for administrator login. with the policy, you can enforce regular changes and specific criteria for a password including: minimum length between 8 and 32 characters. if the password must contain uppercase (A, B, C) and/or lowercase (a, b, c) characters. if the password must contain numbers (1, 2, 3). if the password must contain non-alphanumeric characters (!, @, #, $, %, ^, &, *, (). where the password applies (admin or IPsec or both). the duration of the password before a new one must be specified.
To apply a password policy - web-based manager 1 Go to System > Admin > Settings. 2 Select Enable and configure the settings as required. To apply a password policy - CLI config system password-policy set status enable Configure the other settings as required.
Forgotten password?
It happens that the administrator of the FortiGate unit leaves the company and does not have the opportunity to provide the administrative password or forgets. Or you simply forgot the password. In the event you lose or forget the password, you need to contact Customer Support for the steps required to reset the password. For information on contacting Customer Support, see the Support web site at web site at https://support.fortinet.com.
Administrators
By default, the FortiGate unit has a super administrator called admin. This user login cannot be deleted and always has ultimate access over the FortiGate unit. As well you can add administrators for various functions and VDOMs. Each one can have their own username and password and set of access privileges.There are two levels of administrator accounts; regular administrators and system administrators. Regular administrators are administrators with any admin profile other than the default super_admin. System administrators are administrators that are assigned the super_admin profile.
270
Basic setup
Administrators
Administrator profiles
Administer profiles define what the administrator user can do when logged into the FortiGate unit. When you set up an administrator user account, you also assign an administrator profile, which dictates what the administrator user will see. Depending on the nature of the administrators work, access level or seniority, you can allow them to view and configure as much, or as little, as required.
super_admin profile
The super_admin administrator is the administrative account that the primary administrator should have to log into the FortiGate unit. The profile can not be deleted or modified to ensure there is always a method to administer the FortiGate unit.This user profile has access to all components of FortiOS, including the ability to add and remove other system administrators. For some administrative functions, such as backing up and restoring the configuration using SCP, super_admin access is required.
Tip: By default, the super_admin user (username is admin), does not have a password. Ensure you assign a password. You can also change the name of the account from admin to another name for better security.
Creating profiles
To configure administrator profiles go to System > Admin > Admin Profile. You can only assign one profile to an administrator user. On the New Admin Profile page, you define the components of FortiOS that will be available to view and/or edit. For example, if you configure a profile so that the administrator can only access the firewall components, when an administrator with that profile logs into the FortiGate unit, they will only be able to view and edit any firewall components including policies, addresses, schedules and any other settings that directly affect security policies.
Figure 38: The view of an administrator with firewall-only access
271
Administrators
Basic setup
config system accprofile set scope global ... end Once the scope is set, you can enable the read and read/write settings.
Adding administrators
When adding administrators, you are setting up the administrators user account. An administrator account comprises of an administrators basic settings as well as their access profile. The access profile is a definition of what the administrator is capable of viewing and editing. For information on administrator profiles, see Administrator profiles on page 271. To add an administrator - web-based manager 1 Go to System > Admin > Administrators. 2 Select Create New. 3 Enter the administrator name. 4 Select the type of account it will be. If you select Remote, the FortiGate unit can reference a RADIUS, LDAP or TACAS+ server. 5 When selecting Remote or PKI accounts, select the User Group the account will access. For information on logging in using remote authentication servers, see the User Authentication Guide. For an example of setting up a user with LDAP, see LDAP Admin Access and Authorization on page 272 6 Enter the password for the user. This may be a temporary password that the administrator can change later. Passwords can be up to 256 characters in length. For more information on passwords, see Passwords on page 269. 7 Select OK. To add an administrator - CLI config system admin edit <admin_name> set password <password> set accprofile <profile_name> end
272
Basic setup
Administrators
273
Administrators
Basic setup
To create an administrator - web-based manager 1 Go to System > Admin > Administrators and select Create New. 2 In the Administrator field, enter the name for the administrator. 3 For Type, select Remote. 4 Select the User Group created above from the drop-down list. 5 Select Wildcard. The Wildcard option allows for LDAP users to connect as this administrator. 6 Select an Admin Profile. 7 Select OK. To create an administrator - CLI config system admin edit <admin_name> set remote-auth enable set accprofile super_admin set wildcard enable set remote-group ldap end
Monitoring administrators
You can view the administrators logged in using the System Information widget on the Dashboard. On the widget is the Current Administrator row that shows the administrator logged in and the total logged in. Selecting Details displays the administrators), where they are logging in from and how (CLI, web-based manager) and when they logged in. You are also able to monitor the activities the administrators perform on the FortiGate unit using the logging of events. Event logs include a number of options to track configuration changes. To set logging - web-based manager 1 Go to Log&Report > Log Config > Log Setting. 2 Select a location to store logs and set the Minimum log level to Information. 3 Select Apply. 4 Go to Log&Report > Event Log. 5 Select the following event logs: System activity event Admin event Configuration change event
6 Select Apply.
274
Basic setup
To set logging - CLI config log <log_location> (log configuration will vary depending on location) end config log eventfilter set admin enable set system enable set config enable end To view the logs go to Log&Report > Log Access > Event.
Trusted hosts
Setting trusted hosts for an administrators increases limiting what computers an administrator can log in from. When you identify a trusted host, the FortiGate unit will only accept the administrators login from the configured IP address. Any attempt to log in with the same credentials from any other IP address will be dropped. To ensure the administrator has access from different locations, you can enter up to ten IP addresses. Ideally, this should be kept to a minimum. For higher security, use an IP address with a net mask of 255.255.255.255, and enter an IP address (non-zero) in each of the three default trusted host fields. Trusted hosts are configured when adding a new administrator by going to System > Admin > Administrators in the web-based manager or config system admin in the CLI. The trusted hosts apply to the web-based manager, ping, snmp and the CLI when accessed through Telnet or SSH. CLI access through the console port is not affected. Also ensure all entries contain actual IP addresses, not the default 0.0.0.0.
275
Basic setup
To back up the FortiGate configuration - web-based manager 1 Go to System > Dashboard > Status. 2 On the System Information widget, select Backup for the System Configuration. 3 Select to back up to your Local PC, FortiManager or to a USB key. The USB Disk option will be grayed out if no USB drive is inserted in the USB port. The FortiManager option will not be available if the FortiGate unit is not being managed by a FortiManager system. 4 If VDOMs are enabled, select to backup the entire FortiGate configuration (Full Config) or only a specific VDOM configuration (VDOM Config). 5 If backing up a VDOM configuration, select the VDOM name from the list. 6 Select Encrypt configuration file. Encryption must be enabled on the backup file to back up VPN certificates. 7 Enter a password and enter it again to confirm it. You will need this password to restore the file. 8 Select Backup. 9 The web browser will prompt you for a location to save the configuration file. The configuration file will have a .conf extension. To back up the FortiGate configuration - CLI execute backup config management-station <comment> or execute backup config usb <backup_filename> [<backup_password>] or for FTP, note that port number, username are optional depending on the FTP site execute backup config ftp <backup_filename> <ftp_server> [<port>] [<user_name>] [<password>] or for TFTP
execute backup config tftp <backup_filename> <tftp_servers> <password>
Use the same commands to backup a VDOM configuration by first entering the commands: config vdom edit <vdom_name> It is a good practice to backup the FortiGate configuration after any modification to any of the FortiGate settings. Alternatively, before performing an upgrade to the firmware, ensure you back up the configuration before upgrading. Should anything happen during the upgrade that changes the configuration, you can easily restore the saved configuration.
276
Basic setup
Use the same commands to backup a VDOM configuration by first entering the commands: config global set admin-scp enable end config vdom edit <vdom_name>
277
Basic setup
Windows client example To download the configuration file to a local directory called c:\config, enter the following command in a Command Prompt window: pscp admin@172.20.120.171:sys_config c:\config Enter the admin password when prompted.
Restoring a configuration
Should you need to restore a configuration file, use the following steps. To restore the FortiGate configuration - web-based manager 1 Go to System > Dashboard > Status. 2 On the System Information widget, select Restore for the System Configuration.
278
Basic setup
Firmware
3 Select to upload the configuration file to be restored from your Local PC or a USB key. The USB Disk option will be grayed out if no USB drive is inserted in the USB port. The FortiManager option will not be available if the FortiGate unit is not being managed by a FortiManager system. 4 Enter the path and file name of the configuration file, or select Browse to locate the file. 5 Enter a password if required. 6 Select Restore. To back up the FortiGate configuration - CLI execute restore config management-station normal 0 or execute restore config usb <filename> [<password>] or for FTP, note that port number, username are optional depending on the FTP site execute backup config ftp <backup_filename> <ftp_server> [<port>] [<user_name>] [<password>] or for TFTP
execute backup config tftp <backup_filename> <tftp_server> <password>
The FortiGate unit will load the configuration file and restart. Once the restart has completed, verify that the configuration has been restored.
Configuration revisions
The Configuration Revisions menu enables you to manage multiple versions of configuration files. Revision control requires either a configured central management server, or FortiGate units with 512 MB or more of memory. The central management server can either be a FortiManager unit or the FortiGuard Analysis & Management Service. When revision control is enabled on your unit, and configurations have been backed up, a list of saved revisions of those backed-up configurations appears. Configuration revisions are viewed in System > Maintenance > Configuration Revision.
Firmware
Fortinet periodically updates the FortiGate firmware to include new features and address issues. After you have registered your FortiGate unit, you can download firmware updates from the support web site, http://support.fortinet.com. You can also use the instructions in this chapter to revert, to a previous version. The FortiGate unit includes a number of firmware installation options that enables you to test new firmware without disrupting the existing installation, and load it from different locations as required. Fortinet issues patch releases--maintenance release builds that resolve important issues. Fortinet strongly recommends reviewing the release notes for the patch release, as well as testing and reviewing the patch release before upgrading the firmware. Follow the steps below: download and review the release notes for the patch release download the patch release back up the current configuration test the patch release until you are satisfied that it applies to your configuration.
279
Firmware
Basic setup
Installing a patch release without reviewing release notes or testing the firmware may result in changes to settings or unexpected issues. Only FortiGate admin user and administrators whose access profiles contain system read and write privileges can change the FortiGate firmware.
Downloading firmware
Firmware images for all FortiGate units is available on the Fortinet Customer Support web site. You must register your FortiGate unit to access firmware images. Register the FortiGate unit by visiting http://support.fortinet.com and select Product Registration. To download firmware 1 Log into the site using your user name and password. 2 Go to Firmware Images > FortiGate. 3 Select the most recent FortiOS version. 4 Locate the firmware for your FortiGate unit, right-click the link and select the Download option for your browser.
Note: Always review the Release Notes for a new firmware release before installing. The Release Notes can include information that is not available in the regular documentation.
To upgrade the firmware 1 Download the firmware image file to your management computer. 2 Log into the web-based manager as the admin administrative user. 3 Go to System > Dashboard > Status. 4 Under System Information > Firmware Version, select Update. 5 Type the path and filename of the firmware image file, or select Browse and locate the file. 6 Select OK. The FortiGate unit uploads the firmware image file, upgrades to the new firmware version, restarts, and displays the FortiGate login. This process takes a few minutes.
280
Basic setup
Firmware
If you are reverting to a previous FortiOS version, you might not be able to restore the previous configuration from the backup configuration file.
Note: Installing firmware replaces the current antivirus and attack definitions, along with the definitions included with the firmware release you are installing. After you install new firmware, make sure that antivirus and attack definitions are up to date. Note: To use this procedure, you must log in using the admin administrator account, or an administrator account that has system configuration read and write privileges.
To revert to a previous firmware version 1 Copy the firmware image file to the management computer. 2 Log into the FortiGate web-based manager. 3 Go to System > Dashboard > Status. 4 Under System Information > Firmware Version, select Update. 5 Type the path and filename of the firmware image file, or select Browse and locate the file. 6 Select OK. The FortiGate unit uploads the firmware image file, reverts to the old firmware version, resets the configuration, restarts, and displays the FortiGate login. This process takes a few minutes. 7 Log into the web-based manager. 8 Restore your configuration. For information about restoring your configuration see Restoring a configuration on page 278.
281
Firmware
Basic setup
execute restore image tftp <filename> <tftp_ipv4> Where <name_str> is the name of the firmware image file and <tftp_ip4> is the IP address of the TFTP server. For example, if the firmware image file name is image.out and the IP address of the TFTP server is 192.168.1.168, enter: execute restore image tftp image.out 192.168.1.168 The FortiGate unit responds with the message: This operation will replace the current firmware version! Do you want to continue? (y/n) 6 Type y. The FortiGate unit uploads the firmware image file, upgrades to the new firmware version, and restarts. This process takes a few minutes. 7 Reconnect to the CLI. 8 Update antivirus and attack definitions, by entering: execute update-now
USB Auto-Install
The USB Auto-Install feature automatically updates the FortiGate configuration file and firmware image file on a system reboot. Also, this feature provides you with an additional backup if you are unable to save your system settings before shutting down or rebooting your FortiGate unit.
You need an unencrypted configuration file for this feature. Also the required files, must be in the root directory of the USB key. Note: The FortiGate unit will only load a configuration file from a USB key when the FortiGate unit is restarted from a factory reset. This means that with any normal reboot commands, the FortiGate unit will not reload the configuration file. This was done to ensure that if the USB key was left in the USB port, an older configuration would not be loaded by accident, losing any configuration settings changed after the initial save.
To configure the USB Auto-Install - web-based manager 1 Go to System > Config > Advanced. 2 Select the following: On system restart, automatically update FortiGate configuration file if default file name is available on the USB disk. On system restart, automatically update FortiGate firmware image if default image is available on the USB disk. 3 Enter the configuration and image file names or use the default configuration filename (system.conf) and default image name (image.out). 4 The default configuration filename should show in the Default configuration file name field. 5 Select Apply.
282
Basic setup
Firmware
To configure the USB Auto-Install using the CLI 1 Log into the CLI. 2 Enter the following command: config system auto-install set default-config-file <filename> set auto-install-config {enable | disable} set default-image-file <filename> set auto-install-image {enable | disable} end
To use the following procedure, you must have a TFTP server the FortiGate unit can connect to. To revert to a previous firmware version using the CLI 1 Make sure the TFTP server is running 2 Copy the firmware image file to the root directory of the TFTP server. 3 Log into the FortiGate CLI. 4 Make sure the FortiGate unit can connect to the TFTP server execute by using the execute ping command. 5 Enter the following command to copy the firmware image from the TFTP server to the FortiGate unit: execute restore image tftp <name_str> <tftp_ipv4> Where <name_str> is the name of the firmware image file and <tftp_ip4> is the IP address of the TFTP server. For example, if the firmware image file name is imagev28.out and the IP address of the TFTP server is 192.168.1.168, enter: execute restore image tftp image28.out 192.168.1.168 The FortiGate unit responds with this message: This operation will replace the current firmware version! Do you want to continue? (y/n) 6 Type y. The FortiGate unit uploads the firmware image file. After the file uploads, a message similar to the following appears:
283
Firmware
Basic setup
Get image from tftp server OK. Check image OK. This operation will downgrade the current firmware version! Do you want to continue? (y/n) 7 Type y. The FortiGate unit reverts to the old firmware version, resets the configuration to factory defaults, and restarts. This process takes a few minutes. 8 Reconnect to the CLI. 9 To restore your previous configuration, if needed, use the command: execute restore config <name_str> <tftp_ip4> 10 Update antivirus and attack definitions using the command: execute update-now.
To install firmware from a system reboot 1 Connect to the CLI using the RJ-45 to DB-9 or null modem cable. 2 Make sure the TFTP server is running. 3 Copy the new firmware image file to the root directory of the TFTP server. 4 Make sure the internal interface is connected to the same network as the TFTP server. 5 To confirm the FortiGate unit can connect to the TFTP server, use the following command to ping the computer running the TFTP server. For example, if the IP address of the TFTP server is 192.168.1.168: execute ping 192.168.1.168 6 Enter the following command to restart the FortiGate unit. execute reboot The FortiGate unit responds with the following message: This operation will reboot the system! Do you want to continue? (y/n)
284
Basic setup
Firmware
7 Type y. As the FortiGate unit starts, a series of system startup messages appears. When the following messages appears: Press any key to display configuration menu.......... Immediately press any key to interrupt the system startup.
Note: You have only 3 seconds to press any key. If you do not press a key soon enough, the FortiGate unit reboots and you must log in and repeat the execute reboot command.
If you successfully interrupt the startup process, the following messages appears: [G]: Get firmware image from TFTP server. [F]: Format boot device. [B[: Boot with backup firmware and set as default [C]: Configuration and information [Q]: Quit menu and continue to boot with default firmware. [H]: Display this list of options. Enter G, F, Q, or H: 8 Type G to get to the new firmware image form the TFTP server. The following message appears: Enter TFTP server address [192.168.1.168]: 9 Type the address of the TFTP server and press Enter: The following message appears: Enter Local Address [192.168.1.188]: 10 Type an IP address the FortiGate unit can use to connect to the TFTP server. The IP address can be any IP address that is valid for the network the interface is connected to. Make sure you do not enter the IP address of another device on this network. The following message appears: Enter File Name [image.out]: 11 Enter the firmware image filename and press Enter. The TFTP server uploads the firmware image file to the FortiGate unit and a message similar to the following appears: Save as Default firmware/Backup firmware/Run image without saving: [D/B/R] 12 Type D. The FortiGate unit installs the new firmware image and restarts. The installation might take a few minutes to complete.
285
Firmware
Basic setup
Note: You can only save VPN certificates if you encrypt the file. Make sure the configuration encryption is enabled so you can save the VPN certificates with the configuration file. An encrypted file is ineffective if selected for the USB Auto-Install feature.
To backup configuration using the CLI 1 Log into the CLI. 2 Enter the following command to backup the configuration files: exec backup config usb <filename> 3 Enter the following command to check the configuration files are on the key: exec usb-disk list To restore configuration using the CLI 1 Log into the CLI. 2 Enter the following command to restore the configuration files: exec restore image usb <filename> The FortiGate unit responds with the following message: This operation will replace the current firmware version! Do you want to continue? (y/n) 3 Type y.
286
Basic setup
Firmware
6 As the FortiGate unit reboots, press any key to interrupt the system startup. As the FortiGate unit starts, a series of system startup messages appears. When the following messages appears: Press any key to display configuration menu.... 7 Immediately press any key to interrupt the system startup.
Note: You have only 3 seconds to press any key. If you do not press a key soon enough, the FortiGate unit reboots and you must login and repeat the execute reboot command.
If you successfully interrupt the startup process, the following messages appears: [G]: Get firmware image from TFTP server. [F]: Format boot device. [B[: Boot with backup firmware and set as default [C]: Configuration and information [Q]: Quit menu and continue to boot with default firmware. [H]: Display this list of options. Enter G, F, Q, or H: 8 Type G to get the new firmware image from the TFTP server. The following message appears: Enter TFTP server address [192.168.1.168]: 9 Type the address of the TFTP server and press Enter: The following message appears: Enter Local Address [192.168.1.188]: 10 Type an IP address of the FortiGate unit to connect to the TFTP server. The IP address must be on the same network as the TFTP server, but make sure you do not use the IP address of another device on the network. The following message appears: Enter File Name [image.out]: 11 Enter the firmware image file name and press Enter. The TFTP server uploads the firmware image file to the FortiGate unit and the following appears. Save as Default firmware/Backup firmware/Run image without saving: [D/B/R] 12 Type R. The FortiGate image is installed to system memory and the FortiGate unit starts running the new firmware image, but with its current configuration. You can test the new firmware image as required. When done testing, you can reboot the FortiGate unit, and the FortiGate unit will resume using the firmware that was running before you installed the test firmware.
287
Controlled upgrade
Basic setup
Controlled upgrade
Using a controlled upgrade, you can upload a new version of the FortiOS firmware to a separate partition in the FortiGate memory for later upgrade. The FortiGate unit can also be configured so that when it is rebooted, it will automatically load the new firmware (CLI only). Using this option, you can stage a number of FortiGate units to do an upgrade simultaeniously to all devices using FortiManager or script. To load the firmware for later installation - web-based manager 1 Go to System > Dashboard > Status. 2 Under System Information > Firmware Version, select Update. 3 Type the path and filename of the firmware image file, or select Browse and locate the file. 4 Deselect the Boot the New Firmware option 5 Select OK. To load the firmware for later installation - CLI execute restore secondary-image {ftp | tftp | usb} To set the FortiGate unit so that when it reboots, the new firmware is loaded, use the CLI command... execute set-next-reboot {primary | secondary} ... where {primary | secondary} is the partition with the preloaded firmware. To trigger the upgrade using the web-based manager 1 Go to System > Config > Firmware. 2 Select the check box for the new firmware version. The Comments column indicates which firmware version is the current active version. 3 Select Upgrade icon.
288
Centralized management
Administering one or two FortiGate units is fairly simple enough, especially when they are in the same room or building. However, if you are administering many FortiGate units that may be located in locations in a large geographical area, or in the world, you will need a more efficient method of maintaining firmware upgrades, configuration changes and updates. The FortiManager family of appliances supply the tools needed to effectively manage any size Fortinet security infrastructure, from a few devices to thousands of appliances. The appliances provide centralized policy-based provisioning, configuration, and update management. They also offer end-to-end network monitoring for added control. Managers can control administrative access and simplify policy deployment using role-based administration to define user privileges for specific management domains and functions by aggregating collections of Fortinet appliances and agents into independent management domains. By locally hosting security content updates for managed devices and agents, FortiManager appliances minimize Web filtering rating request response time and maximize network protection. This chapter describes the basics of using FortiManager as an administration tool for multiple FortiGate units. It describes the basics of setting up a FortiGate unit in FortiManager, and some key management features you can use within FortiManager to manage the FortiGate unit. For full details and instructions on FortiManager, see the FortiManager Administration Guide. This chapter includes the following sections: Adding a FortiGate to FortiManager Configuration through FortiManager Firmware updates FortiGuard Backup and restore configurations Administrative domains
FortiGate configuration
These steps ensure that the FortiGate unit will be able to receive updated antivirus and IPS updates, and allow remote management through the FortiManager system. You can add a FortiGate unit whether it is running in either NAT/Route mode or Transparent mode. The FortiManager unit provides remote management of a FortiGate unit over TCP port 541.
289
Centralized management
Note: If you have not already done so, register the FortiGate unit by visiting http://support.fortinet.com and select Product Registration. By registering your Fortinet unit, you will receive updates to threat detection and prevention databases (Antivirus, Intrusion Detection, etc.) and will also ensure your access to technical support. You must enable the FortiGate management option so the FortiGate unit can accept management updates to firmware, antivirus signatures and IPS signatures. To configure the FortiGate unit - web-based manager 1 Log in to the FortiGate unit. 2 Go to System > Admin > Central Management. 3 Select Enable FortiManager. 4 Enter the IP address for the FortiManager. 5 Select Apply. The FortiManager ID appears in the Trusted FortiManager table, and can now be managed by the FortiManager unit, once you add it to the Device Manager. To configure the FortiGate unit - CLI config system central-mamagement set status enable set fmg <ip_address> end
set status enable set enc-algorithm {default* | high | low | disable} end The default encryption automatically sets high and medium encryption algorithms. Algorithms used for high, medium, and low follows openssl definitions: High - Key lengths larger than 128 bits, and some cipher suites with 128-bit keys. Algorithms are: DHE-RSA-AES256-SHA:AES256-SHA:EDH-RSA-DES-CBC3SHA:DES-CBC3-SHA:DES-CBC3-MD5:DHE-RSA-AES128-SHA:AES128-SHA Medium - Key strengths of 128 bit encryption. Algorithm are:RC4-SHA:RC4-MD5:RC4-MD Low - Key strengths of 64 or 56 bit encryption algorithms but excluding export cipher suites Algorithms: EDH-RSA-DES-CDBC-SHA; DES-CBC-SHA; DES-CBC-MD5.
FortiManager configuration
After enabling Central Management and indicating the FortiManager unit that will provide the management of the FortiGate unit, you can add it to the Device Manager in the FortiManager web-based manager.
290
Centralized management
To add the FortiGate unit to the Device Manager in FortiManager 1 Log in to the FortiManager unit. 2 Select Add Device from the top tool bar. 3 Enter the IP address of the FortiGate unit. 4 Enter the Name of the device. This can be the model name, or functional name, such as West Building, or Accounting Firewall. 5 Enter the remaining information as required. 6 Select OK.
The Configuration Change Status indicates when the FortiGate configuration on FortiManager has changed and requires update to the FortiGate unit. Select Install Now to synchronize the changes. Select Installation Preview to review the changes, in CLI format, that will be uploaded to the FortiGate unit.
291
Firmware updates
Centralized management
Global objects
If you are maintaining a number of FortiGate units within a network, many of the policies and configuration elements will be the same across the corporation. In these instances, the adding and editing of many of the same policies will be come a tedious and error-prone activity. With FortiManager global objects, this level of configuration is simplified. A global object is an object that is not associated specifically with one device or group. Global objects includes security policies, a DNS server, VPN, and IP pools. The Global Objects window is where you can configure global objects and copy the configurations to the FortiManager device database for a selected device or a group of devices. You can also import configurations from the FortiManager device database for a selected device and modify the configuration as required. When configuring or creating a global policy object the interface, prompts, and fields are the same as creating the same object on a FortiGate unit using the FortiGate web-based manager.
Firmware updates
FortiManager can also be the source where firmware updates are performed for multiple FortiGate units, saving time rather than upgrading each FortiGate unit individually. The FortiManager unit stores local copies of firmware images by either downloading these images from the Fortinet Distribution Network (FDN) or by accepting firmware images that you upload from your management computer. If you are using the FortiManager unit to download firmware images from the FDN, FortiManager units first validate device licenses. The FDN validates support contracts and provides a list of currently available firmware images. For devices with valid Fortinet Technical Support contracts, you can download new firmware images from the FDN, including release notes. After firmware images have been either downloaded from the FDN or imported to the firmware list, you can either schedule or immediately upgrade/downgrade a device or groups firmware. See the FortiManager Administration Guide for more information on updating the FortiGate firmware using the FortiManager central management.
FortiGuard
FortiManager can also connect to the FortiGuard Distribution Network to receive push updates for IPS signatures and antivirus definitions. These updates can then be used to update multiple FortiGate units throughout an organization. By the FortiManager as the host for updates, bandwidth use is minimized by downloading to one source instead of many. To receive IPS and antivirus updates from FortiManager, indicate an alternate IP address on the FortiGate unit. To configure updates from FortiManager 1 Go to System > Config > FortiGuard. 2 Select AntiVirus and IPS Options to expand the options.
292
Centralized management
3 Select the checkbox next to Use override server address and enter the IP address of the FortiManager unit. 4 Select Apply.
Administrative domains
FortiManager administrative domains enable the admin administrator to create groupings of devices for configured administrators to monitor and manage. FortiManager can manage a large number of Fortinet appliances. This enables administrators to maintain managed devices specific to their geographic location or business division. This also includes FortiGate units with multiple configured VDOMs. Each administrator is tied to an administrative domain (ADOM). When that particular administrator logs in, they see only those devices or VDOMs configured for that administrator and ADOM. The one exception is the admin administrator account which can see and maintain all administrative domains and the devices within those domains. Administrative domains are not enabled by default, and enabling and configuring the domains can only be performed by the admin administrator. The maximum number of administrative domains you can add depends on the FortiManager system model. See the FortiManager Administration Guide for information on the maximums for each model.
293
Administrative domains
Centralized management
294
Before you can access the CLI through the network, you usually must enable SSH and/or Telnet on the network interface through which you will access the CLI.
295
Note: The following procedure describes connection using Microsoft HyperTerminal software; steps may vary with other terminal emulators.
To connect to the CLI using a local serial console connection 1 Using the null modem or RJ-45-to-DB-9 cable, connect the FortiGate units console port to the serial communications (COM) port on your management computer. 2 On your management computer, start HyperTerminal. 3 For the Connection Description, enter a Name for the connection, and select OK. 4 On the Connect using drop-down list box, select the communications (COM) port on your management computer you are using to connect to the FortiGate unit. 5 Select OK. 6 Select the following Port settings and select OK.
Bits per second Data bits Parity Stop bits Flow control 9600 8 None 1 None
7 Press Enter or Return on your keyboard to connect to the CLI. 8 Type a valid administrator account name (such as admin) and press Enter. 9 Type the password for that administrator account and press Enter. (In its default state, there is no password for the admin account.) The CLI displays the following text: Welcome! Type ? to list available commands. You can now enter CLI commands, including configuring access to the CLI through SSH or Telnet. For details, see Enabling access to the CLI through the network (SSH or Telnet) on page 296.
You must enable SSH and/or Telnet on the network interface associated with that physical network port. If your computer is not connected directly or through a switch, you must also configure the FortiGate unit with a static route to a router that can forward packets from the FortiGate unit to your computer. You can do this using either: a local console connection the web-based manager
296
Requirements a computer with an available serial communications (COM) port and RJ-45 port terminal emulation software such as HyperTerminal for Microsoft Windows the RJ-45-to-DB-9 or null modem cable included in your FortiGate package a network cable prior configuration of the operating mode, network interface, and static route (for details, see)
To enable SSH or Telnet access to the CLI using a local console connection 1 Using the network cable, connect the FortiGate units network port either directly to your computers network port, or to a network through which your computer can reach the FortiGate unit. 2 Note the number of the physical network port. 3 Using a local console connection, connect and log into the CLI. For details, see Connecting to the CLI using a local console on page 295. 4 Enter the following command: config system interface edit <interface_str> set allowaccess <protocols_list> next end where: <interface_str> is the name of the network interface associated with the physical network port and containing its number, such as port1 <protocols_list> is the complete, space-delimited list of permitted administrative access protocols, such as https ssh telnet For example, to exclude HTTP, HTTPS, SNMP, and PING, and allow only SSH and Telnet administrative access on port1: set system interface port1 config allowaccess ssh telnet
Caution: Telnet is not a secure access method. SSH should be used to access the CLI from the Internet or any other untrusted network.
5 To confirm the configuration, enter the command to display the network interfaces settings. get system interface <interface_str> The CLI displays the settings, including the allowed administrative access protocols, for the network interfaces. To connect to the CLI through the network interface, see Connecting to the CLI using SSH on page 297 or Connecting to the CLI using Telnet on page 298.
297
Note: FortiGate units support 3DES and Blowfish encryption algorithms for SSH.
Before you can connect to the CLI using SSH, you must first configure a network interface to accept SSH connections. For details, see Enabling access to the CLI through the network (SSH or Telnet) on page 296.
Note: The following procedure uses PuTTY. Steps may vary with other SSH clients.
To connect to the CLI using SSH 1 On your management computer, start an SSH client. 2 In Host Name (or IP Address), enter the IP address of a network interface on which you have enabled SSH administrative access. 3 In Port, enter 22. 4 For the Connection type, select SSH. 5 Select Open. The SSH client connects to the FortiGate unit. The SSH client may display a warning if this is the first time you are connecting to the FortiGate unit and its SSH key is not yet recognized by your SSH client, or if you have previously connected to the FortiGate unit but it used a different IP address or SSH key. If your management computer is directly connected to the FortiGate unit with no network hosts between them, this is normal. 6 Click Yes to verify the fingerprint and accept the FortiGate units SSH key. You will not be able to log in until you have accepted the key. The CLI displays a login prompt. 7 Type a valid administrator account name (such as admin) and press Enter. 8 Type the password for this administrator account and press Enter.
Note: If three incorrect login or password attempts occur in a row, you will be disconnected. Wait one minute, then reconnect to attempt the login again.
The FortiGate unit displays a command prompt (its host name followed by a #). You can now enter CLI commands.
Before you can connect to the CLI using Telnet, you must first configure a network interface to accept SSH connections. For details, see Enabling access to the CLI through the network (SSH or Telnet) on page 296.
298
Command syntax
To connect to the CLI using Telnet 1 On your management computer, start a Telnet client. 2 Connect to a FortiGate network interface on which you have enabled Telnet. 3 Type a valid administrator account name (such as admin) and press Enter. 4 Type the password for this administrator account and press Enter.
Note: If three incorrect login or password attempts occur in a row, you will be disconnected. Wait one minute, then reconnect to attempt the login again.
The FortiGate unit displays a command prompt (its host name followed by a #). You can now enter CLI commands.
Command syntax
When entering a command, the command line interface (CLI) requires that you use valid syntax, and conform to expected input constraints. It will reject invalid commands. Fortinet documentation uses the following conventions to describe valid command syntax
Terminology
Each command line consists of a command word that is usually followed by words for the configuration data or other specific item that the command uses or affects: get system admin To describe the function of each word in the command line, especially if that nature has changed between firmware versions, Fortinet uses terms with the following definitions.
Figure 40: Command syntax terminology Command Subcommand Object Table Option
command A word that begins the command line and indicates an action that the FortiGate unit should perform on a part of the configuration or host on the network, such as config or execute. Together with other words, such as fields or values, that end when you press the Enter key, it forms a command line. Exceptions include multiline command lines, which can be entered using an escape sequence. (See Shortcuts and key commands on page 307.) Valid command lines must be unambiguous if abbreviated. (See Command abbreviation on page 307.) Optional words or other command line permutations are indicated by syntax notation. (See Notation on page 300.)
299
Command syntax
sub-command A kind of command that is available only when nested within the scope of another command. After entering a command, its applicable sub-commands are available to you until you exit the scope of the command, or until you descend an additional level into another sub-command. Indentation is used to indicate levels of nested commands. (See Indentation on page 300.) Not all top-level commands have sub-commands. Available sub-commands vary by their containing scope. (See Sub-commands on page 301.)
object A part of the configuration that contains tables and/or fields. Valid command lines must be specific enough to indicate an individual object. table A set of fields that is one of possibly multiple similar sets which each have a name or number, such as an administrator account, policy, or network interface. These named or numbered sets are sometimes referenced by other parts of the configuration that use them. (See Notation on page 300.) field The name of a setting, such as ip or hostname. Fields in some tables must be configured with values. Failure to configure a required field will result in an invalid object configuration error message, and the FortiGate unit will discard the invalid table. value A number, letter, IP address, or other type of input that is usually your configuration setting held by a field. Some commands, however, require multiple input values which may not be named but are simply entered in sequential order in the same command line. Valid input types are indicated by constraint notation. (See Notation on page 300.) option A kind of value that must be one or more words from of a fixed set of options. (See Notation on page 300.)
Indentation
Indentation indicates levels of nested commands, which indicate what other subcommittees are available from within the scope. For example, the edit sub-command is available only within a command that affects tables, and the next sub-command is available only from within the edit sub-command: config system interface edit port1 set status up next end For information about available sub-commands, see Sub-commands on page 301.
Notation
Brackets, braces, and pipes are used to denote valid permutations of the syntax. Constraint notations, such as <address_ipv4>, indicate which data types or string patterns are acceptable value input.
Table 3: Command syntax notation Convention Description
Square brackets [ ] A non-required word or series of words. For example: [verbose {1 | 2 | 3}] indicates that you may either omit or type both the verbose word and its accompanying option, such as verbose 3.
300
Sub-commands
Table 3: Command syntax notation Angle brackets < > A word constrained by data type. The angled brackets contain a descriptive name followed by an underscore ( _ ) and suffix that indicates the valid data type. For example, <retries_int>, indicates that you should enter a number of retries, such as 5. Data types include: <xxx_name>: A name referring to another part of the configuration, such as policy_A. <xxx_index>: An index number referring to another part of the configuration, such as 0 for the first static route. <xxx_pattern>: A regular expression or word with wild cards that matches possible variations, such as *@example.com to match all email addresses ending in @example.com. <xxx_fqdn>: A fully qualified domain name (FQDN), such as mail.example.com. <xxx_email>: An email address, such as admin@example.com. <xxx_ipv4>: An IPv4 address, such as 192.168.1.99. <xxx_v4mask>: A dotted decimal IPv4 netmask, such as 255.255.255.0. <xxx_ipv4mask>: A dotted decimal IPv4 address and netmask separated by a space, such as 192.168.1.99 255.255.255.0. <xxx_ipv4/mask>: A dotted decimal IPv4 address and CIDRnotation netmask separated by a slash, such as 192.168.1.1/24. <xxx_ipv4range>: A hyphen ( - )-delimited inclusive range of IPv4 addresses, such as 192.168.1.1-192.168.1.255. <xxx_ipv6>: A colon( : )-delimited hexadecimal IPv6 address, such as 3f2e:6a8b:78a3:0d82:1725:6a2f:0370:6234. <xxx_v6mask>: An IPv6 netmask, such as /96. <xxx_ipv6mask>: A dotted decimal IPv6 address and netmask separated by a space. <xxx_str>: A string of characters that is not another data type, such as P@ssw0rd. Strings containing spaces or special characters must be surrounded in quotes or use escape sequences. See Special characters on page 308. <xxx_int>: An integer number that is not another data type, such as 15 for the number of minutes. A word or series of words that is constrained to a set of options delimited by either vertical bars or spaces. You must enter at least one of the options, unless the set of options is surrounded by square brackets [ ]. Mutually exclusive options. For example: {enable | disable} indicates that you must enter either enable or disable, but must not enter both. Non-mutually exclusive options. For example: {http https ping snmp ssh telnet} indicates that you may enter all or a subset of those options, in any order, in a space-delimited list, such as: ping https ssh Note: To change the options, you must re-type the entire list. For example, to add snmp to the previous example, you would type: ping https snmp ssh If the option adds to or subtracts from the existing list of options, instead of replacing it, or if the list is comma-delimited, the exception will be noted.
Sub-commands
Each command line consists of a command word that is usually followed by words for the configuration data or other specific item that the command uses or affects: get system admin
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
301
Sub-commands
Sub-commands are available from within the scope of some commands.When you enter a sub-command level, the command prompt changes to indicate the name of the current command scope. For example, after entering: config system admin the command prompt becomes: (admin)# Applicable sub-commands are available to you until you exit the scope of the command, or until you descend an additional level into another sub-command. For example, the edit sub-command is available only within a command that affects tables; the next sub-command is available only from within the edit sub-command: config system interface edit port1 set status up next end
Note: Sub-command scope is indicated in this System Administration by indentation. See Indentation on page 300.
Available sub-commands vary by command.From a command prompt within config, two types of sub-commands might become available: commands affecting fields commands affecting tables
Table 4: Commands for tables clone <table> Clone (or make a copy of) a table from the current object. For example, in config firewall policy, you could enter the following command to clone security policy 27 to create security policy 30: clone 27 to 39 In config antivirus profile, you could enter the following command to clone an antivirus profile named av_pro_1 to create a new antivirus profile named av_pro_2: clone av_pro_1 to av_pro_2 clone may not be available for all tables. Remove a table from the current object. For example, in config system admin, you could delete an administrator account named newadmin by typing delete newadmin and pressing Enter. This deletes newadmin and all its fields, such as newadmins first-name and email-address. delete is only available within objects containing tables. Create or edit a table in the current object. For example, in config system admin: edit the settings for the default admin administrator account by typing edit admin. add a new administrator account with the name newadmin and edit newadmins settings by typing edit newadmin. edit is an interactive sub-command: further sub-commands are available from within edit. edit changes the prompt to reflect the table you are currently editing. edit is only available within objects containing tables. In objects such as security policies, <table> is a sequence number. To create a new entry without the risk of overwriting an existing one, enter edit 0. The CLI initially confirms the creation of entry 0, but assigns the next unused number after you finish editing and enter end.
delete <table>
edit <table>
302
Sub-commands
Table 4: Commands for tables end get Save the changes to the current object and exit the config command. This returns you to the top-level command prompt. List the configuration of the current object or table. In objects, get lists the table names (if present), or fields and their values. In a table, get lists the fields and their values. For more information on get commands, see the CLI Reference. Remove all tables in the current object. For example, in config forensic user, you could type get to see the list of user names, then type purge and then y to confirm that you want to delete all users. purge is only available for objects containing tables. Caution: Back up the FortiGate unit before performing a purge. purge cannot be undone. To restore purged tables, the configuration must be restored from a backup. Caution: Do not purge system interface or system admin tables. purge does not provide default tables. This can result in being unable to connect or log in, requiring the FortiGate unit to be formatted and restored. Rename a table. For example, in config system admin, you could rename admin3 to fwadmin by typing rename admin3 to fwadmin. rename is only available within objects containing tables. Display changes to the default configuration. Changes are listed in the form of configuration commands.
purge
show
next
303
Permissions
Table 5: Commands for fields set <field> <value> Set a fields value. For example, in config system admin, after typing edit admin, you could type set password newpass to change the password of the admin administrator to newpass. Note: When using set to change a field containing a space-delimited list, type the whole new list. For example, set <field> <new-value> will replace the list with the <new-value> rather than appending <new-value> to the list. show unset <field> Display changes to the default configuration. Changes are listed in the form of configuration commands. Reset the table or objects fields to default values. For example, in config system admin, after typing edit admin, typing unset password resets the password of the admin administrator account to the default (in this case, no password).
Example of field commands From within the admin_1 table, you might enter: set password my1stExamplePassword to assign the value my1stExamplePassword to the password field. You might then enter the next command to save the changes and edit the next administrators table.
Permissions
Depending on the account that you use to log in to the FortiGate unit, you may not have complete access to all CLI commands. Access profiles control which CLI commands an administrator account can access. Access profiles assign either read, write, or no access to each area of the FortiGate software. To view configurations, you must have read access. To make changes, you must have write access.
Table 6: Areas of control in access profiles Access control area name In the web-based manager Admin Users In the CLI Grants access to (For each config command, there is an equivalent get/show command, unless otherwise noted. config access requires write permission. get/show access requires read permission.) System > Admin config system admin config system accprofile Auth Users authgrp User config config config config config Endpoint NAC endpointcontrol-grp fwgrp imp2p imp2p imp2p imp2p user aim-user icq-user msn-user yahoo-user
admingrp
Firewall Configuration
Firewall
304
Permissions
Table 6: Areas of control in access profiles config firewall config gui topology execute fsae refresh FortiGuard Update updategrp System > Maintenance > FortiGuard config system autoupdate execute update-ase execute update-av execute update-ips execute update-now Log & Report loggrp Log&Report cconfig alertemail config log config system alertemail config system fortianalyzer1/2/3 execute formatlogdisk execute fortiguard-log execute log Maintenance mntgrp System > Maintenance diagnose sys ... execute backup ... execute batch execute central-mgmt execute factoryreset execute reboot execute restore execute shutdown execute usb-disk Network Configuration Router Configuration netgrp routegrp System > Network > Interface config system interface Router config router ... execute mrouter execute router
305
Permissions
Table 6: Areas of control in access profiles System Configuration sysgrp System > Status (all), System > Network > Options, System > Network > DNS Database, System > Config (all), System > Admin > Central Management, System > Admin > Settings, Wireless Controller config gui console config system auto-install, bug report, central-management, console, dns, dns-database, fips-cc, fortiguard, fortiguard-log, global, ha, ipv6-tunnel, modem, ntp, password-policy, replacemsg, session-helper, session-sync, session-ttl, settings, sit-tunnel, snmp, switch-interface, tos-based-priority, wccp config wireless-controller ... execute cfg, cli, date, disconnect-admin-session, enter, factoryreset, fortiguard-log, ha, modem, ping, ping-options, ping6, ping6-options, reboot, send-fds-statistics, set-next-reboot, shutdown, ssh, telnet, time, traceroute get gui console get ipsec tunnel get system central-mgmt, cmdb, fdp-fortianalyzer, fortianalyzer-connectivity, fortiguard-log-service, fortiguard-service, info, performance, session get wireless-controller UTM Configuration utmgrp UTM config config config config config config config VPN Configuration vpngrp VPN config vpn execute vpn antivirus application imp2p old-version imp2p policy ips spamfilter webfilter
Unlike other administrator accounts, the administrator account named admin exists by default and cannot be deleted. The admin administrator account is similar to a root administrator account. This administrator account always has full permission to view and change all FortiGate configuration options, including viewing and changing all other administrator accounts. Its name and permissions cannot be changed. It is the only administrator account that can reset another administrators password without being required to enter that administrators existing password.
Caution: Set a strong password for the admin administrator account, and change the password regularly. By default, this administrator account has no password. Failure to maintain the password of the admin administrator account could compromise the security of your FortiGate unit.
306
Tips
For complete access to all commands, you must log in with the administrator account named admin.
Tips
Basic features and characteristics of the CLI environment provide support and ease of use for many CLI tasks.
Help
To display brief help during command entry, press the question mark (?) key. Press the question mark (?) key at the command prompt to display a list of the commands available and a description of each command. Type a word or part of a word, then press the question mark (?) key to display a list of valid word completions or subsequent words, and to display a description of each.
List valid word completions or subsequent words. ? If multiple words could complete your entry, display all possible completions with helpful descriptions of each. Complete the word with the next available match. Press the key multiple times to cycle through available matches. Recall the previous command. Command memory is limited to the current session. Recall the next command. Move the cursor left or right within the command line. Move the cursor to the beginning of the command line. Move the cursor to the end of the command line. Move the cursor backwards one word. Move the cursor forwards one word. Delete the current character. Tab Up arrow, or Ctrl + P Down arrow, or Ctrl + N Left or Right arrow Ctrl + A Ctrl + E Ctrl + B Ctrl + F Ctrl + D
Abort current interactive commands, such as when entering multiple lines. Ctrl + C If you are not currently within an interactive command such as config or edit, this closes the CLI connection. Continue typing a command on the next line for a multi-line command. For each line that you want to continue, terminate it with a backslash ( \ ). To complete the command line, terminate it by pressing the spacebar and then the Enter key, without an immediately preceding backslash. \ then Enter
Command abbreviation
You can abbreviate words in the command line to their smallest number of non-ambiguous characters. For example, the command get system status could be abbreviated to g sy st.
307
Tips
Environment variables
The CLI supports the following environment variables. Variable names are case-sensitive.
$USERFROM The management access type (ssh, telnet, jsconsole for the CLI Console widget in the web-based manager, and so on) and the IP address of the administrator that configured the item. The account name of the administrator that configured the item. The serial number of the FortiGate unit.
$USERNAME $SerialNum
For example, the FortiGate units host name can be set to its serial number. config system global set hostname $SerialNum end As another example, you could log in as admin1, then configure a restricted secondary administrator account for yourself named admin2, whose first-name is admin1 to indicate that it is another of your accounts: config system admin edit admin2 set first-name $USERNAME
Special characters
The characters <, >, (,), #, ', and are not permitted in most CLI fields. These characters are special characters, sometimes also called reserved characters. You may be able to enter special character as part of a strings value by using a special command, enclosing it in quotes, or preceding it with an escape sequence in this case, a backslash ( \ ) character.
Table 8: Entering special characters Character ? Tab Space (to be interpreted as part of a string value, not to end the string) ' (to be interpreted as part of a string value, not to end the string) " (to be interpreted as part of a string value, not to end the string) \ Keys Ctrl + V then ? Ctrl + V then Tab Enclose the string in quotation marks: "Security Administrator. Enclose the string in single quotes: 'Security Administrator'. Precede the space with a backslash: Security\ Administrator. \'
\"
\\
If you need to add configuration via CLI that requires ? as part of config, you need to input CTRL-V first. If you enter the question mark (?) without first using CTRL-V, the question mark has a different meaning in CLI: it will show available command options in that section. For example, if you enter ? without CTRL-V:
308
Tips
edit "*.xe token line: Unmatched double quote. If you enter ? with CTRL-V: edit "*.xe?" new entry '*.xe?' added
Examples
Use the following command to display the MAC address of the FortiGate unit internal interface: get hardware nic internal | grep Current_HWaddr Current_HWaddr 00:09:0f:cb:c2:75 Use the following command to display all TCP sessions in the session list and include the session list line number in the output get system session list | grep -n tcp Use the following command to display all lines in HTTP replacement message commands that contain URL (upper or lower case): show system replacemsg http | grep -i url
309
Tips
For example, with Shift-JIS, backslashes ( \ ) could be inadvertently interpreted as yen symbols ( ) and vice versa. A regular expression intended to match HTTP requests containing money values with a yen symbol therefore may not work it if the symbol is entered using the wrong encoding. For best results, you should: use UTF-8 encoding, or use only the characters whose numerically encoded values are the same in UTF-8, such as the US-ASCII characters that are also encoded using the same values in ISO 8859-1, Windows code page 1252, Shift-JIS and other encodings, or for regular expressions that must match HTTP requests, use the same encoding as your HTTP clients
Note: HTTP clients may send requests in encodings other than UTF-8. Encodings usually vary by the clients operating system or input language. If you cannot predict the clients encoding, you may only be able to match any parts of the request that are in English, because regardless of the encoding, the values for English characters tend to be encoded identically. For example, English words may be legible regardless of interpreting a web page as either ISO 8859-1 or as GB2312, whereas simplified Chinese characters might only be legible if the page is interpreted as GB2312.
It configure your FortiGate unit using other encodings, you may need to switch language settings on your management computer, including for your web browser or Telnet/SSH client. For instructions on how to configure your management computers operating system language, locale, or input method, see its documentation.
Note: If you choose to configure parts of the FortiGate unit using non-ASCII characters, verify that all systems interacting with the FortiGate unit also support the same encodings. You should also use the same encoding throughout the configuration if possible in order to avoid needing to switch the language settings of the web-based manager and your web browser or Telnet/SSH client while you work.
Similarly to input, your web browser or CLI client should usually interpret display output as encoded using UTF-8. If it does not, your configured items may not display correctly in the web-based manager or CLI. Exceptions include items such as regular expressions that you may have configured using other encodings in order to match the encoding of HTTP requests that the FortiGate unit receives. To enter non-ASCII characters in the CLI Console widget 1 On your management computer, start your web browser and go to the URL for the FortiGate units web-based manager. 2 Configure your web browser to interpret the page as UTF-8 encoded. 3 Log in to the FortiGate unit. 4 Go to System > Dashboard > Status. 5 In title bar of the CLI Console widget, click Edit (the pencil icon). 6 Enable Use external command input box. 7 Select OK. The Command field appears below the usual input and display area of the CLI Console widget. 8 In Command, type a command.
310
Tips
9 Press Enter. In the display area, the CLI Console widget displays your previous command interpreted into its character code equivalent, such as: edit \743\601\613\743\601\652 and the commands output. To enter non-ASCII characters in a Telnet/SSH client 1 On your management computer, start your Telnet or SSH client. 2 Configure your Telnet or SSH client to send and receive characters using UTF-8 encoding. Support for sending and receiving international characters varies by each Telnet/SSH client. Consult the documentation for your Telnet/SSH client. 3 Log in to the FortiGate unit. 4 At the command prompt, type your command and press Enter.
Figure 42: Entering encoded characters (PuTTY)
You may need to surround words that use encoded characters with single quotes ( ' ). Depending on your Telnet/SSH clients support for your languages input methods and for sending international characters, you may need to interpret them into character codes before pressing Enter. For example, you might need to enter: edit '\743\601\613\743\601\652' 5 The CLI displays your previous command and its output.
311
Tips
Screen paging
You can configure the CLI to, when displaying multiple pages worth of output, pause after displaying each pages worth of text. When the display pauses, the last line displays --More--. You can then either: press the spacebar to display the next page. type Q to truncate the output and return to the command prompt.
This may be useful when displaying lengthy output, such as the list of possible matching commands for command completion, or a long list of settings. Rather than scrolling through or possibly exceeding the buffer of your terminal emulator, you can simply display one page at a time. To configure the CLI display to pause when the screen is full: config system console set output more end
Baud rate
You can change the default baud rate of the local console connection. To change the baud rate enter the following commands: config system console set baudrate {115200 | 19200 | 38400 | 57600 | 9600} end
3 Use execute restore to upload the modified configuration file back to the FortiGate unit. The FortiGate unit downloads the configuration file and checks that the model information is correct. If it is, the FortiGate unit loads the configuration file and checks each command for errors.If a command is invalid, the FortiGate unit ignores the command. If the configuration file is valid, the FortiGate unit restarts and loads the new configuration.
312
Tips
To match a special character such as the period ('.') and the asterisk (*), regular expressions use the slash (\) escape character. For example: To match example.com, the regular expression should be example\.com. In Perl regular expressions, the asterisk (*) means match 0 or more times of the character before it, not 0 or more times of any character. For example: exam*\.com matches examiiii.com but does not match eample.com. To match any character 0 or more times, use .* where . means any character and the * means 0 or more times. For example: the wildcard match pattern exam*.com is equivalent to the regular expression exam.*\.com.
Word boundary
In Perl regular expressions, the pattern does not have an implicit word boundary. For example, the regular expression test not only matches the word test but also matches any word that contains the word test such as atest, mytest, testimony, atestb. The notation \b specifies the word boundary. To match exactly the word test, the expression should be \btest\b.
Case sensitivity
Regular expression pattern matching is case sensitive in the Web and Spam filters. To make a word or phrase case insensitive, use the regular expression /i. For example, /bad language/i will block all instances of bad language regardless of case.
Table 9: Perl regular expression examples Expression abc ^abc abc$ a|b ^abc|abc$ ab{2,4}c ab{2,}c ab*c ab+c Matches abc (that exact character sequence, but anywhere in the string) abc at the beginning of the string abc at the end of the string either of a and b the string abc at the beginning or at the end of the string an a followed by two, three or four b's followed by a c an a followed by at least two b's followed by a c an a followed by any number (zero or more) of b's followed by a c an a followed by one or more b's followed by a c
313
Tips
Table 9: Perl regular expression examples ab?c a.c a\.c [abc] [Aa]bc [abc]+ [^abc]+ \d\d /i \w+ 100\s*mk abc\b perl\B \x an a followed by an optional b followed by a c; that is, either abc or ac an a followed by any single character (not newline) followed by a c a.c exactly any one of a, b and c either of Abc and abc any (nonempty) string of a's, b's and c's (such as a, abba, acbabcacaa) any (nonempty) string which does not contain any of a, b and c (such as defg) any two decimal digits, such as 42; same as \d{2} makes the pattern case insensitive. For example, /bad language/i blocks any instance of bad language regardless of case. a "word": a nonempty sequence of alphanumeric characters and low lines (underscores), such as foo and 12bar8 and foo_1 the strings 100 and mk optionally separated by any amount of white space (spaces, tabs, newlines) abc when followed by a word boundary (e.g. in abc! but not in abcd) perl when not followed by a word boundary (e.g. in perlert but not in perl stuff) tells the regular expression parser to ignore white space that is neither backslashed nor within a character class. You can use this to break up your regular expression into (slightly) more readable parts.
314
Tightening security
The FortiGate unit protects the network. There are additional configurations you can do in FortiOS to more effectively hide the FortiGate unit from would-be hackers on the Internet. This chapter describes some options to better cloak your network. These security steps are focused on limiting administrative access on management computers and within FortiOS. For physical security, the FortiGate unit should be housed in a server room with limited access and locks requiring access codes or swipe cards. This chapter includes the following sections: Administrators Users Interface settings Rejecting PING requests Opening TCP 113 Obfuscate HTTP headers
Administrators
One point of security breach is at the management computer. Administrators who leave their workstations for a prolonged amount of time while staying logged into the web-based manager or CLI (whether on purpose or not), leave the firewall open to malicious intent.
Passwords
Do not make passwords that are obvious, such as the company name, administrator names or other obvious word or phrase. Administrative passwords can be up to 256 characters. For more information on passwords, see Passwords on page 269.
315
Administrators
Tightening security
Administrator lockout
By default, the FortiGate unit includes set number of password retries. That is, the administrator has a maximum of three attempts to log into their account before they are locked out for a set amount of time. The number of attempts can be set to an alternate value. As well, the default wait time before the administrator can try to enter a password again is 60 seconds. You can also change this to further sway would-be hackers. Both settings are configured only in the CLI To configure the lockout options use the following commands: config system global set admin-lockout-threshold <failed_attempts> set admin-lockout-duration <seconds> end For example, to set the lockout threshold to one attempt and a five minute duration before the administrator can try again to log in enter the commands config system global set admin-lockout-threshold 1 set admin-lockout-duration 300 end
Idle time-out
To avoid the possibility of an administrator walking away from the management computer and leaving it exposed to unauthorized personnel, you can add an idle time-out. That is, if the web-based manager is not used for a specified amount of time, the FortiGate unit will automatically log the user out. To continue their work, they must log in to the device again. The time-out can be set as high as 480 minutes, or eight hours, although this is not recommend. To set the idle time out - web-based manager 1 Go to System > Admin > Settings. 2 In the Timeout Settings, enter the amount of time the Administrator login can remain idol, or inactive before automatically logging the administrator out. 3 Select Apply.
System Administration for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
316
Tightening security
Administrators
To set the idle time out - CLI config system global set admintimeout <minutes> end
Administrative ports
You can set the web-based manager access as through HTTP, HTTPS, SSH and Telnet. In these cases, the default ports for these protocols are 80, 443, 22 and 23 respectively. You can change the ports used for network administration to a different, unused port to further limit potential hackers.
Note: Ensure the port you select is not a port you will be using for other applications. For a list of assigned port numbers see http://www.iana.org/assignments/port-numbers.
To change the administrative ports - web-based manager 1 Go to System > Admin > Settings. 2 In the Web Administration Ports section, change the port numbers. 3 Select Apply To change the administrative ports - CLI config system global set admin-port <http_port_number> set admin-sport <https_port_number> set admin-ssh-port <ssh_port_number> set admin-telnet-port <telnet_port_number> end When logging into the FortiGate unit, by default FortiOS will automatically use the default ports. That is, when logging into the FortiGate IP address, you only need to enter the address, for example: https://192.168.1.1 When you change the administrative port number, the port number must be added to the url. For example, if the port number for HTTPS access is 2112, the administrator must enter the following address: https://192.168.1.1:2112
317
Users
Tightening security
Users
User access is also a consideration for possible breaches of security. Users can require authorization to connect to the network using authorization security policies. Still a potential for someone to attempt access to system with access to sensitive inform ai ton, additional security measures can be added to minimize possible hacks. Users who leave their workstations for a prolonged amount of time while staying logged into the network or internet leave the internal network open to malicious intent.
Passwords
Ensure that users do not make passwords that are obvious, such as the company name, administrator names or other obvious word or phrase. User passwords can be up to 256 characters. For more information on passwords, see Passwords on page 269. Also instill a policy that the password must be changed on a regular basis.
User lockout
By default, the FortiGate unit includes set number of password retries. That is, the user has a maximum of three attempts to log into their account before they are locked out for a set amount of time. The number of attempts can be set to an alternate value. As well, the default wait time, or black out time, before the user can try to enter a password again is not set. You can also change this to further sway would-be hackers. Both settings are configured only in the CLI To configure the lockout options use the following commands: config user settings set set auth-invalid-max <failed_attempts> set admin-blackout-time <seconds> end For example, to set the lockout threshold to three attempts and a five minute duration before the user can try again to log in enter the commands config user settings set auth-invalid-max 3 set auth-blackout-time 300 end
Interface settings
Within FortiOS there are a few options you can set to limit unauthorized access and prevent unwanted remote login attempts.
318
Tightening security
Within the CLI, you cannot completely clear all the admin access options; one must be selected. It is best to either do this from the web-based manager.
Disable interfaces
If any of the interfaces on the FortiGate unit are not being used, disable traffic on that interface. This avoids someone plugging in network cables and potentially causing network bypass or loop issues. To disable an interface - web-based manager 1 Go to System > Network > Interface. 2 Select the interface from the list and select Edit. 3 For Administrative Access, select Down. 4 Select OK. To disable an interface - CLI config system interface edit <inerface_name> set status down end
319
Tightening security
320
Best Practices
The FortiGate unit is installed, and traffic is flowing. With your network sufficiently protected, you can now fine tune the firewall for the best performance and efficiently. This chapter describes configuration options that can ensure your FortiGate unit is running at its best performance. This chapter includes best practices and suggestions for: Hardware Performance Firewall Intrusion protection Antivirus Web filtering Antispam
Hardware
Environmental specifications
Keep the following environmental specifications in mind when installing and setting up your FortiGate unit. Operating temperature: 32 to 104F (0 to 40C) (temperatures may vary, depending on the FortiGate model) If you install the FortiGate unit in a closed or multi-unit rack assembly, the operating ambient temperature of the rack environment may be greater than room ambient temperature. Therefore, make sure to install the equipment in an environment compatible with the manufacturer's maximum rated ambient temperature. Storage temperature: -13 to 158F (-25 to 70C) (temperatures may vary, depending on the FortiGate model) Humidity: 5 to 90% non-condensing Air flow - For rack installation, make sure that the amount of air flow required for safe operation of the equipment is not compromised. For free-standing installation, make sure that the appliance has at least 1.5 in. (3.75 cm) of clearance on each side to allow for adequate air flow and cooling.
This device complies with part FCC Class A, Part 15, UL/CUL, C Tick, CE and VCCI. Operation is subject to the following two conditions: This device may not cause harmful interference, and This device must accept any interference received, including interference that may cause undesired operation.
321
Hardware
Best Practices
This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures: Reorient or relocate the receiving antenna. Increase the separation between the equipment and receiver. Connect the equipment into an outlet on a circuit different from that to which the receiver is connected. Consult the dealer or an experienced radio/TV technician for help.
The equipment compliance with FCC radiation exposure limit set forth for uncontrolled Environment.
Caution: Risk of Explosion if battery is replaced by an incorrect type. Dispose of used batteries according to the instructions
Caution: To reduce the risk of fire, use only No. 26 AWG or larger UL Listed or CSA Certified Telecommunication Line Cord.
Grounding
Ensure the FortiGate unit is connected and properly grounded to a lightning and surge protector. WAN or LAN connections that enter the premises from outside the building should be connected to an Ethernet CAT5 (10/100 Mb/s) surge protector. Shielded Twisted Pair (STP) Ethernet cables should be used whenever possible rather than Unshielded Twisted Pair (UTP). Do not connect or disconnect cables during lightning activity to avoid damage to the FortiGate unit or personal injury.
322
Best Practices
Shutting down
Reliable Earthing - Reliable earthing of rack-mounted equipment should be maintained. Particular attention should be given to supply connections other than direct connections to the branch circuit (e.g. use of power strips).
Shutting down
Always shut down the FortiGate operating system properly before turning off the power switch to avoid potential hardware problems. To power off the FortiGate unit - web-based manager 1 Go to System > Status. 2 In the Unit Operation display, select Shutdown. To power off the FortiGate unit execute shutdown Once completing this step you can safely disconnect the power cables from the power supply.
Performance
Disable any management features you do not need. If you dont need SSH or SNMP disable them. SSH also provides another possibility for would-be hackers to infiltrate your FortiGate unit. Put the most used firewall rules to the top of the interface list. Log only necessary traffic. The writing of logs, especially if to an internal hard disk, slows down performance. Enable only the required application inspections. Keep alert systems to a minimum. If you send logs to a syslog server, you may not need SNMP or email alerts, making for redundant processing. Establish scheduled FortiGuard updates at a reasonable rate. Daily every 4-5 hours for most situations, or in more heavy-traffic situations, in the evening when more bandwidth can be available. Keep UTM profiles to a minimum. If you do not need a profile on a firewall rule, do not include it. Keep VDOMs to a minimum. On low-end FortiGate units, avoid using them if possible. Avoid traffic shaping if you need maximum performance. Traffic shaping, by definition, slows down traffic.
Firewall
Avoid using the All selection for the source and destination addresses. Use addresses or address groups. Avoid using Any for the services. Use logging on a policy only when necessary. For example, you may want to log all dropped connections but be aware of the performance impact. However, use this sparingly to sample traffic data rather than have it continually storing log information you may not use.
323
Intrusion protection
Best Practices
Use the comment field to input management data; who requested the rule, who authorized it, etc. Avoid FQDN addresses if possible. It can cause a performance impact on DNS queries and security impact from DNS spoofing. If possible, avoid port ranges on services for security reasons. Use groups whenever possible.
Intrusion protection
Create and use UTM profiles with specific signatures and anomalies you need per-interface and per-rule. Do not use predefined or generic profiles. While convenient to supply immediate protection, you should create profiles to suit your network environment. If you do use the default profiles, reduce the IPS signatures/anomalies enabled in the profile to conserver processing time and memory. If you are going to enable anomalies, make sure you tune thresholds according to your environment. If you need protection, but not audit information, disable the logging option. Tune the IP-protocol parameter accordingly.
Antivirus
Enable only the protocols you need to scan. If you have antivirus scans occurring on the SMTP server, or using FortiMail, it is redundant to have it occur on the FortiGate unit as well. Reduce the maximum file size to be scanned. Viruses travel usually in small files of around 1 to 2 megabytes. Antivirus scanning within an HA cluster can impact performance. Enable grayware scanning on UTM profiles tied to internet browsing. Do not quarantine files unless you regularly monitor and review them. This is otherwise a waste of space and impacts performance. Use file patterns to avoid scanning where it is not required. Enable heuristics from the CLI if high security is required using the command config antivirus heuristic.
Web filtering
Web filtering within an HA cluster impacts performance. Always review the DNS settings to ensure the servers are fast. Content block may cause performance overhead. Local URL filter is faster than FortiGuard web filter, because the filter list is local and the FortiGate unit does not need to go out to the Internet to get the information from a FortiGuard web server.
324
Best Practices
Antispam
Antispam
If possible use, a FortiMail unit. The antispam engines are more robust. Use fast DNS servers. Use specific UTM profiles for the rule that will use antispam. DNS checks may cause false positive with HELO DNS lookup. Content analysis (banned words) may impose performance overhead.
Security
Use NTP to synchronize time on the FortiGate and the core network systems such as email servers, web servers and logging services. Enable log rules to match corporate policy. For example, log administration authentication events and access to systems from untrusted interfaces. Minimize adhoc changes to live systems if possible to minimize interruptions to the network. When not possible, create backup configurations and implement sound audit systems using FortiAnalyzer and FortiManager. If you only need to allow access to a system on a specific port, limit the access by creating the strictest rule possible.
325
Security
Best Practices
326
FortiGuard
FortiGuard is a world-wide network of servers. The FortiGuard Distribution Network (FDN) of servers provides updates to antivirus, antispam and IPS definitions. Worldwide coverage of FortiGuard services is provided by FortiGuard service points. FortiGuard Subscription Services provide comprehensive Unified Threat Management (UTM) security solutions to enable protection against content and network level threats. Fortinet employs people around the globe monitoring virus, spyware and vulnerability activities. As these various vulnerabilities are found, signatures are created and pushed to the subscribed FortiGate unit. The Global Threat Research Team enables Fortinet to deliver a combination of multi-layered security intelligence and provide true zero-day protection from new and emerging threats. FortiGuard services are continuously updated year round, 24x7x365. The FortiGuard Network has data centers around the world located in secure, high availability locations that automatically deliver updates to the Fortinet security platforms to and protect the network with the most up-to-date information. To ensure optimal response and updates, the FortiGate unit will contact a FortiGuard service point closest to the FortiGate installation, using the configured time zone information. Every FortiGate unit includes a free 30-day FortiGuard trial license. FortiGuard license management is performed by Fortinet servers. The FortiGate unit automatically contacts a FortiGuard service point when enabling FortiGuard services. Contact Fortinet Technical Support to renew a FortiGuard license after the free trial. This chapter includes the topics: FortiGuard Services Antivirus and IPS Web filtering Email filtering Security tools Troubleshooting
FortiGuard Services
The FortiGuard services provide a number of services to monitor world-wide activity and provide the best possible security. Services include: Antispam/Web Filtering- The FortiGuard Antispam Service uses both a sender IP reputation database and a spam signature database, along with sophisticated spam filtering tools on Fortinet appliances and agents, to detect and block a wide range of spam messages. Updates to the IP reputation and spam signature databases are provided continuously via the global FortiGuard distribution network. Antivirus -The FortiGuard Antivirus Service provides fully automated updates to ensure protection against the latest content level threats. It employs advanced virus, spyware, and heuristic detection engines to prevent both new and evolving threats and vulnerabilities from gaining access to your network.
327
FortiGuard
Intrusion Prevention - The FortiGuard Intrusion Prevention Service uses a customizable database of more than 4000 known threats to stop attacks that evade conventional firewall defenses. It also provides behavior-based heuristics, enabling the system to recognize threats when no signature has yet been developed. It also provides more than 1000 application identity signatures for complete application control. Web Filtering - Web Filtering provides Web URL filtering to block access to harmful, inappropriate, and dangerous web sites that may contain phishing/pharming attacks, malware such as spyware, or objectionable content that can expose your organization to legal liability. Based on automatic research tools and targeted research analysis, real-time updates enable you to apply highly-granular policies that filter web access based on 78 web content categories, over 45 million rated web sites, and more than two billion web pages - all continuously updated.
Manual updates
To manually update the signature definitions file, you need to first go to the Support web site at https://support.fortinet.com. Once logged in, select FortiGuard Service Updates from the Download area of the web page. The browser will present you the most current antivirus and IPS signature definitions which you can download. Once downloaded to your computer, log into the FortiGate unit to load the definition file. To load the definition file onto the FortiGate unit 1 Go to System > Dashboard > Status. 2 On the License Information widget, select the Update link for either AV Definitions or IPS Definitions. 3 Locate the downloaded file and select OK. The upload may take a few minutes to complete.
Automatic updates
The FortiGate unit can be configured to request updates from the FortiGuard Distribution Network. You can configure this to be on a scheduled basis, or with push notifications.
Scheduling updates
Scheduling updates ensures that the virus and IPS definitions are downloaded to your FortiGate unit on a regular basis, ensuring that you do not forget to check for the definition files yourself. As well, by scheduling updates during off-peak hours, such as evenings or weekends, when network usage is minimal, ensures that the network activity will not suffer from the added traffic of downloading the definition files.
328
FortiGuard
If you require the most up-to-date definitions as viruses and intrusions are found in the wild, the FortiGuard Distribution Network can push updates to the FortiGate units as they are developed. This ensures that your network will be protected from any breakouts of a virus within the shortest amount of time, minimizing any damaging effect that can occur. Push updates require that you have registered your FortiGate unit. Once push updates are enabled, the next time new antivirus or IPS attack definitions are released, the FDN notifies all the FortiGate unit that a new update is available. Within 60 seconds of receiving a push notification, the unit automatically requests the update from the FortiGuard servers. To enable scheduled updates - web-based manager 1 Go to System > Config > FortiGuard. 2 Click the Expand Arrow for AntiVirus and IPS Options. 3 Select the Scheduled Update check box. 4 Select the frequency of the updates and when within that frequency. 5 Select Apply. To enable scheduled updates - CLI
config system autoupdate schedule set status enable set frequency {every | daily | weekly} set time <hh:mm> set day <day_of_week> end
Push updates
Push updates enable you to get immediate updates when new virus or intrusions have been discovered and new signatures are created. This ensures that when the latest signature is available it will be sent to the FortiGate. When a push notification occurs, the FortiGuard server sends a notice to the FortiGate unit that there is a new signature definition file available. The FortiGate unit then initiates a download of the definition file, similar to the scheduled update. To ensure maximum security for your network, you should have a scheduled update as well as enable the push update, in case an urgent signature is created, and your cycle of the updates only occurs weekly. To enable push updates - web-based manager 1 Got to System > Config > FortiGuard. 2 Click the Expand Arrow for Antivirus and IPS Options. 3 Select Allow Push Update. 4 Select Apply. To enable push updates - CLI
config system autoupdate push-update set status enable
end
329
FortiGuard
Push IP override
If the FortiGate unit is behind another NAT device (or another FortiGate unit), to ensure it receives the push update notifications, you need to use an override IP address for the notifications. To do this, you create a virtual IP to map to the external port of the NAT device. Generally speaking, if there are two FortiGate devices as in the diagram below, the following steps need to be completed on the FortiGate NAT device to ensure the FortiGate unit on the internal network receives the updates: Add a port forwarding virtual IP to the FortiGate NAT device that connects to the Internet by going to Firewall > Virtual IP. Add a security policy to the FortiGate NAT device that connects to the Internet that includes the port forwarding virtual IP. Configure the FortiGate unit on the internal network with an override push IP and port.
On the FortiGate internal device, the virtual IP is entered as the Use push override IP address.
Figure 43: Using a virtual IP for a FortiGate unit behind a NAT device
uti on
17
2.2
0.1
20
.7
To enable push update override- web-based manager 1 Got to System > Config > FortiGuard. 2 Click the Expand Arrow for Antivirus and IPS Options. 3 Select Allow Push Update. 4 Select Use push override IP. 5 Enter the virtual IP address configured on the NAT device. 6 Select Apply.
330
10 V .1 i r 1 7 tu 0 . 1 2 . al 0 . 2 0 IP 3 .1 20 .8
10
.10
.10
.1
or tiG D at ev e ic NA e T
F rn te In e e at vic tiG e or D al
FortiGuard
Web filtering
Web filtering
The multiple FortiGuard data centers around the world hold the entire categorized URL database and receive rating requests from customer FortiGate units typically triggered by browser based URL requests. These rating requests are responded to with the categories stored for specific URLs, the requesting FortiGate unit will then use its own local profile configuration to determine what action is appropriate to the category, that is, to blocking, monitor or permit the request. Fortinets development team has ensured that providing this powerful filtering capability is as simple as possible to enable. Further, rating responses can also be cached locally on the FortiGate unit, providing a quicker response time, while easing load on the FortiGuard servers, aiding in a quicker response time for less common URL requests. This is a very effective method for common sites. Search engines and other frequently visited sites for your business can remain cached locally. Other sites less frequently visited, can be cached locally for a determined amount of time. For a site such as Google, the frequency of its access can keep it in the cache, other sites can remain in the cache up to 24 hours, or less depending on the configuration. By default, the web filtering cache is enabled. The cache includes a time-to-live value, which is the amount of time a url will stay in the cache before expiring. You can change this value to shorten or extend the time between 300 and 86400 seconds. To modify the web filter cache size - web-based manager 1 Got to System > Config > FortiGuard. 2 Click the Expand Arrow for Web Filtering and Email Filtering Options. 3 Enter the TTL value for the Web filter cache. 4 Select Apply. To modify the web filter cache size - CLI
config system fortiguard set webfilter-cache-ttl <integer>
end Further web filtering options can be configured to block specific URLs, and allow others through. These configurations are available through the UTM > Web Filter menu. For more information, see the chapter of The Handbook.
Email filtering
Similar to web filtering, FortiGuard data centers monitor and update email databases of known spam sources. With FortiGuard antispam enabled, the FortiGate unit verifies incoming email sender address and IPs against the database, and take the necessary action as defined within the antivirus profiles.
331
Security tools
FortiGuard
Further, spam source IP addresses can also be cached locally on the FortiGate unit, providing a quicker response time, while easing load on the FortiGuard servers, aiding in a quicker response time for less common email address requests. By default, the antispam cache is enabled. The cache includes a time-to-live value, which is the amount of time an email address will stay in the cache before expiring. You can change this value to shorten or extend the time between 300 and 86400 seconds. To modify the antispam filter cache size - web-based manager 1 Got to System > Config > FortiGuard. 2 Click the Expand Arrow for Web Filtering and Email Filtering Options. 3 Enter the TTL value for the Antispam filter cache. 4 Select Apply. To modify the web filter cache size - CLI
config system fortiguard set antispam-cache-ttl <integer>
end Further antispam filtering options can be configured to block, allow or quarantine, specific email addresses. These configurations are available through the UTM > Antispam menu. For more information, see the chapter of The Handbook.
Security tools
The FortiGuard online center provides a number of online security tools that enable you to verify or check ratings of web sites, email addresses as well as check file for viruses. These features are available at http://www.fortiguard.com.
URL lookup
By entering a web site address, you can see if it has been rated and what category and classification it is filed as. If you find your web site or a site you commonly go to has been wrongly categorized, use this page to request the site to be re-evaluated. http://www.fortiguard.com/webfiltering/webfiltering.html
332
FortiGuard
Troubleshooting
Troubleshooting
If you are not getting FortiGuard web filtering or antispam services, there are a few things to verify communication to the FortiGuard Distribution Network (FDN) is working. Before any troubleshooting, ensure that the FortiGate unit has been registered and you or your company, has subscribed to the FortiGuard services.
333
Troubleshooting
FortiGuard
Alternatively, you can view the FortiGuard connection status by going to System > Maintenance > FortiGuard.
Figure 45: FortiGuard availability
334
FortiGuard
Troubleshooting
CLI verification
You can also use the CLI to see what FortiGuard servers are available to your FortiGate unit. Use the following CLI command to ping the FDN for a connection:
ping guard.fortinet.net
You can also use diagnose command to find out what FortiGuard servers are available:
diagnose debug rating
From this command, you will see output similar to the following:
Locale License Expiration Hostname : : : : english Contract Sun Jul 24 20:00:00 2011 service.fortiguard.net 2 11:12:28 2010) -=RTT Flags 10 12 32 32 95 95 99 162 164 223 D 241 DI TZ -5 -5 -5 -5 -8 0 0 0 0 -8 -8 Packets Curr Lost Total Lost 77200 0 42 52514 0 34 34390 0 62 34380 0 61 34336 0 13 34428 0 115 34423 0 108 34437 0 125 34430 0 11763 42530 0 8129 55602 0 21555
-=- Server List (Tue Nov IP 69.20.236.180 69.20.236.179 66.117.56.42 66.117.56.37 174.137.33.92 80.85.69.37 80.85.69.41 80.85.69.40 80.85.69.38 208.91.112.194 216.156.209.26 Weight 0 0 0 0 30 50 50 50 50 81 286
Normally an extensive list of servers will be available. Should you see a short list of three to five available servers, it means that the FortiGuard servers are responding to DNS replies to service.FortiGuard.net, but the INIT requests are not completely reaching FDS services on the servers. The rating flags indicate the server status:
Table 10: FortiGuard debug rating flags D
I F T
Indicates the server was found via the DNS lookup of the hostname. If the hostname returns more than one IP address, all of them will be flagged with 'D' and will be used first for INIT requests before falling back to the other servers. Indicates the server to which the last INIT request was sent The server has not responded to requests and is considered to have failed. The server is currently being timed.
The server list is sorted first by weight and then the server with the smallest RTT is put at the top of the list, regardless of weight. When a packet is lost, that is, no response in two seconds, it will be resent to the next server in the list. The top position in the list is selected based on RTT while the other list positions are based on weight. The weight for each server increases with failed packets and decreases with successful packets. To lower the possibility of using a faraway server, the weight is not allowed to dip below a base weight which is calculated as the difference in hours between the FortiGate unit and the server multiplied by 10. The further away the server is, the higher its base weight and the lower in the list it will appear.
335
Troubleshooting
FortiGuard
Port assignment
FortiGate units contact the FortiGuard Distribution Network (FDN) for the latest list of FDN servers by sending UDP packets with typical source ports of 1027 or 1031, and destination ports of 53 or 8888. The FDN reply packets have a destination port of 1027 or 1031. If your ISP blocks UDP packets in this port range, the FortiGate unit cannot receive the FDN reply packets. As a result, the FortiGate unit will not receive the complete FDN server list. You can select a different source port range for the FortiGate unit to use. If your ISP blocks the lower range of UDP ports (around 1024), you can configure your FortiGate unit to use higher-numbered ports, using the CLI command
config system global set ip-src-port-range <start port>-<end port> end
where the <start port> and <end port> are numbers in the range of 1024 to 25000. For example, you could configure the FortiGate unit to not use ports lower than 2048 or ports higher than the following range:
config system global set ip-src-port-range 2048-20000 end
Trial and error may be required to select the best source port range. You can also contact your ISP to determine the best range to use. Push updates might be unavailable if: there is a NAT device installed between the unit and the FDN your unit connects to the Internet using a proxy server.
336
Monitoring
With network administration, the first step is installing and configuring the FortiGate unit to be the protector of the internal network. Once the system is running efficiently, the next step is to monitor the system and network traffic, to tweak leaks and abusers as well as the overall health of the FortiGate unit(s) that provide that protection. This chapter discusses the various methods of monitoring both the FortiGate unit and the network traffic through a range of different tools available within FortiOS. This chapter includes the topics: Dashboard sFlow Logging Alert email SNMP SNMP get command syntax Fortinet and FortiGate MIB fields
Dashboard
The FortiOS dashboard provides a location to view real-time system information. By default, the dashboard displays the key statistics of the FortiGate unit itself, providing the memory and CPU status, as well as the health of the ports, whether they are up or down and their throughput.
Widgets
Within the dashboard is a number of smaller windows, called widgets, that provide this status information. Beyond what is visible by default, you can add a number of other widgets that display other key traffic information including application use, traffic per IP address, top attacks, traffic history and logging statistics. You will see when you log into the FortiGate unit, there are two separate dashboards. You can add multiple dashboards to reflect what data you want to monitor, and add the widgets accordingly. Dashboard configuration is only available through the web-based manager. Administrators must have read and write privileges to customize and add widgets when in either menu. Administrators must have read privileges if they want to view the information. To add a dashboard and widgets 1 Go to System > Dashboard. 2 Select the Dashboard menu at the top of the window and select Add Dashboard. 3 Enter a name such as Monitoring. 4 Select the Widget menu at the top of the window. 5 From the screen, select the type of information you want to add. 6 When done, select the X in the top right of the widget.
337
sFlow
Monitoring
Dashboard widgets provide an excellent method to view real-time data about the events occurring on the FortiGate unit and the network. For example, by adding the Network Protocol Usage widget, you can monitor the activity of various protocols over a selected span of time. Based on that information you can add or adjust traffic shaping and/or security policies to control traffic.
Tip: You can position widgets within the dashboard frame by clicking and dragging it to a different location.
FortiClient connections
The License Information widget includes information for the FortiClient connections. It displays the number of FortiClient connections allowed, and the number of users connecting. By selecting the Details link for the number of connections, you can view more information about the connecting user, including IP address, user name and type of operating system the user is connecting with.
sFlow
sFlow is a method of monitoring the traffic on your network to identify areas on the network that may impact performance and throughput. sFlow is described in http://www.sflow.org. FortiOS implements sFlow version 5. sFlow uses packet sampling to monitor network traffic. That is, an sFlow Agent captures packet information at defined intervals and sends them to an sFlow Collector for analysis, providing real-time data analysis. The information sent is only a sampling of the data for minimal impact on network throughput and performance. The sFlow Agent is embedded in the FortiGate unit. Once configured, the FortiGate unit sends sFlow datagrams of the sampled traffic to the sFlow Collector, also called an sFlow Analyzer. The sFlow Collector receives the datagrams, and provides real-time analysis and graphing to indicate where potential traffic issues are occurring. sFlow Collector software is available from a number of third party software vendors. sFlow data captures only a sampling of network traffic, not all traffic like the traffic logs on the FortiGate unit. Sampling works by the sFlow Agent looking at traffic packets when they arrive on an interface. A decision is made whether the packet is dropped, and sent on to its destination, or a copy is forwarded to the sFlow Collector. The sample used and its frequency are determined during configuration. The sFlow datagram sent to the Collector contains the information: Packet header (e.g. MAC,IPv4,IPv6,IPX,AppleTalk,TCP,UDP, ICMP) Sample process parameters (rate, pool etc.) Input/output ports Priority (802.1p and TOS) VLAN (802.1Q) Source/destination prefix Next hop address Source AS, Source Peer AS Destination AS Path Communities, local preference User IDs (TACACS/RADIUS) for source/destination
338
Monitoring
Logging
URL associated with source/destination Interface statistics (RFC 1573, RFC 2233, and RFC 2358)
sFlow agents can be added to any type of FortiGate interface. sFlow isn't supported on some virtual interfaces such as VDOM link, IPsec, gre, and ssl.<vdom>. For more information on sFlow, Collector software and sFlow MIBs, visit www.sflow.org.
Configuration
sFlow configuration is available only from the CLI. Configuration requires two steps: enabling the sFlow Agent, and configuring the interface for the sampling information.
Enable sFlow
config system sflow set collector-ip <ip_address> set collector-port <port_number> end
The default port for sFlow is UDP 6343. To configure in VDOM, use the commands:
config system vdom-sflow set vdom-sflow enable set collector-ip <ip_address> set collector-port <port_number> end
Configure sFlow agents per interface. config system interface edit <interface_name> set sflow-sampler enable set sample-rate <every_n_packets> set sample-direction [tx | rx | both] set polling-interval <seconds> end
Logging
FortiOS provides a robust logging environment that enables you to monitor, store and report traffic information and FortiGate events including attempted log ins and hardware status. Depending on your requirements, you can log to a number of different hosts. To configure logging in the web-based manager, go to Log & Report > Log Config > Log Setting. To configure logging in the CLI use the commands config log <log_location>. For details on configuring logging see the Logging and Reporting Guide and FortiAnalyzer Administration Guide.
FortiGate memory
Logs are saved to the internal memory by default. Inexpensive yet volatile, for basic event logs or verifying traffic, AV or spam patterns, logging to memory is a simple option. However, because logs are stored in the limited space of the internal memory, only a small amount is available for logs. As such logs can fill up and be overridden with new entries, negating the use of recursive data. This is especially true for traffic logs. Also, should the FortiGate unit be shut down or rebooted, all log information will be lost. To change the logging options for memory, go to Log&Report > Log Config > Log Setting.
339
Logging
Monitoring
Syslog server
An industry standard for collecting log messages, for off site storage. In the web-based manager, you are able to send logs to a single syslog server, however in the CLI you can configure up to three syslog servers where you can also use multiple configuration options. For example, send traffic logs to one server, antivirus logs to another. The FortiGate unit sends Syslog traffic over UIDP port 514. Note that if a secure tunnel is configured for communication to a FortiAnalyzer unit, then Syslog traffic will be sent over an IPSec connection, using UPD 500/4500, protocol IP/50. To configure a Syslog server in the web-based manager, go to Log&Report > log Config > Log Setting. In the CLI use the commands: config log syslogd setting set status enable end Further options are available when enabled to configure a different port, facility and server IP address. For Syslog traffic, you can identify a specific port/IP address for logging traffic. Configuration of these services is performed in the CLI, using the command set source-ip. When configured, this becomes the dedicated port to send this traffic over. For example, to set the source IP of a Syslog server to be on the DMZ1 port with an IP of 192.168.4.5, the commands are: config log syslogd setting set status enable
set source-ip 192.168.4.5
end
340
Monitoring
Logging
The FortiGate unit sends log messages to the FortiGuard Analysis and Management service using TCP port 443. Configuration is available once a user account has been set up and confirmed. To enable the account on the FortiGate unit, go to System > Maintenance > FortiGuard, select the blue arrow to expand the option, and enter the account ID. For FortiGuard Analysis and Management traffic, you can identify a specific port/IP address for logging traffic. Configuration of these services is performed in the CLI, using the command set source-ip. When configured, this becomes the dedicated port to send this traffic over. For example, to set the source IP of the FortiGuard Analysis and Management server to be on the DMZ1 port with an IP of 192.168.4.5, the commands are: config log fortiguard setting set status enable
set source-ip 192.168.4.5
end From the FortiGate unit, you can configure the connection and sending of log messages to be sent over an SSL tunnel to ensure log messages are sent securely. To do this, use the CLI commands to enable the encrypted connection and define the level of encryption. config log fortiguard setting set status enable
set enc-alogorithm {default | high | low | disable}
end For more information on each encryption level see Configuring an SSL connection on page 342.
FortiAnalyzer
The FortiAnalyzer family of logging, analyzing, and reporting appliances securely aggregate log data from Fortinet devices and other syslog-compatible devices. Using a comprehensive suite of easily-customized reports, users can filter and review records, including traffic, event, virus, attack, Web content, and email data, mining the data to determine your security stance and assure regulatory compliance. FortiAnalyzer also provides advanced security management functions such as quarantined file archiving, event correlation, vulnerability assessments, traffic analysis, and archiving of email, Web access, instant messaging and file transfer content. The FortiGate unit send log messages over UDP port 514 or OFTP (TCP 514). If a secure connection has been configured, log traffic is sent over UDP port 500/4500, Protocol IP/50. For more information on configuring a secure connection see Sending logs using a secure connection on page 342. For FortiAnalyzer traffic, you can identify a specific port/IP address for logging traffic. Configuration of these services is performed in the CLI, using the command set source-ip. When configured, this becomes the dedicated port to send this traffic over. For example, to set the source IP of a FortiAnalyzer unit to be on port 3 with an IP of 192.168.21.12, the commands are: config log fortiguard setting set status enable
set source-ip 192.168.21.12
end
341
Logging
Monitoring
To configure a secure connection to the FortiAnalyzer unit On the FortiAnalyzer unit, enter the commands: config log device edit <device_name> set secure psk set psk <name_of_IPSec_tunnel> set id <fortigate_device_name_on_the_fortianalyzer> end To configure a secure connection on the FortiGate unit On the FortiGate CLI, enter the commands: config log fortianalyzer setting set status enable set server <ip_address> set local set localid <name_of_IPSec_tunnel> end
set status enable set enc-algorithm {default* | high | low | disable} end
Note: These commands are specific to OS versions 4.0 MR3 and higher. IPSec connections will still be possible between FortiOS 4.0 MR3 and FortiAnalyzer 4.0 MR2 and lower.
The default encryption automatically sets high and medium encryption algorithms. Algorithms used for high, medium, and low follows openssl definitions: High - Key lengths larger than 128 bits, and some cipher suites with 128-bit keys. Algorithms are: DHE-RSA-AES256-SHA:AES256-SHA:EDH-RSA-DES-CBC3SHA:DES-CBC3-SHA:DES-CBC3-MD5:DHE-RSA-AES128-SHA:AES128-SHA Medium - Key strengths of 128 bit encryption. Algorithm are:RC4-SHA:RC4-MD5:RC4-MD
342
Monitoring
Alert email
Low - Key strengths of 64 or 56 bit encryption algorithms but excluding export cipher suites Algorithms: EDH-RSA-DES-CDBC-SHA; DES-CBC-SHA; DES-CBC-MD5.
Alert email
As an administrator, you want to be certain you can respond quickly to issues occurring on your network or on the FortiGate unit. Alert email provides an efficient and direct method of notifying an administrator of events. By configuring alert messages, you can define the threshold when a problem becomes critical and needs attention. When this threshold is reached, the FortiGate unit will send an email to one or more individuals notifying them of the issue. In the following example, the FortiGate unit is configured to send email to two administrators (admin1 and admin2) when multiple intrusions are detected every two minutes. The FortiGate unit has its own email address on the mail server. To configure alert email - web-based manager 1 Go to Log&Report > Log Config > Alert E-mail. 2 Enter the information.
SMTP Server Email from Email to Authentication SMTP User Password Interval Time Enter the address or name of the email server. For example, smtp.example.com. fortigate@example.com admin1@example.com admin2@example.com Enable authentication if required by the email server. FortiGate ********************* 2
3 For the Interval Time, enter 2. 4 Select Intrusion Detected. 5 Select Apply. To configure alert email - CLI config system alert email set port 25 set server smtp.example.com set authenticate enable set username FortiGate set password ************* end config alertemail setting set username fortigate@example.com set mailto1 admin1@example.com set mailto2 admin2@example.com set filter category set IPS-logs enable end
343
SNMP
Monitoring
SNMP
Simple Network Management Protocol (SNMP) enables you to monitor hardware on your network. You can configure the hardware, such as the FortiGate SNMP agent, to report system information and send traps (alarms or event messages) to SNMP managers. An SNMP manager, or host, is a typically a computer running an application that can read the incoming trap and event messages from the agent and send out SNMP queries to the SNMP agents. A FortiManager unit can act as an SNMP manager, or host, to one or more FortiGate units.
Note: FortiOS supports SNMP using both IPv4 and IPv6 addressing.
By using an SNMP manager, you can access SNMP traps and data from any FortiGate interface or VLAN sub interface configured for SNMP management access. Part of configuring an SNMP manager is to list it as a host in a community on the FortiGate unit it will be monitoring. Otherwise the SNMP monitor will not receive any traps from that FortiGate unit, or be able to query that unit. The FortiGate SNMP implementation is read-only. SNMP v1, v2c, and v3 compliant SNMP managers have read-only access to FortiGate system information through queries and can receive trap messages from the FortiGate unit. To monitor FortiGate system information and receive FortiGate traps, you must first compile the Fortinet and FortiGate Management Information Base (MIB) files. A MIB is a text file that describes a list of SNMP data objects that are used by the SNMP manager. These MIBs provide information the SNMP manager needs to interpret the SNMP trap, event, and query messages sent by the FortiGate unit SNMP agent. FortiGate core MIB files are available on the Customer Support web site. The Fortinet implementation of SNMP includes support for most of RFC 2665 (Ethernet-like MIB) and most of RFC 1213 (MIB II). For more information, see Fortinet MIBs on page 347. RFC support for SNMP v3 includes Architecture for SNMP Frameworks (RFC 3411), and partial support of User-based Security Model (RFC 3414). SNMP traps alert you to events that occur such as an a full log disk or a virus detected. For more information about SNMP traps, see Fortinet and FortiGate traps on page 349. SNMP fields contain information about the FortiGate unit, such as CPU usage percentage or the number of sessions. This information is useful for monitoring the condition of the unit on an ongoing basis and to provide more information when a trap occurs. For more information about SNMP fields, see Fortinet and FortiGate MIB fields on page 352. The FortiGate SNMP v3 implementation includes support for queries, traps, authentication, and privacy. Authentication and encryption are configured in the CLI. See the system snmp user command in the FortiGate CLI Reference.
Gigabit interfaces
When determining the interface speed of a FortiGate unit with a 10G interface, the IF-MIB.ifSpeed may not return the correct value. IF-MIB.ifSpeed is a 32-bit gauge used to report interface speeds in bits/second, and cannot convert to a 64-bit value. The 32-bit counter wrap the output too fast to be accurate. In this case, you can use the value ifHighSpeed. It reports interface speeds in megabits/second. This ensures that 10Gb interfaces report the correct value.
344
Monitoring
SNMP
SNMP agent
You need to first enter information and enable the FortiGate SNMP Agent. Enter information about the FortiGate unit to identify it so that when your SNMP manager receives traps from the FortiGate unit, you will know which unit sent the information. To configure the SNMP agent - web-based manager 1 Go to System > Config > SNMP v1/v2c. 2 Select Enable for the SNMP Agent. 3 Enter a descriptive name for the agent. 4 Enter the location of the FortiGate unit. 5 Enter a contact or administrator for the SNMP Agent or FortiGate unit. 6 Select Apply. To configure SNMP agent - CLI config system snmp sysinfo set status enable set contact-info <contact_information> set description <description_of_FortiGate> set location <FortiGate_location> end
SNMP community
An SNMP community is a grouping of devices for network administration purposes. Within that SNMP community, devices can communicate by sending and receiving traps and other information. One device can belong to multiple communities, such as one administrator terminal monitoring both a firewall SNMP and a printer SNMP community. Add SNMP communities to your FortiGate unit so that SNMP managers can connect to view system information and receive SNMP traps. You can add up to three SNMP communities. Each community can have a different configuration for SNMP queries and traps. Each community can be configured to monitor the FortiGate unit for a different set of events. You can also add the IP addresses of up to 8 SNMP managers to each community.
Note: When the FortiGate unit is in virtual domain mode, SNMP traps can only be sent on interfaces in the management virtual domain. Traps cannot be sent over other interfaces.
To add an SNMP v1/v2c community - web-based manager 1 Go to System > Config > SNMP. 2 In the SNMP v1/v2c area, select Create New. 3 Enter a Community Name. 4 Enter the IP address and Identify the SNMP managers that can use the settings in this SNMP community to monitor the FortiGate unit. 5 Select the interface if the SNMP manager is not on the same subnet as the FortiGate unit. 6 Enter the Port number that the SNMP managers in this community use for SNMP v1 and SNMP v2c queries to receive configuration information from the FortiGate unit. Select the Enable check box to activate queries for each SNMP version.
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
345
SNMP
Monitoring
7 Enter the Local and Remote port numbers that the FortiGate unit uses to send SNMP v1 and SNMP v2c traps to the SNMP managers in this community. 8 Select the Enable check box to activate traps for each SNMP version. 9 Select OK. To add an SNMP v1/v2c community - CLI config system snmp community edit <index_number> set events <events_list> set name <community_name> set query-v1-port <port_number> set query-v1-status {enable | disable} set query-v2c-port <port_number> set query-v2c-status {enable | disable} set status {enable | disable} set trap-v1-lport <port_number> set trap-v1-rport <port_number> set trap-v1-status {enable | disable} set trap-v2c-lport <port_number> set trap-v2c-rport <port_number> set trap-v2c-status {enable | disable} end To add an SNMP v3 community - web-based manager 1 Go to System > Config > SNMP. 2 In the SNMP v3 area, select Create New. 3 Enter a User Name. 4 Select a Security Level and associated authorization algorithms. 5 Enter the IP address of the Notification Host SNMP managers that can use the settings in this SNMP community to monitor the FortiGate unit. 6 Enter the Port number that the SNMP managers in this community use to receive configuration information from the FortiGate unit. Select the Enable check box to activate queries for each SNMP version. 7 Select the Enable check box to activate traps. 8 Select OK. To add an SNMP v3 community - CLI config system snmp user edit <index_number> set security-level [auth-priv | auth-no-priv | no-auth-nopriv} set queries enable set query-port <port_number> set notify-hosts <ip_address> set events <event_selections> end
346
Monitoring
SNMP
Fortinet MIBs
The FortiGate SNMP agent supports Fortinet proprietary MIBs as well as standard RFC 1213 and RFC 2665 MIBs. RFC support includes support for the parts of RFC 2665 (Ethernet-like MIB) and the parts of RFC 1213 (MIB II) that apply to FortiGate unit configuration. There are two MIB files for FortiGate units - the Fortinet MIB, and the FortiGate MIB. The Fortinet MIB contains traps, fields and information that is common to all Fortinet products. The FortiGate MIB contains traps, fields and information that is specific to FortiGate units. Each Fortinet product has its own MIB. If you use other Fortinet products you will need to download their MIB files as well. Both MIB files are used for FortiOS and FortiOS Carrier; there are no additional traps for the Carrier version of the operating system. The Fortinet MIB and FortiGate MIB along with the two RFC MIBs are listed in tables in this section. You can download the two FortiGate MIB files from Fortinet Customer Support. The Fortinet MIB contains information for Fortinet products in general. the Fortinet FortiGate MIB includes the system information for The FortiGate unit and version of FortiOS. Both files are required for proper SNMP data collection. To download the MIB files 1 Login to the Customer Support web site at support.fortinet.com. 2 Go to Download > Firmware Images. 3 Select FortiGate > v4.00 > Core MIB. 4 Select and download the Fortinet core MIB file. 5 Move up one directory level. 6 Select the firmware version, revision and patch (if applicable). 7 Select the MIB directory. 8 Select and download the Fortinet FortiGate MIB file.
347
Monitoring
Your SNMP manager may already include standard and private MIBs in a compiled database that is ready to use. You must add the Fortinet proprietary MIB to this database to have access to the Fortinet specific information.
Note: There were major changes to the MIB files between v3.0 and v4.0. You need to use the new MIBs for v4.0 or you may mistakenly access the wrong traps and fields. MIB files are updated for each version of FortiOS. When upgrading the firmware ensure that you updated the Fortinet FortiGate MIB file as well. Table 11: Fortinet MIBs MIB file name or RFC FORTINET-CORE-MIB.mib Description The Fortinet MIB includes all system configuration information and trap information that is common to all Fortinet products. Your SNMP manager requires this information to monitor FortiGate unit configuration settings and receive traps from the FortiGate SNMP agent. For more information, see Fortinet and FortiGate traps on page 349 and Fortinet and FortiGate MIB fields on page 352. The FortiGate MIB includes all system configuration information and trap information that is specific to FortiGate units. Your SNMP manager requires this information to monitor FortiGate configuration settings and receive traps from the FortiGate SNMP agent. FortiManager systems require this MIB to monitor FortiGate units. For more information, see Fortinet and FortiGate traps on page 349 and Fortinet and FortiGate MIB fields on page 352. The FortiGate SNMP agent supports MIB II groups with these exceptions. No support for the EGP group from MIB II (RFC 1213, section 3.11 and 6.10). Protocol statistics returned for MIB II groups (IP/ICMP/TCP/UDP/etc.) do not accurately capture all FortiGate traffic activity. More accurate information can be obtained from the information reported by the Fortinet MIB. The FortiGate SNMP agent supports Ethernet-like MIB information. FortiGate SNMP does not support for the dot3Tests and dot3Errors groups.
FORTINET-FORTIGATE-MIB.mib
348
Monitoring
The SNMP get command gets firmware version running on the FortiGate unit. The community name is public. The IP address of the interface configured for SNMP management access is 10.10.10.1. The firmware version MIB field is fgSysVersion and the OID for this MIB field is 1.3.6.1.4.1.12356.101.4.1.1 The first command uses the MIB field name and the second uses the OID: snmpget -v2c -c public 10.10.10.1 fgSysVersion snmpget -v2c -c public 10.10.10.1 1.3.6.1.4.1.12356.101.4.1.1
Table 12: Generic Fortinet traps (OID 1.3.6.1.4.1.12356.101.3.0) Index Trap message .1 .2 .3 .4 ColdStart WarmStart LinkUp LinkDown Description Standard traps as described in RFC 1215.
349
Monitoring
Table 13: System traps (OID1.3.6.1.4.1.12356.1.3.0) Index Trap message .101 CPU usage high (fnTrapCpuThreshold) Memory low (fnTrapMemThreshold) Log disk too full (fnTrapLogDiskThreshold) Temperature too high (fnTrapTempHigh) Description CPU usage exceeds 80%. This threshold can be set in the CLI using config system snmp sysinfo, set trap-high-cpu-threshold. Memory usage exceeds 90%. This threshold can be set in the CLI using config system snmp sysinfo, set trap-low-memory-threshold. Log disk usage has exceeded the configured threshold. Only available on devices with log disks. This threshold can be set in the CLI using config system snmp sysinfo, set trap-log-full-threshold. A temperature sensor on the device has exceeded its threshold. Not all devices have thermal sensors. See manual for specifications.
.102
.103
.104
.105
Voltage outside acceptable Power levels have fluctuated outside of normal levels. Not range all devices have voltage monitoring instrumentation. (fnTrapVoltageOutOfRange) Power supply failure (fnTrapPowerSupplyFailure) Interface IP change (fnTrapIpChange) Power supply failure detected. Not available on all models. Available on some devices which support redundant power supplies. The IP address for an interface has changed. The trap message includes the name of the interface, the new IP address and the serial number of the Fortinet unit. You can use this trap to track interface IP address changes for interfaces with dynamic IP addresses set using DHCP or PPPoE. This trap is sent for diagnostic purposes. It has an OID index of .999.
.106
.201
.999
Table 14: FortiGate VPN traps (OID1.3.6.1.4.1.12356.1.3.0) Index Trap message .301 .302 VPN tunnel is up (fgTrapVpnTunUp) VPN tunnel down (fgTrapVpnTunDown) Local gateway address (fgVpnTrapLocalGateway) Description An IPSec VPN tunnel has started. An IPSec VPN tunnel has shut down. Address of the local side of the VPN tunnel. This information is associated with both of the VPN tunnel traps. (OID1.3.6.1.4.1.12356.101.12.3.2)
Remote gateway address Address of remote side of the VPN tunnel. (fgVpnTrapRemoteGateway) This information is associated with both of the VPN tunnel traps. (OID1.3.6.1.4.1.12356.101.12.3.2) Table 15: FortiGate IPS traps (OID1.3.6.1.4.1.12356.1.3.0) Index Trap message .503 .504 .505 IPS Signature (fgTrapIpsSignature) IPS Anomaly (fgTrapIpsAnomaly) IPS Package Update (fgTrapIpsPkgUpdate) Description IPS signature detected. IPS anomaly detected. The IPS signature database has been updated.
350
Monitoring
Table 15: FortiGate IPS traps (OID1.3.6.1.4.1.12356.1.3.0) Index Trap message (fgIpsTrapSigId) (fgIpsTrapSrcIp) (fgIpsTrapSigMsg) Description ID of IPS signature identified in trap. (OID 1.3.6.1.4.1.12356.101.9.3.1) IP Address of the IPS signature trigger. (OID 1.3.6.1.4.1.12356.101.9.3.2) Message associated with IPS event. (OID 1.3.6.1.4.1.12356.101.9.3.3)
Table 16: FortiGate antivirus traps (OID1.3.6.1.4.1.12356.1.3.0) Index Trap message .601 Virus detected (fgTrapAvVirus) Oversize file/email detected (fgTrapAvOversize) Filename block detected (fgTrapAvPattern) Fragmented file detected (fgTrapAvFragmented) (fgTrapAvEnterConserve) (fgTrapAvBypass) (fgTrapAvOversizePass) (fgTrapAvOversizeBlock) (fgAvTrapVirName) Description The antivirus engine detected a virus in an infected file from an HTTP or FTP download or from an email message. The antivirus scanner detected an oversized file. The antivirus scanner blocked a file that matched a known virus pattern. The antivirus scanner detected a fragmented file or attachment. The AV engine entered conservation mode due to low memory conditions. The AV scanner has been bypassed due to conservation mode. An oversized file has been detected, but has been passed due to configuration. An oversized file has been detected, and has been blocked. The virus name that triggered the event. (OID1.3.6.1.4.1.12356.101.8.3.1)
Table 17: FortiGate HA traps (OID1.3.6.1.4.1.12356.1.3.0) Index Trap message .401 .402 HA switch (fgTrapHaSwitch) HA State Change (fgTrapHaStateChange) HA Heartbeat Failure (fgTrapHaHBFail) HA Member Unavailable (fgTrapHaMemberDown) HA Member Available (fgTrapHaMemberUp) (fgHaTrapMemberSerial) Description The specified cluster member has switched from a slave role to a master role. The trap sent when the HA cluster member changes its state. The heartbeat failure count has exceeded the configured threshold. An HA member becomes unavailable to the cluster. An HA member becomes available to the cluster. Serial number of an HA cluster member. Used to identify the origin of a trap when a cluster is configured. (OID1.3.6.1.4.1.12356.101.13.3.1)
351
Monitoring
Fortinet MIB
Table 18: OIDs for the Fortinet-Core-MIB MIB Field fnSystem fnSysSerial OID 1.3.6.1.4.1.12356.100.1.1 1.3.6.1.4.1.12356.100.1.1.1 Device serial number. This is the same serial number as given in the ENTITY-MIB tables for the base entity. Description
.3.6.1.4.1.12356.100.1.2 1.3.6.1.4.1.12356.100.1.2.1 1.3.6.1.4.1.12356.100.1.2.100 1.3.6.1.4.1.12356.100.1.2.100.1 1.3.6.1.4.1.12356.100.1.2.100.2 The number of admin accounts in fnAdminTable. A table of administrator accounts on the device. This table is intended to be extended with platform specific information. An entry containing information applicable to a particular admin account. Language used for administration interfaces.
fnAdminEntry
1.3.6.1.4.1.12356.100.1.2.100.2.1
fnAdminIndex
1.3.6.1.4.1.12356.100.1.2.100.2.1.1 An index uniquely defining an administrator account within the fnAdminTable. 1.3.6.1.4.1.12356.100.1.2.100.2.1.2 The user-name of the specified administrator account. 1.3.6.1.4.1.12356.100.1.2.100.2.1.3 The type of address stored in fnAdminAddr, in compliance with INET-ADDRESS-MIB 1.3.6.1.4.1.12356.100.1.2.100.2.1.4 The address prefix identifying where the administrator account can be used from, typically an IPv4 address. The address type/format is determined by fnAdminAddrType.
fmAdminName
fnAddminAddrType
fnAdminAddr
352
Monitoring
Table 18: OIDs for the Fortinet-Core-MIB MIB Field fnAdminMask OID Description
1.3.6.1.4.1.12356.100.1.2.100.2.1.5 The address prefix length (or network mask) applied to the fgAdminAddr to determine the subnet or host the administrator can access the device from. 1.3.6.1.4.1.12356.100.1.3 1.3.6.1.4.1.12356.100.1.3.0 1.3.6.1.4.1.12356.100.1.3.0.101 Indicates that the CPU usage has exceeded the configured threshold. Indicates memory usage has exceeded the configured threshold. Log disk usage has exceeded the configured threshold. Only available on devices with log disks. A temperature sensor on the device has exceeded its threshold. Not all devices have thermal sensors. See manual for specifications. Power levels have fluctuated outside of normal levels. Not all devices have voltage monitoring instrumentation. See manual for specifications. Power supply failure detected. Not available on all models. Available on some devices which support redundant power supplies. See manual for specifications. Indicates that the IP address of the specified interface has been changed. Trap sent for diagnostic purposes by an administrator.
fnTrapMemThreshold
1.3.6.1.4.1.12356.100.1.3.0.102
fnTrapLogDiskThreshold
1.3.6.1.4.1.12356.100.1.3.0.103
fnTrapTempHigh
1.3.6.1.4.1.12356.100.1.3.0.104
fnTrapVoltageOutOfRange
1.3.6.1.4.1.12356.100.1.3.0.105
fnTrapPowerSupplyFailure
1.3.6.1.4.1.12356.100.1.3.0.106
fnTrapIpChange
1.3.6.1.4.1.12356.100.1.3.0.201
fnTrapTest
1.3.6.1.4.1.12356.100.1.3.0.999
fnTrapObjects fnGenTrapMsg
1.3.6.1.4.1.12356.100.1.3.1 1.3.6.1.4.1.12356.100.1.3.1.1 Generic message associated with an event. The content will depend on the nature of the trap.
fnMIBConformance
1.3.6.1.4.1.12356.100.10 Objects relating to the physical device. Objects relating the management of a device. Administration access control objects.
353
Monitoring
Table 18: OIDs for the Fortinet-Core-MIB MIB Field fnTrapsComplianceGroup OID 1.3.6.1.4.1.12356.100.10.4 Description Event notifications. Object identifiers used in notifications. Object identifiers used in notifications. Objects are required if their containing trap is implemented.
FortiGate MIB
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgModel fgTraps fgTrapPrefix fgTrapVpnTunup OID 1.3.6.1.4.1.12356.101.1 1.3.6.1.4.1.12356.101.2 1.3.6.1.4.1.12356.101.2.0 1.3.6.1.4.1.12356.101.2.0.301 Indicates that the specified VPN tunnel has been brought up. The specified VPN tunnel has been brought down. The specified cluster member has transitioned from a slave role to a master role. Trap being sent when the HA cluster member changes its state. The heartbeat device failure count has exceeded the configured threshold. The specified device (by serial number) is moving to a down state. A new cluster member has joined the cluster. An IPS signature has been triggered. An IPS anomaly has been detected. The IPS signature database has been updated. A virus has been detected by the antivirus engine. An oversized file has been detected by the antivirus engine. The antivirus engine has blocked a file because it matched a configured pattern. The antivirus engine has detected a fragmented file. Description
fgTrapVpnTunDown fgTrapHaSwitch
1.3.6.1.4.1.12356.101.2.0.302 1.3.6.1.4.1.12356.101.2.0.401
fgTrapHaStateChange
1.3.6.1.4.1.12356.101.2.0.402
fgTrapHaBFail
1.3.6.1.4.1.12356.101.2.0.403
fgTrapHaMemberDown
1.3.6.1.4.1.12356.101.2.0.404
fgTrapAvPattern
1.3.6.1.4.1.12356.101.2.0.603
fgTrapAvFragmented
1.3.6.1.4.1.12356.101.2.0.604
354
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgTrapAvEnterConserve OID 1.3.6.1.4.1.12356.101.2.0.605 Description The antivirus engine has entered conservation mode due to low memory conditions. The antivirus engine has been bypassed due to conservation mode. An oversized file has been detected, but has been passed due to configuration. An oversized file has been detected and has been blocked. The device has been disconnected from the FortiAnalyzer.
fgTrapAvBypass
1.3.6.1.4.1.12356.101.2.0.606
fgTrapAvOversizePass
1.3.6.1.4.1.12356.101.2.0.607
fgTrapAvOversizeBlock
1.3.6.1.4.1.12356.101.2.0.608
fgTrapFazDisconnect
1.3.6.1.4.1.12356.101.2.0.701
Virtual Domains fgVirtualDomain fgVdInfo fgVdNumber fgVdMaxVdoms 1.3.6.1.4.1.12356.101.3 1.3.6.1.4.1.12356.101.3.1 1.3.6.1.4.1.12356.101.3.1.1 1.3.6.1.4.1.12356.101.3.1.2 The number of virtual domains in vdTable. The maximum number of virtual domains allowed on the device as allowed by hardware and/or licensing. Whether virtual domains are enabled on this device.
An entry containing information applicable to a particular virtual domain. Internal virtual domain index used to uniquely identify rows in this table. This index is also used by other tables referencing a virtual domain. The name of the virtual domain. Operation mode of the virtual domain (NAT or Transparent). A table of virtual domains in transparent operation mode. This table has a dependent relationship with fgVdTable. An entry containing information applicable to a particular virtual domain in transparent mode. The type of address stored in fgVdTpMgmtAddr, in compliance with INETADDRESS-MIB.
fgVdEntIndex
1.3.6.1.4.1.12356.101.3.2.1.1.1
fgVdEntName fgVdEntOpMode
1.3.6.1.4.1.12356.101.3.2.1.1.2 1.3.6.1.4.1.12356.101.3.2.1.1.3
fgVdTpTable
1.3.6.1.4.1.12356.101.3.2.2
fgVdTpEntry
1.3.6.1.4.1.12356.101.3.2.2.1
fgVdTpMgmtAddrType
1.3.6.1.4.1.12356.101.3.2.2.1.1
355
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgVdTpMgmtAddr OID 1.3.6.1.4.1.12356.101.3.2.2.1.2 Description The management IP address of the virtual domain in transparent mode, typically an IPv4 address.The address type/format is determined by fgVdTpMgmtAddrType. The address prefix length (or network mask) applied to the fgVdTpMgmtAddr.
fgVdTpMgmtMask
1.3.6.1.4.1.12356.101.3.2.2.1.3
System fgSystem fgSystemInfo fgSysVersion fgSysMgmtVdom 1.3.6.1.4.1.12356.101.4 1.3.6.1.4.1.12356.101.4.1 1.3.6.1.4.1.12356.101.4.1.1 1.3.6.1.4.1.12356.101.4.1.2 Firmware version. Index that identifies the management virtual domain. This index corresponds to the index used by fgVdTable. Current CPU usage (percentage). Current memory usage (percentage). Total physical RA installed (KB) Current hard disk usage (MB), if disk is present. Total hard disk capacity (MB), if disk is present. Number of active sessions on the device. Current lowmem utilization (percentage). Lowmem is memory available for the kernel's own data structures and kernel specific tables. The system can get into a bad state if it runs out of lowmem. Total lowmem capacity (KB).
Security policy statistics table. This table has a dependent expansion relationship with fgVdTable. Only virtual domains with enabled policies are present in this table. Security policy statistics on a virtual domain.
fgFwPolStatsEntry
1.3.6.1.4.1.12356.101.5.1.2.1.1
356
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgFwPolID OID 1.3.6.1.4.1.12356.101.5.1.2.1.1.1 Description Security policy ID. Only enabled policies are present in this table. Policy IDs are only unique within a virtual domain. Number of packets matched to policy (passed or blocked, depending on policy action). Count is from the time the policy became active. Number of bytes in packets matching the policy. See fgFwPolPktCount.
fgFwPolPktCount
1.3.6.1.4.1.12356.101.5.1.2.1.1.2
fgFwPolByteCount
1.3.6.1.4.1.12356.101.5.1.2.1.1.3
1.3.6.1.4.1.12356.101.5.2 1.3.6.1.4.1.12356.101.5.2.1 1.3.6.1.4.1.12356.101.5.2.1.1 1.3.6.1.4.1.12356.101.5.2.1.2 The number of user accounts in fgFwUserTable. Idle period after which a firewall-authentication user's session is automatically expired. A list of local and proxy (Radius server) user accounts for use with firewall user authentication. An entry containing information applicable to a particular user account. An index for uniquely identifying the users in fgFwUserTable. User name of the specified account. Type of authentication the account uses (local, RADIUS, LDAP, etc.). Status of the user account (enabled/disabled). Virtual domain the user account exists in. This index corresponds to the index used in fgVdTable.
fgFwUserTables fgFwUserTable
1.3.6.1.4.1.12356.101.5.2.2 1.3.6.1.4.1.12356.101.5.2.2.1
fgFwUserEntry
1.3.6.1.4.1.12356.101.5.2.2.1.1
fgFwUserIndex
1.3.6.1.4.1.12356.101.5.2.2.1.1.1
fgFwUserName fgFwUserAuth
1.3.6.1.4.1.12356.101.5.2.2.1.1.2 1.3.6.1.4.1.12356.101.5.2.2.1.1.3
fgFwUserState fgFwUserVdom
1.3.6.1.4.1.12356.101.5.2.2.1.1.4 1.3.6.1.4.1.12356.101.5.2.2.1.1.5
FortiManager and Administration fgMgmt fgFmTrapPrefix fgFmTrapDeployComplete 1.3.6.1.4.1.12356.101.6 1.3.6.1.4.1.12356.101.6.0 1.3.6.1.4.1.12356.101.6.0.1000 Indicates when deployment of a new configuration has been completed. Used for verification by FortiManager.
357
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgFmTrapDeployInProgress OID 1.3.6.1.4.1.12356.101.6.0.1002 Description Indicates that a configuration change was not immediate and that the change is currently in progress. Used for verification by FortiManager. The device configuration has been changed by something other than the managing FortiManager unit. Trap is sent to the managing FortiManager if an interface IP is changed.
fgFmTrapConfChange
1.3.6.1.4.1.12356.101.6.0.1003
fgFmTrapIfChange
1.3.6.1.4.1.12356.101.6.0.1004
1.3.6.1.4.1.12356.101.6.1 1.3.6.1.4.1.12356.101.6.1.1 1.3.6.1.4.1.12356.101.6.1.1.1 Idle period after which an administrator is automatically logged out of the system. Status of the LCD protection (enabled/disabled). A table of administrator accounts on the device. An entry containing information applicable to a particular admin account. The virtual domain the administrator belongs to. IP address of the interface listed in the trap. Mask of subnet the interface belongs to.
fgAdminVdom fgMgmtTrapObjects fgManIfIp fgManIfMask Antivirus fgAntivirus fgAvInfo fgAvTables fgAvStatsTable fgAvStatsEntry fgAvVirusDetected
1.3.6.1.4.1.12356.101.8 1.3.6.1.4.1.12356.101.8.1 1.3.6.1.4.1.12356.101.8.2 1.3.6.1.4.1.12356.101.8.2.1 1.3.6.1.4.1.12356.101.8.2.1.1 1.3.6.1.4.1.12356.101.8.2.1.1.1 A table of Antivirus statistics per virtual domain. Antivirus statistics for a particular virtual domain. Number of virus transmissions detected in the virtual domain since start up. Number of virus transmissions blocked in the virtual domain since start up. Number of virus transmissions over HTTP detected in the virtual domain since start up.
fgAvVirusBlocked
1.3.6.1.4.1.12356.101.8.2.1.1.2
fgAvHTTPVirusDetected
1.3.6.1.4.1.12356.101.8.2.1.1.3
358
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgAvHTTPVirusBlocked OID 1.3.6.1.4.1.12356.101.8.2.1.1.4 Description Number of virus transmissions over HTTP blocked in the virtual domain since start up. Number of virus transmissions over SMTP detected in the virtual domain since start up. Number of virus transmissions over SMTP blocked in the virtual domain since start up. Number of virus transmissions over POP3 detected in the virtual domain since start up. Number of virus transmissions over POP3 blocked in the virtual domain since start up. Number of virus transmissions over IMAP detected in the virtual domain since start up. Number of virus transmissions over IMAP blocked in the virtual domain since start up. Number of virus transmissions over FTP detected in the virtual domain since start up. Number of virus transmissions over FTP blocked in the virtual domain since start up. Number of virus transmissions over IM protocols detected in the virtual domain since start up. Number of virus transmissions over IM protocols blocked in the virtual domain since start up. Number of virus transmissions over NNTP detected in the virtual domain since start up. Number of virus transmissions over NNTP blocked in the virtual domain since start up. Number of over-sized file transmissions detected in the virtual domain since start up.
fgAvSMTPVirusDetected
1.3.6.1.4.1.12356.101.8.2.1.1.5
fgAvSMTPVirusBlocked
1.3.6.1.4.1.12356.101.8.2.1.1.6
fgAvPOP3VirusDetected
1.3.6.1.4.1.12356.101.8.2.1.1.7
fgAvPOP3VirusBlocked
1.3.6.1.4.1.12356.101.8.2.1.1.8
fgAvIMAPVirusDetected
1.3.6.1.4.1.12356.101.8.2.1.1.9
fgAvIMAPVirusBlocked
1.3.6.1.4.1.12356.101.8.2.1.1.10
fgAvFTPVirusDetected
1.3.6.1.4.1.12356.101.8.2.1.1.11
fgAvFTPVirusBlocked
1.3.6.1.4.1.12356.101.8.2.1.1.12
fgAvIMVirusDetected
1.3.6.1.4.1.12356.101.8.2.1.1.13
fgAvIMVirusBlocked
1.3.6.1.4.1.12356.101.8.2.1.1.14
fgAvNNTPVirusDetected
1.3.6.1.4.1.12356.101.8.2.1.1.15
fgAvNNTPVirusBlocked
1.3.6.1.4.1.12356.101.8.2.1.1.16
fgAvOversizedDetected
1.3.6.1.4.1.12356.101.8.2.1.1.17
359
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgAvOversizedBlocked OID 1.3.6.1.4.1.12356.101.8.2.1.1.18 Description Number of over-sized file transmissions blocked in the virtual domain since start up. Virus name that triggered event.
1.3.6.1.4.1.12356.101.8.3 1.3.6.1.4.1.12356.101.8.3.1
1.3.6.1.4.1.12356.101.9 1.3.6.1.4.1.12356.101.9.1 1.3.6.1.4.1.12356.101.9.2 1.3.6.1.4.1.12356.101.9.2.1 1.3.6.1.4.1.12356.101.9.2.1.1 1.3.6.1.4.1.12356.101.9.2.1.1.1 A table of IPS/IDS statistics per virtual domain. IPS/IDS statistics for a particular virtual domain. Number of intrusions detected since start up in this virtual domain. Number of intrusions blocked since start up in this virtual domain. Number of critical severity intrusions detected since start up in this virtual domain. Number of high severity intrusions detected since start up in this virtual domain. Number of medium severity intrusions detected since start up in this virtual domain. Number of low severity intrusions detected since start up in this virtual domain. Number of informational severity intrusions detected since start up in this virtual domain. Number of intrusions detected by signature since start up in this virtual domain. Number of intrusions detected as anomalies since start up in this virtual domain. ID of IPS signature identified in trap. Source IP Address of the IPS signature trigger.
fgIpsIntrusionBlocked
1.3.6.1.4.1.12356.101.9.2.1.1.2
fgIpsCritSevDetections
1.3.6.1.4.1.12356.101.9.2.1.1.3
fgIpsHighSevDetections
1.3.6.1.4.1.12356.101.9.2.1.1.4
fgIpsMedSevDetections
1.3.6.1.4.1.12356.101.9.2.1.1.5
fgIpsLowSevDetections
1.3.6.1.4.1.12356.101.9.2.1.1.6
fgIpsInfoSevDetections
1.3.6.1.4.1.12356.101.9.2.1.1.7
fgIpsSignatureDetections
1.3.6.1.4.1.12356.101.9.2.1.1.8
fgIpsAnomalyDetections
1.3.6.1.4.1.12356.101.9.2.1.1.9
360
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgIpsTrapSigMsg Application Control fgApplications fgWebfilter fgWebfilterInfo fgWebfilterTables fgWebfilterStatsTable fgWebfilterStatsEntry fgWfHTTPBlocked 1.3.6.1.4.1.12356.101.10 1.3.6.1.4.1.12356.101.10.1 1.3.6.1.4.1.12356.101.10.1.1 1.3.6.1.4.1.12356.101.10.1.2 1.3.6.1.4.1.12356.101.10.1.2.1 1.3.6.1.4.1.12356.101.10.1.2.1.1 1.3.6.1.4.1.12356.101.10.1.2.1.1.1 A table of Web filter statistics per virtual domain. Web filter statistics for a particular virtual domain. Number of HTTP sessions blocked by Web filter since start up. Number of HTTPS sessions blocked by Web filter since start up. Number of HTTP URLs blocked by Web filter since start up. Number of HTTPS URLs blocked by Web filter since start up. Number of ActiveX downloads blocked by Web filter since start up. Number of HTTP Cookies blocked by Web filter since start up. Number of Applets blocked by Web-filter since start up. A table of FortiGuard statistics per virtual domain. FortiGuard statistics for a particular virtual domain. Number of HTTP requests examined using FortiGuard since start up. Number of HTTPS requests examined using FortiGuard since start up. Number of HTTP requests allowed to proceed using FortiGuard since start up. Number of HTTPS requests allowed to proceed using FortiGuard since start up. Number of HTTP requests blocked using FortiGuard since start up. Number of HTTPS requests blocked using FortiGuard since start up. OID 1.3.6.1.4.1.12356.101.9.3.3 Description Message associated with IPS event.
fgWfHTTPSBlocked
1.3.6.1.4.1.12356.101.10.1.2.1.1.2
fgWfHTTPURLBlocked
1.3.6.1.4.1.12356.101.10.1.2.1.1.3
fgWfHTTPSURLBlocked
1.3.6.1.4.1.12356.101.10.1.2.1.1.4
fgWfActiveXBlocked
1.3.6.1.4.1.12356.101.10.1.2.1.1.5
fgWfCookieBlocked
1.3.6.1.4.1.12356.101.10.1.2.1.1.6
fgFgWfHTTPSExamined
1.3.6.1.4.1.12356.101.10.1.2.2.1.2
fgFgWfHTTPAllowed
1.3.6.1.4.1.12356.101.10.1.2.2.1.3
fgFgWfHTTPSAllowed
1.3.6.1.4.1.12356.101.10.1.2.2.1.4
fgFgWfHTTPBlocked
1.3.6.1.4.1.12356.101.10.1.2.2.1.5
fgFgWfHTTPSBlocked
1.3.6.1.4.1.12356.101.10.1.2.2.1.6
361
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgFgWfHTTPLogged OID 1.3.6.1.4.1.12356.101.10.1.2.2.1.7 Description Number of HTTP requests logged using FortiGuard since start up. Number of HTTPS requests logged using FortiGuard since start up. Number of HTTP requests overridden using FortiGuard since start up. Number of HTTPS requests overridden using FortiGuard since start up. HTTP proxy up-time, in seconds. HTTP proxy memory usage (percentage of system total). A table of HTTP Proxy statistics per virtual domain. HTTP Proxy statistics for a particular virtual domain. Number of HTTP requests in this virtual domain processed by the HTTP proxy since start up. HTTP proxy current connections. SMTP Proxy up-time, in seconds. SMTP Proxy memory utilization (percentage of system total). A table of SMTP proxy statistics per virtual domain. SMTP Proxy statistics for a particular virtual domain. Number of requests in this virtual domain processed by the SMTP proxy since start up. Number of spam detected in this virtual domain by the SMTP proxy since start up. SMTP proxy current connections. Up time of the POP3 proxy, in seconds. Memory usage of the POP3 Proxy (percentage of system total).
fgFgWfHTTPSLogged
1.3.6.1.4.1.12356.101.10.1.2.2.1.8
fgFgWfHTTPOverridden
1.3.6.1.4.1.12356.101.10.1.2.2.1.9
fgFgWfHTTPSOverridden
1.3.6.1.4.1.12356.101.10.1.2.2.1.10
fgApSMTPSpamDetected
1.3.6.1.4.1.12356.101.10.101.3.1.2
362
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgApPOP3StatsTable fgApPOP3StatsEntry fgApPOP3ReqProcessed OID 1.3.6.1.4.1.12356.101.10.102.3 1.3.6.1.4.1.12356.101.10.102.3.1 1.3.6.1.4.1.12356.101.10.102.3.1.1 Description A table of POP3 proxy statistics per virtual domain. Proxy pop3 statistics for a particular virtual domain. Number of requests in this virtual domain processed by the POP3 proxy since start up. Number of spam detected in this virtual domain by the POP3 Proxy since start up. POP3 proxy current connections. Up time of the IMAP proxy, in seconds. Memory utilization of the IMAP Proxy (as a percentage of the system total). A table of IMAP proxy statistics per virtual domain. IMAP Proxy statistics for a particular virtual domain. Number of requests in this virtual domain processed by the IMAP proxy since start up. Number of spam detected in this virtual domain by the IMAP proxy since start up. IMAP proxy current connections. Up time of the NNTP proxy, in seconds. Memory utilization of the NNTP proxy, as a percentage of the system total. A table of NNTP proxy statistics per virtual domain. NNTP Proxy statistics for a particular virtual domain. Number of requests in the virtual domain processed by the NNTP proxy since start up. NNTP proxy current connections. Up time of the IM proxy, in seconds.
fgApPOP3SpamDetected
1.3.6.1.4.1.12356.101.10.102.3.1.2
fgApIMAPSpamDetected
1.3.6.1.4.1.12356.101.10.103.3.1.2
363
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgApIMMemUsage OID 1.3.6.1.4.1.12356.101.10.105.2 Description IM Proxy memory usage, as a percentage of the system total. A table of IM proxy statistics per virtual domain. IM Proxy statistics for a particular virtual domain. Number of requests in this virtual domain processed by the IM proxy since start up. Up time of the SIP Proxy, in seconds. SIP Proxy memory utilization, as a percentage of the system total. A table of SIP proxy statistics per virtual domain. SIP Proxy statistics for a particular virtual domain. Number of client registration requests (Register and Options) in this virtual domain processed by the SIP proxy since start up. Number of call handling requests (Invite, Ack, Bye, Cancel and Refer) in this virtual domain processed by the SIP proxy since start up. Number of service requests (Subscribe, notify and Message) in this virtual domain processed by the SIP proxy since start up. Number of other sip requests in this virtual domain processed by the SIP proxy since start up. The number of scan units in the fgAppSuStatsTable. A table of scan unit statistics. Statistics entry for a particular scan unit. Index that uniquely identifies a scan unit in the fgAppSuStatsTable. Number of files scanned by this scan unit. A table of VoIP related statistics per virtual domain.
fgApSIPCallHandling
1.3.6.1.4.1.12356.101.10.106.3.1.2
fgApSIPServices
1.3.6.1.4.1.12356.101.10.106.3.1.3
fgApSIPOtherReq
1.3.6.1.4.1.12356.101.10.106.3.1.4
364
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgAppVoPStatsEntry fgAppVoIPConn OID 1.3.6.1.4.1.12356.101.10.108.1.1 1.3.6.1.4.1.12356.101.10.108.1.1.1 Description VoIP statistics for a particular virtual domain. The current number of VoIP connections on the virtual domain. Number of VoIP calls blocked (SIP Invites blocked and SCCP calls blocked) in this virtual domain. A table of P2P protocol related statistics per virtual domain. P2P statistics for a particular virtual domain. Number of P2P connections blocked in this virtual domain. A table of peer to peer statistics per virtual domain per protocol. This table has a dependent expansion relationship with fgVdTable. P2P statistics for a particular virtual domain and protocol. P2P protocol this row of statistics is for, within the specified virtual domain. Number of bytes transferred through this virtual domain on this P2P protocol since last reset. Time elapsed since the corresponding fgAppP2PProtEntBytes was last reset to 0. A table of instant messaging statistics per virtual domain. IM statistics for a particular virtual domain. Total number of IM messages processed in this virtual domain. Number of files transferred through this virtual domain. Number of blocked file transfers in this virtual domain. Number of connections blocked in this virtual domain.
fgAppVoIPCallBlocked
1.3.6.1.4.1.12356.101.10.108.1.1.2
fgAppP2P fgAppP2PStatsTable
1.3.6.1.4.1.12356.101.10.109 1.3.6.1.4.1.12356.101.10.109.1
fgAppP2PStatsEntry fgAppP2PConnBlocked
1.3.6.1.4.1.12356.101.10.109.1.1 1.3.6.1.4.1.12356.101.10.109.1.1.1
fgAppP2PProtoTable
1.3.6.1.4.1.12356.101.10.109.2
fgAppP2PProtoEntry fgAppP2PProtoEntProto
1.3.6.1.4.1.12356.101.10.109.2.1 1.3.6.1.4.1.12356.101.10.109.2.1.1
fgAppP2PProtoEntBytes
1.3.6.1.4.1.12356.101.10.109.2.1.2
fgAppP2PProtoEntLastReset
1.3.6.1.4.1.12356.101.10.109.2.1.3
fgAppIMFileTransfered fgAppIMFileTxBlocked
1.3.6.1.4.1.12356.101.10.110.1.1.2 1.3.6.1.4.1.12356.101.10.110.1.1.3
fgAppIMConnBlocked
1.3.6.1.4.1.12356.101.10.110.1.1.4
fgAppProxyFTP
1.3.6.1.4.1.12356.101.10.111
365
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgApFTPUpTime fgApFTPMemUsage OID 1.3.6.1.4.1.12356.101.10.111.1 1.3.6.1.4.1.12356.101.10.111.2 Description Up time of the FTP proxy, in seconds. FTP Proxy memory utilization, as a percentage of the system total. A table of FTP proxy statistics per virtual domain. FTP Proxy statistics for a particular virtual domain. Number of requests in this virtual domain processed by the FTP proxy since start up. FTP proxy current connections.
fgApFTPConnections fgAppExplicitProxy fgExplicitProxyInfo fgExplicitProxyUpTime fgExplicitProxyMemUsage fgExplicitProxyRequests fgExplicitProxyStatsTable fgExplicitProxyStatsEntry fgExplicitProxyUsers fgExplicitProxySessions fgExplicitProxyScanStatsTable fgExplicitProxyScanStatsEntry
1.3.6.1.4.1.12356.101.10.111.4 1.3.6.1.4.1.12356.101.10.112 1.3.6.1.4.1.12356.101.10.112.1 1.3.6.1.4.1.12356.101.10.112.1.1 1.3.6.1.4.1.12356.101.10.112.1.2 1.3.6.1.4.1.12356.101.10.112.1.3 1.3.6.1.4.1.12356.101.10.112.2 1.3.6.1.4.1.12356.101.10.112.2.1 1.3.6.1.4.1.12356.101.10.112.2.1.1 1.3.6.1.4.1.12356.101.10.112.2.1.2 1.3.6.1.4.1.12356.101.10.112.3 1.3.6.1.4.1.12356.101.10.112.3.1
Explicit proxy up-time (in seconds). Explicit proxy memory usage (percentage of system total). Explicit proxy total number of requests. A table of explicit proxy statistics per virtual domain. Explicit proxy statistics for a particular virtual domain. Number of current users in this virtual domain. Number of current sessions in this virtual domain. A table of explicit proxy scan statistics per virtual domain. Explicit proxy scan statistics for a particular virtual domain. Disposition of an scan result. Number of viruses in this virtual domain. Number of elements containing banned words in this virtual domain. Number of elements violating policy (e.g. filename or file type rules) in this virtual domain. Number of oversized elements in this virtual domain. Number of too deeply nested archives in this virtual domain.
fgExplicitProxyPolicy
1.3.6.1.4.1.12356.101.10.112.3.1.4
fgExplicitProxyOversized
1.3.6.1.4.1.12356.101.10.112.3.1.5
fgExplicitProxyArchNest
1.3.6.1.4.1.12356.101.10.112.3.1.6
366
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgExplicitProxyArchSize OID 1.3.6.1.4.1.12356.101.10.112.3.1.7 Description Number of archives that decompress beyond size limit in this virtual domain. Number of encrypted archives in this virtual domain. Number of multipart archives in this virtual domain.
fgExplicitProxyArchEncrypted
1.3.6.1.4.1.12356.101.10.112.3.1.8
fgExplicitProxyArchMultiPart
1.3.6.1.4.1.12356.101.10.112.3.1.9
fgExplicitProxyArchUnsupported 1.3.6.1.4.1.12356.101.10.112.3.1.10 Number of archives with unsupported (but known) formats in this virtual domain. fgExplicitProxyArchBomb fgExplicitProxyArchCorrupt fgExplicitProxyScriptStatsTable 1.3.6.1.4.1.12356.101.10.112.3.1.11 Number of archive bombs in this virtual domain. 1.3.6.1.4.1.12356.101.10.112.3.1.12 Number of corrupt archives in this virtual domain. 1.3.6.1.4.1.12356.101.10.112.4 A table of explicit proxy script filtering statistics per virtual domain. Explicit proxy scan statistics for a particular virtual domain. Number of applets filtered from files in this virtual domain. Number of ActiveX scripts filtered from files in this virtual domain. Number of JScript scripts filtered from files in this virtual domain. Number of JavaScript scripts filtered from files in this virtual domain. Number of Visual Basic scripts filtered from files in this virtual domain. Number of other types of scripts filtered from files in this virtual domain. A table of explicit proxy policy enforcement statistics per virtual domain. Explicit proxy scan statistics for a particular virtual domain. Number of elements blocked due to Data Leak Prevention in this virtual domain. Number of elements blocked due to Content-Type filtering rules in this virtual domain. Number of URLs inspected against filtering rules in this virtual domain.
fgExplicitProxyScriptStatsEntry
1.3.6.1.4.1.12356.101.10.112.4.1
fgExplicitProxyFilteredApplets
1.3.6.1.4.1.12356.101.10.112.4.1.1
fgExplicitProxyFilteredActiveX
1.3.6.1.4.1.12356.101.10.112.4.1.2
fgExplicitProxyFilteredJScript
1.3.6.1.4.1.12356.101.10.112.4.1.3
fgExplicitProxyFilteredJS
1.3.6.1.4.1.12356.101.10.112.4.1.4
fgExplicitProxyFilteredVBS
1.3.6.1.4.1.12356.101.10.112.4.1.5
fgExplicitProxyFilteredOthScript
.3.6.1.4.1.12356.101.10.112.4.1.6
fgExplicitProxyFilterStatsTable
1.3.6.1.4.1.12356.101.10.112.5
fgExplicitProxyFilterStatsEntry
1.3.6.1.4.1.12356.101.10.112.5.1
fgExplicitProxyBlockedDLP
1.3.6.1.4.1.12356.101.10.112.5.1.1
fgExplicitProxyBlockedConType 1.3.6.1.4.1.12356.101.10.112.5.1.2
fgExplicitProxyExaminedURLs
1.3.6.1.4.1.12356.101.10.112.5.1.3
367
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgExplicitProxyAllowedURLs OID 1.3.6.1.4.1.12356.101.10.112.5.1.4 Description Number of URLs explicitly allowed due to filtering rules in this virtual domain. Number of URLs explicitly blocked due to filtering rules in this virtual domain. Number of URLs logged due to filtering rules in this virtual domain. Number of URLs access due to overriding filtering rules in this virtual domain.
fgExplicitProxyBlockedURLs
1.3.6.1.4.1.12356.101.10.112.5.1.5
fgExplicitProxyLoggedURLs
1.3.6.1.4.1.12356.101.10.112.5.1.6
fgExplicitProxyOverriddenURLs
1.3.6.1.4.1.12356.101.10.112.5.1.7
fgAppWebCache fgWebCacheInfo fgWebCacheRAMLimit fgWebCacheRAMUsage fgWebCacheRAMHits fgWebCacheRAMMisses fgWebCacheRequests fgWebCacheBypass fgWebCacheUpTime fgWebCacheDiskStatsTable fgWebCacheDiskStatsEntry fgWebCacheDisk fgWebCacheDiskLimit
1.3.6.1.4.1.12356.101.10.113 1.3.6.1.4.1.12356.101.10.113.1 1.3.6.1.4.1.12356.101.10.113.1.1 1.3.6.1.4.1.12356.101.10.113.1.2 1.3.6.1.4.1.12356.101.10.113.1.3 1.3.6.1.4.1.12356.101.10.113.1.4 1.3.6.1.4.1.12356.101.10.113.1.5 1.3.6.1.4.1.12356.101.10.113.1.6 1.3.6.1.4.1.12356.101.10.113.1.7 1.3.6.1.4.1.12356.101.10.113.2 1.3.6.1.4.1.12356.101.10.113.2.1 1.3.6.1.4.1.12356.101.10.113.2.1.1 1.3.6.1.4.1.12356.101.10.113.2.1.2 RAM available for web cache in bytes. RAM used by web cache in bytes. Number of cache hits in RAM since last reset. Number of cache misses in RAM since last reset. Number of cache requests since last reset. Number of cache bypasses since last reset. Web Cache up-time (in seconds). A table of the Web Cache disk statistics per disk. The Web Cache disk statistics for a particular disk. The Web Cache Disk index. The about of storage (in bytes) available for the Web Cache on a particular disk. The about of storage (in bytes) in use by the Web Cache on a particular disk. The number of cache hits on a paricular disk. The number of cache misses on a paricular disk.
fgWebCacheDiskUsage
1.3.6.1.4.1.12356.101.10.113.2.1.3
RAM available for mem cache in bytes. RAM used by mem cache in bytes. Number of hits in mem cache since last reset.
368
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgMemCacheMisses fgByteCacheRAMLimit fgByteCacheRAMUsage fgWanOptUpTime fgWanOptStatsTable fgWanOptStatsEntry OID 1.3.6.1.4.1.12356.101.10.114.1.4 1.3.6.1.4.1.12356.101.10.114.1.5 1.3.6.1.4.1.12356.101.10.114.1.6 1.3.6.1.4.1.12356.101.10.114.1.7 1.3.6.1.4.1.12356.101.10.114.2 1.3.6.1.4.1.12356.101.10.114.2.1 Description Number of misses in mem cache since last reset. RAM available for byte cache in bytes. RAM used by byte cache in bytes. Wan Optimization up-time (in seconds). A table of WAN optimization statistics per virtual domain. WAN optimization statistics for a particular virtual domain. Number of current tunnels in this virtual domain. Number of bytes received on LAN in last 5 seconds. Number of bytes sent on LAN in last 5 seconds. Number of bytes received on WAN in last 5 seconds. Number of bytes sent on WAN in last 5 seconds. A table of the WAN optimization history per protocol. The WAN optimization history for a particular virtual domain, period, and protocol. WAN optimization table entry period. Internal WAN optimization table entry protocol. Reduction rate achieved by WAN optimization. Number of bytes transferred via LAN. Number of bytes transferred via WAN. A table of the WAN optimization traffic for a particular virtual domain and protocol. The WAN optimization history for a particular protocol. Amount of traffic received from the LAN by WAN optimization. Amount of traffic sent to the LAN by WAN optimization.
fgWanOptHistoryStatsEntry
1.3.6.1.4.1.12356.101.10.114.3.1
fgWanOptTrafficStatsEntry
1.3.6.1.4.1.12356.101.10.114.4.1
fgWanOptLanInTraffic
1.3.6.1.4.1.12356.101.10.114.4.1.1
fgWanOptLanOutTraffic
1.3.6.1.4.1.12356.101.10.114.4.1.2
369
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgWanOptWanInTraffic OID 1.3.6.1.4.1.12356.101.10.114.4.1.3 Description Amount of traffic received from the WAN by WAN optimization. Amount of traffic sent to the WAN by WAN optimization. A table of the Web Cache disk statistics per disk. The Web Cache disk statistics for a particular disk. The Web Cache Disk index. The about of storage (in bytes) available for the Web Cache on a particular disk. The about of storage (in bytes) in use by the Web Cache on a paricular disk. The number of cache hits on a paricular disk. The number of cache misses on a paricular disk.
fgWanOptDiskUsage
1.3.6.1.4.1.12356.101.10.114.5.1.3
fgWanOptDiskHits fgWanOptDiskMisses Protocol and Session Table fgInetProto fgInetProtoInfo fgInetProtoTables fgIpSessTable fgIpSessEntry
1.3.6.1.4.1.12356.101.10.114.5.1.4 1.3.6.1.4.1.12356.101.10.114.5.1.5
1.3.6.1.4.1.12356.101.11 1.3.6.1.4.1.12356.101.11.1 1.3.6.1.4.1.12356.101.11.2 1.3.6.1.4.1.12356.101.11.2.1 1.3.6.1.4.1.12356.101.11.2.1.1 Information on a specific session, including source and destination. An index value that uniquely identifies an IP session within the fgIpSessTable. The protocol the session is using (IP, TCP, UDP, etc.). Source IP address (IPv4 only) of the session. Source port number (UDP and TCP only) of the session. Destination IP address (IPv4 only) of the session. Destination Port number (UDP and TCP only) of the session. Number of seconds remaining before the session expires (if idle). Virtual domain the session is part of. This index corresponds to the index used by fgVdTable. IP session statistics table.
fgIpSessIndex
1.3.6.1.4.1.12356.101.11.2.1.1.1
fgIpSessToAddr fgIpSessToPort
1.3.6.1.4.1.12356.101.11.2.1.1.5 1.3.6.1.4.1.12356.101.11.2.1.1.6
fgIpSessExp
1.3.6.1.4.1.12356.101.11.2.1.1.7
fgIpSessVdom
1.3.6.1.4.1.12356.101.11.2.1.1.8
fgIpSessStatsTable
1.3.6.1.4.1.12356.101.11.2.2
370
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgIpSessStatsEntry fgIpSessNumber VPN fgVPN fgVpnInfo fgVpnTables fgVpnDialupTable fgVpnDialupEntry fgVpnDialupIndex 1.3.6.1.4.1.12356.101.12 1.3.6.1.4.1.12356.101.12.1 1.3.6.1.4.1.12356.101.12.2 1.3.6.1.4.1.12356.101.12.2.1 1.3.6.1.4.1.12356.101.12.2.1.1 1.3.6.1.4.1.12356.101.12.2.1.1.1 Dial-up VPN peers information. Dial-up VPN peer info. An index value that uniquely identifies an VPN dial-up peer within the fgVpnDialupTable. Remote gateway IP address of the tunnel. Tunnel life time (seconds) of the tunnel. Time before the next key exchange (seconds) of the tunnel. Remote subnet address of the tunnel. Remote subnet mask of the tunnel. Local subnet address of the tunnel. Virtual domain tunnel is part of. This index corresponds to the index used by fgVdTable. Number of bytes received on tunnel since instantiation. Number of bytes sent on tunnel since instantiation. Table of non-dial-up VPN tunnels. Tunnel VPN peer info. An index value that uniquely identifies a VPN tunnel within the fgVpnTunTable. Descriptive name of phase1 configuration for the tunnel. Descriptive name of phase2 configuration for the tunnel. IP of remote gateway used by the tunnel. Port of remote gateway used by tunnel, if UDP. IP of local gateway used by the tunnel. OID 1.3.6.1.4.1.12356.101.11.2.2.1 1.3.6.1.4.1.12356.101.11.2.2.1.1 Description IP session statistics on a virtual domain. Current number of sessions on the virtual domain.
371
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgVpnTunEntLocGwyPort OID 1.3.6.1.4.1.12356.101.12.2.2.1.7 Description Port of local gateway used by tunnel, if UDP. Beginning of address range of source selector. End of address range of source selector. Source selector port. Beginning of address range of destination selector. End of address range of destination selector. Destination selector port. Protocol number for selector. Lifetime of tunnel in seconds, if time based lifetime used. Lifetime of tunnel in bytes, if byte transfer based lifetime used. Timeout of tunnel in seconds. Number of bytes received on tunnel. Number of bytes sent out on tunnel. Current status of tunnel (up or down). Virtual domain the tunnel is part of. This index corresponds to the index used by fgVdTable. SSL VPN statistics table. SSL VPN statistics for a given virtual domain. Whether SSL-VPN is enabled on this virtual domain. The current number of users logged in through SSL-VPN tunnels in the virtual domain. The maximum number of total users that can be logged in at any one time on the virtual domain. The current number of active SSL web sessions in the virtual domain. The maximum number of active SSL web sessions at any one time within the virtual domain.
fgVonTunEntSelectorDstBeginIp 1.3.6.1.4.1.12356.101.12.2.2.1.11 fgVpnTunEntSelectorDstEndIp fgVpnTunEntSelectorDstPort fgVpnTunEntSelectorProto fgVpnTunEntLifeSecs 1.3.6.1.4.1.12356.101.12.2.2.1.12 1.3.6.1.4.1.12356.101.12.2.2.1.13 1.3.6.1.4.1.12356.101.12.2.2.1.14 1.3.6.1.4.1.12356.101.12.2.2.1.15
fgVpnTunEntLifeBytes
1.3.6.1.4.1.12356.101.12.2.2.1.16
fgVpnSslStatsLoginUsers
1.3.6.1.4.1.12356.101.12.2.3.1.2
fgVpnSslStatsMaxUsers
1.3.6.1.4.1.12356.101.12.2.3.1.3
fgVpnSslStatsActiveWebSessio ns
1.3.6.1.4.1.12356.101.12.2.3.1.4
fgVpnSslStatsMaxWebSessions 1.3.6.1.4.1.12356.101.12.2.3.1.5
372
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgVpnSslStatsActiveTunnels OID 1.3.6.1.4.1.12356.101.12.2.3.1.6 Description The current number of active SSL tunnels in the virtual domain. The maximum number of active SSL tunnels at any one time in the virtual domain. A list of active SSL VPN tunnel entries. An SSL VPN tunnel entry containing connection information and traffic statistics. An index value that uniquely identifies an active SSL VPN tunnel within the fgVpnSslTunnelTable. The index of the virtual domain this tunnel belongs to. This index corresponds to the index used by fgVdTable. The user name used to authenticate the tunnel. The source IP address of this tunnel. The connection IP address of this tunnel. The up-time of this tunnel in seconds. The number of incoming bytes of L2 traffic through this tunnel since it was established. The number of outgoing bytes of L2 traffic through this tunnel since it was established. Local gateway IP address. Used in VPN related traps. Remote gateway IP address. Used in VPN related traps.
fgVpnSslStatsMaxTunnels
1.3.6.1.4.1.12356.101.12.2.3.1.7
fgVpnSslTunnelTable fgVpnSslTunnelEntry
1.3.6.1.4.1.12356.101.12.2.4 1.3.6.1.4.1.12356.101.12.2.4.1
fgVpnSslTunnelIndex
1.3.6.1.4.1.12356.101.12.2.4.1.1
fgVpnSslTunnelVdom
1.3.6.1.4.1.12356.101.12.2.4.1.2
fgVpnSslTunnelBytesOut
1.3.6.1.4.1.12356.101.12.2.4.1.8
fgVpnTrapObjects fgVpnTrapLocalGateway fgVpnTrapRemoteGateway High Availability fgHighAvailability fgHaInfo fgHaSystemMode fgHaGroupId fgHaPriority fgHaOverride
1.3.6.1.4.1.12356.101.13 1.3.6.1.4.1.12356.101.13.1 1.3.6.1.4.1.12356.101.13.1.1 1.3.6.1.4.1.12356.101.13.1.2 1.3.6.1.4.1.12356.101.13.1.3 1.3.6.1.4.1.12356.101.13.1.4 High-availability mode (Standalone, A-A or A-P). HA cluster group ID device is configured for. HA clustering priority of the device (default = 127). Status of a master override flag.
373
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgHaAutoSync OID 1.3.6.1.4.1.12356.101.13.1.5 Description Configuration of an automatic configuration synchronization (enabled or disabled). Load-balancing schedule of cluster (in A-A mode). Ha cluster group name. Some useful statistics for all members of a cluster. This table is also available in standalone mode. Statistics for a particular HA cluster's unit. An index value that uniquely identifies an unit in the HA Cluster. Serial number of the HA cluster member for this row. CPU usage of the specified cluster member (percentage). Memory usage of the specified cluster member (percentage). Network bandwidth usage of specified cluster member (kbps). Current session count of specified cluster member. Number of packets processed by the specified cluster member since start up. Number of bytes processed by the specified cluster member since start up. Number of IDS/IPS events triggered on the specified cluster member since start up. Number of anti-virus events triggered on the specified cluster member since start up. Host name of the specified cluster member. Serial number of an HA cluster member. Used to identify the origin of a trap when a cluster is configured.
fgHaStatsEntry fgHaStatsIndex
1.3.6.1.4.1.12356.101.13.2.1.1 1.3.6.1.4.1.12356.101.13.2.1.1.1
fgHaStatsSerial fgHaStatsCpuUsage
1.3.6.1.4.1.12356.101.13.2.1.1.2 1.3.6.1.4.1.12356.101.13.2.1.1.3
fgHaStatsMemUsage
1.3.6.1.4.1.12356.101.13.2.1.1.4
fgHaStatsNetUsage
1.3.6.1.4.1.12356.101.13.2.1.1.5
fgHaStatsSesCount fgHaStatsPktCount
1.3.6.1.4.1.12356.101.13.2.1.1.6 1.3.6.1.4.1.12356.101.13.2.1.1.7
fgHaStatsByteCount
1.3.6.1.4.1.12356.101.13.2.1.1.8
fgHaStatsIdsCount
1.3.6.1.4.1.12356.101.13.2.1.1.9
fgHaStatsAvCount
1.3.6.1.4.1.12356.101.13.2.1.1.10
374
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgFmTrapGroup OID 1.3.6.1.4.1.12356.101.100.1 Description Traps are intended for use in conjunction with a FortiManager. These objects support the traps in the fgFmTrapGroup. Objects pertaining to administration of the device. Objects pertaining to the system status of the device. Objects pertaining to software running on the device. Object pertaining to hardware sensors on the device. Objects pertaining to High Availability clustering of FortiGate devices. Objects pertaining to Virtual Private Networking on FortiGate devices. Objects pertaining to Firewall functionality on FortiGate devices. Objects pertaining to application proxy and filtering services on FortiGate devices. Objects pertaining to Antivirus services on FortiGate devices. Objects pertaining to Intrusion Detection and Prevention services on FortiGate devices. Objects pertaining to FortiGate and FortiGuard based Web Filtering services on FortiGate devices. Objects pertaining to Virtual Firewall Domain services on FortiGate devices. Objects pertaining to the administration of FortiGate device. Objects pertaining to the interface table of FortiGate device. Objects pertaining to the processors table of FortiGate device. Notifications that can be generated from a FortiGate device.
fgHwSensorsObjectGroup
1.3.6.1.4.1.12356.101.100.6
fgHighAvailabilityObjectGroup
1.3.6.1.4.1.12356.101.100.7
fgVpnObjectGroup
1.3.6.1.4.1.12356.101.100.8
fgFirewallObjectGroup
1.3.6.1.4.1.12356.101.100.9
fgAppServicesObjectGroup
1.3.6.1.4.1.12356.101.100.10
fgAntivirusObjectGroup
1.3.6.1.4.1.12356.101.100.11
fgIntrusionPrevtObjectGroup
1.3.6.1.4.1.12356.101.100.12
fgWebFilterObjectGroup
1.3.6.1.4.1.12356.101.100.13
fgVirtualDomainObjectGroup
1.3.6.1.4.1.12356.101.100.14
fgAdministrationObjectGroup
1.3.6.1.4.1.12356.101.100.15
fgIntfObjectGroup
1.3.6.1.4.1.12356.101.100.16
fgProcessorsObjectGroup
1.3.6.1.4.1.12356.101.100.17
fgNotificationGropu
1.3.6.1.4.1.12356.101.100.18
375
Monitoring
Table 19: OIDs for the Fortinet-FortiGate-MIB MIB Field fgObsoleteNotificationsGroup OID 1.3.6.1.4.1.12356.101.100.19 Description Notifications that have been deprecated, but may still be generated by older models. Model and feature specific.
fgMIBCompliance
1.3.6.1.4.1.12356.101.100.100
376
Multicast forwarding
Multicasting (also called IP multicasting) consists of using a single multicast source to send data to many receivers. Multicasting can be used to send data to many receivers simultaneously while conserving bandwidth and reducing network traffic. Multicasting can be used for one-way delivery of media streams to multiple receivers and for one-way data transmission for news feeds, financial information, and so on. Also RIPv2 uses multicasting to share routing table information. A FortiGate unit can operate as a Protocol Independent Multicast (PIM) version 2 router. FortiGate units support PIM sparse mode (RFC 4601) and PIM dense mode (RFC 3973) and can service multicast servers or receivers on the network segment to which a FortiGate unit interface is connected. Multicast routing is not supported in Transparent mode (TP mode).
Note: To support PIM communications, the sending/receiving applications and all connecting PIM routers in between must be enabled with PIM version 2. PIM can use static routes, RIP, OSPF, or BGP to forward multicast packets to their destinations. To enable source-to-destination packet delivery, either sparse mode or dense mode must be enabled on the PIM-router interfaces. Sparse mode routers cannot send multicast messages to dense mode routers. In addition, if a FortiGate unit is located between a source and a PIM router, two PIM routers, or is connected directly to a receiver, you must create a security policy manually to pass encapsulated (multicast) packets or decapsulated data (IP traffic) between the source and destination.
A PIM domain is a logical area comprising a number of contiguous networks. The domain contains at least one Boot Strap Router (BSR), and if sparse mode is enabled, a number of Rendezvous Points (RPs) and Designated Routers (DRs). When PIM is enabled on a FortiGate unit, the FortiGate unit can perform any of these functions at any time as configured.
Sparse mode
Initially, all candidate BSRs in a PIM domain exchange bootstrap messages to select one BSR to which each RP sends the multicast address or addresses of the multicast group(s) that it can service. The selected BSR chooses one RP per multicast group and makes this information available to all of the PIM routers in the domain through bootstrap messages. PIM routers use the information to build packet distribution trees, which map each multicast group to a specific RP. Packet distribution trees may also contain information about the sources and receivers associated with particular multicast groups.
Note: When a FortiGate unit interface is configured as a multicast interface, sparse mode is enabled on it by default to ensure that distribution trees are not built unless at least one downstream receiver requests multicast traffic from a specific source. If the sources of multicast traffic and their receivers are close to each other and the PIM domain contains a dense population of active receivers, you may choose to enable dense mode throughout the PIM domain instead.
An RP represents the root of a non-source-specific distribution tree to a multicast group. By joining and pruning the information contained in distribution trees, a single stream of multicast packets (for example, a video feed) originating from the source can be forwarded to a certain RP to reach a multicast destination.
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
377
Dense mode
Multicast forwarding
Each PIM router maintains a Multicast Routing Information Base (MRIB) that determines to which neighboring PIM router join and prune messages are sent. An MRIB contains reverse-path information that reveals the path of a multicast packet from its source to the PIM router that maintains the MRIB. To send multicast traffic, a server application sends IP traffic to a multicast group address. The locally elected DR registers the sender with the RP that is associated with the target multicast group. The RP uses its MRIB to forward a single stream of IP packets from the source to the members of the multicast group. The IP packets are replicated only when necessary to distribute the data to branches of the RPs distribution tree. To receive multicast traffic, a client application can use Internet Group Management Protocol (IGMP) version 1 (RFC 1112), 2 (RFC 2236), or 3 (RFC 3376) control messages to request the traffic for a particular multicast group. The locally elected DR receives the request and adds the host to the multicast group that is associated with the connected network segment by sending a join message towards the RP for the group. Afterward, the DR queries the hosts on the connected network segment continually to determine whether the hosts are active. When the DR no longer receives confirmation that at least one member of the multicast group is still active, the DR sends a prune message towards the RP for the group.
Dense mode
The packet organization used in sparse mode is also used in dense mode. When a multicast source begins to send IP traffic and dense mode is enabled, the closest PIM router registers the IP traffic from the multicast source (S) and forwards multicast packets to the multicast group address (G). All PIM routers initially broadcast the multicast packets throughout the PIM domain to ensure that all receivers that have requested traffic for multicast group address G can access the information if needed. To forward multicast packets to specific destinations afterward, the PIM routers build distribution trees based on the information in multicast packets. Upstream PIM routers depend on prune/graft messages from downstream PIM routers to determine if receivers are actually present on directly connected network segments. The PIM routers exchange state refresh messages to update their distribution trees. FortiGate units store this state information in a Tree Information Base (TIB), which is used to build a multicast forwarding table. The information in the multicast forwarding table determines whether packets are forwarded downstream. The forwarding table is updated whenever the TIB is modified. PIM routers receive data streams every few minutes and update their forwarding tables using the source (S) and multicast group (G) information in the data stream. Superfluous multicast traffic is stopped by PIM routers that do not have downstream receiversPIM routers that do not manage multicast groups send prune messages to the upstream PIM routers. When a receiver requests traffic for multicast address G, the closest PIM router sends a graft message upstream to begin receiving multicast packets. FortiGate units operating in NAT/Route mode can also be configured as multicast routers. You can configure a FortiGate unit to be a Protocol Independent Multicast (PIM) router operating in Sparse Mode (SM) or Dense Mode (DM).
Multicast IP addresses
Multicast uses the Class D address space. The 224.0.0.0 to 239.255.255.255 IP address range is reserved for multicast groups. The multicast address range applies to multicast groups, not to the originators of multicast packets. Table 20 lists reserved multicast address ranges and describes what they are reserved for:
System Administration for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
378
Multicast forwarding
PIM Support
Table 20: Reserved Multicast address ranges Reserved Address Range 224.0.0.0 to 224.0.0.255 Use Notes
Used for network protocols on local In this range, packets are not forwarded networks. For more information, see by the router but remain on the local RFC 1700. network. They have a Time to Live (TTL) of 1. These addresses are used for communicating routing information. Global addresses used for multicasting data between organizations and across the Internet. For more information, see RFC 1700. Limited scope addresses used for local groups and organizations. For more information, see RFC 2365. Some of these addresses are reserved, for example, 224.0.1.1 is used for Network Time Protocol (NTP).
224.0.1.0 to 238.255.255.255
239.0.0.0 to 239.255.255.255
Routers are configured with filters to prevent multicasts to these addresses from leaving the local system.
PIM Support
A FortiGate unit can be configured to support PIM using the config router multicast CLI command. When PIM is enabled, the FortiGate unit allocates memory to manage mapping information. The FortiGate unit communicates with neighboring PIM routers to acquire mapping information and if required, processes the multicast traffic associated with specific multicast groups.
Note: The end-user multicast client-server applications must be installed and configured to initiate Internet connections and handle broadband content such as audio/video information.
Client applications send multicast data by registering IP traffic with a PIM-enabled router. An end-user could type in a class D multicast group address, an alias for the multicast group address, or a call-conference number to initiate the session. Rather than sending multiple copies of generated IP traffic to more than one specific IP destination address, PIM-enabled routers encapsulate the data and use the one multicast group address to forward multicast packets to multiple destinations. Because one destination address is used, a single stream of data can be sent. Client applications receive multicast data by requesting that the traffic destined for a certain multicast group address be delivered to them end-users may use phone books, a menu of ongoing or future sessions, or some other method through a user interface to select the address of interest. A class D address in the 224.0.0.0 to 239.255.255.255 range may be used as a multicast group address, subject to the rules assigned by the Internet Assigned Numbers Authority (IANA). All class D addresses must be assigned in advance. Because there is no way to determine in advance if a certain multicast group address is in use, collisions may occur (to resolve this problem, end-users may switch to a different multicast address). To configure a PIM domain 1 If you will be using sparse mode, determine appropriate paths for multicast packets. 2 Make a note of the interfaces that will be PIM-enabled. These interfaces may run a unicast routing protocol. 3 If you will be using sparse mode and want multicast packets to be handled by specific (static) RPs, record the IP addresses of the PIM-enabled interfaces on those RPs.
379
Multicast forwarding
4 Enable PIM version 2 on all participating routers between the source and receivers. On FortiGate units, use the config router multicast command to set global operating parameters. 5 Configure the PIM routers that have good connections throughout the PIM domain to be candidate BSRs. 6 If sparse mode is enabled, configure one or more of the PIM routers to be candidate RPs. 7 If required, adjust the default settings of PIM-enabled interface(s).
380
Multicast forwarding
Figure 46: Example multicast network including a FortiGate unit that forwards multicast packets
of ers oup b r m Me ast G .0 ic 68.4 t l u 1 M 39. r_3 2 ive e c Re r_2 ive e c Re ive r_1
Re
iv ce
er_
e ec
Multicast Forwarding Enabled Source address: 192.168.5.18 Source interface: internal Destination address: 239.168.4.0 Destination interface: external NAT IP: 192.168.18.10
Fo r int tiGat ern eex al 800 te I DM rnal P: 19 Z I IP: 2.1 P: 17 68 19 2.2 .5.1 2.1 0. 68 20. .6. 10 1
g 4 tin 0/2 ke 5. ar 8. M 16 2.
19
381
Multicast forwarding
Enter the following CLI command to enable multicast forwarding: config system settings set multicast-forward enable end If multicast forwarding is disabled and the FortiGate unit drops packets that have multicast source or destination addresses. You can also use the multicast-ttl-notchange keyword of the system settings command so that the FortiGate unit does not increase the TTL value for forwarded multicast packets. You should use this option only if packets are expiring before reaching the multicast router. config system settings set multicast-ttl-notchange enable end In Transparent mode, the FortiGate unit does not forward frames with multicast destination addresses. Multicast traffic such as the one used by routing protocols or streaming media may need to traverse the FortiGate unit, and should not be interfere with the communication. To avoid any issues during transmission, you can set up multicast security policies. These types of security policies can only be enabled using the CLI.
System Administration for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
382
Multicast forwarding
Note: The CLI parameter multicast-skip-policy must be disabled when using multicast security policies. To disable enter the command config system settings set multicast-skip-policy disable end
In this simple example, no check is performed on the source or destination interfaces. A multicast packet received on an interface is flooded unconditionally to all interfaces on the forwarding domain, except the incoming interface. To enable the multicast policy config firewall multicast-policy edit 1 set action accept end In this example, the multicast policy only applies to the source port of WAN1 and the destination port of Internal. To enable the restrictive multicast policy config firewall multicast-policy edit 1 set srcintf wan1 set dstinf internal set action accept end In this example, packets are allowed to flow from WAN1 to Internal, and sourced by the address 172.20.120.129. To enable the restrictive multicast policy config firewall multicast-policy edit 1 set srcintf wan1 set srcaddr 172.20.120.129 255.255.255.255 set dstinf internal set action accept end This example shows how to configure the multicast security policy required for the configuration shown in Figure 46 on page 381. This policy accepts multicast packets that are sent from a PC with IP address 192.168.5.18 to destination address range 239.168.4.0. The policy allows the multicast packets to enter the internal interface and then exit the external interface. When the packets leave the external interface their source address is translated to 192.168.18.10 config firewall multicast-policy edit 5 set srcaddr 192.168.5.18 255.255.255.255 set srcintf internal set destaddr 239.168.4.0 255.255.255.0 set dstintf external set nat 192.168.18.10 end
383
Multicast forwarding
This example shows how to configure a multicast security policy so that the FortiGate unit forwards multicast packets from a multicast Server with an IP 10.10.10.10 is broadcasting to address 225.1.1.1. This Server is on the network connected to the FortiGate DMZ interface. config firewall multicast-policy edit 1 set srcintf DMZ set srcaddr 10.10.10.10 255.255.255.255 set dstintf Internal set dstaddr 225.1.1.1 255.255.255.255 set action accept edit 2 set action deny end
384
Multicast forwarding
F E 0/ 23
(.
16
25
9.2
0)
54
.82
.0/
24
10 Cis co _3 75 0_ 2r ou
(. 1)
0/
24
23
(. 25 0)
0/
rn
al
(.
25 3)
te
ex
(. 1)
al
rn
in
te
25 0)
0/
24
(.
0/
23
(. 13 0)
The configuration uses a statically configured rendezvous point (RP) which resides on the Cisco_3750_1. Using a bootstrap router (BSR) was not tested in this example. See Example PIM configuration that uses BSR to find the RP on page 397 for an example that uses a BSR.
Configuration steps
The following procedures show how to configure the multicast configuration settings for the devices in the example configuration. Cisco_3750_1 router configuration Cisco_3750_2 router configuration To configure the FortiGate-800 unit Cisco_3750_3 router configuration
Cisco_3750_1 router configuration version 12.2 ! hostname Cisco-3750-1 ! switch 1 provision ws-c3750-24ts ip subnet-zero ip routing ! ip multicast-routing distributed
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
G R ro e up ce i 23 ve 3. r (. 25 12 4. 9) 20 0. 1
e rc ou t S 2.1 1 as .8 0. tic 4 20 ul 25 4. M 9. 25 16 3. 23
00 Cis co
_3
.31
.12
8.1
28
ter
/30
385
Multicast forwarding
! spanning-tree mode pvst no spanning-tree optimize bpdu transmission spanning-tree extend system-id ! interface Loopback0 ip address 169.254.100.1 255.255.255.255 ! interface FastEthernet1/0/23 switchport access vlan 182 switchport mode access ! interface FastEthernet1/0/24 switchport access vlan 172 switchport mode access ! interface Vlan172 ip address 10.31.138.1 255.255.255.0 ip pim sparse-mode ip igmp query-interval 125 ip mroute-cache distributed ! interface Vlan182 ip address 169.254.82.250 255.255.255.0 ip pim sparse-mode ip mroute-cache distributed ! ip classless ip route 0.0.0.0 0.0.0.0 169.254.82.1 ip http server ip pim rp-address 169.254.100.1 Source-RP ! ip access-list standard Source-RP permit 233.254.200.0 0.0.0.255 Cisco_3750_2 router configuration version 12.2 ! hostname Cisco-3750-2 ! switch 1 provision ws-c3750-24ts ip subnet-zero ip routing ! ip multicast-routing distributed ! spanning-tree mode pvst no spanning-tree optimize bpdu transmission spanning-tree extend system-id ! interface FastEthernet1/0/23 switchport access vlan 138 switchport mode access
386
Multicast forwarding
! interface FastEthernet1/0/24 switchport access vlan 182 witchport mode access ! interface Vlan138 ip address 10.31.138.250 255.255.255.0 ip pim sparse-mode ip mroute-cache distributed ! interface Vlan182 ip address 169.254.82.1 255.255.255.0 ip pim sparse-mode ip mroute-cache distributed ! ip classless ip route 0.0.0.0 0.0.0.0 10.31.138.253 ip route 169.254.100.1 255.255.255.255 169.254.82.250 ip http server ip pim rp-address 169.254.100.1 Source-RP ! ! ip access-list standard Source-RP permit 233.254.200.0 0.0.0.255 To configure the FortiGate-800 unit 1 Configure the internal and external interfaces. config system interface edit internal set vdom root set ip 10.31.130.1 255.255.255.0 set allowaccess ping https set type physical next edit external set vdom root set ip 10.31.138.253 255.255.255.0 set allowaccess ping set type physical end end 2 Add a firewall address for the RP. config firewall address edit RP set subnet 169.254.100.1/32 end 3 Add standard security policies to allow traffic to reach the RP. config firewall policy edit 1 set srcintf internal set dstintf external set srcaddr all
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
387
Multicast forwarding
set dstaddr RP set action accept set schedule always set service ANY next edit 2 set srcintf external set dstintf internal set srcaddr RP set dstaddr all set action accept set schedule always set service ANY end 4 Add the multicast security policy. config firewall multicast-policy edit 1 set dstaddr 233.254.200.0 255.255.255.0 set dstintf internal set srcaddr 169.254.82.0 255.255.255.0 set srcintf external end 5 Add an access list. config router access-list edit Source-RP config rule edit 1 set prefix 233.254.200.0 255.255.255.0 set exact-match disable next end 6 Add some static routes. config router static edit 1 set device internal set gateway 10.31.130.250 next edit 2 set device external set dst 169.254.0.0 255.255.0.0 set gateway 10.31.138.250 next 7 Configure multicast routing. config router multicast config interface edit internal set pim-mode sparse-mode config igmp set version 2 end next edit external
System Administration for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
388
Multicast forwarding
set pim-mode sparse-mode config igmp set version 2 end next end set multicast-routing enable config pim-sm-global config rp-address edit 1 set ip-address 169.254.100.1 set group Source-RP next Cisco_3750_3 router configuration version 12.2 ! hostname Cisco-3750-3 ! switch 1 provision ws-c3750-24ts ip subnet-zero ip routing ! ip multicast-routing distributed ! spanning-tree mode pvst no spanning-tree optimize bpdu transmission spanning-tree extend system-id ! interface FastEthernet1/0/23 switchport access vlan 128 switchport mode access ! interface FastEthernet1/0/24 switchport access vlan 130 switchport mode access ! interface Vlan128 ip address 10.31.128.130 255.255.255.252 ip pim sparse-mode ip mroute-cache distributed ! interface Vlan130 ip address 10.31.130.250 255.255.255.0 ip pim sparse-mode ip mroute-cache distributed ! ip classless ip route 0.0.0.0 0.0.0.0 10.31.130.1 ip http server ip pim rp-address 169.254.100.1 Source-RP ! !
389
Multicast forwarding
6.0
.0/
24 10
In
te rn al
(. 23 7)
er na l
T1
xt
In
te
rn
al
er na l
xt
(. 22 6)
po
rt 2
T3
po
rt
390
ec
ei
ve
(.
62
e rc ou .1 t S 55 as .2 tic 5 ul 25 M 9. 23 (. ) 11
.13
0.0
.0/
24
10
.13
2.0
.0/
24 10
.16
7.0
.0/
24
Multicast forwarding
FGT-3 # get router info multicast pim sparse-mode neighbour Neighbor Interface Uptime/Expires Ver Address Priority/Mode 10.132.0.156 port2 01:57:12/00:01:33 v2
DR 1 /
Breaking down each entry in detail: (*, 239.255.255.1) RP: 192.168.1.1 RPF nbr: 10.132.0.156 RPF idx: port2 Upstream State: JOINED Local: port3 Joined: Asserted: FCR:
391
Multicast forwarding
The RP will always be listed in a *,G entry, the RPF neighbor and interface index will also be shown. In this topology these are the same in all downstream PIM routers. The state is active so the upstream state is joined. In this case FGT-3 is the last hop router so the IGMP join is received locally on port3. There is no PIM outgoing interface listed for this entry as it is used for the upstream PIM join. (10.166.0.11, 239.255.255.1) RPF nbr: 10.132.0.156 RPF idx: port2 SPT bit: 1 Upstream State: JOINED Local: Joined: Asserted: Outgoing: port3 This is the entry for the SPT, no RP IS listed. The S,G stream will be forwarded out of the stated outgoing interface. (10.166.0.11, 239.255.255.1, rpt) RP: 192.168.1.1 RPF nbr: 10.132.0.156 RPF idx: port2 Upstream State: NOT PRUNED Local: Pruned: Outgoing: The above S,G,RPT state is created for all streams that have both a S,G and a *,G entry on the router. This is not pruned in this case because of the topology, the RP and source are reachable over the same interface. Although not seen in this scenario, assert states may be seen when multiple PIM routers exist on the same LAN which can lead to more than one upstream router having a valid forwarding state. Assert messages are used to elect a single forwarder from the upstream devices.
392
Multicast forwarding
393
Multicast forwarding
(10.166.0.11, 239.255.255.1) RPF nbr: 10.130.0.237 RPF idx: internal SPT bit: 1 Upstream State: JOINED Local: Joined: external Asserted: Outgoing: external The S,G entry shows that we have received a join on the external interface and the stream is being forwarded out of this interface. (10.166.0.11, 239.255.255.1, rpt) RP: 192.168.1.1 RPF nbr: 0.0.0.0 RPF idx: None Upstream State: PRUNED Local: Pruned: Outgoing: External The S,G,RPT is different from FGT-3 because FGT-2 is the RP, it has pruned back the SPT for the RP to the first hop router.
394
Multicast forwarding
The stream has been pruned back from the RP because the end-to-end SPT is flowing, there is no requirement for the stream to be sent to the RP in this case. (10.166.0.11, 239.255.255.1, rpt) RP: 0.0.0.0 RPF nbr: 10.130.0.156 RPF idx: external Upstream State: RPT NOT JOINED Local: Pruned: Outgoing:
This example only describes the configuration of FGT-2. FGT-2 performs NAT so that the receivers connected to FGT-3 receive the following translated multicast streams. If the multicast source sends multicast packets with a source and destination IP of 10.166.0.11 and 233.2.2.1; FGT-3 translates the source and destination IPs to 192.168.20.1 and 239.254.1.1 If the multicast source sends multicast packets with a source and destination IP of 10.166.0.11 and 233.3.3.1; FGT-3 translates the source and destination IPs to 192.168.20.10 and 239.254.3.1
395
Multicast forwarding
24
S D ou es rc tin e I a t P: io 1 n 0. IP 16 :2 6 33 .0. .3 11 N .3 A T .1
5.0
.0/
24
F G R T P 23 f -1 3. or 0. gr 0. ou 0/ p 8 s
10
.12
po rt 6
po rt 7
S D ou es rc tin e I at P: io 1 n 92 IP .1 :2 6 39 8.2 .2 0. 54 10 .3 .1
S D ou es rc tin e I a t P: io 1 n 0. IP 16 :2 6 33 .0. .2 11 N .2 A .1 T
S D ou es rc tin e I at P: io 1 n 92 IP .1 :2 6 39 8.2 .2 0. 54 1 .1 .1
F G B T S 23 R -3 9. a 25 nd 4. R 0. P 0/ fo 16 r g
ro up
To configure FGT-2 for DNAT multicast 1 Add a loopback interface. In the example, the loopback interface is named loopback. config system interface edit loopback set vdom root set ip 192.168.20.1 255.255.255.0 set type loopback next end 2 Add PIM and add a unicast routing protocol to the loopback interface as if it was a normal routed interface. Also add static joins to the loopback interface for any groups to be translated. config router multicast config interface edit loopback set pim-mode sparse-mode config join-group edit 233.2.2.1 next edit 233.3.3.1 next end next 3 In this example, to add firewall multicast policies, different source IP addresses are required so you must first add an IP pool:
396
10
.12
6.0
.0/
24
8 10 .12
7.0
.0/
24
Multicast forwarding
config firewall ippool edit Multicast_source set endip 192.168.20.20 set interface port6 set startip 192.168.20.10 next end 4 Add the translation security policies. Policy 2, which is the source NAT policy, uses the actual IP address of port6. Policy 1, the DNAT policy, uses an address from the IP pool. config firewall multicast-policy edit 1 set dnat 239.254.3.1 set dstaddr 233.3.3.1 255.255.255.255 set dstintf loopback set nat 192.168.20.10 set srcaddr 10.166.0.11 255.255.255.255 set srcintf port6 next edit 2 set dnat 239.254.1.1 set dstaddr 233.2.2.1 255.255.255.255 set dstintf loopback set nat 192.168.20.1 set srcaddr 10.166.0.11 255.255.255.255 set srcintf port6 next 5 Add a firewall multicast policy to forward the stream from the loopback interface to the physical outbound interface. This example is an any/any policy that makes sure traffic accepted by the other multicast policies can exit the FortiGate unit. config firewall multicast-policy edit 3 set dstintf port7 set srcintf loopback next
397
Multicast forwarding
5 35 co Cis witch s
Fo
rtiG
ate
-50 0A _
is c ro o 3 ut 6 er 40
ec _1 0A .1 50 .1 e- .1 a t 237 1 . 1 tiG r 1. .1 or fo 7. .1 F P 23 .1 8 R 23
ve
398
ec
ei
ve
Multicast forwarding
config router multicast config interface edit port6 set pim-mode sparse-mode next edit port1 set pim-mode sparse-mode next edit lo0 set pim-mode sparse-mode set rp-candidate enable config join-group edit 236.1.1.1 next end set rp-candidate-priority 1 next end set multicast-routing enable config pim-sm-global set bsr-allow-quick-refresh enable set bsr-candidate enable set bsr-interface lo0 set bsr-priority 200 end end
Configuration steps
In this sample, FortiGate-500A_1 is the RP for the group 228.1.1.1, 237.1.1.1, 238.1.1.1, and FortiGate-500A_4 is the RP for the other group which has a priority of1. OSPF is used in this example to distribute routes including the loopback interface. All firewalls have full mesh security policies to allow any to any. In the FortiGate-500A_1 configuration, the NAT policy translates source address 236.1.1.1 to 237.1.1.1 In the FortiGate-500A_4, configuration, the NAT policy translates source 236.1.1.1 to 238.1.1.1
399
Multicast forwarding
The following procedures include the CLI commands for configuring each of the FortiGate units in the example configuration. To configure FortiGate-500A_1 1 Configure multicast routing. config router multicast config interface edit port5 set pim-mode sparse-mode next edit port4 set pim-mode sparse-mode next edit lan set pim-mode sparse-mode next edit port1 set pim-mode sparse-mode next edit lo999 set pim-mode sparse-mode next edit lo0 set pim-mode sparse-mode set rp-candidate enable set rp-candidate-group 1 next end set multicast-routing enable config pim-sm-global set bsr-candidate enable set bsr-interface lo0 end end 2 Add multicast security policies. config firewall multicast-policy edit 1 set dstintf port5 set srcintf port4 next edit 2 set dstintf port4 set srcintf port5 next edit 3 next end 3 Add router access lists. config router access-list edit 1 config rule
System Administration for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
400
Multicast forwarding
edit 1 set prefix 228.1.1.1 255.255.255.255 set exact-match enable next edit 2 set prefix 237.1.1.1 255.255.255.255 set exact-match enable next edit 3 set prefix 238.1.1.1 255.255.255.255 set exact-match enable next end next end To configure FortiGate-500A_2 1 Configure multicast routing. config router multicast config interface edit "lan" set pim-mode sparse-mode next edit "port5" set pim-mode sparse-mode next edit "port2" set pim-mode sparse-mode next edit "port4" set pim-mode sparse-mode next edit "lo_5" set pim-mode sparse-mode config join-group edit 236.1.1.1 next end next end set multicast-routing enable end 2 Add multicast security policies. config firewall multicast-policy edit 1 set dstintf lan set srcintf port5 next edit 2 set dstintf port5 set srcintf lan next edit 4
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
401
Multicast forwarding
set dstintf lan set srcintf port2 next edit 5 set dstintf port2 set srcintf lan next edit 7 set dstintf port1 set srcintf port2 next edit 8 set dstintf port2 set srcintf port1 next edit 9 set dstintf port5 set srcintf port2 next edit 10 set dstintf port2 set srcintf port5 next edit 11 set dnat 237.1.1.1 set dstintf lo_5 set nat 5.5.5.5 set srcintf port2 next edit 12 set dstintf lan set srcintf lo_5 next edit 13 set dstintf port1 set srcintf lo_5 next edit 14 set dstintf port5 set srcintf lo_5 next edit 15 set dstintf port2 set srcintf lo_5 next edit 16 next end To configure FortiGate-500A_3 1 Configure multicast routing. config router multicast config interface
402
Multicast forwarding
edit port5 set pim-mode sparse-mode next edit port6 set pim-mode sparse-mode next edit lo0 set pim-mode sparse-mode set rp-candidate enable set rp-candidate-priority 255 next edit lan set pim-mode sparse-mode next end set multicast-routing enable config pim-sm-global set bsr-candidate enable set bsr-interface lo0 end end 2 Add multicast security policies. config firewall multicast-policy edit 1 set dstintf port5 set srcintf port6 next edit 2 set dstintf port6 set srcintf port5 next edit 3 set dstintf port6 set srcintf lan next edit 4 set dstintf lan set srcintf port6 next edit 5 set dstintf port5 set srcintf lan next edit 6 set dstintf lan set srcintf port5 next end To configure FortiGate-500A_4 1 Configure multicast routing. config router multicast config interface
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
403
Multicast forwarding
edit port6 set pim-mode sparse-mode next edit lan set pim-mode sparse-mode next edit port1 set pim-mode sparse-mode next edit lo0 set pim-mode sparse-mode set rp-candidate enable config join-group edit 236.1.1.1 next end set rp-candidate-priority 1 next end set multicast-routing enable config pim-sm-global set bsr-allow-quick-refresh enable set bsr-candidate enable set bsr-interface lo0 set bsr-priority 1 end end 2 Add multicast security policies. config firewall policy edit 1 set srcintf lan set dstintf port6 set srcaddr all set dstaddr all set action accept set schedule always set service ANY next edit 2 set srcintf port6 set dstintf lan set srcaddr all set dstaddr all set action accept set schedule always set service ANY next edit 3 set srcintf port1 set dstintf port6 set srcaddr all set dstaddr all set action accept
System Administration for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
404
Multicast forwarding
set schedule always set service ANY next edit 4 set srcintf port6 set dstintf port1 set srcaddr all set dstaddr all set action accept set schedule always set service ANY next edit 5 set srcintf port1 set dstintf lan set srcaddr all set dstaddr all set action accept set schedule always set service ANY next edit 6 set srcintf lan set dstintf port1 set srcaddr all set dstaddr all set action accept set schedule always set service ANY next edit 7 set srcintf port1 set dstintf port1 set srcaddr all set dstaddr all set action accept set schedule always set service ANY next edit 8 set srcintf port6 set dstintf lo0 set srcaddr all set dstaddr all set action accept set schedule always set service ANY next edit 9 set srcintf port1 set dstintf lo0 set srcaddr all set dstaddr all set action accept
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
405
Multicast forwarding
set schedule always set service ANY next edit 10 set srcintf lan set dstintf lo0 set srcaddr all set dstaddr all set action accept set schedule always set service ANY next end
406
Multicast forwarding
83.97.1.1 1.4.50.4
port6 lo0
0 3
v2/S v2/S
1 0
1 1
83.97.1.2 1.4.50.4
get router info multicast pim sparse-mode rp-mapping PIM Group-to-RP Mappings This system is the Bootstrap Router (v2) Group(s): 224.0.0.0/4 RP: 1.4.50.4 Info source: 1.4.50.4, via bootstrap, priority 1 Uptime: 02:20:32, expires: 00:01:58 RP: 1.4.50.3 Info source: 1.4.50.3, via bootstrap, priority 255 Uptime: 02:20:07, expires: 00:02:24 Group(s): 228.1.1.1/32 RP: 1.4.50.1 Info source: 1.4.50.1, via bootstrap, priority 192 Uptime: 02:18:24, expires: 00:02:06 Group(s): 237.1.1.1/32 RP: 1.4.50.1 Info source: 1.4.50.1, via bootstrap, priority 192 Uptime: 02:18:24, expires: 00:02:06 Group(s): 238.1.1.1/32 RP: 1.4.50.1 Info source: 1.4.50.1, via bootstrap, priority 192 Uptime: 02:18:24, expires: 00:02:06 get router info multicast pim sparse-mode bsr-info PIMv2 Bootstrap information This system is the Bootstrap Router (BSR) BSR address: 1.4.50.4 Uptime: 02:23:08, BSR Priority: 1, Hash mask length: 10 Next bootstrap message in 00:00:18 Role: Candidate BSR State: Elected BSR Candidate RP: 1.4.50.4(lo0) Advertisement interval 60 seconds Next Cand_RP_advertisement in 00:00:54
407
Multicast forwarding
408
IPv6
Internet Protocol version 6 (IPv6) is an Internet Layer protocol for packet-switched internetworks that has been designed to provide several advantages over Internet Protocol version 4 (IPv4). The Internet Engineering Task Force (IETF) has designated IPv6 as the successor of IPv4 for general use on the Internet. Both IPv6 and IPv4 define network layer protocols (how data is sent from one computer to another over packet-switched networks), however IPv6 has a much larger address space than IPv4. It can provide billions of unique IP addresses. A major transition period from IPv4 to IPv6 is under way. For a lengthy period networks will have to support both IPv4 and IPv6. The transition will not happen over night, simply because of the time required to convert equipment and applications to IPv6. In addition some legacy equipment and applications may never support IPv6 and will have to either be replaced or will require ongoing support as IT budgets permit. During this transition period, it will not be possible to operate an IPv6 network without also supporting IPv4. Most networks will become mixed networks that have to understand and route both IPv6 addresses and IPv4 addresses. To be able to support both IPv4 and IPv6, FortiOS implements a dual stack architecture that recognizes and separately routes both IPv4 and IPv6. In addition to routing, most vital FortiOS network and content protection security features now fully support for IPv6. This section includes: IPv6 overview FortiGate IPv6 configuration Transition from IPv4 to IPv6 Configuring FortiOS to connect to an IPv6 tunnel provider IPv6 troubleshooting Additional IPv6 resources
IPv6 overview
IP version 6 handles issues that weren't around decades ago when IPv4 was created such as running out of IP addresses, fair distributing of IP addresses, built-in quality of service (QoS) features, better multimedia support, and improved handling of fragmentation. A bigger address space, bigger default packet size, and more optional header extensions provide these features with flexibility to customize them to any needs. IPv6 has 128-bit addresses compared to IPv4's 32-bit addresses, effectively eliminating address exhaustion. This new very large address space will likely reduce the need for network address translation (NAT) since IPv6 provides more than a billion IP addresses for each person on Earth. All hardware and software network components must support this new address size, an upgrade that may take a while to complete and will force IPv6 and IPv4 to work side-by-side during the transition period. During that time FortiOS supports IPv4 and IPv6 will ensure a smooth transition for networks.
409
IPv6 overview
IPv6
Header-level extension Limited number of small IP options. Unlimited number of IPv6 extension headers. Fragmentation Control Protocols Minimum MTU Address assignment Address types Sender or any intermediate router allowed to fragment. Only sender may fragment.
Mixture of non-IP (ARP), ICMP and All control protocols based on other protocols. ICMPv6. 567 bytes one address per host Use of unicast, multicast and broadcast address types. Devices configured manually or with host configuration protocols such as DHCP. 1280 bytes multiple addresses per interface. Broadcast addressing no longer used, use of unicast, multicast and anycast address types Devices configure themselves independently using stateless auto configuration or use DHCP.
Address configuration
IPv6 addresses are assigned to interfaces rather than nodes, thereby recognizing that a node can have more than one interface, and you can assign more than one IPv6 address to an interface. In addition, the larger address space in IPv6 addresses allows flexibility in allocating addresses and routing traffic, and simplifies some aspects of address assignment and renumbering when changing Internet Service Providers. With IPv4, complex Classless Inter-Domain Routing (CIDR) techniques were developed to make the best use of the small address space. CIDR facilitates routing by allowing blocks of addresses to be grouped together into a single routing table entry. With IPv4, renumbering an existing network for a new connectivity provider with different routing prefixes is a major effort (see RFC 2071, Network Renumbering Overview: Why would I want it and what is it anyway? and RFC 2072, Router Renumbering Guide). With IPv6, however, it is possible to renumber an entire network ad hoc by changing the prefix in a few routers, as the host identifiers are decoupled from the subnet identifiers and the network provider's routing prefix. The size of each subnet in IPv6 is 264 addresses (64 bits), which is the square of the size of the entire IPv4 Internet. The actual address space utilized by IPv6 applications will most likely be small in IPv6, but both network management and routing will be more efficient.
IPv6 MTU
Maximum Transmission Unit (MTU) refers to the size (in bytes) of the largest packet or frame that a given layer of a communications protocol can pass onwards. A higher MTU brings higher bandwidth efficiency. IPv6 requires an MTU of at least 1280 bytes. With encapsulations (for example, tunneling), an MTU of 1500 or more is recommended.
410
IPv6
IPv6 overview
The (sub)network prefix part contains the site prefix (first three fields, 48 bits) and the subnet ID (next two fields, 16-bits), for a total of 64-bits. The information contained in these fields is used for routing IPv6 packets. The (sub)network prefix defines the site topology to a router by specifying the specific link to which the subnet has been assigned. The site prefix details the public topology allocated (usually by an Internet Service Provider, ISP) to your site. The subnet ID details the private topology (or site topology) to a router that you assign to your site when you configure your IPv6 network. The host part consists of the interface ID (or token) which is 64-bits in length and must be unique within the subnet. The length of the interface ID allows for the mapping of existing 48-bit MAC addresses currently used by many local area network (LAN) technologies such as Ethernet, and the mapping of 64-bit MAC addresses of IEEE 1394 (FireWire) and other future LAN technologies. The host is either configured automatically from the MAC address of the interface, or is manually configured.
Figure 51: IPv6 Address Format
IP address notation
IPv6 addresses are normally written as eight groups of four hexadecimal digits each, separated by a colon, for example:
2001:db8:3c4d:0d82:1725:6a2f:0370:6234
is a valid IPv6 address. There are several ways to shorten the presentation of an IPv6 address. Most IPv6 addresses do not occupy all of the possible 128 bits. This results in fields that are padded with zeros or contain only zeros. If a 4-digit group is 0000, it may be replaced with two colons (::), for example: 2001:db8:3c4d:0000:1725:6a2f:0370:6234 is the same IPv6 address as: 2001:db8:3c4d::1725:6a2f:0370:6234 Leading zeroes in a group may be omitted, for example (in the address above): 2001:db8:3c4d::1725:6a2f:370:6234 The double colon (::) must only be used once in an IP address, as multiple occurrences lead to ambiguity in the address translation. The following examples of shortened IP address presentations all resolve to the same address. 19a4:0478:0000:0000:0000:0000:1a57:ac9e 19a4:0478:0000:0000:0000::1a57:ac9e
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
411
IPv6 overview
IPv6
19a4:478:0:0:0:0:1a57:ac9e 19a4:478:0:0::1a57:ac9e 19a4:478::0:0:1a57:ac9e 19a4:478::1a57:ac9e All of these address presentations are valid and represent the same address. For IPv4-compatible or IPv4-mapped IPv6 addresses (see Address types on page 412), you can enter the IPv4 portion using either hexadecimal or dotted decimal, but the FortiGate CLI always shows the IPv4 portion in dotted decimal format. For all other IPv6 addresses, the CLI accepts and displays only hexadecimal.
Netmasks
As with IP addresses, hexadecimal notation replaces the dotted decimal notation of IPv4. IPv4 Classless Inter-Domain Routing (CIDR) notation can also be used. This notation appends a slash (/) to the IP address, followed by the number of bits in the network portion of the address.
Table 22: IPv6 address notation IP Address Netmask Network CIDR IP/Netmask 3ffe:ffff:1011:f101:0210:a4ff:fee3:9566 ffff:ffff:ffff:ffff:0000:0000:0000:0000 3ffe:ffff:1011:f101:0000:0000:0000:0000 3ffe:ffff:1011:f101:0210:a4ff:fee3:9566/64
Address scopes
Address scopes define the region where an address may be defined as a unique identifier of an interface. The regions are: local link (link-local), site network (site-local), and global network. Each IPv6 address can only belong to one zone that corresponds to its scope.
Address types
IPv6 addresses are classified into three groups - Unicast, Multicast, and Anycast.
Unicast
Identifies an interface of an individual node. Packets sent to a unicast address are sent to that specific interface. Unicast IPv6 addresses can have a scope reflected in more specific address names - global unicast address, link-local address, and unique local unicast address.
Multicast
Multicast addresses are assigned to a group of interfaces that typically belong to different nodes. A packet that is sent to a multicast address is delivered to all interfaces identified by the address. IPv6 multicast addresses are distinguished from unicast addresses by the value of the high-order octet of the addresses. A value of 0xFF (binary 11111111) identifies an address as a multicast address. Any other value identifies an address as a unicast address. The four least significant bits of the second address octet identify the address scope or the span over which the multicast address is propagated.
412
IPv6
IPv6 overview
Anycast
Anycast addresses are assigned to a group of interfaces usually belonging to different nodes. A packet sent to an anycast address is delivered to just one of the member interfaces, typically the nearest according to the router protocols choice of distance. They cannot be identified easily as their structure is the same as a normal unicast address, differ only by being injected into the routing protocol at multiple points in the network. When a unicast address is assigned to more than one interface (making it an anycast address), the address assigned to the nodes must be configured in such as way as to indicate that it is an anycast address. Interfaces configured for IPv6 must have at least one link-local unicast address and additional ones for site-local or global addressing. Link-local addresses are often used in network address autoconfiguration where no external source of network addressing information is available.
Special addresses
Special IPv6 addresses include unspecified and loopback addresses. For more information about IPv6 addresses, see RFC 4921, IP Version 6 Addressing Architecture The IPv6 address space is split into scopes, or address scopes. The table below indicates which IPv6 address is used.
Table 23: IPv6 addresses with prefix information Address Type Embedded IPv4 address Loopback Binary Prefix IPv6 Notation Uses Prefix for embedding IPv4 address in an IPv6 address. Used as a node to send an IPv6 packet to itself. Seen as link-local unicast address of a virtual interface (loopback interface) to an imaginary link that goes nowhere. Must never be assigned to a physical interface, or as the source address of IPv6 packets that are sent outside of the single node. IPv6 destination address of loopback should not be sent outside a single node, and never forwarded by an IPv6 router. Equivalent to 127.0.0.1 in IPv4. RFC 246022 Global unicast and anycast. RFC 429120 Global unicast and anycast (unallocated) Teredo - RFC 438023 Nonroutable. Documentation purposes only - RFC 384924 Used for communication between two nodes running both IPv4 and IPv6 over the Internet. Formed by combining the IPv6 prefix with the 32-bits of the public IPv4 address of the node, creating a 48-bit address prefix. - RFC 3056
001 01 - 1111 1000 0 0010 0000 000 0001 0000 0000 000 0000 0010 0000 0000 0001 1101 1000 1000 0000 0010 0000 0000 0010
413
IPv6 overview
IPv6
Table 23: IPv6 addresses with prefix information Address Type 6Bone Binary Prefix 0011 1111 1111 1110 IPv6 Notation 3FFE::/16 Uses Deprecated. 6Bone testing assignment 1996 to mid-2006 RFC 370125 Used for addressing on a single link for automatic address configuration, neighbor discovery, or when no routers are present. Routers must not forward packets with link-local source or destination addresses.. Used for addressing inside of a site without needing a global prefix. Routers must not forward packets with site-local source or destination addresses outside of the site. RFC 387926 Unicast unique local address space, unicast and anycast RFC 419327 Multicast address space RFC 4291 For more information, see Multicast on page 412.
FE80::/10
Reserved
1111 1110 11
FEC0::/10
1111 110
FC00::/7
1111 1111
FF00::/8
Header Extension
The base header of an IPv6 address is fixed for efficient processing. Header extensions are indicated by the next header value in the next header field. Header extensions are optional and do not need to be present in all IPv6 packets. The sequence for the next header in order is represented by the diagram below.
Hop-by-Hop Options Header Destinations OPtions Routing Header Header Router Authentication Encapsulation on Security Header Payload Destination Mobility Options TCP/UDP/ Header Header SCTP (MIPv6) Destination
IPv6 Header
Fragment Header
Payload
The last header extension is the value of either 6 for TCP, 17 for UDP, 132 for SCTP or any other transport protocol defined by the IETF. Header extensions appear in the follwoing sequence: Hop-by-Hop Options Header First Extension Header Next Header value of 0 indicates the Hop-by-Hop Options Extension Header All nodes along the route or path must process this extension header Second Extension Header Next Header value of 43 indicates the Routing Extension Header All nodes along the route or path must process this extension header Note that the Routing Header Type 0 is due to security reason depreciated
Routing Header
414
IPv6
IPv6 overview
Fragmentation Header Third Extension Header Next Header value of 44 indicates the Fragmentation Extension Header Used in case of transmitting payload longer than a IPv6 packet can carry Fourth Extension Header Next Header value of 50 indicates the Authentication Extension Header Used to provide protection against replay, origin authentication and connectionless integrity Fifth Extension Header Next Header value of 51 indicates the ESP Extension Header Used to provide protection against replay, origin authentication and connectionless integrity Sixth Extension Header Next Header value of 60 indicates the Destination Options Header Used to provide additional information for the end systems node Seventh Extension Header Next Header value of 135 indicates the Mobility Header Used by mobile nodes to exchange information for Mobile IP nodes (MIPv6)
Mobility Header
Table 24: Header and Protocol Types Extension Header Hop-by hop Options Routing Fragment Destination Options Authentication Header (AH) Encapsulating Security Payload Mobility Protocol TCP UDP IPv6-in-IPv6 GRE ICMPv6 No next header OSPF PIM SCTP Type 0 43 44 60 50 51 135 Type 6 17 41 47 58 59 89 103 132
415
IPv6 overview
IPv6
To facilitate neighbor discovery, routers periodically send messages advertising their availability. This communication includes lists of the address prefixes for destinations available on each routers interfaces. ND defines five different Internet Control Message Protocol (ICMP) packet types: a pair of Neighbor Solicitation and Neighbor Advertisement messages, a pair of Router Solicitation and Router Advertisement messages, and a Redirect message. A Neighbor Solicitation is sent by a node to determine the link-layer address of a neighbor, or to verify that a neighbor is still reachable via a cached link-layer address. Also used for Duplicate Address Detection (how a node determines that an address it wants to use is not already in use by another node). The Neighbor Advertisement message is a response to a Neighbor Solicitation message. A node may also announce a link-layer address change by sending unsolicited Neighbor Advertisements. A host may send a Router Solicitation when an interface becomes enabled, requesting routers to generate a Router Advertisement immediately rather than at their next scheduled time. Routers advertise their presence together with various link and Internet parameters according to a specific schedule or in response to a Router Solicitation message. A Router Advertisement contains prefixes used for on-link determination and/or address configuration, a suggested hop limit value, etc. The Redirect message is used by routers to inform hosts of a better first-hop for a destination. For more information, see RFC 2461, Neighbor Discovery for IP Version 6 (IPv6).
416
IPv6
FortiGate units are dual IP layer IPv6/IPv4 nodes and they support IPv6 over IPv4 tunneling. For more information, see RFC 2893, Transition Mechanisms for IPv6 Hosts and Routers and RFC 2185, Routing Aspects of IPv6 Transition.
417
IPv6
IP v6 el nn tu e r v6 o k IP b r r ve e l -o nn v6 tu IP 4 v IP al rn te k In or v6 tw IP Ne
Steps to connect to an IPv6 tunnel broker 1 Create a SIT-Tunnel Interface 2 Create a static IPv6 Route into the Tunnel-Interface 3 Assign your IPv6 Network to your FortiGate 4 Create a Firewall-Policy to allow Traffic from LAN to the Tunnel-Interface
418
IPv6
Now that the tunnel exists, some additional interface commands are required. Such as enabling ping6 for troubleshooting and allow HTTPS and SSH administration connections to the interface. config system interface edit HE_ip6_broker config ipv6 set ip6-allowaccess ping https ssh end next end
Create a security policy to allow traffic from port1 to the tunnel interface
With the tunnel configured, it will appear as an interface in the Network interface list. That means the next step is to add a security policies to allow traffic to and from the tunnel.
419
IPv6
config firewall policy6 edit 2 set srcintf port1 set dstintf HE_ip6_broker set srcaddr "::/0" set dstaddr "::/0" set action accept set schedule "always" set service "ANY" set logtraffic enable next end
420
IPv6
421
IPv6
config ip6-extra-addr edit <ipv6_addr> end config ip6-prefix-list set autonomous-flag <enable | disable> set onlink-flag <enable | disable> set preferred-life-time <integer> set valid-life-time <integer> end end end
Static routing
Static routing for IPv6 is essentially the same as with IPv4. From a configuration point of view, the only difference is the type of addresses used. When both IPv4 and IPv6 static routes are configured, they are displayed under two separate headings on the static routing page - Route and IPv6 Route. Use the arrows next to each heading to expand or minimize that list of routes. To configure IPv6 static routes - web-based manager 1 Go to Router > Static > Static Route. 2 Select arrow to expand the Create New menu. 3 Select IPv6 Route. 4 Enter Destination IP/Mask, Device, Gateway, Distance, and Priority as with normal static routing using IPv6 addresses. 5 Select OK. To configure IPv6 static routes - CLI Use the following command to add an IPv6 static route:
config router static6 edit 1 set dst <ipv6_addr> set gateway <ipv6_addr> set device <interface> set priority <integer>
end
Dynamic routing
As with static routing, the dynamic routing protocols all have IPv6 versions. Both IPv4 and IPv6 dynamic routing can be running at the same time due to the dual stack architecture of the FortiGate unit. IPv6 dynamic routing must be configured using CLI commands.
Table 25: Dynamic routing protocols, IPv6 versions, CLI command, and RFCs Dynamic Routing RIP IPv6 CLI command IPv6 RFC
RFC 2080
422
IPv6
Table 25: Dynamic routing protocols, IPv6 versions, CLI command, and RFCs BGP BGP4+ config router bgp All parts of bgp that include IP addresses have IPv4 and IPv6 versions. config rotuer ospf6
OSPF
OSPFv3
To configure DHCP use the following command set: config system dhcp6 server edit 1 set domain example.com set interface port3 config ip-range edit 1 set end-ip 2800:68:15:3::10 set start-ip 2800:68:15:3::1 end set option1 50 'AABB' set subnet 2800:68:15:3::/64 set dns-server1 2800:68:15:3::2 set dns-server2 2800:68:15:3::29 set dns-server3 2800:68:15:3::28 set enable enable end end For more information on the commands, see the CLI Reference.
423
IPv6
The syntax for the IPv6 over IPv4 tunneling CLI command is: config system sit-tunnel edit <name_string> set destination <ipv4_addr> set interface <interface_string> set ip6 <ipv6_addr> set source <ipv4_addr> next end <name_string> destination <ipv4_addr> interface <interface_string> ip6 <ipv6_addr> source <ipv4_addr>
This will be the name of the tunnel, and appear in the network interface list. It should be descriptive such as my_ip6_tunnel. The maximum length allowed is 15 characters. This is the tunnel brokers IPv4 server address. It is one of the two ends of the tunnel. This interface is the interface the tunnel piggy backs on. Generally this should be the external interface of the FortiGate unit. This setting is optional if you dont have a fixed IP address from your ISP. The IPv6 address of the tunnel. This is the FortiGate unit end of the tunnel. It is just like any other FortiGate unit interface address. If this address is DHCP-based, it will change. In that case you should ensure the netmask covers the possible range of addresses. It is possible to use 0.0.0.0 to cover all possible addresses if you have a DDNS or PPPoE connection where the address changes.
For more configuration of tunnels see Configuring FortiOS to connect to an IPv6 tunnel provider on page 417.
424
IPv6
The VPN gateways have IPv6 addresses. The protected networks have IPv4 addresses. The phase 2 configurations at either end use IPv4 selectors. The VPN gateways have IPv4 addresses. The protected networks use IPv6 addresses. The phase 2 configurations at either end use IPv6 selectors.
Compared with IPv4 IPsec VPN functionality, there are some limitations: Except for IPv6 over IPv4, remote gateways with Dynamic DNS are not supported. This is because FortiOS 3.0 does not support IPv6 DNS. You cannot use RSA certificates in which the common name (cn) is a domain name that resolves to an IPv6 address. This is because FortiOS 3.0 does not support IPv6 DNS. DHCP over IPsec is not supported, because FortiOS 3.0 does not support IPv6 DHCP. Selectors cannot be firewall address names. Only IP address, address range and subnet are supported. Redundant IPv6 tunnels are not supported.
Certificates
On a VPN with IPv6 phase 1 configuration, you can authenticate using VPN certificates in which the common name (cn) is an IPv6 address. The cn-type keyword of the user peer command has an option, ipv6, to support this.
Phase 1 configuration
In the web-based manager, you define the Phase 1 as IPv6 in the Advanced settings. Enable the IPv6 Version check box. You can then enter an IPv6 address for the remote gateway. In the CLI, you define an IPsec phase 1 configuration as IPv6 by setting ip-version to 6. Its default value is 4. Then, the local-gw and remote-gw keywords are hidden and the corresponding local-gw6 and remote-gw6 keywords are available. The values for local-gw6 and remote-gw6 must be IPv6 addresses. For example: config vpn ipsec phase1-interface edit tunnel6 set ip-version 6 set remote-gw6 0:123:4567::1234 set interface port3 set proposal 3des-md5 end
425
IPv6 troubleshooting
IPv6
Phase 2 configuration
To create an IPv6 IPsec phase 2 configuration in the web-based manager, you need to define IPv6 selectors in the Advanced settings. Change the default 0.0.0.0/0 address for Source address and Destination address to the IPv6 value ::/0. If needed, enter specific IPv6 addresses, address ranges or subnet addresses in these fields. In the CLI, set src-addr-type and dst-addr-type to ip6, range6 or subnet6 to specify IPv6 selectors. By default, zero selectors are entered, ::/0 for the subnet6 address type, for example. The simplest IPv6 phase 2 configuration looks like the following: config vpn ipsec phase2-interface edit tunnel6_p2 set phase1name tunnel6 set proposal 3des-md5 set src-addr-type subnet6 set dst-addr-type subnet6 end
Security policies
To complete the VPN configuration, you need a security policy in each direction to permit traffic between the protected networks port and the IPsec interface. You need IPv6 policies unless the VPN is IPv4 over IPv6.
Routing
Appropriate routing is needed for both the IPsec packets and the encapsulated traffic within them. You need a route, which could be the default route, to the remote VPN gateway via the appropriate interface. You also need a route to the remote protected network via the IPsec interface. To create a static route in the web-based manager, go to Router > Static > Static Route. Select the drop-down arrow for Create New and select IPv6 Route. Enter the information and select OK. In the CLI, use the router static6 command. For example, where the remote network is fec0:0000:0000:0004::/64 and the IPsec interface is toB: config router static6 edit 1 set device port2 set dst 0::/0 next edit 2 set device toB set dst fec0:0000:0000:0004::/64 next end If the VPN is IPV4 over IPv6, the route to the remote protected network is an IPv4 route. If the VPN is IPv6 over IPv4, the route to the remote VPN gateway is an IPv4 route.
IPv6 troubleshooting
There are a number of troubleshooting methods that can be used with IPv6 issues.
ping6
The main method of troubleshooting IPv6 traffic is using the IPv6 version of ping.
System Administration for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
426
IPv6
IPv6 troubleshooting
You can use the IPv6 ping command to: send an ICMP echo request packet to the IPv6 address that you specify. specify a source interface other than the one from which the probe originates by using the source interface keywords. specify a source IP address other than the one from which the probe originates by using the source address keywords
sweep sizes
The following characters may appear in the display after the ping command is issued: ! - reply received . - timed out while waiting for a reply ? - unknown packet type A - admin unreachable b - packet too big H - host unreachable N - network unreachable P - port unreachable p - parameter problem S - source beyond scope t - hop limit expired (TTL expired)
427
IPv6 troubleshooting
IPv6
-i interval
-Q tos
-q -R
428
IPv6
IPv6 troubleshooting
-r
Bypass the normal routing tables and send directly to a host on an attached interface. If the host is not on a directly-attached network, an error is returned. This option can be used to ping a local host through an interface that has no route through it provided the option -I is also used. Specifies the number of data bytes to be sent. The default is 56, which translates into 64 ICMP data bytes when combined with the 8 bytes of ICMP header data. Set socket sndbuf (send buffer). If not specified, it is selected to buffer not more than one packet. Set the IP Time to Live. Set special IP timestamp options. May be either tsonly (only timestamps), tsandaddr (timestamps and addresses) or tsprespec host1 [host2 [host3 [host4]]] (timestamp prespecified hops). Select Path MTU Discovery strategy. hint may be either do (prohibit fragmentation, even local one), want (do PMTU discovery, fragment locally when packet size is large), or dont (do not set DF flag). Print full user-to-user latency (the old behavior). Normally ping prints network round trip time, which can be different f.e. due to DNS failures. Verbose output. Show version and exit. Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received. In this case ping does not stop after count packet are sent, it waits either for deadline expire or until count probes are answered or for some error notification from network. Time to wait for a response, in seconds. The option affects only timeout in absence of any responses, otherwise ping waits for two RTTs.
-U -v -V -w deadline
-W timeout
Examples
Ping a global V6 address with a 1400 byte packet from FortiGate CLI: execute ping6 s 1400 2001:480:332::10 Ping a multicast group using a ping6 command on FortiGate CLI ( -I and port name must be specified for CLI ping6 command to ping v6 multicast group): execute ping6 I port1 ff02::1 Ping a localnet v6 address from FortiGate CLI: execute ping6 FE80:0:0:0:213:e8ff:fe9e:ccf7 This address would normally be written as FE80::213:e8ff:fe9e:ccf7.
429
IPv6 troubleshooting
IPv6
diagnose sniffer packet any 'ip6 and tcp port 80' 4 10 interfaces=[any] filters=[ip6 and tcp port 80] 1 LAN in 2001:4dd0:ff42:72:21b:63ff:fe08:e071.53037 -> 2a00:1450:8007::63.80: syn 2298823882 2 test6 out 2001:4dd0:ff42:72:21b:63ff:fe08:e071.53037 -> 2a00:1450:8007::63.80: syn 2298823882 3 test6 in 2a00:1450:8007::63.80 -> 2001:4dd0:ff42:72:21b:63ff:fe08:e071.53037: syn 4218782319 ack 4 LAN out 2a00:1450:8007::63.80 -> 2001:4dd0:ff42:72:21b:63ff:fe08:e071.53037: syn 4218782319 ack 5 LAN in 2001:4dd0:ff42:72:21b:63ff:fe08:e071.53037 -> 2a00:1450:8007::63.80: ack 4218782320 6 test6 out 2001:4dd0:ff42:72:21b:63ff:fe08:e071.53037 -> 2a00:1450:8007::63.80: ack 4218782320
430
IPv6
diagnose ipv6 neighbor-cache Add, delete, flush, or list the IPv6 ARP table or table entry. diagnose sys session6 tree diagnose ipv6 Clear, filter, full-stat, list, stat IPv6 sessions. View all the diagnose IPv6 commands.
RFC 2460, Internet Describes functionality, configuration of http://www.ietf.org/rfc/rfc2460 Protocol, Version 6 (IPv6) IP version 6 (IPv6) and differences from Specification IPv4. RFC 2461, Neighbor Describes the features and functions of http://www.ietf.org/rfc/rfc2461 Discovery for IP Version 6 IPv6 Neighbor Discovery protocol (IPv6) RFC 2462, IPv6 Stateless Specifies the steps a host takes in Address Autoconfiguration deciding how to autoconfigure its interfaces in IPv6 http://www.ietf.org/rfc/rfc2462
RFC 2893, Transition Specifies IPv4 compatibility mechanisms http://www.ietf.org/rfc/rfc2893 Mechanisms for IPv6 Hosts that can be implemented by IPv6 hosts and Routers and routers RFC 3306, Unicast-Prefix- Describes the format and types of Ipv6 Based IPv6 Multicast multicast addresses Addresses RFC 3484, Default Describes the algorithms used in IPv6 Address Selection for default address selection Internet protocol version 6 (IPv6) RFC 3513, Internet Protocol version 6 (IPv6) Addressing Architecture RFC 3587, IPv6 Global Unicast Address Format http://www.ietf.org/rfc/rfc3306
http://www.ietf.org/rfc/rfc3484
Contains details about the types of IPv6 http://www.ietf.org/rfc/rfc3513 addresses and includes examples Defines the standard format for IPv6 unicast addresses http://www.ietf.org/rfc/rfc3587
431
IPv6
432
Virtual LANs
Virtual Local Area Networks (VLANs) multiply the capabilities of your FortiGate unit, and can also provide added network security. Virtual LANs (VLANs) use ID tags to logically separate devices on a network into smaller broadcast domains. These smaller domains forward packets only to devices that are part of that VLAN domain. This reduces traffic and increases network security. A Local Area Network (LAN) is a group of connected computers and devices that are arranged into network broadcast domains. A LAN broadcast domain includes all the computers that receive a packet broadcast from any computer in that broadcast domain. A switch will automatically forward the packets to all of its ports; in contrast, routers do not automatically forward network broadcast packets. This means routers separate broadcast domains. If a network has only switches and no routers, that network is considered one broadcast domain, no matter how large or small it is. Smaller broadcast domains are more efficient because fewer devices receive unnecessary packets. They are more secure as well because a hacker reading traffic on the network will have access to only a small portion of the network instead of the entire networks traffic. Virtual LANs (VLANs) use ID tags to logically separate a LAN into smaller broadcast domains. Each VLAN is its own broadcast domain. Smaller broadcast domains reduce traffic and increase network security. The IEEE 802.1Q standard defines VLANs. All layer-2 and layer-3 devices along a route must be 802.1Q-compliant to support VLANs along that route. For more information, see VLAN switching and routing on page 434 and VLAN layer-3 routing on page 437. VLANs reduce the size of the broadcast domains by only forwarding packets to interfaces that are part of that VLAN or part of a VLAN trunk link. Trunk links form switch-to-switch or switch-to-router connections, and forward traffic for all VLANs. This enables a VLAN to include devices that are part of the same broadcast domain, but physically distant from each other. VLAN ID tags consist of a 4-byte frame extension that switches and routers apply to every packet sent and received in the VLAN. Workstations and desktop computers, which are commonly originators or destinations of network traffic, are not an active part of the VLAN processall the VLAN tagging and tag removal is done after the packet has left the computer. For more information, see VLAN ID rules on page 434. Any FortiGate unit without VDOMs enabled can have a maximum of 255 interfaces in transparent operating mode. The same is true for any single VDOM. In NAT/Route operating mode, the number can range from 255 to 8192 interfaces per VDOM, depending on the FortiGate model. These numbers include VLANs, other virtual interfaces, and physical interfaces. To have more than 255 interfaces configured in transparent operating mode, you need to configure multiple VDOMs that enable you to divide the total number of interfaces over all the VDOMs. One example of an application of VLANs is a companys accounting department. Accounting computers may be located at both main and branch offices. However, accounting computers need to communicate with each other frequently and require increased security. VLANs allow the accounting network traffic to be sent only to accounting computers and to connect accounting computers in different locations as if they were on the same physical subnet.
433
VLAN ID rules
Virtual LANs
Note: This guide uses the term packet to refer to both layer-2 frames and layer-3 packets.
VLAN ID rules
Layer-2 switches and layer-3 devices add VLAN ID tags to the traffic as it arrives and remove them before they deliver the traffic to its final destination. Devices such as PCs and servers on the network do not require any special configuration for VLANs. Twelve bits of the 4-byte VLAN tag are reserved for the VLAN ID number. Valid VLAN ID numbers are from 1 to 4094, while 0 is used for high priority frames, and 4095 is reserved. On a layer-2 switch, you can have only one VLAN subinterface per physical interface, unless that interface is configured as a trunk link. Trunk links can transport traffic for multiple VLANs to other parts of the network. On a FortiGate unit, you can add multiple VLANs to the same physical interface. However, VLAN subinterfaces added to the same physical interface cannot have the same VLAN ID or have IP addresses on the same subnet. You can add VLAN subinterfaces with the same VLAN ID to different physical interfaces. Creating VLAN subinterfaces with the same VLAN ID does not create any internal connection between them. For example a VLAN ID of 300 on port1 and VLAN ID of 300 on port2 are allowed, but they are not connected. Their relationship is the same as between any two FortiGate network interfaces.
434
Virtual LANs
Table 27: How ports and VLANs are used on Switch A and B Switch A A A&B B B Ports 1-4 5-7 8 4-5 6 VLAN 100 200 Trunk link 100 200
In this example, switch A is connected to the Branch Office and switch B to the Main Office. 1 A computer on port 1 of switch A sends a data frame over the network.
N LA 10 0 O ch ffic e A VL N2 00
Br
an
5-
Fra
me
S w
V
P
N LA
10
or
ts 14
tr t8 or .1Q 2 80
or
ts t8
4, P or
k lin k
2 Switch A tags the data frame with a VLAN 100 ID tag upon arrival because port 1 is part of VLAN 100. 3 Switch A forwards the tagged data frame to the other VLAN 100 portsports 2 through 4. Switch A also forwards the data frame to the 802.1Q trunk link (port 8) so other parts of the network that may contain VLAN 100 groups will receive VLAN 100 traffic.
P or ts h itc A
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
un
Ma
in
fic Of
N LA
20
h itc w S B
435
Virtual LANs
This data frame is not forwarded to the other ports on switch A because they are not part of VLAN 100. This increases security and decreases network traffic.
N LA 10 0 h fice Of V N LA 20 0
c ran
57
P or ts
Fra
me
V
un tr t8 or Q P 2.1 80
N LA
10
P or ts
4, 5 t8 or P ink l
4 Switch B receives the data frame over the trunk link (port 8). 5 Because there are VLAN 100 ports on switch B (ports 4 and 5), the data frame is forwarded to those ports. As with switch A, the data frame is not delivered to VLAN 200. If there were no VLAN 100 ports on switch B, the switch would not forward the data frame and it would stop there.
N1 00 h nc fice Of VL 00
ts or P 4 1w S h itc A
ain
fice Of
A VL
N2
00
h itc w S
2 AN
A VL
Bra
5-
Fra
me
A VL
N1
or
00
ts 14 P P or ts t8 4, P or
k lin k tr t8 or 1Q 2. 80
P or ts S w h itc A
un
Ma
in
fice Of
N LA
20
h itc w S B
436
Virtual LANs
6 The switch removes the VLAN 100 ID tag before it forwards the data frame to an end destination. The sending and receiving computers are not aware of any VLAN tagging on the data frames that are being transmitted. When any computer receives that data frame, it appears as a normal data frame.
The data frame may be forwarded to another VLAN, sent to a regular non-VLAN-tagged network or just forwarded to the same VLAN as a layer-2 switch would do. Or, the data frame may be discarded if the proper security policy has been configured to do so.
437
Virtual LANs
This example explains how traffic can change VLANsoriginating on VLAN 100 and arriving at a destination on VLAN 300. Layer-2 switches alone cannot accomplish this, but a layer-3 router can. 1 The VLAN 100 computer at the Branch Office sends the data frame to switch A, where the VLAN 100 tag is added.
A VL N1 00 ch O e ffic A VL N2 00
an Br
Fra
me
P or ts t8 or Q P 2.1
80 tr un k lin
57 A w S h itc B
or
t1
ts or P 4 1h itc w S
t or P
rt 1 Po 300 N A VL
3
in Ma fic Of e
P or t5
V N LA 30 0
438
Virtual LANs
2 Switch A forwards the tagged data frame to the FortiGate unit over the 802.1Q trunk link, and to the VLAN 100 interfaces on Switch A. Up to this point everything is the same as in the layer-2 example.
N LA 10 0 hO e ffic A VL N2 00
Bra
nc
P P
tr t8 or .1Q 2 80
or ts
57 4 1w h itc A h itc w S B
or
t1
3 The FortiGate unit removes the VLAN 100 tag, and inspects the content of the data frame. The FortiGate unit uses the content to select the correct security policy and routing options.
P ts or S
Fra
li n k
me
P t3 or
un k
rt 1 Po 300 AN VL M
ain
fice Of
P or t5
VL
AN
30
439
Virtual LANs
4 The FortiGate units security policy allows the data frame to go to VLAN 300 in this example. The data frame will be sent to all VLAN 300 interfaces, but in the example there is only oneport 1 on the FortiGate unit. Before the data frame leaves, the FortiGate unit adds the VLAN ID 300 tag to the data frame. This is the step that layer 2 cannot do. Only layer 3 can retag a data frame as a different VLAN.
A VL N1 00 ch O e ffic A VL N2 00
n Bra
P P
tr t8 or .1Q 2 80 un
or ts A h itc w S B
k lin
57 4 1w h itc
or
t1
P ts or S
P t3 or
Fra
me
rt 1 Po 300 AN VL M
ain
fice Of
P or t5
VL
AN
30
440
Virtual LANs
5 Switch B receives the data frame, and removes the VLAN ID 300 tag, because this is the last hop, and forwards the data frame to the computer on port 5.
AN 10 0 h fice Of A VL N2 00
VL
Bra
nc
P P
tr t8 or .1Q 2 80
or ts
57 4 1w h itc A h itc w S B
or
t1
In this example, a data frame arrived at the FortiGate unit tagged as VLAN 100. After checking its content, the FortiGate unit retagged the data frame for VLAN 300. It is this change from VLAN 100 to VLAN 300 that requires a layer-3 routing device, in this case the FortiGate unit. Layer-2 switches cannot perform this change.
P ts or S
Fra
lin k
me
P t3 or
Fra
me N3 00
un k
V
P or t5
rt 1 Po 300 N LA
in Ma
fice Of
A VL
441
Virtual LANs
Normally in VLAN configurations, the FortiGate unit's internal interface is connected to a VLAN trunk, and the external interface connects to an Internet router that is not configured for VLANs. In this configuration the FortiGate unit can apply different policies for traffic on each VLAN interface connected to the internal interface, which results in less network traffic and better security.
Physical interface
The term VLAN subinterface correctly implies the VLAN interface is not a complete interface by itself. You add a VLAN subinterface to the physical interface that receives VLAN-tagged packets. The physical interface can belong to a different VDOM than the VLAN, but it must be connected to a network router that is configured for this VLAN. Without that router, the VLAN will not be connected to the network, and VLAN traffic will not be able to access this interface. The traffic on the VLAN is separate from any other traffic on the physical interface. When you are working with interfaces on your FortiGate unit, use the Column Settings on the Interface display to make sure the information you need is displayed. When working with VLANs, it is useful to position the VLAN ID column close to the IP address. If you are working with VDOMs, including the Virtual Domain column as well will help you troubleshoot problems more quickly. To view the Interface display, go to System > Network > Interface.
VLAN ID
The VLAN ID is part of the VLAN tag added to the packets by VLAN switches and routers. The VLAN ID is a number between 1 and 4094 that allow groups of IP addresses with the same VLAN ID to be associated together. VLAN ID 0 is used only for high priority frames, and 4095 is reserved.
442
Virtual LANs
All devices along a route must support the VLAN ID of the traffic along that route. Otherwise, the traffic will be discarded before reaching its destination. For example, if your computer is part of VLAN_100 and a co-worker on a different floor of your building is also on the same VLAN_100, you can communicate with each other over VLAN_100, only if all the switches and routers support VLANs and are configured to pass along VLAN_100 traffic properly. Otherwise, any traffic you send your co-worker will be blocked or not delivered.
VDOM
If VDOMs are enabled, each VLAN subinterface must belong to a VDOM. This rule also applies for physical interfaces.
Note: Interface-related CLI commands require a VDOM to be specified, regardless of whether the FortiGate unit has VDOMs enabled.
VLAN subinterfaces on separate VDOMs cannot communicate directly with each other. In this situation, the VLAN traffic must exit the FortiGate unit and re-enter the unit again, passing through firewalls in both directions. This situation is the same for physical interfaces. A VLAN subinterface can belong to a different VDOM than the physical interface it is part of. This is because the traffic on the VLAN is handled separately from the other traffic on that interface. This is one of the main strengths of VLANs. The following procedure will add a VLAN subinterface called VLAN_100 to the FortiGate internal interface with a VLAN ID of 100. It will have an IP address and netmask of 172.100.1.1/255.255.255.0, and allow HTTPS, PING, and TELNET administrative access. Note that in the CLI, you must enter set type vlan before setting the vlanid, and that the allowaccess protocols are lower case. To add a VLAN subinterface in NAT/Route mode - web-based manager 1 If Current VDOM appears at the bottom left of the screen, select Global from the list of VDOMs. 2 Go to System > Network > Interface. 3 Select Create New to add a VLAN subinterface. 4 Enter the following:
VLAN Name Type Interface VLAN ID Addressing Mode IP/Netmask VLAN_100 VLAN internal 100 Manual 172.100.1.1/255.255.255.0
5 Select OK. To view the new VLAN subinterface, select the expand arrow next to the parent physical interface (the internal interface). This will expand the display to show all VLAN subinterfaces on this physical interface. If there is no expand arrow displayed, there are no subinterfaces configured on that physical interface.
443
Virtual LANs
For each VLAN, the list displays the name of the VLAN, and, depending on column settings, its IP address, the Administrative access you selected for it, the VLAN ID number, and which VDOM it belongs to if VDOMs are enabled. To add a VLAN subinterface in NAT/Route mode - CLI config system interface edit VLAN_100 set interface internal set type vlan set vlanid 100 set ip 172.100.1.1 255.255.255.0 set allowaccess https ping telnet end
The packets on each VLAN are subject to antivirus scans and other UTM measures as they pass through the FortiGate unit.
Configuring routing
As a minimum, you need to configure a default static route to a gateway with access to an external network for outbound packets. In more complex cases, you will have to configure different static or dynamic routes based on packet source and destination addresses. As with firewalls, you need to configure routes for VLAN traffic. VLANs need routing and a gateway configured to send and receive packets outside their local subnet just as physical interfaces do. The type of routing you configure, static or dynamic, will depend on the routing used by the subnet and interfaces you are connecting to. Dynamic routing can be routing information protocol (RIP), border gateway protocol (BGP), open shortest path first (OSPF), or multicast. If you enable SSH, PING, TELNET, HTTPS and HTTP on the VLAN, you can use those protocols to troubleshoot your routing and test that it is properly configured. Enabling logging on the interfaces and using CLI diagnose commands such as diagnose sniff packet <interface_name> can also help locate any possible configuration or hardware issues.
444
Virtual LANs
Un t pa agge ck d ets Ex 17 tern 2.1 al 6.2 1.2 19 Inte 2.1 rna 68 l .11 0.1
A VL
N2
00
802
26
.1Q
Fa
trun
k
0 Fa
N 2 10 00 .1 N .2 et .0 w o
0/2 4
/9
A VL
When the VLAN switch receives packets from VLAN_100 and VLAN_200, it applies VLAN ID tags and forwards the packets of each VLAN both to local ports and to the FortiGate unit across the trunk link. The FortiGate unit has policies that allow traffic to flow between the VLANs, and from the VLANs to the external network. This section describes how to configure a FortiGate-800 unit and a Cisco Catalyst 2950 switch for this example network topology. The Cisco configuration commands used in this section are IOS commands. It is assumed that both the FortiGate-800 and the Cisco 2950 switch are installed and connected and that basic configuration has been completed. On the switch, you will need to be able to access the CLI to enter commands. Refer to the manual for your FortiGate model as well as the manual for the switch you select for more information. It is also assumed that no VDOMs are enabled.
LA
N 1 10 00 .1 N .1 et .0 w o
rk
LA N
N1
00
0/3 Fa
S w itc h
LA
rk
445
Virtual LANs
To configure the external interface - CLI config system interface edit external set mode static set ip 172.16.21.2 255.255.255.0 end
446
Virtual LANs
The rest of this example shows how to configure the VLAN behavior on the FortiGate unit, configure the switches to direct VLAN traffic the same as the FortiGate unit, and test that the configuration is correct. Adding VLAN subinterfaces can be completed through the web-based manager, or the CLI. To add VLAN subinterfaces - web-based manager 1 Go to System > Network > Interface. 2 Select Create New. 3 Enter the following information and select OK:
Name Interface VLAN ID Addressing mode IP/Netmask Administrative Access VLAN_100 internal 100 Manual 10.1.1.1/255.255.255.0 HTTPS, PING, TELNET
4 Select Create New. 5 Enter the following information and select OK:
Name Interface VLAN ID Addressing mode IP/Netmask Administrative Access VLAN_200 internal 200 Manual 10.1.2.1/255.255.255.0 HTTPS, PING, TELNET
To add VLAN subinterfaces - CLI config system interface edit VLAN_100 set vdom root set interface internal set type vlan set vlanid 100 set mode static set ip 10.1.1.1 255.255.255.0 set allowaccess https ping telnet next edit VLAN_200 set vdom root set interface internal set type vlan set vlanid 200 set mode static set ip 10.1.2.1 255.255.255.0 set allowaccess https ping telnet end
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
447
Virtual LANs
4 Select Create New. 5 Enter the following information and select OK:
Address Name Type Subnet / IP Range VLAN_200_Net Subnet / IP Range 10.1.2.0/255.255.255.0
To add the firewall addresses - CLI config firewall address edit VLAN_100_Net set type ipmask set subnet 10.1.1.0 255.255.255.0 next edit VLAN_200_Net set type ipmask set subnet 10.1.2.0 255.255.255.0 end
If you do not want to allow all services on a VLAN, you can create a security policy for each service you want to allow. This example allows all services. To add the security policies - web-based manager 1 Go to Policy > Policy > Policy. 2 Select Create New.
448
Virtual LANs
4 Select Create New. 5 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action Enable NAT VLAN_200 VLAN_200_Net VLAN_100 VLAN_100_Net Always ANY ACCEPT Enable
6 Select Create New. 7 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action Enable NAT VLAN_100 VLAN_100_Net external all Always ANY ACCEPT Enable
8 Select Create New. 9 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action Enable NAT VLAN_200 VLAN_200_Net external all Always ANY ACCEPT Enable
449
Virtual LANs
To add the security policies - CLI config firewall policy edit 1 set srcintf VLAN_100 set srcaddr VLAN_100_Net set dstintf VLAN_200 set dstaddr VLAN_200_Net set schedule always set service ANY set action accept set nat enable set status enable next edit 2 set srcintf VLAN_200 set srcaddr VLAN_200_Net set dstintf VLAN_100 set dstaddr VLAN_100_Net set schedule always set service ANY set action accept set nat enable set status enable next edit 3 set srcintf VLAN_100 set srcaddr VLAN_100_Net set dstintf external set dstaddr all set schedule always set service ANY set action accept set nat enable set status enable next edit 4 set srcintf VLAN_200 set srcaddr VLAN_200_Net set dstintf external set dstaddr all set schedule always set service ANY set action accept set nat enable set status enable end
450
Virtual LANs
One method to configure a Cisco switch is to connect over a serial connection to the console port on the switch, and enter the commands at the CLI. Another method is to designate one interface on the switch as the management interface and use a web browser to connect to the switchs graphical interface. For details on connecting and configuring your Cisco switch, refer to the installation and configuration manuals for the switch. The switch used in this example is a Cisco Catalyst 2950 switch. The commands used are IOS commands. Refer to the switch manual for help with these commands. To configure the VLAN subinterfaces and the trunk interfaces Add this file to the Cisco switch: ! interface FastEthernet0/3 switchport access vlan 100 ! interface FastEthernet0/9 switchport access vlan 200 ! interface FastEthernet0/24 switchport trunk encapsulation dot1q switchport mode trunk ! The switch has the following configuration:
Port 0/3 Port 0/9 Port 0/24 VLAN ID 100 VLAN ID 200 802.1Q trunk
Note: To complete the setup, configure devices on VLAN_100 and VLAN_200 with default gateways. The default gateway for VLAN_100 is the FortiGate VLAN_100 subinterface. The default gateway for VLAN_200 is the FortiGate VLAN_200 subinterface.
451
Virtual LANs
C:\>tracert 172.16.21.2 Tracing route to 172.16.21.2 over a maximum of 30 hops: 1 <10 ms <10 ms <10 ms 10.1.2.1 2 <10 ms <10 ms <10 ms 172.16.21.2 Trace complete.
You can also configure the protection profiles that manage antivirus scanning, web filtering and spam filtering. For more information on UTM profiles, see UTM Guide on page 765.
452
Virtual LANs
For this example, we are creating a VLAN called internal_v225 on the internal interface, with a VLAN ID of 225. Administrative access is enabled for HTTPS and SSH. VDOMs are not enabled. To add VLAN subinterfaces in transparent mode - web-based manager 1 Go to System > Network > Interface. 2 Select Create New. 3 Enter the following information and select OK.
Name Type Interface VLAN ID Ping Server Administrative Access Description internal_v225 VLAN internal 225 not enabled Enable HTTPS, and SSH. These are very secure access methods. VLAN 225 on internal interface
The FortiGate unit adds the new subinterface to the interface that you selected. Repeat steps 2 and 3 to add additional VLANs. You will need to change the VLAN ID, Name, and possibly Interface when adding additional VLANs. To add VLAN subinterfaces in transparent mode - CLI
config system interface edit internal_v225 set interface internal set vlanid 225 set allowaccess HTTPS SSH set description VLAN 225 on internal interface set vdom root end
453
Virtual LANs
7 Select the Source and Destination Address names that you added in step 2. 8 Select Protection Profile, and select the profile from the list. 9 Configure other settings as required. 10 Select OK. To add security policies for VLAN subinterfaces - CLI config firewall address edit incoming_VLAN_address set associated-interface <incoming_VLAN_interface> set type ipmask set subnet <IPv4_address_mask) next edit outgoing_VLAN_address set associated-interface <outgoing_VLAN_interface> set type ipmask set subnet <IPv4_address_mask> next end config firewall policy edit <unused_policy_number> set srcintf <incoming_VLAN_interface> set srcaddr incoming_VLAN_address set destintf <outgoing_VLAN_interface> set destaddr outgoing_VLAN_address set service <protocol_to_allow_on VLAN> set action ACCEPT set profile-status enable set profile <selected_profile> next end end
454
Virtual LANs
0/2 4
0 Fa
VL
LA
N 10 10 .1 0 00 Ne .0 tw .0 o r
V LA N
AN
10
0 Fa
0/3
S w itc h
LA
N 10 20 .2 0 00 Ne .0 t w .0 o r
/9
V LA N ro ut er
Ex ter na l Int e rn al
VL
AN
20
455
Virtual LANs
4 Select Create New. 5 Enter the following information and select OK:
Name Interface VLAN ID VLAN_100_ext external 100
6 Select Create New. 7 Enter the following information and select OK:
Name Interface VLAN ID VLAN_200_int internal 200
8 Select Create New. 9 Enter the following information and select OK:
Name Interface VLAN ID VLAN_200_ext external 200
To add VLAN subinterfaces - CLI config system interface edit VLAN_100_int set status down set type vlan set interface internal set vlanid 100 next edit VLAN_100_ext set status down set type vlan set interface external set vlanid 100 next edit VLAN_200_int set status down set type vlan set interface internal set vlanid 200 next edit VLAN_200_ext set status down set type vlan set interface external set vlanid 200
System Administration for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
456
Virtual LANs
end
4 Select Create New. 5 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action VLAN_100_ext all VLAN_100_int all Always ANY ACCEPT
6 Go to Policy > Policy > Policy. 7 Select Create New. 8 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action Enable NAT VLAN_200_int all VLAN_200_ext all Always ANY ACCEPT enable
9 Select Create New. 10 Enter the following information and select OK:
457
Virtual LANs
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action
To add the security policies - CLI config firewall policy edit 1 set srcintf VLAN_100_int set srcaddr all set dstintf VLAN_100_ext set dstaddr all set action accept set schedule always set service ANY next edit 2 set srcintf VLAN_100_ext set srcaddr all set dstintf VLAN_100_int set dstaddr all set action accept set schedule always set service ANY next edit 3 set srcintf VLAN_200_int set srcaddr all set dstintf VLAN_200_ext set dstaddr all set action accept set schedule always set service ANY next edit 4 set srcintf VLAN_200_ext set srcaddr all set dstintf VLAN_200_int set dstaddr all set action accept set schedule always set service ANY end
458
Virtual LANs
459
Virtual LANs
Asymmetric routing
You might discover unexpectedly that hosts on some networks are unable to reach certain other networks. This occurs when request and response packets follow different paths. If the FortiGate unit recognizes the response packets, but not the requests, it blocks the packets as invalid. Also, if the FortiGate unit recognizes the same packets repeated on multiple interfaces, it blocks the session as a potential attack. This is asymmetric routing. By default, the FortiGate unit blocks packets or drops the session when this happens. You can configure the FortiGate unit to permit asymmetric routing by using the following CLI command: config vdom edit <vdom_name> config system settings set asymroute enable end end If VDOMs are enabled, this command is per VDOM. You must set it for each VDOM that has the problem. If this solves your blocked traffic issue, you know that asymmetric routing is the cause. But allowing asymmetric routing is not the best solution, because it reduces the security of your network. For a long-term solution, it is better to change your routing configuration or change how your FortiGate unit connects to your network. The Asymmetric Routing and Other FortiGate Layer-2 Installation Issues technical note provides detailed examples of asymmetric routing situations and possible solutions.
Caution: If you enable asymmetric routing, antivirus and intrusion prevention systems will not be effective. Your FortiGate unit will be unaware of connections and treat each packet individually. It will become a stateless firewall.
460
Virtual LANs
ARP traffic
Address Resolution Protocol (ARP) packets are vital to communication on a network, and ARP support is enabled on FortiGate unit interfaces by default. Normally you want ARP packets to pass through the FortiGate unit, especially if it is sitting between a client and a server or between a client and a router. ARP traffic can cause problems, especially in transparent mode where ARP packets arriving on one interface are sent to all other interfaces including VLAN subinterfaces. Some layer-2 switches become unstable when they detect the same MAC address originating on more than one switch interface or from more than one VLAN. This instability can occur if the layer-2 switch does not maintain separate MAC address tables for each VLAN. Unstable switches may reset and cause network traffic to slow down considerably.
461
Virtual LANs
However, you should not use the multiple VDOMs solution under any of the following conditions: you have more VLANs than licensed VDOMs you do not have enough physical interfaces
Instead, use one of two possible solutions, depending on which operation mode you are using: In NAT/Route mode, you can use the vlan forward CLI command. In transparent mode, you can use the forward-domain CLI command. But you still need to be careful in some rare configurations.
Vlanforward solution
If you are using NAT/Route mode, the solution is to use the vlanforward CLI command for the interface in question. By default, this command is enabled and will forward VLAN traffic to all VLANs on this interface. When disabled, each VLAN on this physical interface can send traffic only to the same VLANthere is no cross-talk between VLANs, and ARP packets are forced to take one path along the network which prevents the multiple paths problem. In the following example, vlanforward is disabled on port1. All VLANs configured on port1 will be separate and will not forward any traffic to each other. config system interface edit port1 set vlanforward disable end
Forward-domain solution
If you are using transparent mode, the solution is to use the forward-domain CLI command. This command tags VLAN traffic as belonging to a particular collision group, and only VLANs tagged as part of that collision group receive that trafficit is like an additional set of VLANs. By default, all interfaces and VLANs are part of forward-domain collision group 0. The many benefits of this solution include reduced administration, the need for fewer physical interfaces, and the availability of more flexible network solutions. In the following example, forward-domain collision group 340 includes VLAN 340 traffic on port1 and untagged traffic on port 2. Forward-domain collision group 341 includes VLAN 341 traffic on port 1 and untagged traffic on port 3. All other interfaces are part of forward-domain collision group 0 by default. This configuration separates VLANs 340 and 341 from each other on port 1, and prevents the ARP packet problems from before. Use these CLI commands: config system interface edit port1 next edit port2 set forward_domain 340 next edit port3 set forward_domain 341 next edit port1-340 set forward_domain 340 set interface port1 set vlanid 340
System Administration for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
462
Virtual LANs
next edit port1-341 set forward_domain 341 set interface port1 set vlanid 341 end You may experience connection issues with layer-2 traffic, such as ping, if your network configuration has: packets going through the FortiGate unit in transparent mode more than once more than one forwarding domain (such as incoming on one forwarding domain and outgoing on another) IPS and AV enabled.
Now IPS and AV is applied the first time packets go through the FortiGate unit, but not on subsequent passes. Only applying IPS and AV to this first pass fixes the network layer-2 related connection issues.
NetBIOS
Computers running Microsoft Windows operating systems that are connected through a network rely on a WINS server to resolve host names to IP addresses. The hosts communicate with the WINS server by using the NetBIOS protocol. To support this type of network, you need to enable the forwarding of NetBIOS requests to a WINS server. The following example will forward NetBIOS requests on the internal interface for the WINS server located at an IP address of 192.168.111.222. config system interface edit internal set netbios_forward enable set wins-ip 192.168.111.222 end These commands apply only in NAT/Route mode. If VDOMs are enabled, these commands are per VDOMyou must set them for each VDOM that has the problem.
STP forwarding
The FortiGate unit does not participate in the Spanning Tree Protocol (STP). STP is an IEEE 802.1 protocol that ensures there are no layer-2 loops on the network. Loops are created when there is more than one route for traffic to take and that traffic is broadcast back to the original switch. This loop floods the network with traffic, reducing available bandwidth to nothing. If you use your FortiGate unit in a network topology that relies on STP for network loop protection, you need to make changes to your FortiGate configuration. Otherwise, STP recognizes your FortiGate unit as a blocked link and forwards the data to another path. By default, your FortiGate unit blocks STP as well as other non-IP protocol traffic. Using the CLI, you can enable forwarding of STP and other layer-2 protocols through the interface. In this example, layer-2 forwarding is enabled on the external interface: config system interface edit external set l2forward enable set stpforward enable end
463
Virtual LANs
By substituting different commands for stpforward enable, you can also allow layer-2 protocols such as IPX, PPTP or L2TP to be used on the network. For more information, see Layer-2 and Arp traffic on page 461.
464
465
Caution: PPTP control channel messages are not authenticated, and their integrity is not protected. Furthermore, encapsulated PPP packets are not cryptographically protected and may be read or modified unless appropriate encryption software such as Secure Shell (SSH) or Secure File Transfer Protocol (SFTP) is used to transfer data after the tunnel has been established.
As an alternative, you can use encryption software such as Microsoft Point-to-Point Encryption (MPPE) to secure the channel. MPPE is built into Microsoft Windows clients and can be installed on Linux clients. FortiGate units support MPPE.
Figure 55: Packet encapsulation
n tio na sti .2 e d 20 ffic 68. 1 Tra 92.1 1 3
2
1 2
In Figure 55, traffic from the remote client is addressed to a computer on the network behind the FortiGate unit. When the PPTP tunnel is established, packets from the remote client are encapsulated and addressed to the FortiGate unit. The FortiGate unit forwards disassembled packets to the computer on the internal network. When the remote PPTP client connects, the FortiGate unit assigns an IP address from a reserved range of IP addresses to the client PPTP interface. The PPTP client uses the assigned IP address as its source address for the duration of the connection. When the FortiGate unit receives a PPTP packet, the unit disassembles the PPTP packet and forwards the packet to the correct computer on the internal network. The security policy and protection profiles on the FortiGate unit ensure that inbound traffic is screened and processed securely.
de
s 0. et .3 ck .16 pa 2 P 7 T 1 P n P atio in 1
3 1 2
st
2 17
.16
.30
de
s 0. et .3 ck .16 pa 2 P 7 T 1 P n P atio in st 1
on
466
Note: PPTP clients must be authenticated before a tunnel is established. The authentication process relies on FortiGate user group definitions, which can optionally use established authentication mechanisms such as RADIUS or LDAP to authenticate PPTP clients. All PPTP clients are challenged when a connection attempt is made.
er Int
na
tw Ne
ork
PP
TP
li _C
en
t_1
T PP
P_
e Cli
nt_
PP
TP
e Cli
nt_
If the FortiGate unit will act as a PPTP server, there are a number of steps to complete: Configure user authentication for PPTP clients. Enable PPTP. Specify the range of addresses that are assigned to PPTP clients when connecting Configure the security policy.
467
468
PPTP requires two IP addresses, one for each end of the tunnel. The PPTP address range is the range of addresses reserved for remote PPTP clients. When the remote PPTP client establishes a connection, the FortiGate unit assigns an IP address from the reserved range of IP addresses to the client PPTP interface or retrieves the assigned IP address from the PPTP user group. If you use the PPTP user group, you must also define the FortiGate end of the tunnel by entering the IP address of the unit in Local IP (web-based manager) or local-ip (CLI). The PPTP client uses the assigned IP address as its source address for the duration of the connection. PPTP configuration is only available through the CLI. In the example below, PPTP is enabled with the use of an IP range of 182.168.1.1 to 192.168.1.10 for addressing.
Note: The start and end IPs in the PPTP address range must be in the same 24-bit subnet, e.g. 192.168.1.1 - 192.168.1.254. config vpn pptp
In this example, PPTP is enabled with the use of a user group for addressing, where the IP address of the PPTP server is 192.168.1.2 and the user group is hr_admin.
config vpn pptp
469
Note: Do not select identity-based policy, as this will cause the PPTP access to fail. Authentication is configured in the PPTP configuration setup.
To configure the firewall for the PPTP tunnel - CLI config firewall policy edit 1 set srcintf <interface to internet> set dstintf <interface to internal network> set srcaddr <reserved_range> set dstaddr <internal_addresses> set action accept set schedule always set service ANY end
470
6 Select Port Forwarding. 7 Set the Protocol to TCP. 8 Enter the External Service Port of 1723, the default for PPTP. 9 Enter the Map to Port to 1723. 10 Select OK. To define a virtual IP for PPTP pass through - web-based manager config firewall vip edit PPTP_Server set extinf <interface> set extip <ip_address> set portforward enable set protocol tcp set extport 1723 set mappedport 1723 end
471
To add the security policy - CLI config firewall policy edit <policy_number> set srcintf <interface to internet> set dstintf <interface to PPTP server> set srcaddr <address_range> set dstaddr <PPTP_server_address> set action accept set schedule always set service PPTP end
472
According to RFC 2661, an Access Concentrator (LAC) can establish an L2TP tunnel with an L2TP Network Server (LNS). In a typical scenario, the LAC is managed by an ISP and located on the ISP premises; the LNS is the gateway to a private network. When a remote dialup client connects to the Internet through the ISP, the ISP uses a local database to establish the identity of the caller and determine whether the caller needs access to an LNS through an L2TP tunnel. If the services registered to the caller indicate that an L2TP connection to the LNS is required, the ISP LAC attempts to establish an L2TP tunnel with the LNS. A FortiGate unit can be configured to act as an LNS. The FortiGate implementation of L2TP enables a remote dialup client to establish an L2TP tunnel with the FortiGate unit directly, bypassing any LAC managed by an ISP. The ISP must configure its network access server to forward L2TP traffic from the remote client to the FortiGate unit directly whenever the remote client requires an L2TP connection to the FortiGate unit. When the FortiGate unit acts as an LNS, an L2TP session and tunnel is created as soon as the remote client connects to the FortiGate unit. The FortiGate unit assigns an IP address to the client from a reserved range of IP addresses. The remote client uses the assigned IP address as its source address for the duration of the connection. More than one L2TP session can be supported on the same tunnel. FortiGate units can be configured to authenticate remote clients using a plain text user name and password, or authentication can be forwarded to an external RADIUS or LDAP server. L2TP clients are authenticated as members of a user group.
Caution: FortiGate units support L2TP with Microsoft Point-to-Point Encryption (MPPE) encryption only. Later implementations of Microsoft L2TP for Windows use IPSec and require certificates for authentication and encryption. If you want to use Microsoft L2TP with IPSec to connect to a FortiGate unit, the IPSec and certificate elements must be disabled on the remote client.
Traffic from the remote client must be encrypted using MPPE before it is encapsulated and routed to the FortiGate unit. Packets originating at the remote client are addressed to a computer on the private network behind the FortiGate unit. Encapsulated packets are addressed to the public interface of the FortiGate unit. See Figure 57. When the FortiGate unit receives an L2TP packet, the unit disassembles the packet and forwards the packet to the correct computer on the internal network. The security policy and protection profiles on the FortiGate unit ensure that inbound traffic is screened and processed securely.
473
1 2
Note: Fortinet units cannot deliver non-IP traffic such as Frame Relay or ATM frames encapsulated in L2TP packets FortiGate units support the IPv4 and IPv6 addressing schemes only.
you cannot
de
s 0 et .3 ck .16 pa 72 P 1 T n L2 t i o a in st .1
3 1 2
.1 72
6.3
de
s 0 et .3 ck .16 pa 72 P 1 T n L2 tio a in st .1
on
Network topology
The remote client connects to an ISP that determines whether the client requires an L2TP connection to the FortiGate unit. If an L2TP connection is required, the connection request is forwarded to the FortiGate unit directly.
474
e Int
rna
tw Ne
ork
o em
te_
e Cli
nt_
m Re
ote
e Cli
nt_
m Re
ote
e Cli
nt_
475
To define the firewall source address 1 Go to Firewall Objects > Address and select Create New. 2 In the Address Name field, type a name that represents the range of addresses that you reserved for remote clients (for example, Ext_L2TPrange). 3 In Type, select Subnet / IP Range. 4 In the Subnet / IP Range field, type the corresponding IP address range.
System Administration for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
476
5 In Interface, select the FortiGate interface that connects to the clients. This is usually the interface that connects to the Internet. 6 Select OK. To define the firewall destination address 1 Go to Firewall Objects > Address and select Create New. 2 In the Address Name field, type a name that represents a range of IP addresses on the network behind the FortiGate unit (for example, Int_L2TPaccess). 3 In Type, select Subnet / IP Range. 4 In the Subnet / IP Range field, type the corresponding IP address range. 5 In Interface, select the FortiGate interface that connects to the network behind the FortiGate unit. 6 Select OK.
3 You may enable NAT, a protection profile, and/or event logging, or select Enable Identity Based Policy to add authentication or shape traffic. For more information on identity based policies, see the FortiGate Fundamentals chapter of the handbook. 4 Select OK.
477
1 If encryption is required but MPPE support is not already present in the kernel, download and install an MPPE kernel module and reboot your computer. 2 Download and install the L2TP client package. 3 Configure an L2TP connection to run the L2TP program. 4 Configure routes to determine whether all or some of your network traffic will be sent through the tunnel. You must define a route to the remote network over the L2TP link and a host route to the FortiGate unit. 5 Run l2tpd to start the tunnel. Follow the software suppliers documentation to complete the steps. To configure the system, you need to know the public IP address of the FortiGate unit, and the user name and password that has been set up on the FortiGate unit to authenticate L2TP clients. Contact the FortiGate administrator if required to obtain this information.
478
Session helpers
The FortiOS firewall can analyze most TCP/IP protocol traffic by comparing packet header information to security policies. This comparison determines whether to accept or deny the packet and the session that the packet belongs to. Some protocols include information in the packet body (or payload) that must be analyzed to successfully process sessions for this protocol. For example, the SIP VoIP protocol uses TCP control packets with a standard destination port to set up SIP calls. But the packets that carry the actual conversation can use a variety of UDP protocols with a variety of source and destination port numbers. The information about the protocols and port numbers used for a SIP call is contained in the body of the SIP TCP control packets. To successfully process SIP VoIP calls, FortiOS must be able to extract information from the body of the SIP packet and use this information to allow the voice-carrying packets through the firewall. FortiOS uses session helpers to analyze the data in the packet bodies of some protocols and adjust the firewall to allow those protocols to send packets through the firewall. This section describes: Viewing the session helper configuration Changing the session helper configuration DCE-RPC session helper (dcerpc) DNS session helpers (dns-tcp and dns-udp) File transfer protocol (FTP) session helper (ftp) H.245 session helpers (h245I and h245O) H.323 and RAS session helpers (h323 and ras) Media Gateway Controller Protocol (MGCP) session helper (mgcp) ONC-RPC portmapper session helper (pmap) PPTP session helper for PPTP traffic (pptp) Remote shell session helper (rsh) Real-Time Streaming Protocol (RTSP) session helper (rtsp) Session Initiation Protocol (SIP) session helper (sip) Trivial File Transfer Protocol (TFTP) session helper (tftp) Oracle TNS listener session helper (tns)
479
Session helpers
480
Session helpers
To change the port that the pmap session helper listens on to TCP port 112 1 Confirm that the TCP pmap session helper entry is 11 in the session-helper list: show system session-helper 11 config system session-helper edit 11 set name pmap set port 111 set protocol 6 next end 2 Enter the following command to change the TCP port to 112. config system session-helper edit 11 set port 112 end 3 The pmap session helper also listens on UDP port 111. Confirm that the UDP pmap session helper entry is 12 in the session-helper list: show system session-helper 12 config system session-helper edit 12 set name pmap set port 111 set protocol 17 next end 4 Enter the following command to change the UDP port to 112. config system session-helper edit 12 set port 112 end end Use the following command to set the h323 session helper to listen for ports on the UDP protocol. To change the protocol that the h323 session helper listens on 1 Confirm that the h323 session helper entry is 2 in the session-helper list: show system session-helper 2 config system session-helper edit 2 set name h323 set port 1720 set protocol 6 next end 2 Enter the following command to change the protocol to UDP. config system session-helper edit 2 set protocol 17 end end
481
Session helpers
If a session helper listens on more than one port or protocol, then multiple entries for the session helper must be added to the session helper list, one for each port and protocol combination. For example, the rtsp session helper listens on TCP ports 554, 7070, and 8554 so there are three rtsp entries in the session-helper list. If your FortiGate unit receives rtsp packets on a different TCP port (for example, 6677) you can use the following command to configure the rtsp session helper to listen on TCP port 6677. To configure a session helper to listen on a new port and protocol config system session-helper edit 0 set name rtsp set port 6677 set protocol 6 end
482
Session helpers
To completely disable the mgcp session helper 1 Enter the following command to find the mgcp session helper entry that listens on UDP port 2727: show system session-helper . . . edit 20 set name mgcp set port 2727 set protocol 17 next . . . 2 Enter the following command to delete session-helper list entry number 20 to disable the mgcp session helper from listening on UDP port 2727: config system session-helper delete 20
483
Session helpers
config system session-helper edit 0 set name dns-tcp set port 53 set protocol 6 end
484
Session helpers
The alternate gatekeeper provides redundancy and scalability for the H.323 end points. If the primary gatekeeper fails the H.323 end points that have registered with that gatekeeper are automatically registered with the alternate gatekeeper. To use the H.323 alternate gatekeeper, you need to configure security policies that allow H.323 end points to reach the alternate gatekeeper.
485
Session helpers
The session helper identifies an outgoing call reply message using the control message type field (bytes 8-9) with the value 8. The session helper parses these control messages for the call ID field (bytes 12-13) and the clients call ID (bytes 14-15). The session helper then uses the clients call ID value to find the mapping created for the other direction, and then opens a pinhole to accept the GRE traffic that the client sends.
486
Session helpers
An outgoing call reply message contains the following parts: Protocol used for the outgoing call reply message (usually GRE) Source IP address (PPTP client IP) Destination IP address (PPTP server IP) Destination port number (PPTP server Call ID)
Each port that the session opens creates a session for data traffic arriving in that direction. The session helper opens the following two data sessions for each tunnel: Traffic from the PPTP client to the server, using the servers call ID as the destination port Traffic from the PPTP server to the client, using the clients translated call ID as the destination port
The default timeout value of the control connection is 30 minutes. The session helper closes the pinhole when the data session exceeds the timeout value or is idle for an extended period.
487
Session helpers
In a typical RTSP session the client starts the session (for example, when the user selects the Play button on a media player application) and establishes a TCP connection to the RTSP server on port 554. The client then sends an OPTIONS message to find out what audio and video features the server supports. The server responds to the OPTIONS message by specifying the name and version of the server, and a session identifier, for example, 24256-1. The client then sends the DESCRIBE message with the URL of the actual media file the client wants to play. The server responds to the DESCRIBE message with a description of the media in the form of SDP code. The client then sends the SETUP message, which specifies the transport mechanisms acceptable to the client for streamed media, for example RTP/RTCP or RDT, and the ports on which it receives the media. In a NAT configuration the rtsp session helper keeps track of these ports and addresses translates them as necessary. The server responds to the SETUP message and selects one of the transport protocols. When both client and server agree on a mechanism for media transport the client sends the PLAY message, and the server begins streaming the media.
488
Rearranging policies
Moving a policy in the security policy list does not change its ID, which only indicates the order in which the policy was created. To move a policy in the policy list 1 Go to Policy > Policy > Policy. 2 In the security policy list, note the ID of a security policy that is before or after your intended destination. 3 Select the row corresponding to the security policy you want to move and select Move. 4 Select Before or After, and enter the ID of the security policy that is before or after your intended destination. This specifies the policys new position in the security policy list. 5 Select OK.
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
489
Security policy 0
Security policy 0
FortiGate units create a security policy of 0 (zero) which can appear in the logs, but will never appear in the security policy list, and therefore can never be repositioned in the list. When viewing the FortiGate logs, you may find an entry indicating policyid=0. For example: 2008-10-06 00:13:49 log_id=0022013001 type=traffic subtype=violation pri=warning vd=root SN=179089 duration=0 user=N/A group=N/A rule=0 policyid=0 proto=17 service=137/udp app_type=N/A status=deny src=10.181.77.73 srcname=10.181.77.73 dst=10.128.1.161 dstname=10.128.1.161 src_int=N/A dst_int="Internal" sent=0 rcvd=0 src_port=137 dst_port=137 vpn=N/A tran_ip=0.0.0.0 tran_port=0 Any security policy that is automatically added by the FortiGate unit has a policy ID number of 0. The most common reasons the FortiGate unit creates this policy is The IPsec policy for FortiAnalyzer (and FortiManager version 3.0) is automatically added when an IPsec connection to the FortiAnalyzer unit or FortiManager is enabled. The policy to allow FortiGuard servers to be automatically added has a policy ID number of 0. The (default) drop rule that is the last rule in the policy and that is automatically added has a policy ID number of 0. When a network zone is defined within a VDOM, the intra-zone traffic set to allow or block is managed by policy 0 if it is not processed by a configured security policy.
490
DoS Policies
DoS Policies
Denial of Service (DoS) policies, also known as anomaly thresholds, are primarily used to apply DoS sensors to network traffic based on the FortiGate interface it is entering as well as the source and destination addresses. DoS sensors are a traffic anomaly detection feature to identify network traffic that does not fit known or common traffic patterns and behavior. A denial of service attack occurs when an attacking system starts an abnormally large number of sessions with a target system. The large number of sessions slows down or disables the target system so legitimate users can no longer use it. DoS policies examine network traffic very early in the sequence of protective measures the FortiGate unit deploys to protect your network. Because of this, DoS policies are a very efficient defence, using few resources. The previously mentioned denial of service would be detected and its packets dropped before requiring security policy look-ups, antivirus scans, and other protective but resource-intensive operations. You can create DoS sensors to protect against variety of different attack patterns. By default, the FortiGate unit includes two sensors; one to pass all traffic and one to block the more common DoS attack patterns. To create your own DoS sensor, go to UTM Profiles > Intrusion Protection > DoS Sensor and select Create New. For more information on DoS sensor configuration, see the UTM chapter. DoS sensor policies are stored separately in the FortiGate web-based manager and do not appear in the security policy list. As traffic passes through the FortiGate interface, the DoS policy is applied first to determine whether the traffic is genuine or an attack. If it is genuine, the packets are forwarded to the normal security policies and applied as required. If the FortiGate unit determines the traffic is a DoS attack, the policy is applied as configured in the DoS sensor.
491
Sniffer Policies
Sniffer Policies
Sniffer policies are used to configure a physical interface on the FortiGate unit as a one-arm intrusion detection system (IDS). Traffic sent to the interface is examined for matches to the configured IPS sensor and application control list. Matches are logged and then all received traffic is dropped. Sniffing only reports on attacks. It does not deny or otherwise influence traffic. Sniffer policies are applied to sniffer interfaces. Traffic entering a sniffer interface is checked against the sniffer policies for matching source and destination addresses and for service. This check against the policies occurs in listed order, from top to bottom. The first sniffer policy matching all three attributes then examines the traffic. Once a policy matches the attributes, checks for policy matches stop. If no sniffer policies match, the traffic is dropped without being examined. Once a policy match is detected, the matching policy compares the traffic to the contents of the DoS sensor, IPS sensor, and application control list specified in the policy. If any matches are detected, the FortiGate unit creates an entry in the log of the matching sensor/list. If the same traffic matches multiple sensors/lists, it is logged for each match. Before creating the sniffer policy, you must setup the FortiGate unit to the network and configure a port as a dedicated sniffer port.The easiest way to do this is to either use a hub or a switch with a SPAN port. A SPAN port is a special-purpose interface that mirrors all the traffic the switch receives. Traffic is handled normally on every other switch interface, but the SPAN port sends a copy of everything. If you connect your FortiGate unit sniffer interface to the switch SPAN port, all the network traffic will be examined without any being lost because of the examination.
System Administration for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
492
Sniffer Policies
The FortiGate interface needs to be enabled for sniffing. In the example below, the WAN1 port is configured for one-armed sniffing. To configure a FortiGate interface as a one-arm sniffer - web-based manager 1 Go to System > Network > Interface. 2 and select the WAN1 interface row and select Edit. 3 Select the check box for Enable one-arm sniffer. 4 Note that the port that is set up in sniffer mode will not require an IP address. 5 Select OK. To configure a FortiGate interface as a one-arm sniffer - CLI config system interface edit wan1 set ips-sniffer-mode enable end
493
Identity-based Policies
Identity-based Policies
If you enable Enable Identity Based Policy in a security policy, network users must send traffic involving a supported firewall authentication protocol to trigger the firewall authentication challenge, and successfully authenticate, before the FortiGate unit will allow any other traffic matching the security policy. User authentication can occur through any of the following supported protocols: HTTP HTTPS FTP Telnet
Authentication can also occur through automatic login using NTLM and FSAE, to bypass user intervention. The authentication style depends on which of these supported protocols you have included in the selected firewall services group and which of those enabled protocols the network user applies to trigger the authentication challenge. The authentication style will be one of two types. For certificate-based (HTTPS or HTTP redirected to HTTPS only) authentication, you must install customized certificates on the FortiGate unit and on the browsers of network users, which the FortiGate unit matches. For user name and password-based (HTTP, FTP, and Telnet) authentication, the FortiGate unit prompts network users to input their firewall user name and password. For example, if you want to require HTTPS certificate-based authentication before allowing SMTP and POP3 traffic, you must select a firewall service (in the security policy) that includes SMTP, POP3 and HTTPS services. Prior to using either POP3 or SMTP, the network user would send traffic using the HTTPS service, which the FortiGate unit would use to verify the network users certificate; upon successful certificate-based authentication, the network user would then be able to access his or her email. In most cases, you should ensure that users can use DNS through the FortiGate unit without authentication. If DNS is not available, users will not be able to use a domain name when using a supported authentication protocol to trigger the FortiGate units authentication challenge.
Note: If you do not install certificates on the network users web browser, the network users may see an SSL certificate warning message and have to manually accept the default FortiGate certificate, which the network users web browsers may then deem as invalid. Note: When you use certificate authentication, if you do not specify any certificate when you create a security policy, the FortiGate unit will use the default certificate from the global settings. If you specify a certificate, the per-policy setting will override the global setting.
Authentication requires that Action is ACCEPT or SSL-VPN, and that you first create users, assign them to a firewall user group, and assign UTM profiles to that user group.
494
Identity-based Policies
3 Select Enable Identity Based Policy. 4 Firewall authentication is enabled by default. 5 Select Add. 6 From the Available User Groups list, select the Accounting user group and select the right arrow to move it to the Selected User Groups area. 7 From the Available Services list, select the HTTPS and select the right arrow to move it to the Selected Services area. 8 For the Schedule, select Always. 9 Select OK. To create a identity-based policy - CLI
config firewall policy
edit 1 set srcintf internal set srcaddr 10.13.20.22 set dstintf wan1 set dstaddr 172.20.120.141 set action accept set schedule always set identity-based enable config identity-based-policy edit 1 set group accounting set service HTTPS set schedule always end end
495
Identity-based Policies
DNS traffic goes through successfully as does any HTTP traffic after being authenticated. However, if there was FTP traffic, it would not get through. As the FortiGate unit processes FTP traffic, it skips rule one since its matching the source, destination and service. When it moves to rule two it matches the source and destination, it determines there is a match and, sees there are also processes the group/service rules, which requires authentication and acts on those rules. Once satisfied, the FortiGate unit will never go to rule three. In this situation, where you would want FTP traffic to traverse the FortiGate unit, create a security policy specific to the services you require and place it above the authentication policy.
Identity-based sub-policies
When adding authentication to a security policy, you can add multiple authentication rules, or sub-policies. Within these policies you can include additional UTM profiles, traffic shaping and so on, to take affect on the selected services.
Figure 60: Authentication sub-policies
These sub-policies work on the same principle as normal security policies, that is, top down until the criteria has been met. As such, if there is no matching policy within the list, the packet can still be dropped even after authentication is successful.
496
Local-in policies
Local-in policies
Security policies control the flow of traffic through the FortiGate unit. The FortiGate unit also includes the option of controlling internal traffic, that is, management traffic. Each interface includes an allow access configuration to allow management access for specific protocols. Local policies are set up automatically to allow all users all access. Local-in policies takes this a step further, to enable or restrict the user with that access. This also extends beyond the allow access selection. Local-in policies are configured in the CLI with the commands: config firewall local-in-policy edit <policy_number> set intf <source_interface> set srcaddr <source_address> set dstaddr <destination_address> set action {accept | deny} set service <service name> set schedule <schedule_name> end For example, you can configure a local-in policy so that only administrators can access the FortiGate unit on weekends from a specific management computer at 192.168.21.12 using SSH on port 3 (192.168.21.77) using the Weekend schedule which defines the time the of access. config firewall local-in-policy edit <1> set intf port3 set srcaddr 192.168.21.12 set dstaddr 192.168.21.77 set action accept set service SSH set schedule Weekend end You can also disable a policy should there be a requirement to turn off a policy for troubleshooting or other purpose. To disable a policy enter the commands: config firewall local-in-policy edit <policy_number> set status disable end Use the same commands with a status of enable to use the policy again. Local-in policies are also supported with IPv6 by entering the command config firewall local-in-policy6.
497
For ICMP error messages, only those reporting an error for an existing session can pass through the firewall. The security policy will allow traffic to be routed, forwarded or denied. If allowed, the ICMP packets will start a new session. Only ICMP error messages of a corresponding security policy is available will be sent back to the source. Otherwise, the packet is dropped. That is, only ICMP packets for a corresponding security policy can traverse the FortiGate unit. Common error messages include: destination unreachable messages time exceeded messages redirect messages
For example, a security policy that allows TFTP traffic through the FortiGate unit. User1 (192.168.21.12) attempts to connect to the TFTP server (10.11.100.1), however, the UDP port 69 has not been opened on the server. The corresponding sniffer trace occurs: diagnose sniffer packet any host 10.11.100.1 or icmp 4
3.677808 internal in 192.168.21.12.1262 -> 10.11.100.1.69: udp 20 3.677960 wan1 out 192.168.21.12.1262 -> 10.11.100.1.69: udp 20 3.678465 wan1 in 10.11.100.1.132 -> 192.168.21.12: icmp: 10.11.100.1 udp port 69 unreachable 3.678519 internal out 10.11.100.1 -> 192.168.21.12: icmp: 192.168.182.132 udp port 69 unreachable
Session tables
Firewall session tables include entries to record source and destination IP addresses and port numbers. For each packet received by a FortiGate unit, it references the session table for a match. Packets of an established session are checked against the session table continually throughout the communication. The performance of depends on the performance of processing session table. Firewall sessions clear from the table based on the timeout, that is, Time-to-live (TTL) setting. Equally, a completely inactive session with no FIN or RESET will be flushed by the by the session TTL timer. Sessions are not closed based on FIN or a RESET. A FIN that is acknowledged with a FIN ACK would slush the session.
498
Session tables
While this view shows a graph of the connecting users and IP addresses, double-clicking on a bar in the graph will display the complete session information for that user.
Figure 62: Session tables in the Top Sessions widget
You can clear a session from the table by scrolling to the right and selecting the delete icon for a given session.
499
Session tables
Output will look something similar to: session info: proto=17 proto_state=01 duration=121 expire=58 timeout=0 flags=00000000 sockflag=00000000 sockport=0 av_idx=0 use=4 origin-shaper= reply-shaper= per_ip_shaper= ha_id=0 hakey=0 policy_dir=0 tunnel=/ state=may_dirty br statistic(bytes/packets/allow_err): org=63/1/1 reply=133/1/1 tuples=2 orgin->sink: org pre->post, reply pre->post dev=6->2/2->6 gwy=0.0.0.0/0.0.0.0 hook=pre dir=org act=noop 172.20.120.85:51167>8.8.8.8:53(0.0.0.0:0) hook=post dir=reply act=noop 8.8.8.8:53>172.20.120.85:51167(0.0.0.0:0) misc=0 policy_id=3 id_policy_id=0 auth_info=0 chk_client_info=0 vd=0 serial=000171db tos=ff/ff app_list=0 app=0 dd_type=0 dd_rule_id=0 per_ip_bandwidth meter: addr=172.20.120.85, bps=1984 total session 189 To clear a session enter the following command:
diagnose sys session clear Figure 63: State field in Session Tables State log local ext may_dirty ndr nds br npu wccp Meaning Session is being logged Session is originating from, or destined for, a local stack. Session is created by a firewall session helper. Session is created by a policy. For example, the session for FTP channel control will have this state but the FTP data channel will not. Session will be checked by an IPS signature. Session will be checked by an IPS anomaly. Session is being bridged, that is, in transparent mode. Session will possibly be offloaded to NPU. Session is handled by WCCP.
500
4 5 6 7 8 9
In the example output below, a state of 00, the UDP packet has been seen and a session will be created, but no reply packet has been seen: session info: proto=17 proto_state=00 expire=179 timeout=3600 use=3 In this example, the UDP packet has been seen and a session created. Reply packets have also been seen: session info: proto=17 proto_state=01 expire=22 timeout=3600 use=3
501
For NAT security policies to work in NAT mode you must have two interfaces on two different networks with two different subnet addresses. Then you can create security policies to translate source or destination addresses for packets as they are relayed by the FortiGate unit from one interface to the other. A FortiGate unit operating in Transparent mode normally has only one IP address, the management IP. To support NAT in Transparent mode you can add a second management IP. These two management IPs must be on different subnets. When you add two management IP addresses, all FortiGate unit network interfaces will respond to connections to both of these IP addresses. In the example shown in Figure 64, all of the PCs on the internal network (subnet address 192.168.1.0/24) are configured with 192.168.1.99 as their default route. One of the management IPs of the FortiGate unit is set to 192.168.1.99. This configuration results in a typical NAT mode firewall. When a PC on the internal network attempts to connect to the Internet, the PC's default route sends packets destined for the Internet to the FortiGate unit internal interface. Similarly on the DMZ network (subnet address 10.1.1.0/24) all of the PCs have a default route of 10.1.1.99. This example describes adding an internal to WAN1 security policy to relay these packets from the internal interface out the WAN1 interface to the Internet. Because the WAN1 interface does not have an IP address of its own, you must add an IP pool to the WAN1 interface that translates the source addresses of the outgoing packets to an IP address on the network connected to the wan1 interface. The example describes adding an IP pool with a single IP address of 10.1.1.201. So all packets sent by a PC on the internal network that are accepted by the Internal to WAN1 policy leave the WAN1 interface with their source address translated to 10.1.1.201. These packets can now travel across the Internet to their destination. Reply packets return to the WAN1 interface because they have a destination address of 10.1.1.201. The Internal to WAN1 NAT policy translates the destination address of these return packets to the IP address of the originating PC and sends them out the internal interface to the originating PC. Use the following steps to configure NAT in Transparent mode Add two management IPs Add an IP pool to the WAN1 interface Add an Internal to WAN1 security policy
Note: You can add the security policy from the web-based manager and then use the CLI to enable NAT and add the IP Pool.
502
10
.1.
1.0
/24
Tra n
To add a source address translation NAT policy in Transparent mode 1 Enter the following command to add two management IPs. The second management IP is the default gateway for the internal network. config system settings set manageip 10.1.1.99/24 192.168.1.99/24 end 2 Enter the following command to add an IP pool to the WAN1 interface: config firewall ippool edit nat-out set interface "wan1" set startip 10.1.1.201 set endip 10.1.1.201 end 3 Enter the following command to add an Internal to WAN1 security policy with NAT enabled that also includes an IP pool: config firewall policy edit 1 set srcintf "internal" set dstintf "wan1" set scraddr "all" set dstaddr "all" set action accept set schedule "always" set service "ANY" set nat enable set ippool enable set poolname nat-out end
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
R ou te r
sp
k or tw 24 ne 0/ Z 1. M 1. D 0. 1
k or tw /24 ne .0 al .1 rn 68 te .1 In 92 1
503
ith
av
irtu
al
IP
1 3 2
To add a static NAT virtual IP for a single IP address and port - web-based manager 1 Go to Firewall Objects > Virtual IP > Virtual IP. 2 Select Create New. 3 Complete the following and select OK.
.
IP r 42 ve 0. er .1 S 10 . 10
19
Name External Interface Type External IP Address/Range Mapped IP Address/Range Port Forwarding Protocol External Service Port Map to Port
504
To add a static NAT virtual IP for a single IP address and port - CLI config firewall vip edit static_NAT set extintf wan1 set type static-nat set extip 192.168.37.4 set mappedip 10.10.10.42 set portforward enable set extport 80 set mappedport 8000 end Add a external to dmz1 security policy that uses the virtual IP so that when users on the Internet attempt to connect to the web server IP address packets pass through the FortiGate unit from the external interface to the dmz1 interface. The virtual IP translates the destination address of these packets from the external IP to the DMZ network IP address of the web server. To add a static NAT virtual IP for a single IP address to a security policy - web-based manager 1 Go to Policy > Policy > Policy and select Create New. 2 Complete the following:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action wan1 All Internal static_nat always HTTP ACCEPT
3 Select NAT. 4 Select OK. To add a static NAT virtual IP for a single IP address to a security policy - CLI config firewall policy edit 1 set srcintf wan1 set dstintf internal set srcaddr all set dstaddr static_nat set action accept set schedule always set service ANY set nat enable end
505
To create an IP pool - web-based manager 1 Go to Firewall Objects > Virtual IP > IP Pool. 2 Select Create New. 3 Enter the Name pool-1. 4 Enter the IP Range/Subnet 10.1.3.1-10.1.3.254. 5 Select OK. To create an IP pool - CLI config firewall ippool edit pool-1
set startip 10.1.3.1 set endip 10.1.3.254 end
Next, create the virtual IP with port translation to translate the user internal IP used by the network users to the DMZ port and IP address of the server. To create a Virtual IP with port translation - web-based manager 1 Go to Firewall Objects > Virtual IP > Virtual IP. 2 Select Create New.
k or w et 4 N /2 al .0 rn .1 te .1 In 10 r ve .1 er 0 S .12 eb 20 W 2. 17
17
Z 2 DM120. . 0 2.2
506
To create a Virtual IP with port translation - CLI config firewall vip edit server-1 set extintf internal set type static-nat set extip 172.20.120.1 set mappedip 172.20.120.1 set portforward enable set extport 80 set mappedport 8080 end Add an internal to DMZ security policy that uses the virtual IP to translate the destination port number and the IP pool to translate the source addresses. To create the security policy - web-based manager 1 Go to Policy > Policy > Policy and select Create New. 2 Complete the following and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action NAT Dynamic IP Pool internal all dmz server-1 always HTTP ACCEPT Select Select, and select the pool-1 IP pool.
To create the security policy - CLI config firewall edit 1 set srcintf set dstintf set srcaddr
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
507
Using VIP range for Source NAT (SNAT) and static 1-to-1 mapping
dstaddr server-1 action accept schedule always service HTTP nat enable ippool enable poolname pool-1
Using VIP range for Source NAT (SNAT) and static 1-to-1 mapping
VIP addresses are typically used to map external (public) to internal (private) IP addresses for Destination NAT (DNAT). This example shows how to use VIP ranges to perform Source NAT (SNAT) with a static 1-to-1 mapping from internal to external IP addresses. This is similar to using an IP pool with the advantage of having predictable and static 1-to-1 address mapping.
Figure 67: Network diagram .42 .10 0 h .1 10 roug .46 th .10 .10 10
al rn rk te o In tw e N
This example will associate each internal IP address to one external IP address for the Source NAT (SNAT) translation. Using the diagram above, the translations will look like the following
Traffic from Source IP 10.10.10.42 10.10.10.43 ... 10.10.10.46 Translated to Source IP (SNAT) 192.168.37.4 192.168.37.5 ... 192.168.37.8
508
Using VIP range for Source NAT (SNAT) and static 1-to-1 mapping
To configure the virtual IP - web-based manager 1 Go to Firewall Objects > Virtual IP > Virtual IP and select Create New. 2 Enter the Name of Static_NAT_1to1. 3 Select the External Interface of port 1 from the drop-down list. 4 Enter the External IP Address of 192.168.37.4. 5 Enter the Mapped IP Address range of 10.10.10.42 to 10.10.10.46. 6 Select OK. To configure the virtual IP - CLI config firewall vip edit "Static_NAT_1to1" set extip 192.168.37.4 set extintf "port1" set mappedip 10.10.10.42-10.10.10.46 next end Next, configure the security policies. Even if no connection needs to be initiated from external to
internal, a second security policy number is required to activate the VIP range. Otherwise the IP address of the physical interface is used for NAT. In this example it is set as a DENY security policy for security purpose.
To configure the security policies - web-based manager 1 Go to Policy > Policy > Policy and select Create New. 2 Complete the following and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action NAT port2 all port1 all always ANY ACCEPT Select
509
Using VIP range for Source NAT (SNAT) and static 1-to-1 mapping
To configure the security policies - CLI config firewall policy edit 1 set srcintf port2 set dstintf port1 set srcaddr all set dstaddr all set action accept set schedule always set service ANY set nat enable next edit 2 set srcintf port1 set dstintf port2 set srcaddr all" set dstaddr Static_NAT_1to1 set schedule always set service ANY set action deny set comments Used to activate static Source NAT 1-to-1 next end end
510
Advanced concepts
This chapter provides configuration ideas and techniques to enhance your network security. This chapter includes the topics: Dual internet connection Central NAT table Modem DHCP servers and relays Assigning IP address by MAC address DNS services Dynamic DNS Aggregate Interfaces Port pairing IP addresses for self-originated traffic Administration for schools Blocking port 25 to email server traffic Blocking HTTP access by IP Server load balancing and HTTP cookie persistence fields Stateful inspection of SCTP traffic Tag management Software switch
Redundant interfaces
Redundant interfaces, ensures that should your internet access be no longer available through a certain port, the FortiGate unit will use an alternate port to connect to the Internet. In this scenario, two interfaces, WAN1 and WAN2 are connected to the Internet through the ISP. WAN1 is the primary connection. In an event of a failure of WAN1, WAN2 automatically becomes the connection to the Internet. For this configuration to function correctly, you need to configure three specific settings:
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
511
Advanced concepts
configure a ping server to determine when the primary interface (WAN1) is down and when the connection returns configure a default route for each interface. configure security policies to allow traffic through each interface to the internal network.
Ping server
Adding a ping server is required for routing fail over traffic. A ping server will confirm the connectivity of the devices interface To add a ping server - web-based manager 1 Go to Router > Static > Settings and select Create New. 2 Select the Interface that will send ping requests. 3 For the Ping Server field, enter the IP address of a server that the FortiGate unit will send ping requests to. This is typically a next hop router or gateway device. 4 Select the Detect Protocol type. 5 For the Ping Interval field, enter the number of seconds to send ping requests. 6 For the Failover Threshold, enter the number of lost pings is acceptible before the port is determined to be down. 7 Select OK. To add a ping server - CLI config router gwdetect edit wan1 set server <ISP_IP_address> set failtime <failure_count> set interval <seconds> end
Routing
You need to configure a default route for each interface and indicate which route is preferred by specifying the distance. The lower distance is declared active and placed higher in the routing table.
Note: When you have dual WAN interfaces that are configured to provide fail over, you might not be able to connect to the backup WAN interface because the FortiGate unit may not route traffic (even responses) out of the backup interface. The FortiGate unit performs a reverse path lookup to prevent spoofed traffic. If no entry can be found in the routing table which sends the return traffic out the same interface, then the incoming traffic is dropped.
To configure the routing of the two interfaces - web-based manager 1 Go to Router > Static > Static Route and select Create New. 2 Set the Destination IP/Mask to the address and netmask to 0.0.0.0/0.0.0.0. 3 Select the Device to the primary connection, WAN1. 4 Enter the Gateway address. 5 Select Advanced. 6 Set the Distance to 10. 7 Select OK. 8 Repeat steps 1 through 7 setting the Device to WAN2 and a Distance of 20.
System Administration for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
512
Advanced concepts
To configure the routing of the two interfaces - CLI config router static edit 1 set dst 0.0.0.0 0.0.0.0 set device WAN1 set gateway 0.0.0.0 0.0.0.0 set distance 10 next edit 1 set dst <ISP_Address> set device WAN2 set gateway <gateway_address> set distance 20 next end
Security policies
When creating security policies, you need to configure duplicate policies to ensure that after traffic fails over WAN1, regular traffic will be allowed to pass through WAN2 as it did with WAN1. This ensures that fail-over will occur with minimal affect to users. For more information on creating security policies see the FortiGate Fundamentals Guide.
Load sharing
Load sharing enables you to use both connections to the internet at the same time, but do not provide fail over support. When configuring for load sharing, you need to ensure routing is configured for both external ports, for example, WAN1 and WAN2, have static routes with the same distance and priority. Further configuration can be done using Equal Cost Multiple Path (ECMP). For more information on ECMP and load sharing, see the Advanced Routing Guide.
513
Advanced concepts
514
Advanced concepts
A FortiGate with three interfaces means only limited network segments are possible without purchasing more FortiGate devices.
With multiple VDOMs you can have one of them configured in Transparent mode, and the rest in NAT mode. In this configuration, you have an available transparent mode FortiGate unit you can drop into your network for troubleshooting, and you also have the standard. [DIAGARAM TO GO HERE] This example shows how to enable VDOMs on the FortiGate unit and the basic and create a VDOM accounting on the DMZ2 port and assign an administrator to maintain the VDOM. First enable Virtual Domains on the FortiGate unit. To enable VDOMs - web-based manager 1 Go to System > Dashboard > Status. 2 In the System Information widget, select Enable for Virtual Domain. The FortiGate unit logs you out. Once you log back in, you will notice that the menu structure has changed. This reflects the global settings for all Virtual Domains. To enable VDOMs - CLI config system global set vdom-admin enable end Next, add the VDOM called accounting. To add a VDOM - web-based manager 1 Go to System > VDOM > VDOM, and select Create New. 2 Enter the VDOM name accounting. 3 Select OK.
515
Advanced concepts
To add a VDOM - CLI config vdom edit <new_vdom_name> end With the Virtual Domain created, you can assign a physical interface to it, and assign it an IP address. To assign physical interface to the accounting Virtual Domain - web-based manager 1 Go to System > Network > Interface. 2 Select the DMZ2 port row and select Edit. 3 For the Virtual Domain drop-down list, select accounting. 4 Select the Addressing Mode of Manual. 5 Enter the IP address for the port of 10.13.101.100/24. 6 Set the Administrative Access to HTTPS and SSH. 7 Select OK. To assign physical interface to the accounting Virtual Domain - CLI config global config system interface edit dmz2 set vdom accounting set ip 10.13.101.100/24 set allowaccess https ssh next end
516
Advanced concepts
Modem
2 Select Display central NAT table on GUI. 3 Select Apply. To enable Central NAT - CLI config system global set gui-central-nat-table end NAT policies are created in the web-based manager by going to Policy > Policy > Central NAT Table. The NAT policies are enabled when you configure the security policy by selecting the Use Central NAT Table option. NAT policies are created in the CLI by using the commands under config firewall central-nat. To enable the policies use the commands config firewall policy edit <policy_number> set central-nat enable end
Modem
FortiGate units support the use of wireless, 3G and 4G modems connected using the USB port or, if available, the express card slot. Modem access provides either primary or secondary (redundant) access to the Internet. For FortiGate units that do not include an internal modem (those units with an M designation), the modem interface will not appear in the web-based manager until enabled in the CLI. To enable the modem interface enter the CLI commands: config system modem set status enable end Once enabled, modem options become available by going to System > Network > Interface.
Note: The modem interface is only available when the FortiGate unit is in NAT mode.
Configuring the modem settings is a matter of entering the ISP phone number, user name and password. Depending on the modem, additional information may need to be supplied such as product identifiers, and initialization strings. The FortiGate unit includes a number of common modems within its internal database. You can view these by selecting the Configure Modem link on the Modem Settings page. If your modem is not on the list, select Create New to add the information. This information is stored on the device, and will remain after a reboot. Fortinet has an online database of modem models and configuration settings through FortiGuard. A subscription to the FortiGuard services is not required to access the information. As models are added, you can select the Configure Modem link and select Update Now to download new configurations.
517
Modem
Advanced concepts
config system modem set wireless-port {ttyusb0 | ttyusb1 | ttyusb2} end To test the port, use the diagnose command: diagnose sys modem com /ttyusb1 The ttyusb1 will be the value of your USB port selected. The response will be: Serial port: /dev/ttyusb1 Press Ctrl+W to exit. If the port does not respond the output will be:
Can not open modem device /dev/ttyusb1 : Broken pipe
Modes
The FortiGate unit allows for two modes of operation for the modem; stand alone and redundant. In stand alone mode, the modem connects to a dialup ISP account to provide the connection to the Internet. In redundant mode, the modem acts as a backup method of connecting to the Internet, should the primary port for this function fails. Configuring either stand alone or redundant modes are very similar. The primary difference is the selection of the interface that the modem will replace in the event of it failing, and the configuration of a PING server to monitor the chosen interface.
518
Advanced concepts
Modem
Ping server
Adding a ping server is required for routing fail over traffic. A ping server will confirm the connectivity of the devices interface. You can only configure the ping server in the CLI. To add a ping server - CLI config router gwdetect edit wan1 set server <ISP_IP_address> set failtime <failure_count> set interval <seconds> end
519
Advanced concepts
An interface cannot provide both a server and a relay for connections of the same type (regular or IPSec). However, you can configure a Regular DHCP server on an interface only if the interface is a physical interface with a static IP address. You can configure an IPSec DHCP server on an interface that has either a static or a dynamic IP address. You can configure one or more DHCP servers on any FortiGate interface. A DHCP server dynamically assigns IP addresses to hosts on the network connected to the interface. The host computers must be configured to obtain their IP addresses using DHCP. If an interface is connected to multiple networks via routers, you can add a DHCP server for each network. The IP range of each DHCP server must match the network address range. The routers must be configured for DHCP relay. You can configure a FortiGate interface as a DHCP relay. The interface forwards DHCP requests from DHCP clients to an external DHCP server and returns the responses to the DHCP clients. The DHCP server must have appropriate routing so that its response packets to the DHCP clients arrive at the unit.
Service
On FortiGate-50 and FortiGate-60 series units, a DHCP server is configured, by default, on the Internal interface:
IP Range Netmask Lease time DNS Server 1 192.168.1.110 to 192.168.1.210 255.255.255.0 7 days 192.168.1.99
These settings are appropriate for the default Internal interface IP address of 192.168.1.99. If you change this address to a different network, you need to change the DHCP server settings to match.
520
Advanced concepts
DHCP options
When adding a DHCP server, you have the ability to include DHCP codes and options. The DHCP options are BOOTP vendor information fields that provide additional vendor-independent configuration parameters to manage the DHCP server. For example, you may need to configure a FortiGate DHCP server that gives out a separate option as well as an IP address. For example, an environment that needs to support PXE boot with Windows images. The option numbers and codes are specific to the particular application. The documentation for the application will indicate the values to use. Option codes are represented in a option value/HEX value pairs. The option is a value 1 and 255. You can add up to three DHCP code/option pairs per DHCP server. To configure option 252 with value http://192.168.1.1/wpad.dat - web-based manager 1 Go to System > Network > DHCP Server and select Create New. 2 Select a Mode of Server. 3 Select the blue arrow to expand the Advanced options. 4 Select Options. 5 Enter a Code of 252. 6 Enter the Options of 687474703a2f2f3139322e3136382e312e312f777061642e646174.
521
Advanced concepts
In the CLI, use the commands: config system dhcp server edit <server_entry_number> set option1 252 687474703a2f2f3139322e3136382e312e312f777061642e646174 end For detailed information about DHCP options, see RFC 2132, DHCP Options and BOOTP Vendor Extensions.
DNS services
A DNS server is a public service that converts symbolic node names to IP addresses. A Domain Name System (DNS) server implements the protocol. In simple terms, it acts as a phone book for the Internet. A DNS server matches domain names with the computer IP address. This enables you to use readable locations, such as fortinet.com when browsing the Internet. FortiOS supports DNS configuration for both IPv4 and IPv6 addressing. The FortiGate unit includes default DNS server addresses. However, these should be changed to those provided by your Internet Service Provider. The defaults are DNS proxies and are not as reliable as those from your ISP. Within FortiOS, there are two DNS configuration options; each provide a specific service, and can work together to provide a complete DNS solution.
DNS queries
Basic DNS queries are configured on interfaces that connect to the Internet. When a web site is requested, for example, the FortiGate unit will look to the configured DNS servers to provide the IP address to know which server to contact to complete the transaction.
522
Advanced concepts
DNS services
DNS server addresses are configured by going to System > Network > DNS. Here you specify the DNS server addresses. Typically, these addresses are supplied by your ISP. An additional option is available if you have local Microsoft domains on the network, by entering a domain name in the Local Domain Name field. In a situation where all three fields are configured, the FortiGate unit will first look to the local domain. If no match is found, a request is sent to the external DNS servers. If virtual domains are enabled, you create a DNS database in each VDOM. All of the interfaces in a VDOM share the DNS database in that VDOM.
DNS servers
You can also create local DNS servers for your network. Depending on your requirements, you can manually maintain your entries (master DNS server), or use it as a jumping point, where the server refers to an outside source (slave DNS server). A local master DNS server works similarly to the DNS server addresses configured in System > Network > DNS, but all entries must be added manually. This enables you to add a local DNS server to include specific URL/IP address combinations. While a master DNS server is an easy method of including regularly used addresses to save on going to an outside DNS server, it is not recommended to make it the authoritative DNS server. For example, IP addresses may change, and maintaining any type of list can quickly become labor-intensive. A FortiGate master DNS server is best set for local services. For example, if your company has a web server on the DMZ that is accessed by internal employees as well as external users, such as customers or remote users. In this situation, the internal users when accessing the site would send a request for website.example.com, that would go out to the DNS server on the web, to return an IP address or virtual IP. With an internal DNS, the same site request is resolved internally to the internal web server IP address, minimizing traffic and access time. As a slave DNS server, the FortiGate server refers to an external or alternate source as way to obtain the url/IP combination. This useful if there is a master DNS server for a large company where a list is maintained. Satellite offices can then connect to the master DNS server to obtain the correct addressing.
523
DNS services
Advanced concepts
Note: The DNS server options are not visible in the web-based manager by default. You need to enable it by going into the CLI and entering the commands: config system global set gui-dns-database enable end You will need to log out and back in to view the menu.
To configure a master DNS server - web-based manager 1 Go to System > Network > DNS Server, and select Create New. 2 Select the Type of Master. 3 Select the View as Shadow. The view is the accessibility of the DNS server. By selecting Public, external users can access, or use, the DNS server. Selecting Shadow, only internal users can use the DNS server. 4 Enter the DNS Zone, for example, WebServer. 5 Enter the domain name for the zone, for example example.com. 6 Enter the hostname of the DNS server, for example, Corporate. 7 Enter the contact address for the administrator, for example, admin@example.com. 8 Set Authoritative to Disable. 9 Select OK. 10 Enter the DNS entries for the server by selecting Create New. 11 Select the Type, for example, Address (A). 12 Enter the Hostname, for example web.example.com. 13 Enter the remaining inform ai ton, which varies depending on the Type selected. 14 Select OK. To configure a DNS server - CLI
config system dns-database
edit WebServer
set domain example.com
type master view shadow ttl 86400 primary-name corporate contact admin@exmple.com edit 1 set hostname web.example.com set type A set ip 192.168.21.12 set status enable
end end
524
Advanced concepts
Dynamic DNS
Recursive DNS
You can set an option to ensure these types of DNS server is not the authoritative server. When configured, the FortiGate unit will check its internal DNS server (master or slave). If the request cannot be fulfilled, it will look to the external DNS servers. This is known as a split DNS configuration. For this behavior to work completely, for the external port, you must set the DNS query for the external interface to be recursive. To set the DNS query - web-based manager 1 Go to System > Network > DNS Server. 2 In the DNS Service on Interface table, select Create New. 3 Select the Interface and set the Mode to Recursive. 4 Select OK. To set the DNS query - CLI config system dns-server edit wan1 set mode recursive end
Dynamic DNS
If your ISP changes the your external IP address on a regular basis, and you have a static domain name, you can configure the external interface to use a dynamic DNS service to ensure external users and/or customers can always connect to your company firewall. To configure dynamic DNS in the web-based manager, go to System > Network > DNS, select Use DDNS, and enter the relevant information for the interface communicating to the server, and which server to use, and relevant information. To configure dynamic DNS in the CLI use the commands below. Within the CLI you can configure a DDNS for each interface. Only the first configured port appears in the web-based manager. Additional commands vary with the DDNS server you select. config system ddns edit <instance_value>
set monitor-interface <external_interface> set ddns-server <ddns_server_selection>
end
Aggregate Interfaces
Link aggregation (IEEE 802.3ad) enables you to bind two or more physical interfaces together to form an aggregated (combined) link. This new link has the bandwidth of all the links combined. If a link in the group fails, traffic is transferred automatically to the remaining interfaces with the only noticeable effect being a reduced bandwidth. This is similar to redundant interfaces with the major difference being that a redundant interface group only uses one link at a time, where an aggregate link group uses the total bandwidth of the functioning links in the group, up to eight. Support of the IEEE standard 802.3ad for link aggregation is available on some models. An interface is available to be an aggregate interface if:
525
Aggregate Interfaces
Advanced concepts
it is a physical interface, not a VLAN interface or subinterface it is not already part of an aggregate or redundant interface it is in the same VDOM as the aggregated interface. Aggregate ports cannot span multiple VDOMs. it does not have an IP address and is not configured for DHCP or PPPoE it is not referenced in any security policy, VIP, IP Pool or multicast policy it is not an HA heartbeat interface it is not one of the FortiGate-5000 series backplane interfaces
Some models of FortiGate units do not support aggregate interfaces. In this case, the aggregate option is not an option in the web-based manager or CLI. As well, you cannot create aggregate interfaces from the interfaces in a switch port. To see if a port is being used or has other dependencies, use the following diagnose command: diagnose sys checkused system.interface.name <interface_name> When an interface is included in an aggregate interface, it is not listed on the System > Network > Interface page. Interfaces will still appear in the CLI, although configuration for those interfaces will not take affect. You cannot configure the interface individually and it is not available for inclusion in security policies, VIPs, IP pools, or routing.
Example
This example creates an aggregate interface on a FortiGate-3810A using ports 4-6 with an internal IP address of 10.13.101.100, as well as the administrative access to HTTPS and SSH. To create an aggregate interface - web-based manager 1 Go to System > Network > Interface and select Create New. 2 Enter the Name as Aggregate. 3 For the Type, select 802.3ad Aggregate. If this option does not appear, your FortiGate unit does not support aggregate interfaces. 4 In the Available Interfaces list, select port 4, 5 and 6 and move it to the Selected Interfaces list. 5 Select the Addressing Mode of Manual. 6 Enter the IP address for the port of 10.13.101.100/24. 7 For Administrative Access select HTTPS and SSH. 8 Select OK. To create aggregate interface - CLI config system interface edit Aggregate set type aggregate set member port4 port5 port6 set vdom root set ip 172.20.120.100/24 set allowaccess https ssh end
526
Advanced concepts
Port pairing
Port pairing
Port pairing is an option in transparent mode to bind two ports together. In doing this, you can create security policies that regulate traffic only between two specific ports, VLANs or VDOMs. In its simplest form, this enables an administrator to create security policies that are only between these two ports. Traffic is captured between these ports. No other traffic can enter or leave a port pairing. For example, a FortiGate unit has three ports, where port 1 and port 2 are paired together, because the two networks only need to communicate with each other. If packet arrives on port 1, the FortiGate unit needs to figure out whether the packet goes to port 2 or port 3. With port pairing configured, it is more simple. If packet arrives on port 1, then the FortiGate automatically directs the packet to port 2. The opposite is also true in the other direction. This can be ideal when to groups only need to transfer data between each other.
Figure 68: Port pairing
WA N1 3 ort
Po
To configure port pairing - web-based manager 1 Go to System > Network > Interface. 2 Select the arrow next to the Create New button and select Port Pair. 3 Enter a Name for the port pair. 4 Select the physical or virtual ports from the Available Members list and select the rightfacing arrow to add the ports to the Selected Members. There can be only two ports added. 5 Select OK. To configure port pairing - CLI config system port-pair edit <pair_name> set member <port_names> end When configuring security policies with the port pairs, selecting the Source Interface automatically populates the Destination Interface, and vice versa. All other aspects of the security policy configuration remains the same.
527
Advanced concepts
Configuration of these services is performed in the CLI. In each instance, there is a command set source-ip. For example, to set the source IP of NTP to be on the DMZ1 port with an IP of 192.168.4.5, the commands are: config system ntp set ntpsyn enable
set syncinterval 5 set source-ip 192.168.4.5
end To see which services are configured with source-ip settings, use the get command: get system source-ip status The output will appear similar to the sample below: NTP: x.x.x.x DNS: x.x.x.x SNMP: x.x.x.x Central Management: x.x.x.x FortiGuard Updates (AV/IPS): x.x.x.x FortiGuard Queries (WebFilter/SpamFilter): x.x.x.x
Security policies
The default security policies in FortiOS allow all traffic on all ports and all IP addresses. Not the most secure. While applying UTM profiles can help to block viruses, detect attacks and prevent spam, this doesnt provide a solid overall security option. The best approach is a layered approach; the first layer being the security policy.
System Administration for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
528
Advanced concepts
When creating outbound security policies, you need to know the answer to the question What are the students allowed to do? The answer is surf the web, connect to FTP sites, send/receive email, and so on. Once you know what the students need to do, you can research the software used and determine the ports the applications use. For example, if the students only require web surfing, then there are only two ports (80 - HTTP and 443 - HTTPS) needed to complete their tasks. Setting the security policies to only allow traffic through two ports (rather than all 65,000), this will significantly lower any possible exploits. By restricting the ports to known services, mean s stopping the use of proxy servers, as many of them operate on a non-standard port to hide their traffic from URL filtering or HTTP inspection.
DNS
Students should not be allowed to use whatever DNS they want. this opens another port for them to use and potentially smuggle traffic on. The best approach is to point to an internal DNS server and only allow those devices out on port 53. Its the same approach one would use for SMTP. Only allow the mail server to use port 25 since nothing else should be sending email. If there is no internal DNS server, then the list of allowed DNS servers they can use should be restrictive. One possible exploit would be for them to set up their own DNS server at home that serves different IPs for known hosts, such as having Google.com sent back the IP for playboy.com.
FTP
For the most part, students should not be using FTP. FTP is not HTTP or HTTPS so you cannot use URL flitting to restrict where they go. This can be controlled with destination IPs in the security policy. With a policy that specifically outlines which FTP addresses are allowed, all other will be blocked.
529
Advanced concepts
The last policy in the list, included by default, is a deny policy.This adds to the potential of error that could end up allowing unwanted traffic to pass. The deny policy ensures that any traffic making it to this point is stopped. It can also help in further troubleshooting by viewing the logs for denied traffic. With these policies in place, even before packet inspection occurs, the FortiGate, and the network are fairly secure. Should any of the UTM profiles fail, there is still a basic level of security.
UTM Profiles
In FortiOS 4.0 MR2, the protection profiles have been broken into individual profiles. Each UTM feature is now its own component, which can make setting up network security easier.
Antivirus profiles
Antivirus screening should be enabled for any service you have enabled in the security policies. In the case above, HTTP, FTP, as well as POP3 and SMTP (assuming there is email access for students). There is not a virus scan option for HTTPS, because the content is encrypted. Generally speaking, most of the network traffic will be students surfing the web. To configure antivirus profiles in the web-based manager, go to UTM Profiles > Antivirus > Profile, or use the CLI commands under config antivirus profile. Under the antivirus banner is also file filtering. While there should be no reason for a student to download files - applications or otherwise - to the host PC, you can enable file pattern matching to limit what can be downloaded. The most common file types are available to enable for virus checking. to configure file filtering in the web-based manager, go to UTM Profiles > Antivirus > File Filter, on in the CLI under config antivirus filepattern.
Web filtering
The actual filtering of URLs - sites and content - should be performed by FortiGuard. It is easier and web sites are constantly being monitored, and new ones reviewed and added to the FortiGuard databases every day. The FortiGuard categories provide an extensive list of offensive, and non-productive sites. As well, there are additional settings to include in a web filtering profile to best contain a students web browsing. Web URL filtering should be enabled to set up exemptions for web sites that are blocked or reasons other than category filtering. It also prevents the us of IP addresses to get around web filtering. For details on setting this up, see Blocking HTTP access by IP on page 535. Block invalid URLs - HTTPS only. This option inspects the HTTPS certificate and looks at the URL to ensure its valid. It is common for proxy sites to create an HTTPS certificate with a garbage URL. If the site is legitimate, it should be set up correctly. If the site approach to security is to ignore it, then their security policy puts your network at risk and the site should be blocked.
Web filtering options are configured in the web-based manager by going to UTM > Web filter > Profile, or in the CLI under config webfilter profile. Advanced options There are a few Advanced options to consider for a web filtering profile:
530
Advanced concepts
Enable Provide details for blocked HTTP 4xx and 5xx errors. Under normal circumstances there are exploits that can be used with 400 and 500 series messages to access the web site. While most students probably wont know how to do this, there is no harm in being cautious. It only takes one. Enable Rate Images by URL. This option only works with Google images. It examines the URL that the images is stored at to get a rating on it, then blocks or allows the image based on the rating of the originating URL. It does not inspect the image contents. Most image search engines to a prefect and pass the images directly to the browser. Enable Block HTTP redirects by rating. An HTTP redirect is one method of getting around ratings. Go to one web site that has an allowed rating, and it redirects to another web site that may want blocked.
Categories and Classifications For the selection of what FortiGuard categories and classifications that should be blocked, that is purely based on the school system and its Internet information policy. Some categories that could be blocked include: Hacking Illegal or Unethical Racism and Hate Proxy Avoidance Plagiarism Adult Materials Nudity and Risque Pornography Tasteless Lingerie and Swimsuit
Email Filtering
Other than specific teacher-led email inboxes, there is no reason why a student should be able to access, read or send personal email. Ports for POP3, SMTP and IMAP should not be opened in a security policies.
IPS
The intrusion protection profiles should be used to ensure the student PCs are not vulnerable to attacks, nor do you want students making attacks. As well, IPS can do more than simple vulnerability scans. With a FortiGuard subscription, IPS signatures are pushed to the FortiGate unit. New signatures are released constantly for various intrusions as they are discovered. FortiOS includes a number of predefined IPS sensors that you can enable by default. Selecting the all_default signature is a good place to start as it includes the major signatures. To configure IPS sensors in the web-based manager, go to UTM Profiles > Intrusion Protection > IPS Sensor, on the CLI use commands under config ips sensor.
531
Advanced concepts
Application control
Application control uses IPS signatures to limit the use of instant messaging and peer-topeer applications which can lead to possible infections on a students PC. FortiOS includes a number of pre-defined application categories. To configure and maintain application control profiles in the web-based manager, go to UTM Profiles > Application Control > Application Control List. In the CLI use commands under config application list. Some applications to consider include proxies, botnets, toolbars and P2P applications.
Logging
Turn on all logging - every option in this section should be enabled. This is not where you decide what you are going to log. It is simply defining what the UTM profiles can log. Logging everything is a way to monitor traffic on the network, see what students are utilizing the most, and locate any potential holes in your security plan. As well, keeping this information may help to prove negligence later in necessary.
Dedicated traffic
This example show the steps to ensure only traffic exits from the DMZ where the email server is connected. The internal port is connected to the internal network and the WAN1 port connects to the Internet. First, create a security policy that will not allow any traffic through port 25 from the internal interface, which connects to the internal network. Place this policy at the top of the security policy list. To block traffic on port 25 - web-based manager 1 Go to Policy > Policy > Policy and select Create New. 2 Set the following options and select OK.
Source Interface Source Address Internal ALL
Destination Interface WAN1 Destination Address ALL Schedule Service Action Comments ALWAYS SMTP DENY Prevent Malware spam.
532
Advanced concepts
You may also want to enable Log Violation Traffic to see if there is any potential malware or other user sending email using the non-corporate email server. To block traffic on port 25 - CLI config firewall policy edit <policy_number> set srcintf Internal set srcaddr all set dstintf wan1 set dstaddr all set schedule always set service smtp set action deny set comment Prevent Malware spam. end Next, create a security policy for the email server, IP address 10.10.11.29 that only allows SMTP traffic from the email server on port 25. To allow traffic on port 25 for the email server - web-based manager 3 Go to Policy > Policy > Policy and select Create New. 4 Set the following options and select OK.
Source Interface Source Address DMZ 10.10.11.29
Destination Interface WAN1 Destination Address ALL Schedule Service Action ALWAYS SMTP ACCEPT
To allow traffic on port 25 for the email server- CLI config firewall policy edit <policy_number> set srcintf dmz set srcaddr 10.10.11.29 set dstintf wan1 set dstaddr all set schedule always set service smtp set action allow end
533
Advanced concepts
INTERNAL 10.10.10.29
Destination Interface WAN1 Destination Address ALL Schedule Service Action ALWAYS SMTP ACCEPT
To allow traffic on port 25 for the email server- CLI config firewall policy edit <policy_number> set srcintf internal set srcaddr 10.10.10.29 set dstintf wan1 set dstaddr all set schedule always set service smtp set action allow end Next, add a deny security policy that blocks all SMTP traffic from the Internal port to the WAN1 port. Ensure this policy is directly after the policy created above. To block SMTP traffic on port 25 for the rest of the company - web-based manager 3 Go to Policy > Policy > Policy and select Create New. 4 Set the following options and select OK.
Source Interface Source Address INTERNAL ALL
Destination Interface WAN1 Destination Address ALL Schedule Service Action ALWAYS SMTP DENY
To block SMTP traffic on port 25 for the rest of the company - CLI config firewall policy edit <policy_number> set srcintf internal set srcaddr all set dstintf wan1 set dstaddr all set schedule always set service smtp set action deny end
534
Advanced concepts
The second filter blocks any IP address lookup. To add the URL filter entries 1 Go to UTM Profiles > Web Filter > URL Filter. 2 Select Create New to add a filter group, give it a name and select OK. 3 Select Create New for a new filter. 4 Enter the URL of ^([a-z0-9-]+\.){1,}[a-z]+ 5 Set the Type to Regex. 6 Set the Action to Allow. 7 Select OK. 8 Select Create New. 9 Enter the URL of [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} 10 Set the Type to Regex. 11 Set the Action to Block. 12 Select OK. Position these at the end of the URL filter list so that any exemptions or blocks before that are still effective. Both of these filter entries are required. If you only enter the second one, the FortiGate unit will also catch a URL lookup as they both behave in a similar fashion after the URL is resolved to an IP. The first entry is needed to break out of the URL filter and allow the web site before it does the second check if they entered text.
535
Advanced concepts
When HTTP cookie persistence is enabled the FortiGate unit inserts a header of the following form into each HTTP response unless the corresponding HTTP request already contains a FGTServer cookie: Set-Cookie: FGTServer=E7D01637C4B08E89A6714213A9D85D9C7E4D8158; Version=1; Max-Age=3600 The value of the FGTServer cookie encodes the server that traffic should be directed to. The value is encoded so as to not leak information about the internal network. Use http-cookie-domain to restrict the domain that the cookie should apply to. For example, to restrict the cookie to.server.com, enter: set http-cookie-domain .server.com All generated cookies will have the following form: Set-Cookie: FGTServer=E7D01637C4B08E89A6714213A9D85D9C7E4D8158; Version=1; Domain=.server.com; Max-Age=3600 Use http-cookie-path to limit the cookies to a particular path. For example, to limit cookies to the path /sales, enter: set http-cookie-path /sales All generated cookies will have the following form: Set-Cookie: FGTServer=E7D01637C4B08E89A6714213A9D85D9C7E4D8158; Version=1; Domain=.server.com; Path=/sales; Max-Age=3600 Use http-cookie-age to change how long the browser caches the cookie. You can enter an age in minutes or set the age to 0 to make the browser keep the cookie indefinitely: set http-cookie-age 0 All generated cookies will have the following form: Set-Cookie: FGTServer=E7D01637C4B08E89A6714213A9D85D9C7E4D8158; Version=1; Domain=.server.com; Path=/sales Use http-cookie-generation to invalidate all cookies that have already been generated. The exact value of the generation is not important, only that it is different from any generation that has already been used for cookies in this domain. The simplest approach is to increment the generation by one each time invalidation is required. Since the default is 0, enter the following to invalidate all existing cookies: set http-cookie-generation 1 Use http-cookie-share {disable | same-ip} to control the sharing of cookies across virtual servers in the same virtual domain. The default setting same-ip means that any FGTServer cookie generated by one virtual server can be used by another virtual server in the same virtual domain. For example, if you have an application that starts on HTTP and then changes to HTTPS and you want to make sure that the same server is used for the HTTP and HTTPS traffic then you can create two virtual servers, one for port 80 (for HTTP) and one for port 443 (for HTTPS). As long as you add the same real servers to both of these virtual servers (and as long as both virtual servers have the same number of real servers with the same IP addresses), then cookies generated by accessing the HTTP server are reused when the application changes to the HTTPS server. If for any reason you do not want this sharing to occur then select disable to make sure that a cookie generated for a virtual server cannot be used by other virtual servers. Use https-cookie-secure to enable or disable using secure cookies. Secure cookies are disabled by default because secure cookies can interfere with cookie sharing across HTTP and HTTPS virtual servers. If enabled, then the Secure tag is added to the cookie inserted by the FortiGate unit:
536
Advanced concepts
SCTP is a reliable transport protocol that runs on top of a connectionless packet network (IP). SCTP provides the following services: Acknowledged error-free non-duplicated transfer of user data Data fragmentation to conform to discovered path MTU size Sequenced delivery of user messages within multiple streams, with an option for orderof-arrival delivery of individual user messages Optional bundling of multiple user messages into a single SCTP packet network-level fault tolerance through supporting of multi-homing at either or both ends of an association Congestion avoidance behavior and resistance to flooding and masquerade attacks
SCTP is effective as the transport protocol for applications that require monitoring and session-loss detection. For such applications, the SCTP path and session failuredetection mechanisms actively monitor the connectivity of the session. SCTP differs from TCP in having multi-homing capabilities at either or both ends and several streams within a connection, typically referred to as an association. A TCP stream represents a sequence of bytes; an SCTP stream represents a sequence of messages.
537
Advanced concepts
Source and Destination Port and Verification Tag. Chunk Type, Chunk Flags and Chunk Length Verify that association exists Sequence of Chunk Types (INIT, INIT ACK, etc) Timer checking Four way handshake checking Heartbeat mechanism Protection against INIT/ACK flood DoS attacks, and long-INIT flooding Protection against association hijacking
FortiOS also supports SCTP sessions over IPsec VPN tunnels. FortiOS also supports full traffic and event logging for SCTP sessions.
To add the SCTP custom service - CLI config firewall service custom edit M3UA_service set protocol TCP/UDP/SCTP set sctp-portrange 2905 end
538
Advanced concepts
Tag management
Protocol Incoming interface Source address / mask Destination address / mask Destination Ports Force traffic to: Outgoing interface Gateway Address
132 internal 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 From 2905 to 2905 external 1.1.1.1
To add the policy route - CLI config router policy edit 1 set input-device internal set src 0.0.0.0 0.0.0.0 set dst 0.0.0.0 0.0.0.0 set output-device external set gateway 1.1.1.1 set protocol 132 set start-port 2905 set end-port 2905 end
Tag management
Tag management provide a method of categorizing, or labelling objects within FortiOS using keywords. You can give the following elements a tag, similar to a keyword: IPS signature application signature security policy firewall address
Tagging is way to organize the various elements, especially if you have a large number of addresses, security policies to manage and keep track of. Tagging enables you to break these elements into groups, but each element can belong to more than one group. Tags help you find elements which have something in common, be it a group, user or location. This is very similar to tagging found on photo sharing sites.
FortiOS Handbook v3: System Administration 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
539
Tag management
Advanced concepts
To use tagging, you need to enable it for 1U FortiGate units. It is enabled by default on all 2U FortiGate units and blades. To enable tagging - web-based manager 1 Go to System > Admin > Settings. 2 Select Object Tagging and Coloring. 3 Select Apply. To enable tagging - CLI config system settings set gui-object-tags end
To remove a tag, in the element, click the tag in the Applied Tags list.
Reviewing tags
Tags can be reviewed in one location by going to System > Config > Tag Management. In this screen, all tags used appear. The visual size of the tag name indicates the usage; the bigger the size, the more it is used. By hovering over the keyword, a fly out indicates how many times it has been used. To see where it was used, click the keyword. An Object Usage window displays all the reference categories where the keyword was used, and the number of times. Selecting the expand arrow further details its use. Further, for security policies for example, you can select the View icon and see the details of the particular element. If need be, select the Edit icon to modify the element.
540
Advanced concepts
Tag management
Tagging guidelines
Given the ease that tags can be added to elements in FortiOS, it makes sense to jump right in and begin applying tags to elements and object. However, this type of methodology will lead to problems down the road as new elements are added. A methodology should be considered and developed before applying tags. This doesnt mean you need to develop an entire thesaurus or reference guide for all possibilities of tags. However, taking some time to develop a methodology for the keywords you intend to use will benefit later when new security policies, addresses, and so on are added. Some things to consider when developing a tag list: the hierarchy used for the organization such as region, city location, building location department names and if short forms or long forms are used will acronyms be used or terms spelled out. how granular will the tagging be
As tags are added, previously used tags appear so there is an opportunity to use previously used tags. However, you want to avoid a situation where both accounting and acct are both options. This is also important if there are multiple administrators in different locations to ensure consistency. At any time, you can change or even remove tags. It is best to do a bit of planning ahead of time to avoid unnecessary work later on.
541
Software switch
Advanced concepts
Software switch
A software switch, or soft switch, is a virtual switch that is implemented at the software, or firmware level, rather than the hardware level. Adding a software switch can be used to simplify communication between devices connected to different FortiGate interfaces. For example, using a software switch you can place the FortiGate interface connected to an internal network on the same subnet as your wireless interfaces. Then devices on the internal network can communicate with devices on the wireless network without any additional configuration such as additional security policies, on the FortiGate unit. It can also be useful if you require more hardware ports on for the switch on a FortiGate unit. For example, if your FortiGate unit has a 4-port switch, WAN1, WAN2 and DMZ interfaces, and you need one more port, you can create a soft switch that can include the 4-port switch and the DMZ interface all on the same subnet. These types of applications also apply to wireless interfaces and virtual wireless interfaces and physical interfaces such as those with FortiWiFi and FortiAP unit. Similar to a hardware switch, a software switch functions like a single interface. A software switch has one IP address; all of the interfaces in the software switch are on the same subnet. Traffic between devices connected to each interface are not regulated by security policies, and traffic passing in and out of the switch are affected by the same policy. There are a few things to consider when setting up a software switch: Ensure you create a back up of the configuration. Ensure you have at least one port or connection such as the console port to connect to the FortiGate unit. If you accidentally combine too many ports, you will need a way to undo any errors. The ports that you include must not have any link or relation to any other aspect of the FortiGate unit. For example, DHCP servers, security policies, and so on.
To create a software switch - web-based manager 1 Go to System > Network > Interface and select Create New. 2 Enter a Name for the switch. 3 Set Type to Software Switch. 4 Select the interfaces to add to the switch. 5 Enter an IP address. 6 Select OK. To create a software switch - CLI config system switch-interface edit <switch-name> set type switch set member <interface_list> end config system interface edit <switch_name> set ip <ip_address> set allowaccess https ssh ping end
542
Advanced concepts
Software switch
543
Software switch
Advanced concepts
To merge the interfaces - CLI config system switch-interface edit synchro set type switch set member dmz1 wifi end config system interface edit synchro set ip 10.10.21.12 set allowaccess https ssh ping end
Final steps
With the switch set up, you can now add security policies, DHCP servers an any other configuration that you would normally do to configure interfaces on the FortiGate unit.
544
This FortiOS Handbook chapter contains the following sections: Logging overview provides general information about logging. We recommend that you begin with this chapter as it contains information for both beginners and advanced users as well. Log devices provides information about how to configure your chosen log device. Configuring multiple FortiAnalyzer units or Syslog servers is also included. Logging FortiGate activity provides information about the different log types and subtypes, and how to enable logging of FortiGate features. The SQLite log database provides information about SQLite statements as well as examples that you can use to base your own custom datasets on. Log message usage provides general information about log messages, such as what is a log header. Detailed examples of each log type are discussed as well. For additional information about all log messages recorded by a FortiGate unit running FortiOS 4.0 and higher, see the FortiGate Log Message Reference. Reports provides information about how to configure reports if you have logged to a the FortiGate units hard disk SQL database.
545
546
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Logging overview
This section explains what logging is in relation to your FortiGate unit, what a log message is, and log management practices. These practices can help you to improve and grow your logging requirements. This section also includes information concerning log management practices that help you to improve and grow your logging requirements. This section contains the following topics: What is logging? Log messages Log files Log management practices
What is logging?
Logging records the traffic passing through the FortiGate unit to your network and what action the FortiGate unit took during its scanning process of the traffic. This recorded information is called a log message. After a log message is recorded, it is stored within a log file which is then stored on a log device. A log device is a central storage location for log messages. The FortiGate unit supports several log devices, such as a FortiGuard Analysis and Management Service, and the FortiAnalyzer unit. A FortiGate units system memory and local disk can also be configured to store logs, and because of this, are also considered log devices.
Note: You must subscribe to FortiGuard Analysis and Management Service so that you can configure the FortiGate unit to send logs to a FortiGuard Analysis server.
547
Log messages
Logging overview
3 The FortiGate unit exempts the match, and places the recorded activity (the log message) within the DLP log file. 4 According to the log settings that were configured, logs are stored on the FortiGate units local hard drive. The FortiGate unit places the DLP log file on the local hard drive.
Log messages
Log messages are recorded information containing specific details about what is occurring on your network. Within each log message there are fields. A field is two pieces of information that explain a specific part of the log message. For example, the action field contains login (action=login). The fields within the log message are arranged into two groups; one group, which is first, is called the log header, and the second group is the log body, which contains all other fields. A log header from the FortiGate unit appears as follows when viewed in the Raw format: 2011-01-08 12:55:06 log_id=32001 type=dlp subtype=dlp pri=notice vd=root The log body appears as follows when viewed in the Raw format: policyid=1 identidx=0 serial=73855 src=10.10.10.1 sport=1190 src_port=1190 srcint=internal dst=192.168.1.122 dport=80 dst_port=80 dst_int=wan1 service=https status=detected hostname=example.com url=/image/trees_pine_forest/ msg=data leak detected(Data Leak Prevention Rule matched) rulename=AllHTTP action=log-only severity=1 Logs from other devices, such as the FortiAnalyzer unit and Syslog server, contain a slightly different log header. For example, when viewing FortiGate log messages on the FortiAnalyzer unit, the log header contains the following log fields when viewed in the Raw format: itime=1302788921 date=20110401 time=09:04:23 devname=FG50BH3G09601792 device_id=FG50BH3G09601792 log_id=0100022901 type=event subtype=system pri=notice vd=root Within the log header, there is a type field, and this field indicates the type of log file the log message is put into after it is recorded. The log header also contains the log_id field. The log_id field contains the unique identification number that is associated with that particular log message. For example, 32001. All log messages have a unique number that helps to identify them within their log file. The log header also contains information about the log severity level and is indicated in the pri field. This information is important because the severity level indicates various severities that are occurring. For example, if the pri field contains alert, you need to take immediate action with regards to what occurred. There are six log severity levels. The log severity level is the level at which the FortiGate unit records logs at. The log severity level is defined when configuring the logging location. The FortiGate unit logs all messages at and above the logging severity level you select. For example, if you select Error, the unit logs Error, Critical, Alert, and Emergency level messages.
Table 28: Log severity levels Levels 0 - Emergency 1 - Alert Description The system has become unstable. Immediate action is required.
548
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Logging overview
Log messages
Table 28: Log severity levels Levels 2 - Critical 3 - Error 4 - Warning 5 - Notification 6 - Information Description Functionality is affected. An error condition exists and functionality could be affected. Functionality could be affected. Information about normal events. General information about system operations.
The Debug severity level, not shown in Table 28, is rarely used. It is the lowest log severity level and usually contains some firmware status information that is useful when the FortiGate unit is not functioning properly. Debug log messages are only generated if the log severity level is set to Debug. Debug log messages are generated by all types of FortiGate activities. The log body contains the rest of the information of the log message, and this information is unique to the log message itself. There are no two log message bodies that are alike, however, there may be the same fields in most log message bodies, such as the srcintf log field or identidix log field. For detailed information on all log messages, see the FortiGate Log Message Reference.
Log body: policyid=1 identidx=0 serial=73855 src=10.10.10.1 sport=1190 src_port=1190 srcint=internal dst=192.168.1.122 dport=80 dst_port=80 dst_int=wan1 service=https status=detected hostname=example.com url=/image/trees_pine_forest/ msg=data leak detected(Data Leak Prevention Rule matched) rulename=AllHTTP action=log-only severity=1
549
Log messages
Logging overview
policyid=(1)
The ID number of the firewall policy that applies to the session or packet. Any policy that is automatically added by the FortiGate will have an index number of zero. The identity-based policy identification number. This field displays zero if the firewall policy does not use an identity-based policy; otherwise, it displays the number of the identity-based policy entry that the traffic matched. This number is not globally unique, it is only locally unique within a given firewall policy. The serial number of the firewall session of which the event happened. The source IP address. The source port number. The source port number. The source interface name. The destination IP address. The destination port number. The destination port number. The destination interface name. The IP network service that applies to the session or packet. The services displayed correspond to the services configured in the firewall policy. The action the FortiGate unit took. The home page of the web site.
identidx=(0)
serial=(73855) src=(10.10.10.1) sport=(1190) src_port=(1190) srcint=(internal) dst=(192.168.1.122) dport=(80) dst_port=(80) dst_int=(wan1) service=(https)
status=(detected) hostname=(example.com)
url=(/image/trees_pine_for The URL address of the web page that the user was viewing. est/) msg=(data leak detected(Data Leak Prevention Rule matched) rulename=(All-HTTP) action=(log-only) Explains the FortiGate activity that was recorded. In this example, the data leak that was detected matched the rule, All-HTTP, in the DLP sensor. The name of the DLP rule within the DLP sensor. The action that was specified within the rule. In some rules within sensors, you can specify content archiving. If no action type is specified, this field display log-only. The level of severity for that specific rule.
severity=(1)
550
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Logging overview
Log files
Table 29: Explanation of an example of a Debug log message date=(2010-0125) time=(17:25:54) log_id=(93000) The year, month and day of when the event occurred in the format yyyy-mmdd. The hour, minute and second of when the event occurred in the format hh:mm:ss. A five-digit unique identification number. The number represents that log message and is unique to that log message. This five-digit number helps to identify the log message. The section of system where the event occurred. There are eleven log types in FortiOS 4.0.
type=(webfilter)
subtype=(urlfilte The subtype of the log message. This represents a policy applied to the FortiGate feature in the firewall policy. r) pri=(debug) msg=(found in cache) The severity level of the event. There are six severity levels to specify. Explains the activity or event that the FortiGate unit recorded.
The web-based manager is not the only place to view log messages. You can also view log messages from the CLI. For more information about viewing log messages, see Viewing log messages and archives on page 583.
Log files
Each log message that is recorded by the FortiGate unit is put into a log file. The log file contains the log messages that belong to that log type, for example, traffic log messages are put in the traffic log file. When downloading the log file from Log&Report > Log Access, the file name indicates the log type and the device on which it is stored on. This name is in the format <logtype>log<logdevice_logtype>.log. For example, tlog0100.log. The log device and log type part are in numerical format. In the example, tlog0100.log, 01 indicates that the traffic log file was stored on the units local hard drive and 00 indicates that it is a traffic log file. The log devices that are indicated in a log files name are as follows: 00 indicates that the logs are stored on memory 01 indicates that the logs are stored on the units local hard drive 02 indicates that the logs are stored on a FortiAnalyzer unit 04 indicates that the logs are stored on the FortiGuard Analytics server
551
Logging overview
The log type number that comes after the log device number in the log files name is as follows: 00 traffic log 02 antivirus 04 IDS or attack log 06 content 10 Application control log In Table 30, each of the five log files are explained.
Table 30: Log Types based on network traffic Log Type Traffic Event File name tlog.log elog.log Description The traffic log records all traffic to and through the FortiGate interface. The event log records management and activity events. For example, when an administrator logs in or logs out of the web-based manager. The UTM log file contains all UTM-related log messages, such as antivirus and attack. The following explains the log messages that are included in the UTM log file: Antivirus records virus incidents in Web, FTP, and email traffic. Web records HTTP FortiGate log rating errors including web content blocking actions that the FortiGate unit performs Attack records attacks that are detected and prevented by the FortiGate unit Email Filter records blocking of email address patterns and content in SMTP, IMAP, and POP3 traffic Application Control records data detected by the FortiGate unit and the action taken against the network traffic depending on the application that is generating the traffic, for example, instant messaging software, such as MSN Messenger Data Leak Prevention records log data that is considered sensitive and that should not be made public. This log also records data that a company does not want entering their network The DLP archive log, or clog.log, records the following log messages: email messages (using protocols such as SMTP or POP3) FTP events quarantine IPS packet instant messaging VoIP The Network Vulnerability Scan log records vulnerabilities during the scanning of the network.
01 event log 03 web filter 05 spam log or email filter log 09 DLP log
UTM
ulog.log
DLP archive
clog.log
Netscan
nlog.log
552
Logging overview
This plan should provide you with an outline, similar to the following: what FortiGate activities you want and/or need logged (for example, DLP archives) the logging device best suited for your network if you want or require archival of log files ensuring logs are not lost in the event a failure occurs.
After the plan is implemented, you need to manage the logs and be prepared to expand on your log setup when the current logging requirements are outgrown. Good log management practices help you with these tasks. Log management practices help you to improve and manage logging requirements. Logging is an ever-expanding tool that can seem to be a daunting task to manage. The following management practices will help you when issues arise, or your logging setup needs to be expanded. 1 Revisit your plan on a yearly basis to verify that your logging needs are being met by your current log setup. For example, your company or organization may require archival logging, but not at the very beginning. Archival logs are stored on either a FortiGate units local hard drive, a FortiAnalyzer unit, or a FortiGuard Analysis server. 2 Configure an alert message that will notify you of activities that are important to be aware about. For example, a branch office does not have a FortiGate administrator so you need to know, at all times, that the IPSec VPN tunnel is up and running. An alert email notification message can be configured for sending only IPSec tunnel errors. 3 Ensure that your backup solution is up-to-date. If you have recently expanded your log setup, you should also review your backup solution. The backup solution provides a way to ensure that all logs are not lost in the event that the log device fails or issues arise with the log device itself.
553
Logging overview
554
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
SQL overview
The syntax for SQL queries is based on the SQLite3 syntax (see http://www.sqlite.org/lang.html for more information). There is an additional convenience macro, F_TIMESTAMP, that allows you to easily specify a time interval for the query. It takes this form: F_TIMESTAMP(base_timestring, unit, relative value). For example, F_TIMESTAMP('now','hour','-23') means last 24 hours or that the hour in the timestamp is 23 less than now. The FortiGate unit will automatically translate the macro into SQLite3 syntax. You can use the following CLI commands to write SQL statements to query the SQLite database. config report dataset edit <dataset_name> set query <sql_statement> next end For more information about specific examples that are used in creating custom datasets, see the SQLite statement examples on page 556.
555
CLI commands
config report dataset edit "appctrl.Dist.Type.last24h" set query "select app_type, count(*) as totalnum from app_control_log where timestamp >= F_TIMESTAMP('now','hour','-23') and (app_type is not null and app_type!='N/A') group by app_type order by totalnum desc" next
556
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
CLI commands
config report dataset edit "appctrl.Count.Bandwidth.Top10.Apps.last24h" set query "select (timestamp-timestamp%3600) as hourstamp, (CASE WHEN app!=\'N/A\' and app!=\'\' then app ELSE service END) as appname, sum(sent+rcvd) as bandwidth from traffic_log where timestamp >= F_TIMESTAMP(\'now\',\'hour\',\'-23\') and (appname in (select (CASE WHEN app!=\'N/A\' and app!=\'\' then app ELSE service END) as appname from traffic_log where timestamp >= F_TIMESTAMP(\'now\',\'hour\',\'-23\') group by appname order by sum(sent+rcvd) desc limit 10)) group by hourstamp, appname order by hourstamp desc" next
557
edit top_attacks_1hr set log-type attack set time-period last-n-hours set period-last-n 1 set query SELECT attack_id, COUNT( * ) AS totalnum FROM $log WHERE $filter and attack_id IS NOT NULL GROUP BY attack_id ORDER BY totalnum DESC LIMIT 10 end
No data is covered.
Connection problems
If well formed queries do not produce results, and logging is turned on for the log type, there may be a database configuration problem with the remote database. Ensure that: MySQL is running and using the default port 3306. You have created an empty database and a user who has read/write permissions for the database. Here is an example of creating a new MySQL database named fazlogs, and adding a user for the database: #Mysql u root p mysql> Create database fazlogs; mysql> Grant all privileges on fazlogs.* to fazlogger@* identified by fazpassword; mysql> Grant all privileges on fazlogs.* to fazlogger@localhost identified by fazpassword;
558
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Figure 72: Example of an SQL database error message that appears after logging in to the web-based manager
The error message indicates that the SQL database is corrupted and cannot be updated with the SQL schemas any more. When you see this error message, you can do one of the following: select Cancel and back up all log files; then select Rebuild to rebuild the database select Rebuild only after verifying that all log files are backed up to a safe location.
When you select Cancel, no logging is recorded by the FortiGate unit regardless of the log settings that are configured on the unit. When you select Rebuild, all logs are lost because the SQL database is erased and then rebuilt again. Logging resumes after the SQL database is rebuilt. If you want to view the databases errors, use the diag debug sqldb-error-read command in the CLI. This command indicates exactly what errors occurred, and what tables contain those errors. Log files are backed up using the execute log backup {alllogs | logs} command in the CLI. You must use the text variable when backing up log files because the text variable allows you to view the log files outside the FortiGate unit. When you back up log files, you are really just copying the log files from the database to a specified location, such as a TFTP server.
559
560
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Log devices
The FortiGate unit supports a variety of logging devices, including the FortiGuard Analysis and Management Service. This provides great flexibility when choosing a log device for the first time, as well as when logging requirements change. This section explains how to configure your chosen log device, as well as how to configure multiple FortiAnalyzer units or Syslog servers. This section also includes how to log to a FortiGuard Analysis server, which is available if you subscribed to the FortiGuard Analysis and Management Service. The following topics are included in this section: Choosing a log device Example: Setting up a log device and backup solution Configuring the FortiGate unit to store logs on a log device Troubleshooting issues Testing FortiAnalyzer and FortiGuard Analysis server connections Connecting to a FortiAnalyzer unit using Automatic Discovery Uploading logs to a FortiAnalyzer or a FortiGuard Analysis server
Note: You may need to reschedule uploading or rolling of log files because the size of logs files is reduced in FortiOS 4.0 MR1 and higher. Reduction in size provides more storage room for large amounts of log files on log devices.
561
Log devices
These logs devices, except for the FortiGate system memory and local hard disk, can also be used as a backup solution. For example, you configure logging to the FortiGate units local disk, but also configure logging to a FortiGuard Analysis server and archive logs to both the FortiGuard Analysis server and a FortiAnalyzer unit.
562
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Log devices
Figure 73: Example of an integrated FortiAnalyzer unit and Syslog servers in a network
In
te
rn
al
Ne
For
tw or k
tiG
ate
121
121
121
563
Log devices
4 Select Apply. The FortiGate unit logs all messages at and above the logging severity level you select. If you want to archive IPS logs, use the CLI to enable this log. To send logs to the units system memory - CLI 1 Log in to the CLI. 2 Enter the following command syntax: config log memory setting set diskfull <overwrite> set ips-archive {enable | disable} set status {enable | disable} end config log memory global-setting set max-size <byte_size> set full-final-warning-threshold <integer> set full-first-warning-threshold <integer> set full-second-warning-threshold <interger> end Use the config log memory filter command to disable the FortiGate features you do not want to log. By default, most FortiGate features are enabled in the config log memory filter command.
Note: If you have disabled SQL logging and have factory defaults on the FortiGate unit, and then you upgrade, the upgrade will not automatically enable SQL logging.
To log to the hard disk on a FortiGate unit - CLI 1 Log in to the CLI. 2 Enter the following command syntax: config log disk setting set status {enable | disable} set ips-archive {enable | disable} set dlp-archive-quota <integer> set max-log-file-size <size> set storage <storage_location> set diskfull {nolog | overwrite} set report-quota <integer> set log-quota <quota_size>
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
564
Log devices
set set set set set set set set set set set set set end
dlp-archive-quota <quota_size> report-quota (quota_size> upload {enable | disable} upload-format {compact | text} sql-max-size <maximum_size> sql-max-size-action {overwrite | nolog} sql-oldest-entry <integer> drive-standby-time full-first-warning-threshold full-second-warning-threshold full-final-warning-threshold ms-per-transaction <integer> rows-per-transaction <integer>
Use the config log disk filter command to disable the FortiGate features you do not want to log. By default, most FortiGate features are enabled in the config log disk filter command.
565
Log devices
The following assumes that you have already configured the FortiGuard Analysis and Management Service account ID information in System > Maintenance > FortiGuard. To send logs to a FortiGuard Analysis server - CLI 1 Log in to the CLI. 2 Enter the following command syntax: config log fortiguard setting set status {enable | disable} set quotafull {nolog | overwrite} end
4 Select Apply. To log to a Syslog server - CLI 1 Log in to the CLI. 2 Enter the following command syntax: config log syslogd setting set status {enable | disable} set server <address_ipv4> set port <port_integer> set csv {enable | disable}
566
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Log devices
set facility {alert | audit | auth | authpriv | clock | cron | daemon | ftp | kernel | local0 | local1 | local2 | local3 | local4 | local5 | local6 | local7 | lpr | mail | news | ntp | syslog | user | uucp} end
Example
This example shows how to enable logging to and set an IP address for a remote NetIQ WebTrends server.
config log webtrends settings
567
Log devices
You can configure multiple FortiAnalyzer units or Syslog servers within the CLI. This topic includes the following: Configuring multiple FortiAnalyzer units Configuring multiple Syslog servers Example of configuring multiple FortiAnalyzer units
568
Log devices
569
Log devices
570
Log devices
Troubleshooting issues
end 8 Repeat steps 6 and 7 for FortiAnalyzer_2. Logs are now configured to go to multiple FortiAnalyzer units.
Troubleshooting issues
From time to time, issues may arise due to connectivity or logging has stopped altogether. The following provides information on troubleshooting these issues.
571
Log devices
2 In the Logging and Archiving section, under Upload logs remotely, select Test Connectivity beside the FortiAnalyzer units IP address field. When you select Test Connectivity, a window appears with general information about the FortiAnalyzer unit, disk space available and used on the FortiAnalyzer unit, as well as privileges that the FortiGate unit while connected to the FortiAnalyzer unit. 3 Select Close when you are done viewing the connection status and general information.
572
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Log devices
To connect using automatic discovery 1 Log in to the CLI. 2 Enter the following command syntax: config log fortianalyzer setting set status {enable | disable} set server <ip_address> set gui-display {enable | disable} set address-mode auto-discovery end If your FortiGate unit is in Transparent mode, the interface using the automatic discovery feature will not carry traffic. For more information about how to enable the interface to also carry traffic when using the automatic discovery feature, see the Fortinet Knowledge Base article, Fortinet Discovery Protocol in Transparent mode.
Note: The FortiGate unit searches within the same subnet for a response from any available FortiAnalyzer units.
To upload logs to a FortiGuard Analysis server 1 Go to Log&Report > Log Config > Log Setting. 2 In the Logging and Archiving section, select the check box beside Upload logs remotely. 3 Select FortiGuard Analysis and Management Service (Daily at 00:00). 4 Enter the account ID in the Account ID field. 5 Select Apply. 6 To configure the daily upload time, log in to the CLI. 7 Enter the following to configure when the upload occurs, and the time when the unit uploads the logs: config log fortiguard setting set upload-interval {daily | weekly | monthly} set upload-time <hh:mm> end To upload logs to a FortiAnalyzer unit 1 Go to Log&Report > Log Config > Log Settings.
573
Log devices
2 In the Logging and Archiving section, select the check box beside Upload logs remotely. 3 Select FortiAnalyzer (Daily at 00:60). 4 Enter the FortiAnalyzer units IP address in the IP Address field. 5 To configure the daily upload time, log in to the CLI. 6 Enter the following to configure when the upload occurs, and the time when the unit uploads the logs: config log fortianalyzer setting set upload-interval {daily | weekly | monthly} set upload-time <hh:mm> end 7 To change the upload time, in the web-based manager, select Change beside the upload time period, and then make the changes in the Upload Schedule window. Select OK.
574
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Logs
Logs record FortiGate activity, providing detailed information about what is happening on your network. This recorded activity is found in log files, which are stored on a log device. However, logging FortiGate activity requires configuring certain settings so that the FortiGate unit can record the activity. These settings are often referred to as log settings, and are found in most UTM features, such as profiles, and include the event log settings, found on the Event Log page. Log settings provide the information that the FortiGate unit needs so that it knows what activities to record. This topic explains what activity each log file records, as well as additional information about the log file, which will help you determine what FortiGate activity the FortiGate unit should record. This topic includes the following: Traffic Event Data Leak Prevention Application control Antivirus Web Filter IPS (attack) Packet logs Email filter Archives (DLP) Network scan
575
Logs
Traffic
Traffic logs record the traffic that is flowing through your FortiGate unit. Since traffic needs firewall policies to properly flow through the unit, this type of logging is also referred to as firewall policy logging. Firewall policies control all traffic that attempts to pass through the FortiGate unit, between FortiGate interfaces, zones and VLAN sub-interfaces. Logging traffic works in the following way: firewall policy has logging enabled on it (Log Allowed Traffic or Log Violation Traffic) packet comes into an inbound interface a possible log packet is sent regarding a match in the firewall policy, such as URL filter traffic log packet is sent, per firewall policy packet passes and is sent out an interface
Traffic log messages are stored in the traffic log file. Traffic logs can be stored any log device, even system memory.
Other Traffic
The traffic log also records interface traffic logging, which is referred to as other traffic. Other traffic is enabled only in the CLI. When enabled, the FortiGate unit records traffic activity on interfaces as well as firewall policies. Logging other traffic puts a significant system load on the FortiGate unit and should be used only when necessary. Logging other traffic works in the following way: firewall policy has logging enabled on it (Log Allowed Traffic or Log Violation Traffic) and other-traffic packet comes into an interface interface log packet is sent to the traffic log that is enabled on that particular interface possible log packet is sent regarding a match in the firewall policy, such as URL filter interface log packet is sent to the traffic log if enabled on that particular interface packet passes and is sent out an interface interface log packet is sent to traffic (if enabled) on that particular interface
Event
The event log records administration management as well as FortiGate system activity, such as when a configuration has changed, admin login, or high availability (HA) events occur. Event logs are an important log file to record because they record FortiGate system activity, which provides valuable information about how your FortiGate unit is performing. Event logs help you in the following ways: keep track of configuration setting changes IPsec negotiation, SSL VPN and tunnel activity quarantine events, such as banned users system performance HA events and alerts firewall authentication events wireless events on models with WiFi capabilities activities concerning modem and internet protocols L2TP, PPP and PPPoE VIP activities
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
576
Logs
AMC disks bypass mode VoIP activities that include SIP and SCCP protocols.
The FortiGate unit records event logs only when events are enabled.
A DLP sensor must have log settings enabled for each DLP rule and compound rule, as well as applied to a firewall policy so that the FortiGate unit records this type of activity. A DLP sensor can also contain archiving options, which these logs are then archived to the log device.
NAC Quarantine
Within the DLP sensor, there is an option for enabling NAC Quarantine. The NAC Quarantine option allows the FortiGate unit to record details of DLP operation that involve the ban and quarantine actions, and sends these to the event log file. The NAC Quarantine option must also be enabled within the Event Log settings. When enabling NAC quarantine within a DLP Sensor, you must enable this in the CLI because it is a CLIonly command.
Application control
Application control logs provide detailed information about the traffic that an application is generating, such as Skype. The application control feature controls the flow of traffic from a specific application, and the FortiGate unit examines this traffic for signatures that the application generates. The log messages that are recorded provide information such as the type of application being used (for example P2P software), and what type of action the FortiGate unit took. These log messages can also help you to determine the top ten applications that are being used on your network. This feature is called application control monitoring and you can view the information from a widget on the Executive Summary page. The application control list that is used must have Enabled Logging selected within the list, as well as logging enabled within each application entry. Each application entry can also have packet logging enabled. Packet logging for application control records the packet when an application type is identified, similar to IPS packet logging. Logging of application control activity can only be recorded when an application control list is applied to a firewall policy, regardless of whether or not logging is enabled within the application control list.
577
Logs
Antivirus
Antivirus logs are recorded when, during the antivirus scanning process, the FortiGate unit finds a match within the antivirus profile, which includes the presence of a virus or grayware signature. Antivirus logs provide a way to understand what viruses are trying to get in, as well as additional information about the virus itself, without having to go to the FortiGuard Center and do a search for the detected virus. The link is provided within the log message itself. These logs provide valuable information about: name of the detected virus name of the oversized file or infected file action the FortiGate unit took, for example, a file was blocked URL link to the FortiGuard Center which gives detailed information about the virus itself
The antivirus profile must have log settings enabled within it so that the FortiGate unit can record this activity, as well as having the antivirus profile applied to a firewall policy.
Web Filter
Web filter logs record HTTP traffic activity. These log messages provide valuable and detailed information about this particular traffic activity on your network. Web filtering activity is important to log because it can inform you about: what types of web sites are employees accessing if users try to access a banned web site and how often this occurs network congestion due to employees accessing the Internet at the same time alerts you to web-based threats when users surf non-business-related web sites
Web Filter logs are an effective tool to help you determine if you need to update your web filtering settings within a web filter profile due to unforeseen web-based threats, or network congestion. These logs also inform you about web filtering quotas that were configured for filtering HTTP traffic as well. You must configure log settings within the web filter profile as well as apply it to a firewall policy so that the FortiGate unit can record web filter logs.
IPS (attack)
IPS logs, also referred to as attack logs, record attacks that occurred against your network. Attack logs contain detailed information about whether the FortiGate unit protected the network using anomaly-based defense settings or signature-based defense settings, as well as what the attack was. The IPS or attack log file is especially useful because the log messages that are recorded contain a link to the FortiGuard Center, where you can find more information about the attack. This is similar to antivirus logs, where a link to the FortiGuard Center is provided as well and informs you of the virus that was detected by the FortiGate unit. An IPS sensor with log settings enabled must be applied to a firewall policy so that the FortiGate unit can record the activity.
578
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Packet logs
When you enable packet logging within an IPS signature override or filter, the FortiGate unit examines network packets, and if a match is found, saves them to the attack log. Packet logging is designed to be used as a diagnostic tool that can focus on a narrow scope of diagnostics, rather than a log that informs you of what is occurring on your network. You should use caution when enabling packet logging, especially within IPS filters. Filter configuration that contains thousands of signatures could potentially cause a flood of saved packets, which would take up a lot of storage space on the log device. This would also take a great deal of time to sort through all the log messages, as well as consume considerable system resources to process. You can archive packets, however, you must enable this option on the Log Setting page. If your log configuration includes multiple FortiAnalyzer units, packet logs are only sent to the primary, or first FortiAnalyzer unit. Sending packet logs to the other FortiAnalyzer units is not supported.
Email filter
Email filter logs, also referred to as spam filter logs, records information regarding the content within email messages. For example, within an email filter profile, a match is found that finds the email message to be considered spam. Email filter logs are recorded when the FortiGate unit finds a match within the email filter profile and logging settings are enabled within the profile.
Archives (DLP)
Recording DLP logs for network use is called DLP archiving. The DLP engine examines email, FTP, IM, NNTP, and web traffic. Archived logs are usually saved for historical use and can be accessed at any time. IPS packet logs can also be archived, within the Log Settings page. You can use the two default DLP sensors that were configured specifically for archiving log data, Content_Archive and Content_Summary. They are available in UTM > Data Leak Prevention > Sensor. Content_Archive provides full content archiving, while Content_Summary provides summary archiving. You must enable the archiving to record log archives. Logs are not archived unless enabled, regardless of whether or not the DLP sensor for archiving is applied to the firewall policy.
Network scan
Network scan logs are recorded when a scheduled scan of the network occurs. These log messages provide detailed information about the networks vulnerabilities regarding software as well as the discovery of any vulnerabilities. A scheduled scan must be configured, as well as logging enabled within the Event Log settings, for the FortiGate unit to record these log messages.
579
When you are ready to enable logging of the FortiGate activities you have chosen, you must apply them to a firewall policy. When applied to a firewall policy, the FortiGate unit determines whether to record the activity or event based on what is applied on the firewall policy and configured within the Log Config page. The following explains how to enable and configure logging on your FortiGate unit. This topic includes the following: Enabling logging within a firewall policy Enabling logging of events Enabling SQL logging Configuring IPS packet logging Configuring NAC quarantine logging
580
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Firewall All firewall-related events, such as user authentication. authentication event Pattern update Configuration event All pattern update events, such as antivirus and IPS pattern updates and update failures. All configuration changes
GTP service event All GTP service events. (FortiOS Carrier only) Notification event All notification events. MMS statistics event All MMS statistics events. (FortiOS Carrier only) Explicit web proxy event All explicit web proxy events.
SSL VPN user All administrator events related to SSL VPN, such as SSL authentication event configuration and CA certificate loading and removal. SSL VPN All administration events related to SSL VPN, such as SSL administration event configuration and CA certificate loading and removal. SSL VPN session event VIP ssl event VIP server health monitor event WiFi activity event All session activity such as application launches and blocks, timeouts, verifications and so on. All server-load balancing events that are happening during SSL session, especially details about handshaking. All related VIP server health monitor events that occur when the VIP health monitor is configured, such as an interface failure. All WiFi activities, such as Rogue AP.
CPU & memory usage Real-time CPU and memory events only, at 5-minute intervals. (every 5 min) VoIP event All VoIP activity, such as SIP and SCCP violations. AMC interface enters All AMC interface bypass mode events that occur. bypass mode event NAC Quarantine event DNS lookup All endpoint activity that have quarantined hosts when Endpoint NAC is checking hosts. All lookups that are DNS-related.
581
582
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
583
From the Log & Archive Access menu, you can view detailed information about the log message in a log view table, located (by default) at the bottom of the page. Each page contains this log message viewer table, as well as the option of downloading the raw log file. Raw log format is how the log message displays in the log file, and contains sometimes contains additional log fields that are not present in the log message viewer table on the page. When viewing log messages on the web-based manager, you are viewing them in Formatted format. Viewing logs in Raw format allows you to view all log fields, as well as making a log file available regardless of whether you are archiving logs or not. You download the log file by selecting Download Raw Log. The log file is named in the following format: <log_type><log_number><log_subtype_number>.log. For example, clog0112.log, which is the archive log downloaded. The time period is the day and month of when the log was downloaded, not the time period of the log messages within the file itself. You do not have to view log messages from only the web-based manager. You can view log messages from the CLI as well using the execute log display command. This command allows you to see specific log messages that you already configured within the execute log filter command. The execute log filter command configures what log messages you will see, how many log messages you can view at one time (a maximum of 1000 lines of log messages), and the type of log messages you can view. For example, log messages from the DLP log file. This topic contains the following: Viewing log messages from the web-based manager and CLI Viewing log messages using the log table
To view log messages from the web-based manager 1 Go to Log&Report > Log & Archive Access. 2 Select the log menu that you want to view log messages in. For example, the attack log messages in Log&Report > Log & Archive Access > Traffic Log. 3 Within the page, use any one of the following to view each log message: Download Raw Log downloads the log file to your PC. See Downloading log messages and viewing them from your computer on page 585. Column Settings customize what columns display on the page. See Customizing the display of log messages on page 586 Filter Settings filter the information within the page. See Customizing the display of log messages on page 586 Detailed Information display the log table on the right side of the page, at the bottom (default), or hide the log table. See
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
584
4 To display current log messages on the page, select Refresh. To view log messages from the CLI 1 Enter the following to configure how the log messages will be displayed, as well as what log messages you want to display: execute log filter category <category_number> execute log filter start-line <line_number> execute log filter view-lines <lines_per_view> 2 Enter the following to display the logs messages within the CLI: execute log display 3 Log messages appear and stop when the maximum number of view-lines is reached.
585
586
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
The following is an example of how to filter and customize the display of application control log messages. Use the following example to help you to filter and customize the display of log messages in the web-based manager.
587
Before configuring alert email, you must configure at least one DNS server if you are configuring with an Fully Qualified Domain Server (FQDN). The FortiGate unit uses the SMTP server name to connect to the mail server, and must look up this name on your DNS server. You can also specify an IP address. To configure an alert email message 1 Go to Log&Report > Log Config > Alert E-mail. 2 On the Alert E-mail page, enter the information for the SMTP server. 3 If the SMTP user requires authentication, enter the information after selecting the check box beside Enable. 4 Select Apply to apply the SMTP server information. 5 To verify these settings are correct, select Test Connectivity. 6 To send an alert email message based on a logs severity, select Send to alert email for logs based on severity, and then select a severity from the Minimum log level drop-down list. 7 To send an alert email message based on different activities, such as an administrator logging in and out, select from the following options:
Interval Time (1-9999 minutes) Intrusion detected Virus detected Enter the minimum time interval between consecutive alert emails. Use this to rate-limit the volume of alert emails. Select if you require an alert email message based on attempted intrusion detection. Select if you require an alert email message based on virus detection.
Web access blocked Select if you require an alert email message based on blocked web sites that were accessed. HA status changes Violation traffic detected Select if you require an alert email message based on HA status changes. Select if you require an alert email message based on violated traffic that is detected by the FortiGate unit.
Firewall Select if you require an alert email message based on firewall authentication failure authentication failures. SSL VPN login failure Select if you require an alert email message based on any SSL VPN logins that failed. Administrator login/logout IPSec tunnel errors L2TP/PPTP/PPPoE errors Configuration changes FortiGuard license expiry time (1-100 days) Disk usage (1-99%) Select if you require an alert email message based on whether administrators log in or out. Select if you require an alert email message based on whether there is an error in the IPSec tunnel configuration. Select if you require an alert email message based on errors that occurred in L2TP, PPTP, or PPPoE. Select if you require an alert email message based on any changes made to the FortiGate configuration. Enter the number of days before the FortiGuard license expiry time notification is sent. Enter a number for the disk usage threshold, in percent.
FortiGuard log quota Select if you require an alert email message based on the FortiGuard Analysis server log disk quota getting full. usage
8 Select Apply.
588
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Note: The default minimum log severity level is Alert. If the FortiGate unit collects more than one log message before an interval is reached, the FortiGate unit combines the messages and sends out one alert email.
589
590
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
591
How to use log messages to help verify settings and for testing purposes
How to use log messages to help verify settings and for testing purposes
You can use log message to verify settings, as well as for testing connections. The following are examples that explain various situations where you can use log message to verify settings within a feature, and also for testing purposes.
592
How to use log messages to help verify settings and for testing purposes
Both these log messages indicate that the scan discovered two separate service-detection events. 2010-04-05 13:34:31 log_id=1600004100 type=netscan subtype=discovery pri=notice vd=root action=service-detection ip=10.10.20.3 service=microsoft-ds proto=tcp prot=445 2010-04-05 13:34:31 log_id=1600004100 type=netscan subtype=discovery pri=notice vd=root action=service-detection ip=10.10.20.3 service=netbios-ssn proto=tcp port=139 4099 This log message indicates that the scan discovered a host, and explains the hosts operating system, family that the OS belongs to, the type of generation, and the vendor or company that created the OS. 2010-04-05 13:34:31 log_id=1600004099 type=netscan subtype=discovery pri=notice vd=root action=host-detection ip=10.10.20.3 os=Windows XP os_family=Windows os_gen=NT/2K/XP os_vendor=Microsoft
Using diag log test to verify logs are sent to a log device
After setting up a log device, you may want to verify that everything is working properly, including sending of logs to the log device. The diag log test command is used to create various test logs. diag log test
FortiOS Handbook v3: Logging and Reporting 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
593
How to use log messages to help verify settings and for testing purposes
The command can also be used when a Syslog server is not receiving certain logs. When the command is entered in the CLI, an output similar to the following appears below the line: generating a system event message with level warning generating an infected virus message with level warning generating a blocked virus message with level warning generating a URL block message with level warning generating a DLP message with level warning generating an attack detection message with level warning generating an application control IM message with level information generating an antispam message with level notification generating an allowed traffic message with level notice generating a wanopt traffic log message with level notification generating a HA event message with level warning generating netscan log messages with level notice generating a VOIP event message with level information generating authentication event messages These log messages can be viewed from the Log Access menu. The following is a test log message that may be generated and recorded by the FortiGate unit. It is shown as it would be displayed in Raw format in system memory. 2010-08-10 09:34:22 log_id=0508020480 type=emailfilter subtype=smtp pri=notice policyid=12345 identidx=67890 serial=312 user=user group=group vd=root src=1.1.1.1 sport=2560 src_port=2560 src_int=lo dst=2.2.2.2 dport=5120 dst_port=5120 dst_int=eth0 service=mm1 carrier_ep=carrier endpoint profile=N/A profilegroup=N/A profiletype=N/A status=detected from=from@xxx.com to=to@xxx.com tracker=Tracker msg=SpamEmail
594
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Reports
Reports provide a way to analyze log data without manually going through a large amount of logs to get to the information you need. This section explains how to configure a FortiOS report and how to modify the existing default FortiOS UTM report. The FortiOS default UTM report is a report that gathers UTM activity information and compiles it into a report. This section also explains how to view these reports. The following topics are included in this section: FortiOS reports Configuring a FortiOS report Viewing reports Report example
Note: Configuring reports from other log devices, such as a Syslog server, are not supported. If you want to configure a report from logs stored on a FortiAnalyzer unit, you must go directly to the FortiAnalyzer unit itself; starting in FortiOS 4.0 MR3, support for configuring a FortiAnalyzer schedule is no longer available. From FortiOS 4.0 MR3 and onward, executive summary reports are no longer supported and existing summary reports are not carried forward.
Note: You can only configure reports if the FortiGate unit has a hard disk and SQL logging is enabled.
FortiOS reports
Reports provide a clear, concise overview of what is happening on your network based on log data, without manually going through large amounts of logs. Reports can be configured on a FortiGate unit or a FortiAnalyzer unit. However, in this document only FortiOS reports are explained. FortiOS reports are the reports that are generated on the FortiGate unit. FortiAnalyzer reports are configured on a FortiAnalyzer unit and for information about those reports, see the FortiAnalyzer Administration Guide. FortiOS reports are configured from logs stored on the FortiGate units hard drive. These reports, generated by the FortiGate unit itself, provide a central location for both configuring and generating reports. A default FortiOS report, called the FortiGate UTM Daily Activity Report, is available for you to modify to your requirements. The default report provides a way to quickly and easily set up your own report from within the web-based manager. The default FortiOS report is a report that compiles UTM activity from various UTM-related logs, such as virus and attack logs. FortiOS reports consist of multiple parts, regardless of whether its the default FortiOS report or a report that you have configured from scratch, and these parts are configured separately and added to the layout. These parts of a FortiOS report are: charts (including datasets within the charts themselves) themes (including styles which are within the themes themselves) images layout
595
Reports
Charts are used to display the log information in a clear and concise way using graphs and tables. Charts contain datasets, which are SQLite queries and help the FortiGate unit to add specific log information into the chart using the log information that is stored in the SQLite database on the local hard disk. If you want to configure a chart, you must configure the dataset first. Datasets are required for each chart, and if there is no dataset included in a chart, the chart will not be saved. Themes provide a one-step style application for report layouts. Themes contain various styles, including styles for the table of contents, headings, headers and footers, as well as the margins of the reports pages. Themes are applied to layouts. The styles that are applied to themes are configured separately. You can easily upload your company or organizations logo to use within a report. By uploading your company or organizations logo and applying it to a report, you provide a personalized report that is recognizable as your company or organizations report. The image must be in JPEG, JPG or PNG format. Layouts provide a way to incorporate the charts, images, and themes that are configured to create a formatted report. A layout is used as a template by the FortiGate unit to compile and then generate the report. You can reset the reports you have configured, as well as the default FortiOS report you modified, to default settings. When you reset reports to default settings, any configured reports that you created from scratch are lost. The execute report-config reset command resets the reports to default settings. If you are going to reset the reports to their default settings, you should back up the current configuration file before doing so, in the event you want to revert back to the reports you previously created and/or modified.
596
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Reports
Each submenu is a page of the default FortiOS report. For example, the Bandwidth and Application Usage is the page in the report that contains information regarding bandwidth usage for WAN Opt and web cache, as well as application usage. These pages can be removed or modified, or new pages added by selecting Options. This allows you to configure when the report will be generated, whether it will include a table of contents, and whether to add or removed a page from the layout. When you add a new page to the layout, it becomes a submenu in Log&Report > Report Access. Each page can be modified to suite your requirements for a default report, or removed. You can also add pages to the report. Adding or removing pages is done by selecting Options in Edit mode. The Edit mode allows you to modify the default report. The View mode is the mode when you first access the pages, and when you are viewing the saved changes to the default report. The FortiOS default report contains information about the FortiGate unit in two text boxes, one on the cover page and one as an appendix that comes at the end of the generated report. The appendix is located in the VPN Usage page. After generating a report, you can view it from the Historical Reports page by selecting Historical Reports. You must be in View mode to view generated reports.
Example for creating a new default report from the existing default report
The following is an example of how to create a new default from the existing FortiOS default report. The new default report will be generated on a daily basis, and include only email activity information and application usage. To modify the cover page of the layout 1 Go to Log&Report > Report Access > Cover Page. 2 Select Edit. The Editing Section: Cover Page page appears. 3 Within the FortiGate UTM text box, select inside the box so that the cursor appears; delete FortiGate UTM and enter CompanyX. 4 Within the Daily Activity Report text box, delete Daily Activity Report and enter Email, Traffic and Application Usage Activity Report. 5 Select Save to save the current changes. The following assumes that you are still in Editing mode. To remove and add pages within the report 1 In the Cover Page page, select Options. When you select Options, the Report Options window appears. This window provides the settings for adding or removing pages, scheduling when the report generates, and whether to include a table of contents or not. 2 In the Report Options window, under Sections, select the check boxes beside VPN Usage, Threats, and Web Usage. 3 Select Delete. This removes these three submenus from the Report Access menu. 4 Rename the Bandwidth and Application Usage to Application Usage by selecting Bandwidth and Application Usage, and then removing Bandwidth from the name. 5 Press Enter on your keyboard to apply the new name.
597
Reports
6 Select Create New. 7 Enter Traffic Usage. This will add the new Traffic Usage submenu to the list. 8 Select OK. 9 Select Save. To configure email addresses and enable sending the report attached in an email 1 In the Report Options window, select the check box beside Email Generated Reports. The Email Recipients table appears. 2 Select within the table below the title Add Email Recipient; the blinking cursor appears, allowing you to enter the first email address. 3 Enter the first email address. 4 On your keyboard, press Enter to add another row so that you can add another email address. 5 Repeat steps 2 to 4 until all email addresses are included. 6 Select OK to save the email addresses. The following adds the charts and text to the Emails page in Log&Report > Report Access > Emails. To modify the information in the Email, Traffic and Application Usage page 1 Go to Log&Report > Report Access > Application Usage. 2 On the page, select Edit. 3 Remove the bandwidth usage information from the page. This is done by moving your mouse over the top right-hand corner of a text box and then selecting the red x that appears. 4 Go to Log&Report > Report Access > Traffic Usage. 5 In Text, (located in the right-hand pane of the page), drag H1 icon onto the page. A text box appears. 6 Enter the chart headings name in the text box, Top Users By Bandwidth. The heading style automatically configures for you as you type. 7 In Text, drag T icon onto the page. The T icon allows you to enter sentences or phrases in a normal font style, with a smaller font size than is available with H1 or H2. 8 Enter the following in the text box: The top users by bandwidth for today. 9 In Chart (located in the right-hand pane of the page), drag the bar chart onto the page. The Chart Chooser window appears. 10 Select Traffic in the right-hand column, and then select traffic.bandwidth.user; select OK to put the chart on the page.
598
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Reports
11 Repeat steps 5 to 10 to add each of the following charts with a description of each chart, to the page: traffic.sessions.app_cats traffic.sessions.users traffic.bandwith.users traffic.bandwith.app_cats 12 Select Save to save the current changes. The following assumes that you are still editing the report. You will be configuring when the FortiGate unit generates the default report as well as including a table of contents. To configure the report schedule and include a table of contents 1 On the page your in, select Options. 2 In the Report Options window, select Daily for Schedule Type. 3 Enter 08:30 in Time. 4 Verify that the check box is selected beside Include Table of Contents; if the check box is not selected, select it. 5 Select OK. 6 Select Save to save the current changes. 7 To generate the report immediately, select Run. The report is generated and appears in the Historical Reports list on the Historical Reports page. The FortiGate unit generates the report at the scheduled time. If you want to have an on-demand report, you must select Demand from the drop-down list in Schedule Type.
Configuring datasets
You must configure datasets because they are required when configuring a chart. You can use the default datasets that are available when configuring a chart. Datasets require knowledge of SQL because the logs are stored in an SQLite database. You can view the SQLite schema using the get report database schema CLI command syntax.
Note: If you are creating a chart from scratch, you must create a dataset for that chart. The chart cannot be configured without a dataset.
599
Reports
Use the following to configure a dataset that will be applied to a chart. config report dataset edit <report_dataset> set query <SQL_statement> config field edit <field_id> set displayname <string> set type {text | integer | date | ip} next end end If you need more information about queries required for datasets, see The SQLite log database on page 555.
Configuring themes
When you are configuring a layout for a report, you can also add a theme. A theme is a group of settings that create the general style of a report. For example, the styles that are applied to the table of contents section of the report. Themes are configured only in the CLI. You may want to configure your own styles for a theme, such as the type of alignment for the text. Styles are configured within the CLI, and you can also customize the default styles as well. Use the following procedure to configure a theme for a report, which can then be applied to a reports layout. To configure a theme for a report 1 Log in to the CLI. 2 Enter the following command syntax: config report theme edit <theme_name> set column-count [ 1 | 2 | 3] set default-html-style <string> set default-pdf-style <string> set graph-chart-style <string> set heading1-style <string> set heading2-style <string> set heading3-style <string> set heading4-style <string> set hline-style <string> set image-style <string> set normal-text-style <string> set page-footer-style <string> set page-header-style <string> set page-orient {landscape | portrait} set page-style <string> set report-subtitle-style <string> set report-title-style <string> set table-chart-caption-style <string> set table-chart-even-row-style <string> set table-chart-head-style <string> set table-chart-odd-row-style <string>
600
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Reports
table-chart-style <string> toc-heading1-style <string> toc-heading2-style <string> toc-heading3-style <string> toc-heading4-style <string> toc-title-style <string>
3 To choose a style for any one of the above commands, except for column-count and page-orient, enter ? to view the available choices. 4 To change the style of any one of the above commands, except for column-count and page-orient, go to Configuring styles on page 601.
Configuring styles
You can customize the default styles or create your own styles for reports. There are default styles and summary styles to choose from. Default styles use a default style scheme, and the summary styles are for summary reports that contain one or two pages with a small graph or table. To customize an existing style 1 Log in to the CLI. 2 Enter the following command syntax: config report style edit style <style_name> For example default.graph. 3 To view a list of available styles, enter ? after entering edit. To create a new style 1 Log in to the CLI. 2 Enter the following command syntax: config report style edit <new_style_name> set options {align | border | color | column | font | margin | padding | size | text } set align {center | justify | left | right} set bg-color {colour_name1 | color_name2 | color_name3 | } set border-bottom <border width_pixels> <border_style_{solid | dotted | dashed}> <border_color> set border-left <border width_pixels> <border_style_{solid | dotted | dashed}> <border_color> set border-right <border width_pixels> <border_style_{solid | dotted | dashed}> <border_color> set border-top <border width_pixels> <border_style_{solid | dotted | dashed}> <border_color> set column-gap <pixels> set column-span {all |none} set fg-color <color> set font-family {Arial | Courier | Helvetica | Times | Verdana} set font-size {xx-small | x-small | small | medium | large | x-large | xx-large | <pixels>}
601
Reports
set set set set set set set set set set set set set end
font-style {italic | normal} font-weight {bold | normal} height <pixels or percentage> line-height <pixels or percentage> margin-bottom <pixels> margin-left <pixels> margin-right <pixels> margin-top <pixels> padding-bottom <pixels> padding-left <pixels> padding-right <pixels> padding-top <pixels> width <pixels or percentage>
602
Reports
config report layout edit <layout_name> set title <text> set cutoff-option {run-time | custom} set cutoff-time {time_str> set cache-time-out <seconds> set email-recipients <email_addr1, email_addr2, > set email-send {enable | disable} set description <text> set format {html | pdf} set schedule-type {demand | once | daily | weekly} set time <hh:mm> set day {sunday | monday | tuesday | wednesday | thursday | friday | saturday} set style-theme <theme_name> set options {include-table-of-contents | auto-numberingheading | view-chart-as-heading | show-html-navbarbefore-heading1} config page set paper {A4 | letter} set column-break-before {heading1 | heading2 | heading3} set options {header-on-first-page | footer-on-first-page} set style <style_name> config body-item edit <item_id> set type {text | image | chart | misc} set description <text> set style <style_name> set text-component {heading1 | heading2 | heading3 | normal | text} set content <text> set img-src <text> set chart <chart_name> set chart-options {hide-title | include-no-data | showcaption} set parameter1 <value_str> end end
Charts
Charts are used to display the log information in a clear and concise way using a graph. The information for charts is gathered from the log tables in the SQLite database. When you need to find information about a default chart or a chart that was created from scratch you can use the get command in the following way. config report chart edit <chart_name> get The information that displays is similar to the following: name: web.allowed-request.sites.user policy: 0 type: graph period: last7d
FortiOS Handbook v3: Logging and Reporting 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
603
Reports
drill-down-chart: (null) comments: (null) dataset: web.allowed-request.sites.user category: webfilter favorite: no graphy-type: bar style: auto dimension: 3D x-series caption: (null) databind: field(1) is-category: yes label-angle: 45-degree unit: (null) y-series caption: Requests databind: field(2) extra-y: disable group: (null) label-angle: horizontal unit: (null) title: Top Allowed Web Sites for User by Request legend: enable This information provides what the time period of the chart is, the title that will display for that chart (in the example, title is Top Allowed Web Sites for User by Request), as well as the dataset that is included with the chart. The chart may also include a drill-down chart to be used in a HTML report, where you can view additional detailed information. This is the same drill-down feature that is available in most monitoring pages, such as in Log&Report > Monitor > Logging Monitor, where you select a bar on a specific day and view the activity of each log type that was recorded. When you need to view information about a dataset, as well as what log table is used to gather that information, you can use the get command in the following way: config report dataset edit <dataset_name> get The information that displays is similar to the following:
name: appcrtl.Count.Bandwidth.Top10.Apps
policy: 0 query: select (timestampe-timestamp%3600) as hourstamp, (CASE WHEN app!=N/A and app!= then app ELSE service END) as appname, sum(sent+rcvd) as bandwidth from traffic_log where timestamp between ###start_time### and ###end_time### and (appname in (select (CASE WHEN app!=N/A and app!=N/A and app!= then app END ELSE service END) as appname from traffic_log where timestamp between ###start_time### and ###end_time### group by appname order by sum(sent+rcvd) desc limit 10)) group by hourstamp, appname order by hourstamp desc field In the example output, you can see that the log table used to gather the information is from the traffic log table indicated by the from traffic_log in the query statement. Charts that are used in reports do not have last24h in the name, however, these charts are carried forward and are not usually used in FortiOS 4.0 MR3 and higher.
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
604
Reports
Configuring a chart
The following explains how to configure a chart from scratch. To create a new chart 1 Log in to the CLI. 2 Enter the following to create a new chart: config report chart edit <chart_name> set type {graph | table} set period {last24h | last7d} set drill-down-chart <name_drill_down_chart> set comments <text> set dataset <dataset_name> set category {app-crtl | attack | dlp | event | misc | spam | traffic | virus | vulnerability | webfilter} set favorite {yes | no} set graph-type {pie | flow | bar | line | none} set style {auto | manual} set title <title_chart> set legend {enable | disable} config x-series set caption <text> set databind <value_expression> set is-category {yes | no} set label-angle {45-degree | horizontal | vertical}
FortiOS Handbook v3: Logging and Reporting 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
605
Viewing reports
Reports
set scale-format {HH-MM | MM-DD | YYYY | YYYY-MM | YYYYMM-DD| YYYY-MM-DD HH | YYYY-MM-DD-HH-MM} set scale-number-of-step <scale_totalnum> set scale-origin {max | min} set scale-start <time&date> set scale-step <integer> set scale-type <datetime> set scale-unit {day | hour | minute | month | year} set unit <integer> end config y-series set caption <text> set databind <value_expression> set extra-y {enable | disable} set group <y-series_group> set label-angle {45-degree | horizontal | vertical} set unit <integer> end end
4 In the Graphic Chooser window, select Upload. 5 Locate the image file and then select OK.
Viewing reports
Generated reports are viewed from the Historical Reports page in Log&Report > Report Access > Report.
Historical Reports page Displays each generated report. Reports are removed using the Delete icon. You can view either HTML reports or PDF reports directly from this page. A HTML report opens up in a separate window, while a PDF report opens within the Disk page. Return to Layout Select to return to the report layout page, Viewing default layout. Delete Report File Removes one, multiple or all reports from the list. If you select the check box in the check box column, you can remove all reports from the list at one time. The name of the report file, which includes the date and time. Note: To view a HTML report, select the name in this column. The HTML report appears in a separate window.
606
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Reports
Report example
Started
The time when the report began generating. This format includes the date and is displayed in this type of format, yyyy-mm-dd hh:mm:ss. The hour is in the 24 hour format. The time when the report stopped generating. This format includes the date and is displayed in this type of format, yyyy-mm-dd hh:mm:ss. The hour is in the 24 hour format. The size of the report file, in bytes. Displays PDF formatted generated reports. Select the format in this column to view the report in PDF.
Finished
Report example
The following is an example of a report created from within the CLI. The type of report is what is know as a report created from scratch because you are configuring the style, theme, layout and if applicable, the datasets for charts. In the following report, no datasets are configured.
To configure the footers and headers 1 Log in to the CLI. 2 Enter the following to configure a style: config report style edit web-footerheader set options align font set align center set font-size xx-small set font-family Arial set font-weight normal set font-style normal next To configure the pages 1 After entering next, enter the following for the margins and columns: edit web-pages set options align margin column
FortiOS Handbook v3: Logging and Reporting 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
607
Report example
Reports
To configure the table of contents headings and title 1 After entering next in the above procedure, enter the following to configure the table of contents headings and title edit web-toc-title set options align font set font-family Arial set font-weight bold set font-style normal set font-size x-large set align center next edit web-toc-heading1 set options align font set font-family Arial set font-weight bold set font-size large set font-style normal set align left next edit web-toc-heading2 set options align font set font-family Arial set font-size medium set font-style normal set font-weight bold set align left next edit web-toc-heading3 set options align font set font-family Arial set font-size medium set font-style italic set font-weight bold set align left next To configure the page headings 1 After entering next in the above procedure, enter the following to configure the page headings: edit web-page-heading1 set options align font set font-family Arial set font-size large set font-style normal
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
608
Reports
Report example
set font-weight bold set align left next edit web-page-heading2 set options align font set font-family Arial set font-size medium set font-style normal set font-weight bold next edit web-page-heading3 set options align font set font-family Arial set font-size medium set font-style italic set font-weight bold next To configure the chart style 1 After entering next in the above procedure, enter the following to configure the style of the font and alignment of the chart: edit web-chart set options align font set font-family Arial set font-size small set font-style normal set font-weight bold set align left next To configure the cover page 1 After entering next in the above procedure, enter the following to configure the style of the cover page of the report: edit web-cover set options align font set font-family Arial set font-size xx-large set font-style normal set font-weight bold set align center end end
609
Report example
Reports
set set set set set set set set set set set set set set set end
default-pdf-style web-cover graph-chart-style web-chart page-orient landscape page-style web-pages table-chart-style web-chart toc-title-style web-toc-title toc-heading1-style web-toc-heading1 toc-heading2-style web-toc-heading2 toc-heading3-style web-toc-heading3 heading1-style web-heading1 heading2-style web-heading2 heading3-style web-heading3 page-footer-style web-footerheader page-header-style web-footerheader report-title-style web-cover
To modify the time period for the charts 1 In the CLI, enter the following: config report chart
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
610
Reports
Report example
2 Enter the following to modify the time period of each chart: edit web.allowed-request.sites.user set period last7d next edit web.blocked-request.sites.user set period last7d next edit web.blocked-requests.web_cats set period last7d next edit web.bandwidth.sites. set period last7d next edit web.bandwidth.stream-sites.user set period last7d next edit web.bandwidth.stream-sites set period last7d end end end
611
Report example
Reports
set content Web Activity: Blocked and Allowed Requested Web Sites set style web-heading1 next edit 3 set content The blocked and allowed web sites that were requested by users over the last seven days next edit 4 set type chart set chart web.allowed-request.sites.user set description Allowed Web Sites Requested by Users set style web-heading2 next edit 5 set type chart set chart web.blocked-request.sites.user set description Blocked Web Sites Requested by User set style web-heading2 next edit 6 set type chart set chart web.blocked-requests.web_cats set description Blocked Web Sites Requested, per-Web Filter Category set style web-heading2 next edit 7 set description Web Bandwidth Activity set style web-heading1 next edit 8 set content The bandwidth that was used for web activity for the last seven days next edit 9 set type chart set chart web.bandwidth.sites.user set description Bandwidth Used per User set style web-heading2 next edit 10 set type chart set chart web.bandwidth.stream-sites.user set description Bandwidth Used for Web Streaming per User set style web-heading2 next edit 11 set type chart set chart web.bandwidth.stream-sites set description Bandwidth Used for Web Streaming set style web-heading2 end
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
612
Reports
Report example
config paage set options footer-on-first-page set paper letter set column-break-before heading1 end end
613
Report example
Reports
614
Logging and Reporting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Chapter 5 Troubleshooting
This handbook chapter describes concepts of troubleshooting and solving issues that may occur with FortiGate units. This FortiOS Handbook chapter contains the following chapters: Troubleshooting process walks you through best practice concepts of FortiOS troubleshooting. Troubleshooting tools describes some of the basic commands and parts of FortiOS that can help you with troubleshooting. Technical Support Organization Overview describes how Fortinet Support operates, what they will need from you if you contact them, and what you can expect in general. Troubleshooting connectivity walks you through some troubleshooting methods that apply to common issues you may have, especially network connectivity problems. Troubleshooting advanced walks through some more advanced features including traffic shaping, user logons, and VPN. Troubleshooting get commands provides a list of diagnostic commands that can help you troubleshoot your FortiOS unit. Troubleshooting bootup and FSSO addresses potential problems your unit may have when booting up. Also covered is troubleshooting an FSSO installation. The format is an easy to follow step by step question and answer format.
615
616
Troubleshooting process
Before you begin troubleshooting anything but the most minor issues, you need to prepare. Doing so will shorten the time to solve your issue. Before starting you need to: Establish a baseline Search for a solution Create a troubleshooting plan Obtain any required additional equipment Ensure you have administrator level access to required equipment Contact Fortinet customer support for assistance
Establish a baseline
FortiGate units operate at all layers of the OSI model. For this reason troubleshooting problems can become complex. If you establish a normal operation parameters, or baseline, for your system before the problem occurs it will help reduce the complexity when you are troubleshooting. Many of the guiding questions in the following sections are some form of comparing the current problem situation to normal operation on your FortiGate unit. For this reason it is recommended that you know what your normal operating status is, and ideally have a record of it you can refer to. This can easily be accomplished by monitoring the system performance with logs, SNMP tools, or regularly running information gathering commands and saving the output. This regular operation data will show trends, and enable you to see when changes happen and there may be a problem.
Note: Back up your FortiOS configuration on a regular basis. This is a good practice for everyday as well as when troubleshooting. You can restore the backed up configuration when needed and save the time and effort of re-creating it from factory default settings.
Some basic commands you can use to obtain normal operating data for your system:
get system status diagnose firewall statistic show Displays versions of firmware and FortiGuard engines, and other system information. Displays the amount of network traffic broken down into categories such as email, VoIP, TCP, UDP, IM, Gaming, P2P, and Streaming.
get router info routing-table all Displays all the routes in the routing table including their type, source, and other useful data. get ips session get webfilter ftgd-statistics Displays memory used and max available to IPS as well and counts. Displays list of FortiGuard related counts of status, errors, and other data.
These commands are just a sample. Feel free to include any extra information gathering commands that apply to your system. For example if you have active VPN connections, record information about them using the get vpn * series of commands. See Troubleshooting get commands on page 699.
FortiOS Handbook v3: Troubleshooting 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
617
Troubleshooting process
For an extensive snapshot of your system, run the CLI command used by TAC to gather extensive information about a system exec tac report. It runs many diagnose commands that are for specific configurations. This means no matter what features you are using, this command will record their current state. Then if you need to perform troubleshooting at a later date, you can run the same command again and compare the differences to quickly locate suspicious output you can investigate. See exec tac report on page 700.
Before you can solve a problem, you need to understand it. Often this step can be the longest in this process. Ask questions such as: What is not working? Be specific. Is there more than one thing not working? Is it partly working? If so, what parts are working? Is it a connectivity issue for the whole device, or is there an application that isnt reaching the Internet?
Be as specific as possible with your answers, even if it takes awhile to find the answers. These questions will help you define the problem. Once the problem is defined, you can search for a solution and then create a plan on how to solve it.
Gathering Facts
Fact gathering is an important part of defining the problem. Record the following information as it affects your problem:
618
Troubleshooting process
Where did the problem occur? When did the problem occur and to whom? What components are involved? What is the affected application? Can the problem be traced using a packet sniffer? Can the problem be traced in the session table? Can log files be obtained that indicate a failure has occurred?
Answers to these questions will help you narrow down the problem, and what you have to check during your troubleshooting. The more things you can eliminate, the fewer things you need to check during troubleshooting. For this reason, be as specific and accurate as you can while gathering facts.
Technical Documentation
Installation Guides, Administration Guides, Quick Start Guides, and other technical documents are available online at the following URL: http://docs.fortinet.com
Release Notes
Issues that are uncovered after the technical documentation has been published will often be listed in the Release Notes that accompany the device.
Knowledge Base
The Fortinet Knowledge Base provides access to a variety of articles, white papers, and other documentation providing technical insight into a range of Fortinet products. The Knowledge Base is available online at the following URL: http://kb.fortinet.com
619
Troubleshooting process
For additional information about contacting Fortinet Customer Support, see Technical Support Organization Overview on page 653. All of this is your troubleshooting plan.
620
Troubleshooting process
621
Troubleshooting process
622
Troubleshooting tools
This section includes a number of tools you can use during troubleshooting, including: FortiOS diagnostics FortiGate ports FortiAnalyzer/FortiManager ports FortiGuard troubleshooting
FortiOS diagnostics
A collection of diagnostic commands are available in FortiOS for troubleshooting and performance monitoring. While some of these areas have web-based manager areas, all have relevant CLI commands with the main commands listed in this section. Within the CLI commands, the two main groups of diagnostic commands are get and diagnose commands. Both commands display information about system resources, connections, and settings that enable you to locate and fix problems, or to monitor system performance. The one exception to these two main groups it the command exec tac report. This is an execute command that runs an exhaustive series of diagnostic commands. It runs commands that are only needed if you are using certain features like HA, VPN tunnels, or a modem. The report takes a few minutes to complete due to the amount of output generated. If you have your CLI output logged to a file, you can run this command to familiarize yourself with the CLI commands involved. Do not include the output from this command in FortiCare tickets unless it is specifically requested. See exec tac report on page 700. When you call Fortinet Customer Support, you will be asked to provide information about your unit and its current state using the output from these CLI commands. This section includes diagnostics commands to help with: Check date and time Resource usage Processes Proxy operation Hardware NIC Conserve mode Traffic trace Session table Firewall session setup rate Finding object dependencies Flow trace Packet sniffer Debug command Other commands
623
FortiOS diagnostics
Troubleshooting tools
Additional diagnostic commands are covered in Troubleshooting get commands on page 699, and commands related to specific features are covered in the chapter for that specific feature. For example in-depth diagnostics for dynamic routing are covered in the dynamic routing chapter.
Resource usage
Monitor the CPU/memory usage of internal processes using the following command: get system performance top <delay> <max_lines> The data listed includes the name of the daemon, the process ID, whether the process is sleeping or running, the CPU percentage being used, and the memory percentage being used. See Check CPU and memory resources on page 668.
624
Troubleshooting tools
FortiOS diagnostics
Use SNMP to monitor CPU usage. Use CLI commands to monitor CPU usage: diagnose system session stat get system performance status diagnose system top diagnose hardware sysinfo memory
Low memory
If you are seeing low memory usage in the system resources widget, it could mean that the unit is dealing with high traffic volume, which may be causing the problem, or it could be when the unit is dealing with connection pool limits affecting a single proxy. If the unit is receiving large volumes of traffic on a specific proxy, it is possible that the unit will exceed the connection pool limit. If the number of free connections within a proxy connection pool reaches zero, problems may occur. Use the following CLI command, which uses the antivirus failopen feature. Setting it to idledrop will drop connections based on the clients that have the most connections open. This helps to determine the behavior of the FortiGate antivirus system if it becomes overloaded in high traffic. config system global set av_failopen idledrop end
Processes
List information about processes running on the FortiGate unit using the following command: diag sys top Sample output: Run Time: 13 days, 13 hours and 58 minutes 0U, 0S, 98I; 123T, 25F, 32KF newcli sshd 903 901 R S 0.5 0.5 5.5 4.0
Where the codes displayed on the second output line mean the following: U is % of user space applications using CPU. In the example, 0U means 0% of the user space applications are using CPU. S is % of system processes (or kernel processes) using CPU. In the example, 0S means 0% of the system processes are using the CPU. I is % of idle CPU. In the example, 98I means the CPU is 98% idle. T is the total FortiOS system memory in Mb. In the example, 123T means there are 123 Mb of system memory. F is free memory in Mb. In the example, 25F means there is 25 Mb of free memory.
625
FortiOS diagnostics
Troubleshooting tools
KF is the total shared memory pages used. In the example, 32KF means the system is using 32 shared memory pages.
Each additional line of the command output displays information for each of the processes running on the FortiGate unit. For example, the third line of the output is: newcli Where: newcli is the process name. Other process names can include ipsengine, sshd, cmdbsrv, httpsd, scanunitd, and miglogd. 903 is the process ID. The process ID can be any number. R is the current state of the process. The process state can be: Rrunning Ssleep Zzombie Ddisk sleep. 0.5 is the amount of CPU that the process is using. CPU usage can range from 0.0 for a process that is sleeping to higher values for a process that is taking a lot of CPU time. 5.5 is the amount of memory that the process is using. Memory usage can range from 0.1 to 5.5 and higher. Press q to quit and return to the normal CLI prompt. Press p to sort the processes by the amount of CPU that the processes are using. Press m to sort the processes by the amount of memory that the processes are using. 903 R 0.5 5.5
Enter the following single-key commands when diagnose sys top is running:
Proxy operation
Monitor proxy operations using the following command: diag test application <application> <option> The <application> value can include the following: ftpd http im imap ipsengine ipsmonitor pop3 smtp urlfilter ftp proxy http proxy im proxy imap proxy ips sensor ips monitor pop3 proxy smtp proxy urlfilter daemon
626
Troubleshooting tools
FortiOS diagnostics
The <option> value for use with this command can include: 1 2 4 44 444 5 6 7 8 88 9 99 Dump Memory Usage Drop all connections Display connection state * Display info per connection * Display connections per state * Toggle AV Bypass mode Toggle Print Stat mode every ~40 seconds Toggle Backlog Drop Clear stats Toggle statistic recording - stats cleared Toggle Accounting info for display Restart proxy
These commands, except for the ones identified with an *, should only be used under the guidance of Fortinet Support.
Hardware NIC
Monitor hardware network operations using the following command: diag hardware deviceinfo nic <interface> The information displayed by this command is important as errors at the interface are indicative of data link or physical layer issues which may impact the performance of the FortiGate unit.
627
FortiOS diagnostics
Troubleshooting tools
The following is sample output when <interface> = internal: System_Device_Name Current_HWaddr Permanent_HWaddr Link Speed Duplex [] Rx_Packets=5685708 Tx_Packets=4107073 Rx_Bytes=617908014 Tx_Bytes=1269751248 Rx_Errors=0 Tx_Errors=0 Rx_Dropped=0 Tx_Dropped=0 [..] port5 00:09:0f:68:35:60 00:09:0f:68:35:60 up 100 full
Hardware troubleshooting
The diag hardware deviceinfo nic command displays a list of hardware related error names and values. The following table explains the items in the list and their meanings.
g
Table 31: Possible hardware errors and meanings Field Definition Rx_Errors = rx error count Rx_CRC_Errors + Rx_Length_Errors Rx_Align_Errors Rx_Dropped or Rx_No_Buffer_Count Rx_Missed_Errors Tx_Errors = Tx_Aborted_Errors Tx_Window_Errors Bad frame was marked as error by PHY. This error is only valid in 10/100M mode. Running out of buffer space. Equals Rx_FIFO_Errors + CEXTERR (Carrier Extension Error Count). Only valid in 1000M mode, whichis marked by PHY. ECOL (Excessive Collisions Count). Only valid in half-duplex mode. LATECOL (Late Collisions Count). Late collisions are collisions that occur after 64-byte time into the transmission of the packet while working in 10 to100Mb/s data rate and 512-byte timeinto the transmission of the packet while working in the 1000Mb/s data rate. This register only increments if transmits are enabled and the device is in half-duplex mode. See Rx_Errors. Not defined. Total number of collisions experienced by the transmitter. Valid in halfduplex mode. Transmission length error.
628
Troubleshooting tools
FortiOS diagnostics
Table 31: Possible hardware errors and meanings Field Definition Rx_Over_Errors Rx_CRC_Errors Rx_Frame_Errors Rx_FIFO_Errors Tx_Aborted_Errors Tx_Carrier_Errors Not defined. Frame CRC error. Same as Rx_Align_Errors. This error is only valid in 10/100M mode. Same as Rx_Missed_Errors - a missed packet count. See Tx_Errors. The PHY should assert the internal carrier sense signal during every transmission. Failure to do so may indicate that the link has failed or the PHY has an incorrect link configuration. This register only increments if transmits are enabled. This register is not valid in internal SerDes 1 mode (TBI mode for the 82544GC/EI) and is only valid when the Ethernet controller is operating at full duplex. Not defined. Not defined. See LATECOL. Counts the number of times that a successfully transmitted packed encountered a single collision. The value only increments if transmits are enabled and the Ethernet controller is in half-duplex mode. A Multiple Collision Count which counts the number of times that a transmit encountered more than one collision but less than 16. The value only increments if transmits are enabled and the Ethernet controller is in half-duplex mode. Counts defer events. A defer event occurs when the transmitter cannot immediately send a packet due to the medium being busy because another device is transmitting, the IPG timer has not expired, half-duplex deferral events are occurring, XOFF frames are being received, or the link is not up. This register only increments if transmits are enabled. This counter does not increment for streaming transmits that are deferred due to TX IPG. The Rx frame is over size. The Rx frame is too short. This error is only valid in 10/100M mode. Counts the number of symbol errors between reads - SYMERRS. The count increases for every bad symbol received, whether or not a packet is currently being received and whether or not the link is up. This register only increments in internal SerDes mode.
Note: The counters displayed depend on the type of the NIC interface. Please see the following website for more information: http://kc.forticare.com/default.asp?id=1979&Lang=1&SID=
629
FortiOS diagnostics
Troubleshooting tools
Conserve mode
The FortiOS antivirus and IPS systems operate in one of two modes, depending on the available shared memory. If the shared memory utilization is below a defined upper threshold, the system is in non-conserve mode. If shared memory usage goes beyond this threshold, the system enters conserve mode and remains there until the shared memory utilization drops below a second threshold, slightly lower than the original. These thresholds are non-configurable; the threshold above which the system enters conserve mode is 80%, the system will not go back to non-conserve mode until the shared memory usage goes below 70%. Conserve mode occurs under high usage and traffic conditions. It is expected to be a temporary condition that is self-correcting when bursty traffic subsides. When in conserve mode, any new sessions are ignored (no SYN-ACK from the FortiGate unit) or passed without being scanned. The following is sample output from the event log when entering conserve mode. 66 2008-04-16 14:01:31 critical The system has entered system conserve mode
Antivirus failopen
Dealing with high traffic volume may cause the problem dealing with low memory situations or when dealing with connection pool limits affecting a single proxy. If a FortiGate unit is receiving large volumes of traffic on a specific proxy, it is possible that the unit will exceed the connection pool limit. If the number of free connections within a proxy connection pool reaches zero, problems may occur. Antivirus failopen is a safeguard feature that determines the behavior of the FortiGate antivirus system if it becomes overloaded in high traffic. The feature is configurable only though the CLI. config system global set av_failopen {off|one-shot|pass |idledrop} av-failopen-session controls the behavior when the proxy connection pool is exhausted. Again in this case, the FortiGate unit does not send the SYN-ACK. Failopen is only available on FortiGate models 300A and higher. On other lower FortiGate models, the failopen action is configured to pass. The set av-failopen command has the following four options: off If the FortiGate unit enters conserve mode, the antivirus system will stop accepting new AV sessions but will continue to process current active sessions. one-shot If the FortiGate unit enters conserve mode, all subsequent connections bypass the antivirus system but current active sessions will continue to be processed. One-shot is similar to pass but will not automatically turn off once the condition causing av-failopen has stopped. idledrop When configured in this mode, the antivirus failopen mechanism will drop connections based on the clients that have the most open connections.
630
Troubleshooting tools
FortiOS diagnostics
pass Pass becomes the default setting when the av-failopen-session command has been run. If the system enters conserve mode, connections bypass the antivirus system until the system enters non-conserve mode again. Current active sessions will continue to be processed.
Note: The one-shot and pass options do not content filter traffic. Therefore, the data stream could contain malicious content.
Traffic trace
Traffic tracing allows a specific packet stream to be followed. This is useful to confirm packets are taking the route you expected on your network. View the characteristics of a traffic session though specific security policies using: diag sys session Trace per-packet operations for flow tracing using: diag debug flow Trace per-Ethernet frame using: diag sniffer packet
Session table
The FortiGate session table can be viewed from either the CLI or Web Config. The most useful troubleshooting data comes from the CLI. The session table in Web Config also provides some useful summary information, particularly the current policy number that the session is using. In Web Config, click Add Content and select Top Sessions. In the Top Sessions pane, click the Details link. (If there are not enough entries in the session table, try browsing to a different web site and re-examine the table.) The Policy ID shows which security policy matches the session. The sessions that do not have a Policy ID entry originate from the FortiGate device.
631
FortiOS diagnostics
Troubleshooting tools
The session table output from the CLI (diag sys session list) is very verbose. Even on a system with a small amount of traffic, displaying the session table will generate a large amount of output. For this reason, filters are used to display only the session data of interest. Filter a column in Web Config by clicking the funnel icon on the column heading or from the CLI by creating a filter. An entry is placed in the session table for each traffic session passing through a security policy. The following command will list the information for a session in the table: diag sys session list For extended information about all aspects of sessions, see get system session-info fullstat on page 733. Sample Output: FGT# diag sys session list session info: proto=6 proto_state=05 expire=89 timeout=3600 flags=00000000 av_idx=0 use=3 bandwidth=204800/sec guaranteed_bandwidth=102400/sec traffic=332/sec prio=0 logtype=session ha_id=0 hakey=4450 tunnel=/ state=log shape may_dirty statistic(bytes/packets/err): org=3408/38/0 reply=3888/31/0 tuples=2 orgin->sink: org pre->post, reply pre->post oif=3/5 gwy=192.168.11.254/10.0.5.100 hook=post dir=org act=snat 10.0.5.100:1251>192.168.11.254:22(192.168.11.105:1251) hook=pre dir=reply act=dnat 192.168.11.254:22>192.168.11.105:1251(10.0.5.100:1251) pos/(before,after) 0/(0,0), 0/(0,0) misc=0 domain_info=0 auth_info=0 ftgd_info=0 ids=0x0 vd=0 serial=00007c33 tos=ff/ff
632
Troubleshooting tools
FortiOS diagnostics
Since output can be verbose, the filter option allows specific information to be displayed, for example: diag sys session filter <option> The <option> values available include the following: clear dport dst negate policy proto sport src vd clear session filter destination port destination IP address inverse filter policy ID protocol number source port source IP address index of virtual domain. -1 matches all
Even though UDP is a sessionless protocol, the FortiGate unit still keeps track of the following two different states: UDP reply not seen with a value of 0 UDP reply seen with a value of 1
Meaning Session is being logged. Session is originated from or destined for local stack. Session is created by a firewall session helper. Session is created by a policy. For example, the session for ftp control channel will have this state but ftp data channel will not. This is also seen when NAT is enabled. Session will be checked by IPS signature. Session will be checked by IPS anomaly. Session is being bridged (TP) mode.
ndr nds br
633
FortiOS diagnostics
Troubleshooting tools
634
Troubleshooting tools
FortiOS diagnostics
CLI method
When running multiple VDOMs, this command is run in the Global configuration only and it searches for the named object both in the Global and VDOM configuration most recently used: diag sys checkused <path.object.mkey> For example, to verify which objects are referred to in a security policy with an ID of 1, enter the command as follows: diag sys checkused firewall.policy.policyid 1 To check what is referred to by interface port1, enter the following command: diag sys checkused system.interface.name port1 To show all the dependencies for an interface, enter the command as follows: diag sys checkused system.interface.name <interface name> Sample Output:
entry used by table firewall.address:name '10.98.23.23_host entry used by table firewall.address:name 'NAS' entry used by table firewall.address:name 'all' entry used by table firewall.address:name 'fortinet.com' entry used by table firewall.vip:name 'TORRENT_10.0.0.70:6883' entry used by table firewall.policy:policyid '21' entry used by table firewall.policy:policyid '14' entry used by table firewall.policy:policyid '19'
In this example, the interface has dependent objects, including four address objects, one VIP, and three security policies.
635
FortiOS diagnostics
Troubleshooting tools
636
Troubleshooting tools
FortiOS diagnostics
Flow trace
To trace the flow of packets through the FortiGate unit, use the following command: diag debug flow trace start Follow packet flow by setting a flow filter using this command: diag debug flow filter <option> Filtering options include the following: addr clear daddr dport negate port proto saddr sport vd IP address clear filter destination IP address destination port inverse filter port protocol number source IP address source port index of virtual domain, -1 matches all
Enable the output to be displayed to the CLI console using the following command: diag debug flow show console
Note: diag debug flow output is logged as information level event and set to logs or FortiAnalyzer device if connected. As this command generated significant amounts of data, do not let it run longer than necessary.
Start flow monitoring with a specific number of packets using this command: diag debug flow trace start <N> Stop flow tracing at any time using: diag debug flow trace stop The following is an example of the flow trace for the device at the following IP address: 203.160.224.97 diag debug enable diag debug flow filter addr 203.160.224.97 diag debug flow show console enable diag debug flow show function-name enable diag debug flow trace start 100
637
FortiOS diagnostics
Troubleshooting tools
638
Troubleshooting tools
FortiOS diagnostics
Lookup for next-hop gateway address for reply traffic: id=20085 trace_id=210 func=vf_ip4_route_input line=1543 msg="find a route: gw-192.168.3.221 via port5" ACK received: id=20085 trace_id=211 func=resolve_ip_tuple_fast line=2700 msg="vd-root received a packet(proto=6, 192.168.3.221:1487->203.160.224.97:80) from port5." Match existing session in the original direction: id=20085 trace_id=211 func=resolve_ip_tuple_fast line=2727 msg="Find an existing session, id-00000e90, original direction" Apply source NAT: id=20085 trace_id=211 func=__ip_session_run_tuple line=1502 msg="SNAT 192.168.3.221->192.168.11.59:31925" Receive data from client: id=20085 trace_id=212 func=resolve_ip_tuple_fast line=2700 msg="vd-root received a packet(proto=6, 192.168.3.221:1487->203.160.224.97:80) from port5." Match existing session in the original direction: id=20085 trace_id=212 func=resolve_ip_tuple_fast line=2727 msg="Find an existing session, id-00000e90, original direction" Apply source NAT: id=20085 trace_id=212 func=__ip_session_run_tuple line=1502 msg="SNAT 192.168.3.221->192.168.11.59:31925" Receive data from server: id=20085 trace_id=213 func=resolve_ip_tuple_fast line=2700 msg="vd-root received a packet(proto=6, 203.160.224.97:80->192.168.11.59:31925) from port6." Match existing session in reply direction: id=20085 trace_id=213 func=resolve_ip_tuple_fast line=2727 msg="Find an existing session, id-00000e90, reply direction" Apply destination NAT to inverse source NAT action: id=20085 trace_id=213 func=__ip_session_run_tuple line=1516 msg="DNAT 192.168.11.59:31925>192.168.3.221:1487"
639
FortiOS diagnostics
Troubleshooting tools
640
Troubleshooting tools
FortiOS diagnostics
Packet sniffer
Details within packets passing through particular interfaces can be displayed using the packet sniffer with the following command:
diag sniffer packet <interface> <filter> <verbose> <count>
The <interface> value can be any physical or virtual interface name. Use any for all interfaces. The <filter> value limits the display of packets using filters, including Berkeley Packet Filtering (BPF) syntax. '[[src|dst] host<host_name_or_IP1>] [[src|dst] host<host_name_or_IP2>] [[arp|ip|gre|esp|udp|tcp] [port_no]] [[arp|ip|gre|esp|udp|tcp] [port_no]] If a second host is specified, only the traffic between the two hosts will be displayed. Use flexible, logical filters for the packet sniffer or none. For example, to print UDP 1812 traffic between host1 and either host2 or host3, use the following:
'udp and port 1812 and host host1 and \( host2 or host3 \)
The <verbose> option allows different levels of information to be displayed. The verbose levels include: 1 2 3 4 5 6 Print header of packets Print header and data from the IP header of the packets Print header and data from the Ethernet header of the packets Print header of packets with interface name Print header and data from ip of packets with interface name Print header and data from ethernet of packets with interface
The <count> value indicates the number of packets the sniffer needs before stopping. A script to convert FortiGate sniffer output to the PCAP format is available from Fortinet at the following address: http://kc.forticare.com/default.asp?id=1186&SID=&Lang=1
641
FortiOS diagnostics
Troubleshooting tools
First, obtain the NP2 and port numbers with the following command: diag npu np2 list Sample output:
ID PORTS -- ----0 port1 0 port2 0 port3 0 port4 ID PORTS -- ----1 port5 1 port6 1 port7 1 port8 ID PORTS -- ----2 port9 2 port10 2 port11 2 port12 ID PORTS -- ----3 port13 3 port14 3 port15 3 port16
Run the following commands: diag npu np2 fastpath disable 0 (where 0 is the NP2 number) Then, run this command: diag npu np2 fastpath-sniffer enable port1 Sample output: NP2 Fast Path Sniffer on port1 enabled This will cause all traffic on port1 of NP2 0 to be sent to the CPU meaning a standard sniffer trace can be taken and other diag commands should work if it was a standard CPU driven port. These commands are only for the newer NP2 interfaces. FA2 interfaces are more limited as the sniffer will only capture the initial packets before the session is offloaded into HW (FA2). The same holds true for the diag debug flow command as only the session setup will be shown, however, this is usually enough for this command to be useful.
642
Troubleshooting tools
FortiOS diagnostics
Debug command
Debug output provides continuous, real-time event information. Debugging output continues until it is explicitly stopped or until the unit is rebooted. Debugging output can affect system performance and will be continually generated even though output might not be displayed in the CLI console. Debug information displayed in the console will scroll in the console display and may prevent CLI commands from being entered, for example, the command to disable the debug display. To turn off debugging output as the display is scrolling by, press the key to recall the recent diag debug command, press backspace, and type 0, followed by Enter. Debug output display is enabled using the following command: diag debug enable When finished examining the debug output, disable it using: diag debug disable Once enabled, indicate the debug information that is required using this command: diag debug <option> <level> Debug command options include the following: application authd cli console crashlog disable enable flow info kernel rating report reset application authentication daemon debug cli console crash log info disable debug output enable debug output trace packet flow in kernel show active debug level settings kernel display rating info report for tech support reset all debug level to default
The debug level can be set at the end of the command. Typical values are 2 and 3, for example: diag debug application DHCPS 2 diag debug application spamfilter 2 Fortinet support will advise which debugging level to use. Timestamps can be enabled in the debug output using the following command: diag debug console timestamp enable
643
FortiOS diagnostics
Troubleshooting tools
In this example:
192.168.11.2->192.168.10.201:500 Source and Destination gateway IP address dpd_fail=0 pfs=1536... Found existing Phase 1 Create new Phase 2 tunnel
644
Troubleshooting tools
FortiOS diagnostics
645
FortiOS diagnostics
Troubleshooting tools
IP address
There may be times when you want to verify the IP addresses assigned to the FortiGate unit interfaces are what you expect them to be. This is easily accomplished from the CLI using the following command. diag ip address list The output from this command lists the IP address and mask if available, the index of the interface (a sort of ID number) and the devname is the name of the interface. While physical interface names are set, virtual interface names can vary. Listing all the virtual interface names is a good use of this command. Note that for vsys_ha and vsys_fgfm the IP addresses are the local hostthese are internally used virtual interfaces. # diag ip address list IP=10.31.101.100->10.31.101.100/255.255.255.0 index=3 devname=internal IP=172.20.120.122->172.20.120.122/255.255.255.0 index=5 devname=wan1 IP=127.0.0.1->127.0.0.1/255.0.0.0 index=8 devname=root IP=127.0.0.1->127.0.0.1/255.0.0.0 index=11 devname=vsys_ha IP=127.0.0.1->127.0.0.1/255.0.0.0 index=13 devname=vsys_fgfm Other related commands include flushing the IP addresses (diag ip address flush) which will force a reload of the IP addresses. This can be useful if you think an IP address is wrong and dont want to reboot the unit. You can add or delete a single IP address (diag ip address add <ipv4_addr> or diag ip address delete <ipv4_addr>). For more information on useful diagnostic commands, see Troubleshooting get commands on page 699and Troubleshooting connectivity on page 665.
646
Troubleshooting tools
FortiGate ports
FortiGate ports
In the TCP and UDP stacks, there are 65 535 ports available for applications to use when communicating with each other. Many of these ports are commonly known to be associated with specific applications or protocols. These known ports can be useful when troubleshooting your network. Use the following ports while troubleshooting the FortiGate device:
Port(s) UDP 53 Functionality DNS lookup, RBL lookup
UDP 53 or UDP FortiGuard Antispam or Web Filtering rating lookup 8888 UDP 53 (default) or UDP 8888 and UDP 1027 or UDP 1031 UDP 123 UDP 162 UDP 514 FDN Server List - source and destination port numbers vary by originating or reply traffic. See the article How do I troubleshoot performance issues when FortiGuard Web Filtering is enabled? in the Knowledge Base. NTP Synchronization SNMP Traps SYSLOG - All FortiOS versions can use syslog to send log messages to remote syslog servers. FortiOS v2.80 and v3.0 can also view logs stored remotely on a FortiAnalyzer unit. Configuration backup to FortiManager unit or FortiGuard Analysis and Management Service. SMTP alert email, encrypted virus sample auto-submit
TCP 22 TCP 25
TCP 389 or TCP LDAP or PKI authentication 636 TCP 443 FortiGuard Antivirus or IPS update - When requesting updates from a FortiManager unit instead of directly from the FDN, this port must be reconfigured as TCP 8890. FortiGuard Analysis and Management Service FortiGuard Analysis and Management Service log transmission (OFTP) SSL Management Tunnel to FortiGuard Analysis and Management Service (FortiOS v3.0 MR6 or later) Quarantine, remote access to logs and reports on a FortiAnalyzer unit, device registration with FortiAnalyzer units (OFTP) RADIUS authentication FSSO FortiGuard Analysis and Management Service contract validation
TCP 443 TCP 514 TCP 541 TCP 514 TCP 1812 TCP 8000 and TCP 8002 TCP 10151
647
Diagnostic commands
Troubleshooting tools
Diagnostic commands
FortiAnalyzer/FortiManager ports
If you have a FortiAnalyzer unit or FortiManager unit on your network you may need to use the following ports for troubleshooting network traffic.
Functionality DNS lookup NTP synchronization Windows share SNMP traps Syslog, log forwarding Log and report upload SMTP alert email User name LDAP queries for reports RVS update RADIUS authentication Log aggregation client Port(s) UDP 53 UDP 123 UDP 137-138 UDP 162 UDP 514 TCP 21 or TCP 22 TCP 25 TCP 389 or TCP 636 TCP 443 TCP 1812 TCP 3000
Note: For more information about FortiAnalyzer/FortiManager ports, see the Fortinet Knowledge Base at the following address: http://kc.forticare.com/default.asp?SID=&Lang=1&id=773.
648
Troubleshooting tools
FortiGuard troubleshooting
FortiGuard troubleshooting
The FortiGuard service provides updates to Antivirus, IPSec, Webfiltering, and more. The FortiGuard Distribution System (FDS) involves a number of servers across the world that provide updates to your FortiGate unit. Problems can occur both with connection to FDS, and its configuration on your local FortiGate unit. Some of the more common troubleshooting methods are listed here including Troubleshooting process for FortiGuard updates FortiGuard server settings FortiGuard URL rating
649
FortiGuard troubleshooting
Troubleshooting tools
get webfilter status Sample Output: Locale License Expiration Hostname : english : Contract : Thu Oct 9 02:00:00 2011 : fortiguard.example.com
-=- Server List (Mon Feb 18 12:55:48 2008) -=IP a.b.c.d 10.1.101.1 10.2.102.2 10.3.103.3 10.4.104.4 10.5.105.5 Weight 0 10 20 20 20 25 RTT Flags DI TZ 2 1 0 0 0 0 Packets 1926879 10263 16105 6741 5249 12072 CurrLost TotalLost 0 11176 0 633 0 80 0 776 0 987 0 178
Output Details Hostname is the name of the FortiGuard server the FortiGate unit will attempt to contact. The Server List includes the IP addresses of alternate servers if the first entry cannot be reached. In this example the IP addresses are not public addresses The following flags in get webfilter status indicate the server status: D - the server was found through the DNS lookup of the hostname. If the hostname returns more than one IP address, all of them will be flagged with D and will be used first for INIT requests before falling back to the other servers. I - the server to which the last INIT request was sent. F - the server has not responded to requests and is considered to have failed. T - the server is currently being timed.
650
Troubleshooting tools
FortiGuard troubleshooting
Calculating weight
The weight for each server increases with failed packets and decreases with successful packets. To lower the possibility of using a remote server, the weight is not allowed to dip below a base weight, calculated as the difference in hours between the FortiGate unit and the server times 10. The further away the server is, the higher its base weight and the lower in the list it will appear.
Note: The output for the diag debug rating command will vary based on the state of the FortiGate device.
The following output is from a FortiGate device that has no DNS resolution for service.fortiguard.net.
If only three IP addresses appear with the D flag, it means that DNS is good but probably the FortiGuard ports (ports 53 and 8888) are blocked. When the license is expired, an INIT request will be sent every 10 minutes for up to six attempts. If a license is not found after this limit is reached, the INIT requests will be sent every day. A low source port number may appear which means that ports 1024 and 1025 could be blocked on the path to the FDS. Increase the source port on the FortiGate device with the following commands: config sys global set ip-src-port-range <start-end> (Default 1024-25000)
Note: Be careful moving ports like this as it may cause some services to stop working if they cant access their original ports. If you make this change, ensure all services that use ports are checked and updated to new port numbers if needed.
651
FortiGuard troubleshooting
Troubleshooting tools
Sample output: id=93000 msg="pid=57 urlfilter_main-723 in main.c received pkt:count=91, a=/tmp/.thttp.socket/21" id=22009 msg="received a request /tmp/.thttp.socket, addr_len=21: d= ="www.goodorg.org:80, id=12853, vfid=0, type=0, client=192.168.3.90, url=/" id=99501 user="N/A" src=192.168.3.90 sport=1321 dst=<dest_ip> dport=80 service="http" cat=43 cat_desc=Organisation" hostname="www.goodorg.org" url="/" status=blocked msg="URL belongs to a denied category in policy" Sample output: id=22009 msg="received a request /tmp/.thttp.socket, addr_len=21: d=pt.dnstest.google.com:80, id=300, vfid=0, type=0, client=192.168.3.12, url=/gen_204" id=93003 user="N/A" src=192.168.3.12 sport=21715 dst=<dest_ip> dport=80 service="http" cat=41 cat_desc="Search Engines" hostname="pt.dnstest.google.com" url="/gen_204" status=passthrough msg="URL belongs to an allowed category in the policy"
Table 32: Breakdown of sample output parts from URL rating command id=93000 msg="pid=57 urlfilter_main-723 in main.c received pkt:count=91, a=/tmp/.thttp.socket/21" id=22009 msg="received a request /tmp/.thttp.socket, addr_len=21: d= ="www.goodorg.org:80, id=12853, vfid=0, type=0, client=192.168.3.90, url=/" id=99501 The process ID (PID) is listed along with the function in the file running (main.c). Then it lists the number of packets received and the associated socket where the packets came from. Received a request on a particular socket (/tmp/.thttp.socket). The website to be rated is www.goodorg.org:80 and the client browser that wants the verification is 192.169.3.90.
No user associated with this source address (192.168.3.90) and port (1321). The destination IP user="N/A" src=192.168.3.90 is unknown and the port is the standard HTTP port sport=1321 dst=<dest_ip> 80, which is confirmed by service=http. dport=80 service="http" cat=43 The cat keyword gives the category of the URL being checked, which turns out to be an cat_desc=Organisation" organization. This is confirmed by the hostname of hostname="www.goodorg.org" goodorg.org. url="/" status=blocked The status is stated as blocked with the reason msg="URL belongs to a denied stated as URL belongs to a denied category in category in policy" policy.
652
The regional TACs are contacted through a global call center. Incoming service requests are then routed to the appropriate TAC. Each regional TAC delivers technical support to the customers in its regions during its hours of operation. These TACs also combine to provide seamless, around-the-clock support for all customers.
Figure 74: Fortinet regions and TAC.
AMER
Regional TAC Focused Teams Technical Support RMA Customer Services Remote Access Labs
This section includes: Creating an account Registering a device Reporting problems Assisting technical support Support priority levels Return material authorization process
653
Creating an account
Creating an account
To receive technical support and service updates, Fortinet products in the organization must be registered. The Product Registration Form on the support website will allow the registration to be completed online. Creating an account on the support website is the first step in registering products
Figure 75: Support account product registration form.
Once the account has been created, the Product Registration Form will be displayed and the product details can be provided. Alternately, the product registration can be completed at a later time.
Registering a device
Complete the following steps when registering a device for support purposes: 1 Log in using the Username and Password defined when the account was created
654
Registering a device
2 Select Add Registration on the left-hand side. 3 Select New Fortinet Product/License Registration.
Figure 77: .Adding a product to a support account
655
Reporting problems
5 Enter the Serial Number. 6 Enter the Support Contract No. provided by Fortinet when the support contract was purchased. 7 In the Product Description field, explain where this unit is physically located. 8 Click Next and accept the End User License Agreement (EULA) to complete the registration.
Reporting problems
Problems can be reported to a Fortinet Technical Assistance Center in the following ways: By logging an online ticket By phoning a technical support center
Fortinet partners
Fortinet Partners are entitled to priority web-based technical support. This service is designed for partners who provide initial support to their customers and who need to open a support ticket with Fortinet on their behalf. We strongly encourage submission and follow up of support tickets using this service. The support ticket can be submitted after logging into the partner website using one of the following links using FortiPartner account details: http://partners.fortinet.com This link will redirect to the general Partner Extranet website. Click Support > Online Support Ticket. https://www.forticare.com:1443/customersupport/login/partnerlog in.aspx This link redirects to the Partner Online Support Ticket section also known as FortiCare.
Note: The Partner Online Support Ticket section is accessed through HTTPS on port 1443. Ensure that the firewall allows external access this port. Also note that a customers Fortinet device must have a valid support contract to be able submit the support request as a Partner.
656
Reporting problems
Fortinet customers
Fortinet customers should complete the following steps to report a technical problem online: 1 Log in to the support web site at the following address with the account credentials used when the account was created: https://support.fortinet.com 2 Click View Products. 3 In the Products List, select the product that is causing the problem. 4 Complete the Create Support Ticket fields.
657
Reporting problems
658
Reporting problems
3 Select the appropriate ticket number. Closed tickets cannot be updated. A new ticket must be submitted if it concerns the same problem. 4 Add a New Comment or Attachment. 5 Click Submit when complete.
Note: Every web ticket update triggers a notification to the ticket owner or ticket queue supervisor.
Americas
Telephone: 1-866-648-4638 Hours: Monday to Friday 6:00 AM to 6:00 PM (Pacific Daylight Time)
659
EMEA
Telephone: +33-4-898-0555 If a support call is placed outside of EMEA business hours (Monday to Friday 9:00 AM to 6:00 PM (Central European Daylight Time)), priority 1 issues will be transferred to another Fortinet Technical Solutions center according to the Follow the Sun policy, meaning wherever its daylight, that TAC will be taking all support calls. Hours: Monday to Friday 9:00 AM to 6:00 PM (Central European Daylight Time)
APAC
Telephone: +603-2711-7391 Hours: Monday to Friday 9:00 AM to 6:00 PM (Malaysia Time)
660
Priority 1
This Critical priority is assigned to support cases in which: The network or system is down causing customers to experience a total loss of service. There are continuous or frequent instabilities affecting traffic-handling capability on a significant portion of the network. There is a loss of connectivity or isolation to a significant portion of the network. This issue has created a hazard or an emergency.
Priority 2
This Major priority is assigned to support cases in which: The network or system event is causing intermittent impact to end customers. There is a loss of redundancy. There is a loss of routine administrative or diagnostic capability. There is an inability to deploy a key feature or function. There is a partial loss of service due to a failed hardware component.
Priority 3
This Medium priority is assigned to support cases in which: The network event is causing only limited impact to end customers. Issues seen in a test or pre-production environment exist that would normally cause adverse impact to a production network. The customer is making time sensitive information requests. There is a successful workaround in place for a higher priority issue.
Priority 4
This Minor priority is assigned to support cases in which: The customer is making information requests and asking standard questions about the configuration or functionality of equipment.
Customers must report Priority 1 and 2 issues by phone directly to the Fortinet EMEA Support Center. For lower priority issues, you may submit an assistance request (ticket) via the web system. The web ticket system also provides a global overview of all ongoing support requests.
661
The Product Support Details for the selected device will be displayed.
662
663
In the RMA Replacement section of the Product Support Details page, enter the serial number of the replacement device and click RMA Replace.
Figure 82: RMA Replacement section of Product Support Details
This will transfer the support contract from the defective unit to the new unit with the serial number provided.
664
Troubleshooting connectivity
Connectivity problems can be caused by a number of reasons including hardware problems such as cabling or interfaces, routing problems, firewall configuration problems, and more. Connectivity problems can vary from total lack of connection, to some applications not working or some users having problems, to streaming video or VoIP connections being too slow to be useful. These general troubleshooting tips provide a starting point for you to determine why your network is behaving unexpectedly. This section includes general troubleshooting methods. More in depth coverage of these topics, such as transparent mode and firewall sessions, can be found in the FortiGate Fundamentals handbook chapter. If you are experience problems when starting your FortiGate unit, see FortiGate unit bootup issues on page 759.
665
Troubleshooting connectivity
9 Verify the contents of the routing table (in NAT mode) on page 674 Are there routes in the routing table for default and static routes? Do all connected subnets have a route in the routing table? Does a route wrongly have a higher priority than it should? 10 Check the bridging information in Transparent mode on page 675 Are you having problems in transparent mode? 11 Perform a sniffer trace on page 676 Is traffic entering the FortiGate unit and does it arrive on the expected interface? Is the ARP resolution correct for the next-hop destination? Is the traffic exiting the FortiGate unit to the destination as expected? Is the traffic being sent back to the originator? 12 Debug the packet flow on page 678 Is the traffic entering or leaving the FortiGate unit as expected? 13 Check number of sessions used by UTM proxy on page 679 Have you reached the maximum number of sessions for a protocol? Are new sessions not starting for a certain protocol? 14 Examine the firewall session list on page 683 Are there active firewall sessions? For troubleshooting tips for specific non-connectivity areas, see Troubleshooting advanced on page 685. In addition to these steps, you may find other diagnose commands useful. See Other diagnose commands on page 684.
666
Troubleshooting connectivity
If any of these solve the problem, it was a hardware connection problem. You should still perform some basic software connectivity tests to ensure complete connectivity. It might also be that the interface is disabled, or have its Administrative Status set Down. To enable an interface - web-based manager 1 Using the web-based management interface, go to System > Network > Interface. 2 Select and edit the interface to enable, such as port1. 3 Find Administrative Status at the bottom of the screen, and select Up. 4 Select Apply. To enable an interface - CLI config system interface edit port1 set status enable next end
Interface settings
If you can access the FortiGate unit with the management cable only, the first step is to display the interface settings. To display the settings for the internal interface, use the following CLI command: FGT# show system interface internal or for a complete listing of all the possible interface settings, use the following CLI command: config system interface edit internal get end Check the interface settings to ensure they are not preventing traffic. Specific things to check include (web-based manager names shown, CLI names may vary slightly): Link Status Down until a valid cable is plugged into this interface, after which it will be Up. The Links Status is shown by the connection LED for the interface if it lights up green, it is a good connection. If Link Status is down, the interface does not work. Addressing mode if you dont have a DHCP server, you will not be able to logon to an interface in DHCP mode as it will not have an IP address. IP/Netmask an interface needs an IP address to be able to connect to other devices. Ensure there is a valid IP address in this field. The one exception is if DHCP is enabled for this interface to get its IP address from an external DHCP server.
667
Troubleshooting connectivity
IPv6 address unless specifically stated all IP addresses are IPv4. The same protocol must be used by both ends to complete the connection. Ensure both this interface and the remote connection are both using IPv4 or both using IPv6 addressing. Administrative access If no protocols are selected, you will have to use the local management cable to connect to the unit. Note that if you are using IPv6, configure the IPv6 administrative access protocols. Administrative status set to Up or interface will not work.
DNS settings
While this section is not complicated, many networking problems can be traced back to DNS problems. Things to check in this area include: Are there values for both primary and secondary entries? Is the local domain name correct? Are you using IPv6 addressing? If so, are the IPv6 DNS settings correct? Are you using Dynamic DNS (DDNS)? If so, it is using the correct server, credentials, and interface? Can you contact both DNS servers to verify the servers are operational? If an interface addressing mode is set to DHCP and is set to override the internal DNS, is that interface receiving a valid DNS entry from the DHCP server is it a reasonable address and can it be contacted to verify its operational? Are there any DENY security policies that need to allow DNS? Can any internal device perform a successful traceroute to a location using the FQDN? See Traceroute on page 672.
668
Troubleshooting connectivity
A quick way to monitor CPU and memory usage is on the System Dashboard using the System Resources widgets. They have both a visual gauge and a percent number displayed to show you the usage. To check the system resources on your FortiGate unit, run the CLI command FGT# get system performance status This command provides a quick and easy snapshot of the FortiGate. The first line of output shows the CPU usage by category. A FortiGate that is doing nothing will look like: CPU states: 0% user 0% system 0% nice 100% idle However, if your network is running slow you might see something like: CPU states: 1% user 98% system 0% nice 1% idle This line shows that all the CPU is used up by system processes. Normally this should not happen as it shows the FortiGate is overloaded for some reason. If you see this overloading, you should investigate farther as its possible a process such as scanunitid is using all the resources to scan traffic in which case you need to reduce the amount of traffic being scanned by blocking unwanted protocols, configuring more security policies to limit scanning to certain protocols, or similar actions. It is also possible that a hacker has gained access to your network and is overloading it with malicious activity such as running a spam server or using zombie PCs to attack other networks on the Internet. You can get additional CPU related information with the CLI command get system performance top. This command shows you all the top processes running on the FortiGate unit (names on the left) and their CPU usage. If a process is using most of the CPU cycles, investigate it to determine if its normal activity. The second line of output from get system performance status shows the memory usage. Memory usage should not exceed 90%. If memory is too full some processes will not be able to function properly. For example if the system is running low on memory, antivirus scanning will go into failopen mode where it will start dropping connections or bypass the antivirus system. The other lines of output such as network usage, average session setup rate, and viruses caught, IPS attacks blocked can also help you determine why system resource usage it high. For example if network usage is high it will result in high traffic processing on the FortiGate, or if the session setup rate is very low or zero the proxy may be overloaded and not able to do its job.
669
Troubleshooting connectivity
diagnose sys modem wireles-id When there are connectivity issues, use the following to help you resolve them: diag debug enable activates the debug on the console diag debug application modemd dumps communication between the modem and the unit diag debug application pppd dumps the PPP negotiating messages. execute modem dial displays modem debug output
The modem diagnose output should not contain any error on the way to initializing. You should also verify the number that is used to dial with your ISP.
Both ping and traceroute require particular ports to be open on firewalls, or they cannot function. Since you typically use these tools to troubleshoot, you can allow them in the security policies and on interfaces only when you need them, and otherwise keep the ports disabled for added security.
Ping
The ping command sends a very small packet to the destination, and waits for a response. The response has a timer that may expire, indicating the destination is unreachable. The behavior of ping is very much like a sonar ping from a submarine, where the command gets its name. Ping is part of Layer-3 on the OSI Networking Model. Ping sends Internet Control Message Protocol (ICMP) echo request packets to the destination, and listens for echo response packets in reply. However, many public networks block ICMP packets because ping can be used in a denial of service (DoS) attack (such as Ping of Death or a smurf attack), or by an attacker to find active locations on the network. By default, FortiGate units have ping enabled and broadcast-forward is disabled on the external interface.
670
Troubleshooting connectivity
possible ECMP, split horizon, network loops cabling to ensure no loose connections verify which security policy was used (use the packet count column on the Policy > Policy page)
If there is total packet loss, you should investigate: hardware ensure cabling is correct, and all equipment between the two locations is accounted for addresses and routes ensure all IP addresses and routing information along the route is configured as expected firewalls ensure all firewalls, including FortiGate unit security policies allow PING to pass through
ms ms ms ms ms
671
Troubleshooting connectivity
Pinging 10.11.101.101 with 32 bytes of data: Reply from 10.11.101.101: bytes=32 time=10ms TTL=255 Reply from 10.11.101.101: bytes=32 time<1ms TTL=255 Reply from 10.11.101.101: bytes=32 time=1ms TTL=255 Reply from 10.11.101.101: bytes=32 time=1ms TTL=255 Ping statistics for 10.11.101.101: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 10ms, Average = 3ms To ping from a Linux PC 1 Go to a shell prompt. 2 Enter /bin/etc/ping 10.11.101.101.
Traceroute
Where ping will only tell you if it reached its destination and came back successfully, traceroute will show each step of its journey to its destination and how long each step takes. If ping finds an outage between two points, traceroute can be used to locate exactly where the problem is.
What is traceroute
Traceroute works by sending ICMP packets to test each hop along the route. It will send out three packets, and then increase the time to live (TTL) setting by one each time. This effectively allows the packets to go one hop farther along the route. This is the reason why most traceroute commands display their maximum hop count before they start tracing the route that is the maximum number of steps it will take before declaring the destination unreachable. Also the TTL setting may result in steps along the route timing out due to slow responses. There are many possible reasons for this to occur. Traceroute by default uses UDP datagrams with destination ports numbered from 33434 to 33534. The traceroute utility usually has an option to specify use of ICMP echo request (type 8) instead, as used by the Windows tracert utility. If you have a firewall and if you want traceroute to work from both machines (Unix-like systems and Windows) you will need to allow both protocols inbound through your FortiGate security policies (UDP with ports from 33434 to 33534 and ICMP type 8). You can also use the packet count column of the Policy > Policy page to track traceroute packets. This allows you to verify the connection, but also confirm which security policy the traceroute packets are using.
672
Troubleshooting connectivity
The first, or the left column, is the hop count, which cannot go over 30 hops. When that number is reached the traceroute ends. The second, third, and fourth columns display how much time each of the three packets takes to reach this stage of the route. These values are in milliseconds and normally vary quite a bit. Typically a value of <1ms indicates a local connection. The fifth, or the column farthest to the right, is the domain name of that device and its IP address or possibly just the IP address. To perform a traceroute on a Linux PC 1 Go to a command line prompt. 2 Enter /bin/etc/traceroute fortinet.com. The Linux traceroute output is very similar to the MS Windows tracert output.
673
Troubleshooting connectivity
Note: When increasing logging levels, ensure that alert email is configured and both disk usage and log quota are selected. This ensures you will be notified if the increased logging causes problems. You can also use Logging Monitor to determine the activities that generate the most log entries.
check all logs to ensure important information is not overlooked filter or order log entries based on different fields (such as level or service) to look for patterns that may indicate a specific problem (such as frequent blocked connections on a specific port for all IP addresses) use log reporting to help you visualize large amounts of log data go to Log&Report > Report Access > Cover Page, select Option, and configure the date, time, and contents of the log report. You also have the option to email generated log reports to an administrator.
Logs will help identify and locate any problems, but they will not solve the problems. The job of logs is to speed up your problem solving and save you time and effort. For more information on Logging and Log Reports, see the Logging and Reporting handbook chapter.
674
Troubleshooting connectivity
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - ISIS inter area * - candidate default S* C C 0.0.0.0/0 [10/0] via 172.20.120.2, wan1 10.31.101.0/24 is directly connected, internal 172.20.120.0/24 is directly connected, wan1
Sample Output:
#diagnose netlink brctl list list bridge information 1. root.b fdb: size=256 Total 1 bridges used=6 num=7 depth=2 simple=no
675
Troubleshooting connectivity
To display the information for forward domains diagnose netlink brctl domain <name> <id> where <name> is the name of the forwarding domain to display.
Sample Output:
diagnose netlink brctl domain ione 101 show bridge root.b ione forward domain. id=101 dev=trunk_1 6 To list the existing bridge MAC table, use the following command: diagnose netlink brctl name host <name>
Sample Output:
show bridge control interface root.b host. fdb: size=256, used=6, num=7, depth=2, simple=no Bridge root.b host table
port no 2 5 3 4 3 4 1 device 7 6 8 9 8 9 3 devname wan2 vlan_1 dmz internal dmz internal wan1 mac addr 02:09:0f:78:69:00 02:09:0f:78:69:01 02:09:0f:78:69:01 02:09:0f:78:69:02 00:80:c8:39:87:5a 02:09:0f:78:67:68 00:09:0f:78:69:fe ttl 0 0 0 0 194 8 0 attributes Local Static Local Static Local Static Local Static Local Static
To list the existing bridge port list, use this command: diagnose netlink brctl name port <name> Sample Output: show bridge root.b data port. trunk_1 peer_dev=0 internal peer_dev=0 dmz peer_dev=0 wan2 peer_dev=0 wan1 peer_dev=0
676
Troubleshooting connectivity
<verbose>
<count>
For a simple sniffing example, enter the CLI command diag sniffer packet port1 none 1 3. This will display the next 3 packets on the port1 interface using no filtering, and using verbose level 1. At this verbosity level you can see the source IP and port, the destination IP and port, action (such as ack), and sequence numbers. In the output below, port 443 indicates these are HTTPS packets, and 172.20.120.17 is both sending and receiving traffic. Head_Office_620b # diag sniffer packet port1 none 1 3 interfaces=[port1] filters=[none] 0.545306 172.20.120.17.52989 -> 172.20.120.141.443: psh 3177924955 ack 1854307757 0.545963 172.20.120.141.443 -> 172.20.120.17.52989: psh 1854307757 ack 3177925808
FortiOS Handbook v3: Troubleshooting 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
677
Troubleshooting connectivity
0.562409 172.20.120.17.52988 -> 172.20.120.141.443: psh 4225311614 ack 3314279933 For a more advanced example of packet sniffing, the following commands will report packets on any interface travelling between a computer with the host name of PC1 and the computer with the host name of PC2. With verbosity 4 and above, the sniffer trace will display the interface names where traffic enters or leaves the FortiGate unit. Remember to stop the sniffer, type CTRL+C. FGT# diagnose sniffer packet any "host <PC1> or host <PC2>" 4 or FGT# diagnose sniffer packet any "(host <PC1> or host <PC2>) and icmp" 4 The following sniffer CLI command includes the ARP protocol in the filter which may be useful to troubleshoot a failure in the ARP resolution (for instance PC2 may be down and not responding to the FortiGate ARP requests). FGT# diagnose sniffer packet any "host <PC1> or host <PC2> or arp" 4
The following configuration assumes that PC1 is connected to the internal interface of the FortiGate unit and has an IP address of 10.11.101.200. PC1 is the host name of the computer. To debug the packet flow in the CLI, enter the following commands: FGT# diag debug disable FGT# diag debug flow filter add <PC1> FGT# diag debug flow show console enable FGT# diag debug flow trace start 100 FGT# diag debug enable The start 100 argument in the above list of commands will limit the output to 100 packets from the flow. This is useful for looking at the flow without flooding your log or display with too much information. To stop all other debug activities, enter the command:
Troubleshooting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
678
Troubleshooting connectivity
FGT# diag debug flow trace stop The following is an example of debug flow output for traffic that has no matching security policy, and is in turn blocked by the FortiGate unit. The denied message indicates the traffic was blocked. id=20085 trace_id=319 func=resolve_ip_tuple_fast line=2825 msg="vd-root received a packet(proto=6, 192.168.129.136:2854->192.168.96.153:1863) from port3." id=20085 trace_id=319 func=resolve_ip_tuple line=2924 msg="allocate a new session-013004ac" id=20085 trace_id=319 func=vf_ip4_route_input line=1597 msg="find a route: gw-192.168.150.129 via port1" id=20085 trace_id=319 func=fw_forward_handler line=248 msg=" Denied by forward policy check"
679
Troubleshooting connectivity
off This option turns off accepting any new AV sessions, but will continue to process any existing AV sessions that are currently active. All the protocols listed (HTTP, SMTP, POP3, IMAP, FTP, and NNTP) are scanned by FortiGate Antivirus. If AV scanning is enabled, av-failopen off is selected, and the proxy session table fills up no new sessions of that type will be accepted. For example, if POP3 session table is filled and email AV scanning is enabled, no more POP3 connections will be allowed until the session table gets some free space. This is a secure option because no unscanned traffic is allowed to pass. one-shot When memory is low, bypass the antivirus system. The name one-shot comes from the fact that once you are in one-shot av-failopen mode, you must set avfailopen to either pass or off to restart AV scanning. This is a very unsecure option because it allows all traffic without AV scanning, and it never reverts to normal without manual assistance. pass When memory is low, bypass the antivirus system much as one-shot. The difference is that when memory is freed up, the system will start AV scanning automatically again. This is an unsecure option because it allows traffic to pass without AV scanning. However it is better than one-shot because it automatically restarts AV scanning when possible.
If the proxy session table is full for one or more protocols and your FortiGate unit enters into conserve or failopen mode, it will appear as if you have lost connections, network services are intermittent or non-existent, and yet other services work normally for a while until their sessions end and they join the queue of session starved applications.
In the following output, only the HTTP entries are displayed. The other protocols have been removed in an attempt to shorten the output. There will be separate entries for each supported protocol (HTTP, SMTP, POP3, IMAP, FTP, and NNTP) in each section of the output. For more information on session statistics, see Session table on page 631. To check sessions in use and related errors - CLI FGT# # get test app proxyworker 4 Worker[0] HTTP Common Current Connections Max Concurrent Connections Worker Stat Running time (HH:MM:SS:usec) Time in loop scanning
8/8032 76
29:06:27:369365 2:08:000198
Troubleshooting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
680
Troubleshooting connectivity
Error Count (accept) Error Count (read) Error Count (write) Error Count (poll) Error Count (alloc) Last Error Acceptor Read Acceptor Write Acceptor Close HTTP Stat Bytes sent Bytes received Error Count (alloc) Error Count (accept) Error Count (bind) Error Count (connect) Error Count (socket) Error Count (read) Error Count (write) Error Count (retry) Error Count (poll) Error Count (scan reset) Error Count (urlfilter wait) Last Error Web responses clean Web responses scan errors Web responses detected Web responses infected with worms Web responses infected with viruses Web responses infected with susp Web responses file blocked Web responses file exempt Web responses bannedword detected Web requests oversize pass Web requests oversize block Last Server Scan errors URL requests exempt URL requests blocked URL requests passed URL requests submit error URL requests rating error URL requests rating block URL requests rating allow URL requests infected with worms Web requests detected Web requests file blocked Web requests file exempt POST requests clean POST requests scan errors POST requests infected with viruses POST requests infected with susp POST requests file blocked POST requests bannedword detected
FortiOS Handbook v3: Troubleshooting 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
0 0 0 0 0 0 6386 19621 0 667012 (kb) 680347 (kb) 0 0 0 0 0 134 0 40 0 2 3 104 17950 23 16 0 0 0 0 0 0 16 0 102 0 0 0 0 0 0 10025 0 0 0 0 512 0 0 0 0 0
681
Troubleshooting connectivity
POST requests oversize pass POST requests oversize block Web request backlog drop Web response backlog drop Worker Accounting poll=721392/649809/42 pollfail=0 cmdb=85 scan=19266 acceptor=25975 HTTP Accounting setup_ok=8316 setup_fail=0 conn_ok=0 conn_inp=8316 urlfilter=16553/21491/20 uf_lookupf=0 scan=23786 clt=278876 srv=368557
0 0 0 0
SMTP Accounting setup_ok=12 setup_fail=0 conn_ok=0 conn_inp=12 scan=12 suspend=0 resume=0 reject=0 spamadd=0 spamdel=0 clt=275 srv=279 POP3 Accounting setup_ok=30 setup_fail=0 conn_ok=0 conn_inp=30 scan=3 clt=5690 srv=5836 IMAP Accounting setup_ok=0 setup_fail=0 conn_ok=0 conn_inp=0 scan=0 clt=0 srv=0 FTP Accounting setup_ok=0 setup_fail=0 conn_ok=0 conn_inp=0 scan=0 clt=0 srv=0 datalisten=0 dataclt=0 datasrv=0 NNTP Accounting setup_ok=0 setup_fail=0 conn_ok=0 conn_inp=0 scan=0 clt=0 srv=0 The output from this command falls into the following sections: HTTP Common current connections There is an entry for each protocol that displays the connections currently used, and the maximum connections allowed. This maximum is for the UTM proxy which means all the protocols connections combined cannot be larger than this number. To support this, note that the maximum session count for each protocol is the same. You may also see a line titled Max Concurrent Connections for each protocol. This number is the maximum connections of this type allowed at one time. If VDOMs are enabled, this value is defined either on the global or per-VDOM level at VDOM > Global Resources or in the CLI at config system resource-limits. Worker Stat This is statistics about the UTM proxy including how long it has been running, and how many errors it has found.
682
Troubleshooting connectivity
HTTP Stat This section includes statistics about the HTTP protocol proxy. This is a very extensive list covering errors, web responses, and any UTM positive matches. There are similar sections for each protocol, but the specific entries in each vary based on what UTM scanning is looking for in each spam control for email, file transfer blocking for FTP, and so on. Worker Accounting Lists accounting information about the UTM proxy such as polling statistics, how many sessions were scanned, and how many were just accepted. This information can tell you if expect AV scanning is taking place or not. Under normal operation there should be no errors or fails. HTTP Accounting The accounting sections for each protocol provide information about successful session creation, failures, how many sessions are being scanned or filtered, and how many are client or server originated. If setup_fail is larger than zero, run the command again to see if it is increasing quickly. If it is, your FortiGate unit may be in conserve mode.
Related commands
To clear the UTM proxy statistics # get test app proxyworker 8 To drop all idle connections # get test app proxyworker 222 To display statistics per VDOM # get test app proxyworker 4444 For additional related commands, see get test on page 743.
683
Troubleshooting connectivity
FGT# diag sys session filter src 10.11.101.112 FGT# diag sys session list The following example shows filtering the session list based on a destination address of 172.20.120.222. FGT# diag sys session filter dst 172.20.120.222 FGT# diag sys session list To clear all sessions corresponding to a filter - CLI FGT# diag sys session filter dst 172.20.120.222 FGT# diag sys session clear
684
Troubleshooting advanced
There are issues other than connectivity that require troubleshooting. These are more advanced issues that may require investigating a number of different issues before the problem is solved. The advanced troubleshooting sections include, and can help answer the following questions. Traffic shaping issues on page 685 Is an application or user consuming all your network bandwidth? Do some applications need more bandwidth than they are getting? Is less bandwidth allowed than expected on a connection? Are sessions or packets being dropped? User and administrator logon issues on page 689 Are one or more of your users unable to log on to the network? Are one or more of your users unable to initiate VPN connections? Are you having problems logging in to administrator accounts? IPSec VPN issues on page 693 Are VPN negotiations slow? Are VPN connections not completing the initial Phase 1 handshake? Is the IPSec VPN tunnel down? For connectivity troubleshooting tips, see Troubleshooting connectivity on page 665. In addition to these steps, you may find diagnose commands useful. See Other diagnose commands on page 698.
685
Troubleshooting advanced
Monitoring traffic
Traffic shaping is best used with a traffic monitor, such as the Traffic History widget that is available on the Dashboard. Configure two one to watch the internal interface and another for the external interface. Run these monitors for a while before trying the traffic shaping procedures to get a feel for your bandwidth usage. To configure two traffic history monitors - web-based management 1 Go to System > Dashboard > Status. 2 Select Widget > Traffic History. 3 Select the edit icon in the widgets menu bar. 4 Name the widget Internal, and select the Internal interface to monitor. 5 Enable Refresh, and select OK. 6 Repeat steps 2 through 5 selecting and naming this second monitor external. Let the monitors run for a while to display network traffic before starting troubleshooting. Note the times you start and stop traffic on the FortiGate unit as this will be displayed in the monitors. It may be advisable to take screen captures of the monitors at each stage for easier comparison later.
686
Troubleshooting advanced
Sample output: # diag firewall shaper traffic-shaper list policy 4 ipv4 name traffic_test_app maximum-bandwidth 12 KB/sec guaranteed-bandwidth 0 KB/sec current-bandwidth 0 B/sec priority 3 policy 4 packets dropped 0 stats Display statistics for the traffic shaper. Add list to the command to view the stats. The stats are very brief number of shapers, number of ipv4 shapers, number of ipv6 shapers, and number of packets dropped. Or you can wipe the stats by adding the word clear on the end of the command. This will remove all store statistics and start fresh. state Displays the total number of global traffic shapers. This is useful if VDOMs are enabled on your FortiGate unit as it will list all traffic shapers on your FortiGate unit. This command has no additional arguments.
To create a traffic shaping security policy to limit FTP bandwidth usage 1 Go to Firewall > Traffic Shaper > Shared. 2 Select Create New. 3 Enter the following information and select OK.
Name Apply Shaper Guaranteed Bandwidth Traffic Priority traffic_app_test Per Policy Disable Medium
687
Troubleshooting advanced
6 Select any and all for source and destination interfaces and addresses. 7 Select always for schedule. 8 For service select Multiple and enter all the FTP related entries. 9 Select ACCEPT for Action. 10 Enable NAT. 11 Enable Traffic Shaping, and select traffic_test_app. 12 Select OK. 13 Select the new security policy in the list. 14 Select Move, and insert it before Seq. No. 1. 15 Repeat steps 5 through 10, but for service select all services. This works because the first policy will catch all FTP traffic first before it gets to this policy. 16 Select OK. 17 Select the new security policy in the list. 18 Select Move, and insert it below Seq. No. 1. This procedure creates two security policies that will catch all the traffic the first one catches all FTP traffic and limits its bandwidth, and the second one matches everything else. If FTP is found to not be the problem, it is easy to remove FTP from the first policy and add a different protocol or group of protocols to see if they are responsible. Once the bandwidth consuming protocol is discovered, it can be traffic shaped using security policies (clone existing policies and change the first one to only apply to that protocol with the traffic shaping applied), users can be informed to limit their use of that protocol or application, or that protocol could be blocked completely.
688
Troubleshooting advanced
myTrafficShaper is a shared traffic shaper. Some of the output displayed has different meanings depending how this shaper is applied. If this shaper is applied to only one security policy, then the numbers displayed are for the traffic flowing through that one security policy. But if this shaper is applied to multiple policies, the current-bandwidth and packets dropped will be combined for all instances, and will be less useful for troubleshooting. For this reason if possible, either create multiple copies of the traffic shaper with different names to allow for easier troubleshooting, or if possible disable all security policies but one until you get the information you need.
689
Troubleshooting advanced
690
Troubleshooting advanced
2 Expand Firewall if required. 3 Note the user groups that include the affected user or users. Take special note if multiple affected users are all part of one group. 4 Go to Firewall > Policy > Policy. Ensure the Authentication column is visible. If not: Select Column Settings. Move Authentication to the list on the right. Move the Authentication entry to your preferred place in the list using the Move up and Move down buttons. Select OK. 5 Locate one or more authentication policies that authenticate the user group or groups this user belongs to as noted earlier. The user group or groups that a security policy authenticates will appear in the Authentication column. 6 Edit these security policies to look for any that use certificate authentication. 7 Note which certificate is required, and ensure the user has that certificate installed on their system.
691
Troubleshooting advanced
2 Go to System > Interface, select the dmz interface, and select Edit. 3 Under Administrative Access, select HTTPS, PING, HTTP, SSH, SNMP, and TELNET. 4 If you use IPv6, select the above protocols to be used for IPv6 administrative access. 5 Select OK. 6 Repeat for each interface where administrative access is required. To enable administrator access on the dmz interface - CLI config system interface edit dmz set allowaccess HTTPS PING HTTP SSH SNMP TELNET set allowaccess6 HTTPS PING HTTP SSH SNMP TELNET next end
692
Troubleshooting advanced
5 Compare the listed trusted hosts to the IP address the attempted logon is coming from. If there is a match, the problem is not due to trusted hosts. 6 If there is no match and the new address is valid (secure), add it to the list of trusted hosts using the following CLI commands: set trusthost3 <ipv4_addr> <ipv4_netmask> next end Use the numbered trusthost that follows the last configured trusthost. For example if trusthost, trusthost1, and trusthost2 are in use you will use trusthost3. If the problem was due to trusted hosts, the admin account will be able to logon now.
This section focuses on the following VPN tunnel related issues: VPN negotiations appear to be slow VPN tunnel proposal will not connect Other useful VPN IKE related commands
693
Troubleshooting advanced
694
Troubleshooting advanced
To determine what the other end of the VPN tunnel is proposing 1 Start a terminal program such as puTTY and set it to log all output. When necessary refer to the logs to locate information when output is verbose. 2 Logon to the FortiGate unit using a super_admin account. 3 Enter the following CLI commands. 4 Display all the possible IKE error types and the number of times they have occurred: diag vpn ike errors 5 Check for existing debug sessions: diag debug info If a debug session is running, to halt it enter: diag debug disable 6 Confirm your proposal settings: diag vpn ike config list 7 If your proposal settings do not match what you expect, make a change to it and save it to force an update in memory. If that fixes the problem, stop here. 8 List the current vpn filter: diag vpn ike filter 9 If all fields are set to any, there are no filters set and all VPN ike packets will be displayed in the debug output. If your system has only a few VPNs, skip setting the filter. If your system has many VPN connections this will result in very verbose output and make it very difficult to locate the correct connection attempt. 10 Set the VPN filter to display only information from the destination IP address for example 10.10.10.10 : diag vpn ike log-filter dst-addr4 10.10.10.10 To add more filter options, enter them one per line as above. Other filter options are displayed in Table 33.
Table 33: Filter options for diag vpn ike filter clear dst-addr6 dst-port interface list name negate src-addr4 src-addr6 src-port vd erase the current filter the IPv6 destination address range to filter by the destination port range to filter by interface that IKE connection is negotiated over display the current filter the phase1 name to filter by negate the specified filter parameter the IPv4 source address range to filter by the IPv6 source address range to filter by the source port range to filter by index of virtual domain. 0 matches all
11 Start debugging: diag debug app ike 255 diag debug enable 12 Have the remote end attempt a VPN connection.
695
Troubleshooting advanced
Note: If the remote end attempts the connection they become the initiator. This situation makes it easier to debug VPN tunnels because then you have the remote information and all of your local information. by initiate the connection, you will not see the other ends information.
13 If possible go to the web-based manager on your FortiGate unit, go to the VPN monitor and try to bring the tunnel up. 14 Stop the debug output: diag debug disable 15 Go back through the output to determine what proposal information the initiator is using, and how it is different from your VPN P1 proposal settings. Things to look for in the debug output of attempted VPN connections are shown in Table 34.
Table 34: Important terms to look for in VPN debug output initiator responder local ID error no SA proposal chosen R U THERE and R U THERE ack negotiation result SA_life_soft and SA_life_hard R U THERE tunnel up Starts the VPN attempt, in the above procedure that is the remote end Answers the initiators request In aggressive mode, this is not encrypted There was no proposal match there was no encryptionauthentication pair in common, usually occurs after a long list of proposal attempts dead peer detection (dpd), also known as dead gateway detection after three failed attempts to contact the remote end it will be declared dead, no farther attempts will be made to contact it lists the proposal settings that were agreed on negotiating a new key, and the key life If you see this, it means Phase 1 was successful the negotiation was successful, the VPN tunnel is operational
696
Troubleshooting advanced
Table 35: List of arguments for diag vpn ike CLI command config list counts List all the IKE configurations Display list of IKE objects and their current, maximum, and total counts. For example: crypto.md5: now 0 max 1 total 24 Either set or display hardware or software crypto settings. crypto hardware - use hardware crypto (where possible) crypto software - use software crypto status - show number of hardware and software crypto objects Set the IKE filter. See Table 33 on page 695.
crypto
Display VPN IKE gateways. Optionally clear or flush (same result) the gateways in memory. Restart IKE daemon. This is useful if during troubleshooting you discover that settings in memory do not match what you set. Note: All VPN connections will be lost when restarting. If you have active VPN connections, give those connections sufficient notice to close gracefully.
Display all routes in memory for IKE VPN tunnels. Display status of IKE objects. detailed - lists vdom, name, version, IKE SA, and IPsec SA summary - lists number of IKE SA and IPsec SA objects
697
Logging
Troubleshooting advanced
Logging
The following contains information regarding troubleshooting logging issues on the unit. This topic contains the following: Cannot log to a supported log device The alert email did not send an email to the email address The FortiGate unit stopped logging; what happened?
The alert email did not send an email to the email address
Verify that the alert email configuration settings are correct; an alert email will not be sent if the email address requires authentication and Authentication and its settings are not configured. Use Test Connectivity after verifying the alert email configuration settings see if a test alert email is sent to the address or addresses.
698
699
show system interface diagnose ip address list show full-configuration system dns show full-configuration system global show full-configuration system settings diagnose hardware lspci -v
get hardware memory get hardware memory
diagnose diagnose diagnose diagnose diagnose diagnose diagnose diagnose diagnose diagnose
ip router command show show int ipv6 neighbor-cache list ipv6 route list ipv6 ipv6-tunnel list ipv6 sit-tunnel list ips anomaly list ips anomaly status ips dissector status ips packet status ips raw status
diagnose sys session6 stat (similar ipv4 outupt from get system session-info full-stat)
get system auto-update status get system auto-update versions
diagnose test update info diagnose sys flash list diagnose sys logdisk smart diagnose sys logdisk status diagnose sys ha status diagnose sys ha showcsum diagnose sys ha hadiff status diagnose sys ha dump 1 - 8 get sys session-info statistics (similar output from get system
session-info full-stat)
Syntax
exec tac report
Parameters
None.
Usage/Remarks
Use this command to view the information required when calling customer support.
Troubleshooting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
700
When you run this command, it will take up to a few minutes to collect and display all the information. Your console program (telnet, ssh, etc.) should log the output, otherwise it will scroll by too fast to see. No output is listed because the output is extensive, and many of the commands from this report are described in this chapter. Do not include the output from this command in FortiCare tickets unless it is specifically requested. Scope: Global
701
Syntax
get firewall iprope appctrl list get firewall iprope appctrl status
Parameters Usage/Remarks
Use this command to view the rules defined for peer to peer, or the status of those rules. Scope: Vdom
Output Example
FGT # get firewall iprope appctrl app-id=17953 list-id=2004 app-id=17954 list-id=2004 app-id=17956 list-id=2004 app-id=17957 list-id=2004 app-id=107347980 list-id=2004 app-id=108855300 list-id=2004 app-id=109051910 list-id=2004 app-id=109051912 list-id=2004 list action=Pass action=Pass action=Pass action=Pass action=Pass action=Pass action=Pass action=Pass
FGT # get firewall iprope appctrl status appctrl table 3 list 1 app 1083 shaper 0
Description Display all the application IDs, which list they are in by ID, and the action taken for each application. Display the number of ipropes for application control tables, lists, applications, and traffic shapers.
702
Syntax
get firewall iprope list <policy group number>
Parameters
<policy group > The number of the Policy Group as defined in the Web Config
menu Policy > Policy > Policy tab.
Usage/Remarks
Use this command to view the view the rules defined for a Policy Group. This is useful to understand the behavior of the Policy Group per protocol. The Policy Group number is easiest to find by just running this command without the number (get firewall iprope list) and finding the group that includes your policy. For example if you have a traffic shaper for your security policy called shaper_test, look for that information in one of the policy group entries to ensure its the correct one. After that you can use the policy group number to limit the output to the group you want. Scope: Vdom
Output Example
FGT # get firewall iprope list 0020005 policy flag (10809): log redir d_rm master flag2 (0): shapers: shaper_test(3/12800/64000)/shaper_test(3/12800/64000) per_ip= imflag: sockport: 0 action: accept index: 1 schedule(always) group=00200005 av=00004e20 au=00000000 host=0 split=00000000 chk_client_info=0x0 app_list=0 ips_view=0 misc=0 grp_info=0 seq=0 hash=0 tunnel= zone(0): ->zone(0): source(0): dest(0): source wildcard(0): destination wildcard(0): vip(2): 2 1 service(1): [0:0x0:0/(0,0)->(0,0)] nat(0): mms: 0 0
703
Syntax
get firewall proute
Parameters
None.
Usage/Remarks
Use this command to view the policy routes configured on this units current VDOM. Scope: Vdom
Output Example
FGT # get firewall proute list route policy info(vf=root): iff=12 src=10.10.10.0/255.255.255.0 tos=0x00 tos_mask=0x00 dst=10.10.11.0/255.255.255.0 protocol=11 port=1:65535 oif=13 gwy=0.0.0.0
Keyword/Variable vf iff src tos tos_mask dst protocol port oif gwy
Description The current virtual domain (VDOM). All policy routes for this VDOM are displayed. Incoming interface The source IP and netmask for incoming traffic to be matched to the policy Type of service bit pattern in hexadecimal. This is matched and is good for a specific TOS. Type of service bit mask in hexadecimal. Masks out unwanted bits. This is good for matching multiple TOS values. The destination IP and netmask for incoming traffic to be matched to the policy. The protocol number to be matched. The range of ports to match for incoming traffic. Outgoing interface where traffic is being directed to. Outgoing gateway where traffic is being directed to
704
Syntax
get firewall shaper [ per-ip| per-ip-shaper| traffic| trafficshaper ]
Parameters
Keyword/Variable Description Display all configured per-ip traffic shapers with their configurations. List all configured per-ip traffic shapers. Display all configured shared traffic shapers with their configurations including current bandwidth usage. List all configured shared traffic shapers.
Usage/Remarks
Use this command to view traffic shaper bandwidths with traffic levels, and list configured traffic shapers for either shared (traffic) or per-ip traffic shapers. Note that for per-ip and traffic commands, if there is no shaper configured none will be displayed. Scope: Vdom
Output Example
FGT # get firewall shaper per-ip [ip_test] maximum-bandwidth: 12 KB/sec maximum-concurrent-session: 100 packets dropped: 0
Keyword/Variable Description The name of the configured per-ip traffic shaper. The maximum allowed bandwidth for this traffic shaper. The web-based manager units for this field are kbits/sec where this value is in kBytes/sec. Any traffic for this IP address that is over this limit will be dropped. For example entering 100 kbits/sec results in a value of 12 kBytes/sec being displayed here. The maximum allowed number of concurrent sessions for this traffic shaper. If the maximum is reached, no new sessions will be started on this IP address until another session ends. The number of packets that have been dropped from traffic using this shaper. Packets at rates greater than the maximum bandwidth limit are dropped.
ip_test 12 KB/sec
100
0
705
maximum-bandwidth: 131072 KB/sec guaranteed-bandwidth: 12 KB/sec current-bandwidth: 0 B/sec priority: high tos ff packets dropped: 0
Keyword/Variable Description The name of the configured shared traffic shaper. There are a number of default configured traffic shapers that include guarantee-100kbps, high-priority, low-priority, medium-priority, and shared-1M-pipe. The maximum allowed bandwidth for this traffic shaper. Any traffic for this shaper that is over this limit will be dropped. The web-based manager units for this field are kbits/sec where this value is in kBytes/sec. For example entering 1 048 576 kbits/sec results in a value of 131 072 kBytes/sec being displayed here. The guaranteed minimum bandwidth ensures there will never be less than this amount of bandwidth available. The current amount of traffic using this traffic shaper. If this shaper is not assigned to any security policies this value will be zero. Note that the units here are B/sec and not the KB/sec of the other fields for this command. The quality of service (QoS) level for traffic using this shaper. Values can be low, medium, or high. Higher priority traffic will be queued ahead of lower priority traffic to ensure its guaranteed minimum bandwidth is met when necessary. The type of service (TOS) used in the TCP packet headers. It is used to enact the selected priority. The number of packets that have been dropped from traffic using this shaper. Packets at rates greater than the maximum bandwidth limit are dropped.
guarantee-100kbps
131072 KB/sec
12 KB/sec 0 B/sec
high
tos ff
706
Syntax
get hardware cpu
Parameters Usage/Remarks
Use this command to view the specifications about CPUs on the FortiGate unit. Multiple CPUs will each have an entry. Apart from the CPU model information (vendor, cpu family, model name, MHz, and cache size) you can use the flags to determine what features are supported. For example mmx, and 3dnow indicate Single instruction, multiple data (SIMD) support. Scope: Global
Output Example
FGT # get hardware cpu processor: 0 vendor_id: AuthenticAMD cpu family: 5 model: 10 model name: Geode(TM) Integrated Processor by AMD PCS stepping: 2 cpu MHz: 433.248 cache size: 128 KB fdiv_bug: no hlt_bug: no f00f_bug: no coma_bug: no fpu: yes fpu_exception: yes cpuid level: 1 wp: yes flags: fpu de pse tsc msr cx8 sep pge cmov clflush mmx mmxext 3dnowext 3dnow bogomips: 865.07
707
Syntax
get hardware nic <interface>
Parameters
<interface>
Enter the interface name. For example, internal, wan1, wan2.
Usage/Remarks
Use this command to view the interface information and statistics. This is useful when debugging network problems on a particular interface, or providing Customer Support with hardware information about your FortiGate unit. Note that the output will be different for different NICs and may include more fields or different information fields. Scope: Global
Output Example
FGT # get hardware Description chip_id IRQ System_Device_Name Current_HWaddr Permanent_HWaddr State Link Speed Duplex FlowControl MTU_Size Rx_Packets Tx_Packets Rx_Packets Tx_Bytes Collisions Rx_Missed_Errors Tx_Carrier_Errors
Keyword/Variable Description chip_id IRQ System_Device_Name Current_HWaddr
nic wan1 sundance Ethernet driver1.01+LK1.21 6 5 wan1 00:09:0f:78:71:32 00:09:0f:78:71:32 up up 100 full Tx off, Rx off 1500 52377 53098 47029877 7199983 0 0 0
Description Name of the network driver. Id of the chipset IRQ Network device name (i.e. The physical interface name). Current MAC address.
708
Keyword/Variable Permanent_HWaddr State Link Speed Duplex Rx_Packets Tx_Packets Rx_Packets Tx_Bytes Collisions Rx_Missed_Errors Tx_Carrier_Errors
Description Permanent MAC address. Administrative status (up/down). Link status (up/down). Negotiated or configured network speed. Negotiated or configured duplex mode. Packets' number received by the network device. Packets number transmitted by the network device. Amount of bytes received on the interface. Amount of bytes sent from this interface. Number of collisions usually due mostly to incorrect incorrect speed or duplex settings. Equals Rx_FIFO_Errors + CEXTERR (Carrier Extension Error Count). Only valid in 1000M mode, which is marked by PHY. The PHY should assert the internal carrier sense signal during every transmission. Failure to do so may indicate that the link has failed, or the PHY has an incorrect link configuration. This register only increments if transmits are enabled. This register is not valid in internal SerDes1 mode (TBI mode for the 82544GC/EI), and is only valid when the Ethernet controller is operating at full duplex.
709
Syntax
get hardware memory
Parameters
None.
Usage/Remarks
Use this command to view the status of the memory resources. This is useful to confirm and identify any potential memory leaks or even to simply confirm that reduced FortiOS performance is due to a shortage of free memory. Scope: Global
Output Example
FGT # get hardware memory total: Mem: 261955584 Swap: 0 MemTotal: MemFree: MemShared: Buffers: Cached: SwapCached: Active: Inactive: HighTotal: HighFree: LowTotal: LowFree: SwapTotal: SwapFree:
Keyword/Variable Mem Swap MemTotal MemFree SwapCached Active Inactive HighTotal LowFree
used: free: shared: buffers: cached: shm: 97312768 164642816 0 217088 55382016 51322880 0 0 255816 kB 160784 kB 0 kB 212 kB 54084 kB 0 kB 22832 kB 31524 kB 0 kB 0 kB 255816 kB 160784 kB 0 kB 0 kB
Description Memory size. Amount of memory in the swap HighTotal + LowTotal = amount of memory available on the unit Free memory on the unit Amount of memory out of the Swap but remaining in the cache Amount of memory recently used Amount of memory which has not been used for a while Amount of memory which belongs to the zone ZONE_HIGHMEM Amount of Free memory available in the zone ZONE_NORMAL
710
Syntax
get hardware npu { legacy | np1 | np2 | np4 } list
Parameters
{ legacy | np1 | np2 | np4 } Specify which level of NPU interfaces are to be displayed.
Usage/Remarks
Use this command to view the NPU devices and port numbers. This is useful because some FortiOS products contain contain network processors. Network processor features, and therefore offloading requirements, vary by network processor model. If the specified version of NPU is not present on this FortiOS unit, a message indicating that will be displayed. Scope: Global
Output Example
FGT # get hardware npu np1 list ID Interface 0 port9 port10 FGT # get hardware npu np2 list ID PORTS -- ----0 port1 0 port2 0 port3 0 port4 ID PORTS -- ----1 port5 1 port6 1 port7 1 port8 ID PORTS -- ----2 port9 2 port10 2 port11 2 port12 ID PORTS
FortiOS Handbook v3: Troubleshooting 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
711
PORTS
712
Syntax
get hardware npu { legacy | np1 | np2 | np4 }performance <dev_id>
Parameters
{ legacy | np1 | np2 | np4 } Specify which level of NPU interfaces are to be displayed. NPU ID number. If you are unsure you can enter a ? to get a list of available valid NPU ID numbers.
<dev_id>
Usage/Remarks
Use this command to view the performance numbers for NPU devices. This can be useful when you are checking NPU trafficeither for specific problems or for network optimization. Network processor features, and therefore offloading requirements, vary by network processor model. The values displayed are divided into two sections. The first is the ISCP2 performance numbers. In this section, the values are mostly counts for the stated values. For example BADCSUM is the number of bad checksums encountered. The last section starts with IRQ. This is a list of 18 different registers. Scope: Global
Output Example
FGT # get hardware npu np2 performance 1 ISCP2 Performance: Nr_int : 0x00000005 INTwoInd : 0x00000000 RXwoDone : 0x00000000 PKTwoEnd : 0x00000000 PKTCSErr : 0x00000000 PKTidErr : 0x00000000 PHYInt : 0x0/0x0/0x0/0x0 CSUMOFF : 0x00000000 BADCSUM : 0x00000000 MSGINT : 0x00000000 IPSEC : 0x00000000 IPSVLAN : 0x00000000 SESMISS : 0x00000000 TOTUP : 0x00000000 TCPPLTOT : 0x00000000 TCPPLBADCT: 0x00000000 TCPPLBADL: 0x00000000 TCPPLSESI : 0x00000000 TCPPLSESR : 0x00000000 TCPPLBD : 0x00000000 TXInt : 0x0/0x0/0x0/0x0 RxI : 0x0 BDEmpty : 0x0/0x0/0x0/0x0 Congest: 0x0/0x0/0x0/0x0 TMM_Busy : 0x0 Poll List: 0 0 0 0 MSG Performance: TOTMSG : 0x00000000 BADMSG : 0x00000000 TOUTMSG : 0x00000000 MSGLostEvent : 0x00000000 QUERY : 0x00000000 TAE : 0x00000000 SAEXP-SN : 0x00000000 SAEXP-TRF : 0x00000000 OUTUPD : 0x00000000 INUPD : 0x00000000
FortiOS Handbook v3: Troubleshooting 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
713
NULLTK: 0x00000000 NAT Performance: BYPASS (Enable) BLOCK (Disable) IRQ :00000005 QFTL :00000000 DELF :00000000 FFTL :00000000 OVTH :00000005 QRYF :00000000 INSF :00000000 INVC :00000000 ALLO :00000005 FREE :00000005 ALLOF :00000000 BPENTR:00000000 B KENTR:00000000 PBPENTR:00000000 PBKENTR:00000000 NOOP :00000000 THROT :0000000 0(0x002625a0) SWITOT:00000000 SWDTOT:00000000 ITDB:00000000 OTDB:000000000 SPISES:00000000 FLUSH:00000021
Keyword/Variable Description This section displays information about message traffic performance. This section displays information about NAT traffic performance. If BYPASS is enabled many of the counters will be zero.
ISCP2 Performance This section displays information about the ISCP2 performance. MSG Performance NAT Performance
714
Syntax
get hardware npu { legacy | np1 | np2 | np4 }status <dev_id>
Parameters
{ legacy | np1 | np2 | np4 } Specify which level of NPU interfaces are to be displayed. NPU ID number. If you are unsure you can enter a ? to get a list of available valid NPU ID numbers.
<dev_id>
Usage/Remarks
Use this command to display the status of the interfaces attached to the NPU. This can be useful for advanced users to debug traffic on the NPU interfaces. If you enter an NPU or device ID that doesnt exist, an error message stating that it was an invalid NPU ID will be displayed. Scope: Global
Output Example
FGT # get hardware npu np2 status 1 NP2 Status ISCP2 c2160000 (Neighbor f7940000) 1a29:0703 256MB Base f8a5a000 DBG 0x00000000 RX SW Done 0 MTP 0x0 desc_alloc = c2152000 desc_size = 0x2000 count = 0x100 nxt_to_u = 0x0 nxt_to_f = 0x0 Total Interfaces: 4 Total Ports: 4 Number of Interface In-Use: 4 Interface c2160100 netdev c22bb000 0 Name port5 PHY: Attached LB Mode 0 LB IDX 0/1 LB Ports: c2160644, 00000000, 00000000, 00000000 Port c2160644 Id 0 Status Down ictr 4 desc = c2232000 desc_size = 0x00001000 count = 0x00000100 nxt_to_u = 0x00000000 nxt_to_f = 0x00000000 Intf c2160100 Interface c2160250 netdev c2168c00 1 Name port6 PHY: Attached LB Mode 0 LB IDX 0/1 LB Ports: c21606f8, 00000000, 00000000, 00000000 Port c21606f8 Id 1 Status Down ictr 0 desc = c2126000 desc_size = 0x00001000 count = 0x00000100
715
nxt_to_u = 0x00000000 nxt_to_f = 0x00000000 Intf c2160250 Interface c21603a0 netdev c2168800 2 Name port7 PHY: Attached LB Mode 0 LB IDX 0/1 LB Ports: c21607ac, 00000000, 00000000, 00000000 Port c21607ac Id 2 Status Down ictr 0 desc = c2123000 desc_size = 0x00001000 count = 0x00000100 nxt_to_u = 0x00000000 nxt_to_f = 0x00000000 Intf c21603a0 Interface c21604f0 netdev c2168400 3 Name port8 PHY: Attached LB Mode 0 LB IDX 0/1 LB Ports: c2160860, 00000000, 00000000, 00000000 Port c2160860 Id 3 Status Down ictr 0 desc = c2122000 desc_size = 0x00001000 count = 0x00000100 nxt_to_u = 0x00000000 nxt_to_f = 0x00000000 Intf c21604f0 NAT Information: cmdq_qw = 0x2000 cmdq = c2140000 head = 0x5 tail = 0x5 APS (Enabled) information: Session Install when TMM TSE OOE: Disable Session Install when TMM TAE OOE: Disable IPS anomaly check policy: Follow config MSG Base = c2130000 QL = 0x1000 H = 0x0
716
Syntax
get hardware status
Parameters
None.
Usage/Remarks
Use this command to get basic information about your units hardware. This is a short list that can be used to help guide troubleshooting efforts, especially by customer service. For example if there is supposed to be compact flash memory available but this command shows 0MB available, then you know there is a hardware problem with the memory. Also if there are known issues with particular chipsets, this command will display chipset information for hardware such as network cards. The CPU information can vary from simply the number of cores, to the more in-depth information listed here. Scope: Global
Output Example
FGT # get hardware status Model name: Fortigate-3810A ASIC version: CP6 ASIC SRAM: 64M CPU: Intel(R) Core(TM)2 Duo CPU E4300 @ 1.80GHz RAM: 3532 MB Compact Flash: 122 MB /dev/hda USB Flash: not available Network Card chipset: Broadcom 570x Tigon3 Ethernet Adapter (rev.0x8003) Network Card chipset: Intel(R) PRO/1000 Network Connection (rev.0006)Related Commands
717
Syntax
get ips session
Parameters
None.
Usage/Remarks
Viewing the IPS session status allows you to see if traffic is checked by the IPS engine and if the IPS engine is working as expected. You can see the type of traffic and how many sessions are being processed by the IPS engine. You can also see how much memory the IPS engine is using. The displayed information is repeated with short delays to provide a time-lapse view of the IPS sessions status. Scope: Vdom
Output Example
FGT # get ips session SYSTEM: memory capacity 73400320 memory used 3982780 recent pps\bps 0\0K session in-use 0 TCP: in-use\active\total 0\0\0 UDP: in-use\active\total 0\0\0 ICMP: in-use\active\total 0\0\0
Keyword/Variable memory capacity memory used recent pps\bps Description Total memory capacity in system available to IPS. Memory used by IPS sessions. If this value is high, close to the memory capacity, it will likely result in dropped packets and other issues. Recent IPS traffic in packets per second (pps) and bits per second (bps). Use these numbers to determine the level of IPS traffic. If they are very high there will likely be problems with the FortiGate unit performance. Current number of IPS sessions in use. The number of in use, active, and total Transmission Control Protocol (TCP) packets sent over this session. The number of in use, active, and total User Datagram Protocol (UDP) packets sent over this session. The number of in use, active and total Internet Control Message Protocol (ICMP) packets sent over this session.
718
Syntax
get router info kernel
Parameters
None.
Usage/Remarks
Use this command to view the kernel routing table. Computers and network devices connected to the Internet use routing tables to compute the next hop destination for a packet. The routing kernel table is an table of routes to particular network destinations that is stored in a router or a networked computer. This information contains the topology of the network immediately around it. Building the routing table is the primary goal of routing protocols and static routes. In the routing table information displayed you can see the type of route, the protocol used, and the priority of each entry. You can use get router info routing-table all on page 720 for more information on each routing entry. Scope: Vdom
Output Example
FGT # get router info kernel tab=254 vf=2 scope=0 type=1 proto=11 prio=0 0.0.0.0/0.0.0.0/0>192.168.0.0/24 pref=0.0.0.0 gwy=9.1.1.1 dev=5(port1)
Keyword/Variable 192.168.0.0/24 gwy=9.1.1.1 dev=5(port1) Description The destination network or destination host. The gateway address for the next hop. Interface to which packets for this route is sent.
719
Syntax
get router info routing-table all
Parameters
None.
Usage/Remarks
Use this command to view the routing table. This routing table may be larger and have more entries than the kernel routing table when using the get router info kernel command. Computers and network devices connected to Internet use routing tables to compute the next hop destination for a packet. It is an table of routes to particular network destinations that is stored in a router or a networked computer. This information contains the topology of the network immediately around it. Scope: Vdom
Output Example
FGT# get router info routing-table all Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - ISIS inter area * - candidate default S* C C 0.0.0.0/0 [10/0] via 172.20.120.2, wan1 10.31.101.0/24 is directly connected, internal 172.20.120.0/24 is directly connected, wan1
The output of this command is fairly self-explanatory. Note that if you select a specific routing protocol (static, rip, etc) when entering the command only that part of this larger list of entries will be displayed. The default route is indicated by the asterisk (*). How a route is connected to the FortiGate unit is important in determining priority. Note that the two C entries state is directly connected which indicates the lowest possible hop count to get there.
720
Syntax
get system arp
Parameters
None.
Usage/Remarks
This command is useful to view or alter the contents of the kernel's ARP tables. For example when you suspect a duplicate Internet address is the cause for some intermittent network problem. This command is not available in multiple VDOM mode. Scope: Vdom
Output Example
FGT # get system arp Address Age(min) Hardware Addr 172.20.120.16 0 00:0d:87:5c:ab:65 172.20.120.138 0 00:08:9b:09:bb:01
Keyword/Variable Address Age Hardware Addr Interface Description The IP address that is linked to the MAC address. The default is
0.0.0.0
Current duration of the ARP entry in minutes. The default is 0. The hardware, or MAC address, to link with this IP address. The default is 00:00:00:00:00:00: The physical interface of the FortiGate unit where the address is connected.
721
Syntax
get system auto-update status
Parameters
None.
Usage/Remarks
Use this command when you need to view the current antivirus and IPS status from the FortiGate. The status command is used to test the current connectivity status, and can retrieve configuration information, such as Push Updates, Update schedules, or other parameters related to the FortiGuard service operation. The versions command provides extended information about each FortiGuard component and its version, build number, contract expiry date, last update attempts and results.
Note: Result: Connectivity failure indicates the connections to the FortiGuard servers is not possible. This may be a serious problem that needs to be addressed. Until it is solved, you may not receive any FortiGuard updates leaving your network vulnerable.
These commands also allow the user to check whether the FortiGate is running the latest AV and IPS packages. Scope: Global
Output Example
FGT # get system auto-update status FDN availabilty: available at Mon May 26 20:16:43 2008 Push update: disable Scheduled update: enable Update every: 1 hours at 16 minutes after the hour Virus definitions update: enable IPS definitions updates: enable Server override: disable Push address override: disable Web proxy tunneling: disable
Keyword/Variable FDN availabilty Description Specify availability status and last access time (access time corresponds to the scheduled update settings). Possible values are: available/unavailable. Specify wether push update method is enabled or disabled. Possible values are: enable/disable Specify wether scheduled update is enabled or disabled. Possible values are: enable/disable. If scheduled update is enabled, specify the time defined to launch the update.
722
Description Specify wether the IPS definitions update is enabled or disabled. Possible values are: enable/disable. Specify wether the use of another FDS server is enabled or disabled. Possible values are: enable/disable. If enabled a new line is displayed showing the FDS IP address defined in the configuration. For example: Server override: enable Server: 10.0.0.1 If push update is enabled, specify wether the Fortigate override address feature is enabled or disabled. Possible values are: enable/disable. If enabled, a new line is displayed showing the FDS IP address and the TCP port (a.b.c.d:port) defined in the configuration. Example: Push address override: enable Address: 10.0.0.2:9443 Specify wether FortiGate device is using a proxy to retrieve AV and IPS definitions updates. Possible values are: enable/disable. If enabled, additional lines are displayed showing the proxy settings. Example: Web proxy tunneling: enable Proxy address: 10.0.0.3 Proxy port: 8890 Username: foo Password: foo
723
Syntax
get system auto-update versions
Parameters
None.
Usage/Remarks
Use this command to view the antivirus and IPS engines and definitions and license information. This is useful in determining when the antivirus engine, virus definitions, attack definitions, IPS attack definitions, AS Rule set, AS engine, and FDS address were last updated, when their contracts expire, which version they are using, and the result of the last update. Scope: Global
Output Example
FGT # get system auto-update versions AV Engine --------Version: 3.003 Contract Expiry Date: n/a Last Updated using manual update on Wed Jan Last Update Attempt: n/a Result: Updates Installed
9 18:26:00 2008
Virus Definitions --------Version: 8.631 Contract Expiry Date: n/a Last Updated using manual update on Tue Jan 15 14:27:00 2008 Last Update Attempt: n/a Result: Updates Installed Attack Definitions --------Version: 2.461 Contract Expiry Date: n/a Last Updated using manual update on Fri Jan 18 11:23:00 2008 Last Update Attempt: n/a Result: Updates Installed IPS Attack Engine --------Version: 1.091 Contract Expiry Date: n/a Last Updated using manual update on Wed Jan
9 18:22:00 2008
Troubleshooting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
724
Last Update Attempt: n/a Result: Updates Installed FDS Address ---------
Description Version number of the engine or the definitions. Date of the last manual update.
Last Update Attempt The date when the last update was attempted. The status of the last update.
725
Syntax
get system ha status
Parameters
Scope: Global.
Usage/Remarks
Usually you would log into the primary unit CLI using SSH or telnet. In this case the diagnose system ha status command displays information about the primary unit first, and also displays the HA state of the primary unit (the primary unit operates in the work state). For a virtual cluster configuration, the diagnose system ha status command displays information about how the cluster unit that you have logged into is operating in virtual cluster 1 and virtual cluster 2. For example, if you connect to the cluster unit that is the primary unit for virtual cluster 1 and the subordinate unit for virtual cluster 2, the output of the diagnose system ha status command shows virtual cluster 1 in the work state and virtual cluster 2 in the standby state. The diagnose system ha status command also displays additional information about virtual cluster 1 and virtual cluster 2. See the FortiGate CLI Reference Guide or the High Availability handbook chapter more information. Scope: Global
Output Example
FGT # get system ha status Model: 5000 Mode: a-a Group: 0 Debug: 0 ses_pickup: disable load_balance: disable schedule: round robin Master:128 5001_Slot_4 FG50012204400045 1 Slave :100 5001_Slot_3 FG50012205400050 0 number of vcluster: 1 vcluster 1: work 10.0.0.2 Master:0 FG50012204400045 Slave :1 FG50012205400050
Keyword/Variable Model Mode Group Description The FortiGate model number. The HA mode of the cluster: a-a or a-p. If the unit is not in HA mode, standalone will be displayed. The group ID of the cluster.
726
Description The debug status of the cluster. The status of the session pick-up feature, also known as session failover. Session failover means that a cluster maintains active network TCP and IPsec VPN sessions after a device or link failover. Session failover does not failover UDP, multicast, ICMP, or SSL VPN sessions. In some cases UDP sessions may be maintained after a failover. The status of the load-balance-all keyword: enable or disable. Relevant to active-active clusters only. The active-active load balancing schedule. Relevant to active-active clusters only. Master displays the device priority, host name, serial number, and cluster index of the primary (or master) unit. Slave displays the device priority, host name, serial number, and cluster index of the subordinate (or slave, or backup) unit or units. The list of cluster units changes depending on how you log into the CLI. Usually you would use SSH or telnet to log into the primary unit CLI. In this case the primary unit would be at the top the list followed by the other cluster units. If you use execute ha manage or a console connection to log into a subordinate unit CLI, and then enter diagnose system ha status the subordinate unit that you have logged into appears at the top of the list of cluster units. The number of virtual clusters. If virtual domains are not enabled, the cluster has one virtual cluster. If virtual domains are enabled the cluster has two virtual clusters.
number of vcluster
727
Syntax
get system performance firewall packet-distribution get system performance firewall statistics
Parameters
None
Usage/Remarks
Use this command to quickly see information about traffic through the firewall. The Packet-distribution command divides network traffic into ten different packet sizes and lists the number of packets received in each category. This can help you spot hacking attempts or optimize your network. The Statistics command provides packet and byte counts for different major protocols and packet types through the firewall. Packet types include TCP, UDP, ICMP, and IP. Scope: All (Global and Vdom)
Output Example
FGT# get sys per firewall packet-distribution getting packet distribution statistics... 0 bytes 63 bytes: 3624747 packets 64 bytes 127 bytes: 802612 packets 128 bytes 255 bytes: 371774 packets 256 bytes 383 bytes: 712180 packets 384 bytes 511 bytes: 30691 packets 512 bytes 767 bytes: 57220 packets 768 bytes 1023 bytes: 23460 packets 1024 bytes 1279 bytes: 3055 packets 1280 bytes 1500 bytes: 64 packets > 1500 bytes: 0 packets
FGT# get sys per firewall statistics getting traffic statistics... Browsing: 708624 packets, 408018318 bytes DNS: 411789906583486464 packets, 0 bytes E-Mail: 0 packets, 0 bytes FTP: 0 packets, 0 bytes Gaming: 0 packets, 0 bytes IM: 0 packets, 0 bytes Newsgroups: 0 packets, 0 bytes P2P: 0 packets, 0 bytes Streaming: 0 packets, 0 bytes TFTP: 201239863725391872 packets, 56530359549952 bytes VoIP: 3543070 packets, 25 bytes Generic TCP: 55834574848 packets, 1786706395136 bytes Generic UDP: 0 packets, 0 bytes Generic ICMP: 0 packets, 0 bytes Generic IP: 0 packets, 0 bytes
728
Syntax
get system performance status
Parameters Usage/Remarks
Use this command to quickly see important information about your FortiGate units state. Information includes CPU usage, memory usage, network usage, number of sessions, viruses caught, IPS attacks blocked, and FortiGate unit uptime. These numbers provide a quick look at how the FortiGate unit is doing. If any one number needs attention, you can use other commands to get more information on that area. For example if the CPU states show 98% system, you know that your FortiGate is running at full capacity and you need to check the processes to see if any one process is using all the resources and if there are valid reasons for it. Another example is that if memory usage is near 100%, AV failover may occur which (if enabled) may pass traffic without being scanned or refuse new connections. Scope: All (Global and Vdom)
Output Example
FGT# get sys performance status CPU states: 0% user 0% system 0% nice 100% idle Memory states: 10% used Average network usage: 0 kbps in 1 minute, 0 kbps in 10 minutes, 13 kbps in 30 minutes Average sessions: 31 sessions in 1 minute, 30 sessions in 10 minutes, 31 sessions in 30 minutes Virus caught: 0 total in 1 minute IPS attacks blocked: 0 total in 1 minute Uptime: 44 days, 18 hours, 42 minutes
729
Syntax
get system performance top <delay> <max_lines>
Parameters
delay max_lines The amount of time, in seconds, in which the process information is polled. The default is 5 seconds. The maximum number of processes displayed in the output. The default is 20 lines.
Usage/Remarks
Use this command when you need to view the processes running and the information about each process. It displays as a static set of columns where the information changes in place. To exit this display, press <Ctrl-C>. Scope: All (Global and Vdom)
Output Example
FGT # get system performance top 5 20 Run Time: 0 days, 1 hours and 53 minutes 1U, 1S, 97I; 248T, 99F, 73KF newcli 113 S 1.0 sshd 107 S 0.7 newcli 114 R < 0.3 thttp 48 S 0.0 ipsengine 55 S < 0.0 ipsengine 50 S < 0.0 cmdbsvr 18 S 0.0 httpsd 71 S 0.0 httpsd 92 S 0.0 httpsd 37 S 0.0 scanunitd 90 S < 0.0 scanunitd 91 S < 0.0 merged_daemons 45 S 0.0 newcli 108 S 0.0 updated 59 S 0.0 newcli 112 S < 0.0 miglogd 35 S 0.0 nsm 28 S 0.0 imd 53 S 0.0 authd 52 S 0.0
Keyword/Variable Run Time U S I T Description Displays how long the FortiOS has been running as a string User CPU usage (%) System CPU usage (%) Idle CPU usage (%) Total memory Troubleshooting for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2.1 1.9 2.1 5.4 5.2 5.2 3.7 3.3 3.3 2.8 2.2 2.1 2.1 2.1 2.0 2.0 1.9 1.9 1.8 1.7
730
Description Free memory Kernel-free memory Process name Process identification (PID) One letter process status. S: sleeping process R: running process <: high priority CPU usage (%) Memory usage (%)
Column 4 Column 5
731
Syntax
get system session-helper
Parameters
None.
Usage/Remarks
Use this command to display if any of the pre-defined session-helpers are in use. Scope: Global
Output Example
FGT # get system session-helper == 1 == == 2 == == 3 == == 4 == == 5 == == 6 == == 7 == == 8 == == 9 == == 10 == == 11 == == 12 == == 13 == == 14 == == 15 == == 16 == == 17 == == 18 == == 19 == == 20 ==
Keyword/Variable 1...20 Description If one of the pre-defined session helpers is in use, it will be listed here.
732
Syntax
get system session-info full-stat
Parameters
None.
Usage/Remarks
Use this command to display in-depth information session info about the systems state. This includes session table size, expected session table size, session count, firewall error details, and more. This data can provide an important picture of what is happening on your FortiGate unit, for example: For example if the ephemeral buffer is full, you have a very busy device which may indicate a DoS attack is under way. See ephemeral=2/32752. if there are many sessions in a SYN_SENT state to the point of causing other problems, you may be experiencing a SYN flood type DoS attack. See 10 in SYN_SENT state. if the HTTP proxy is too busy to handle new connections, then the ACCEPT queue fills up, and resets if it completely fills up, resetting the users connection. See acceptqf=0
Scope: Global
Output Example
FGT # get system session-info full-stat session table: table_size=131072 max_depth=1 used=50 expect session table: table_size=2048 max_depth=1 used=2 misc info: session_count=167 setup_rate=0 exp_count=0 clash=0 memory_tension_drop=0 ephemeral=2/32752 removeable=134 ha_scan=0 delete=0 flush=0 dev_down=0/0 TCP sessions 6 in ESTABLISHED state 10 in SYN_SENT state 25 in TIME_WAIT state 60 in CLOSE state 6 in CLOSE_WAIT state firewall error stat: error1=00000000 error2=00000000 error3=00000000 error4=00000000 tt=00000000 cont=0000630f ids_recv=0000dd8e url_recv=00000000 av_recv=00000000
FortiOS Handbook v3: Troubleshooting 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
733
fqdn_count=00000000 tcp reset stat: syncqf=0 acceptqf=0 no-listener=0 data=0 ses=0 ips=0 global: ses_limit=0 ses6_limit=0 rt_limit=0 rt6_limit=0 The session setup rate is the second item on the first line of output. The information provided by this command includes:
Table 36: session table Keyword/Variable session table table_size=131072 max_depth=1 used=50 expect session table table_size=2048 max_depth=1 used=2 The number of expect session entries in the expect session table. The maximum number of entries possible in the expect session table. The number of session entries in the session table The maximum number of entries possible in the session table. Description
Table 37: Miscellaneous info output Keyword/Variable misc info: session_count=167 setup_rate=0 exp_count=0 clash=0 The number of sessions in the kernel. How fast sessions have been created. The number of expect sessions in the kernel. Count of the collisions that occurred during the creation of a new session. Description
memory_tension_drop Number of dropped sessions due to the system running out of =0 memory. ephemeral=2/32752 The ephemeral buffer is used to protect against DoS attacks. It is a type of input buffer so the real session table doesnt get overloaded if a DoS attack does happen. The first number is how many sessions are in use, and the second number is the maximum number allowed. If the two numbers are close, it is a good chance there is a DoS attack underway, such as a DDoS using UDP packets.
734
Table 38: TCP sessions Keyword/Variable TCP sessions 6 in ESTABLISHED state Description During the lifetime of a TCP session, it changes state to reflect what stage it is at starting a connection, established, or closing. The connection has been established and is ready for data transfer. The FortiGate is waiting for the remote end of the session to acknowledge the SYN that was sent. Note: If there are many sessions in this state, a SYN flood DoS attack may be in progress. To reduce the number of sessions in the SYN_SENT state, or half open state, you can reduce the wait period using the CLI command
10 in SYN_SENT state
25 in TIME_WAIT The state when a connection termination request is sent to wait for state enough time to ensure the remote end received acknowledgement
of the termination request. If there are too many sessions in TIME_WAIT state, you can reduce the wait period using the CLI command config system global set tcp-timewait-timer XX
end
where XX is the number of seconds to wait before closing the session. The valid range is 0 to 300 seconds, with the default being 120 seconds. A value of zero indicates no wait. 60 in CLOSE state 6 in CLOSE_WAIT state The session is closed The session is being closed by the FortiGate there will be no more data from the sender. This waits for the last ACK before going to the CLOSE state. If there are a lot of sessions in this state, also called half closed state, you can reduce the timer using the CLI command config system global set tcp-halfclose timer XX end where XX is the number of seconds to wait after one peer has sent a FIN packet for this session. The valid range is 0 to 86 400 seconds, with the default being 120 seconds.
Table 39: firewall error status Keyword/Variable firewall error stat: error1=00000000 This indicates there was a mismatch between the encryption state of the packet received and the session the packet belongs to. Either the packet was plain text when the session says it should have been decrypted (such as during a spoof), or the packet was decrypted properly but the session has no associated IPsec tunnel. Description
735
Table 40: tcp reset stats Keyword/Variable tcp reset stat: syncqf=0 SYN queue full Reset happens when the syn queue is full. FortiGate sends a reset (RST) when any of the following occur: syn queue full accept queue full unit goes into conserve mode CPU use is too high (queues arent served correctly, and backlog increases) Description
When this happens, the remote end will TCP timeout and close the TCP session, while on the FortiGate side the TCP session will go to a CLOSE_WAIT state.
acceptqf=0 ACCEPT queue full When a new packets comes in for a new session before being transmitted to the application layer of the device they are stored in a kernel queue. When this queue gets full, it means that the application layer was not able to process the packet. This is a symptom of an overloaded FortiGate unit. This happens when the new session rate of traffic being handled by proxy is too high. Packet was received, but there is no service to handle it.
no-listener=0
736
Syntax
get system session-info list
Parameters
None.
Usage/Remarks
Use this command to tell you the default time to live setting for sessions. All sessions created will have this length of time before they expire and need to create a new session table entry. Scope: Global
Output Example
FGT # get system session-info list session info: proto=17 proto_state=00 duration=4685 expire=174 timeout=0 flags=00000000 sockflag=00000000 sockport=0 av_idx=0 use=4 origin-shaper= reply-shaper= per_ip_shaper= ha_id=0 hakey=30944 policy_dir=0 tunnel=/ state=local may_dirty rem statistic(bytes/packets/allow_err): org=39032/119/1 reply=0/0/0 tuples=2 orgin->sink: org pre->in, reply out->post dev=2->9/9->2 gwy=255.255.255.255/0.0.0.0 hook=pre dir=org act=noop 172.20.120.225:68>255.255.255.255:67(0.0.0.0:0) hook=post dir=reply act=noop 255.255.255.255:67>172.20.120.225:68(0.0.0.0:0) misc=0 policy_id=0 id_policy_id=0 auth_info=0 chk_client_info=0 vd=0 serial=0002dcfe tos=ff/ff ips_view=0 app_list=0 app=0 dd_type=0 dd_rule_id=0 per_ip_bandwidth meter: addr=172.20.120.225, bps=112
737
Table 41: session info Keyword/Variable session info: proto=17 The protocol this packet contains. Common protocol numbers include 17 (UDP), 6 (TCP), 47(GRE), 89(OSPF), and 1 (ICMP). See Assigned Internet Protocol Numbers. proto_state has two digits to keep track of the original direction and the reply direction. There are different states for each of TCP, SCTP, and UDP. ICMP traffic has no state and will always show as proto_state=00. For example if a TCP session has proto_state=67, the originator has closed the session, and the responder is waiting for the last ACK or halfclose timer to expire. TCP packet states 0 - none 1 - ESTABLISHED 2 - SYN_SENT 3 - SYN & SYN/ACK 4 - FIN_WAIT 5 - TIME_WAIT 6 - CLOSE 7 - CLOSE_WAIT 8 - LAST_ACK 9 - LISTEN UDP packet states 0 - Reply Not Seen 1 - Reply Seen duration=4685 expire=174 The number of seconds since this session was created. The number of seconds until this session expires. GRE sessions have a very large expire value. This is to prevent them from timing out, and dropping the GRE session. If there is a timer that will expire, this is the number of seconds until that timer expires. One example is the standard session ttl timer is 3600 seconds. SCTP packet states 0 - SCTP_S_NONE 1 - SCTP_S_ESTABLISHED 2 - SCTP_S_CLOSED 3 - SCTP_S_COOKIE_WAIT 4 - SCTP_S_COOKIE_ECHOED 5 - SCTP_S_SHUTDOWN_SENT 6 - SCTP_S_SHUTDOWN_RECD 7 - SCTP_S_ACK_SENT 8 - SCTP_S_MAX Description
proto_state=00
timeout=0
Table 42: shapers, HA, and state Keyword/Variable origin-shaper= reply-shaper= per_ip_shaper= ha_id=0 tunnel=/ Description The traffic shapers applied to traffic from the origin, from the responder (reply), or any per IP traffic shapers. The value is the name of the shaper that has been applied. The cluster ID. in an HA cluster. If this session is over a tunnel, this displays information about the tunnel.
738
Table 42: shapers, HA, and state Keyword/Variable state=local may_dirty rem Description The status of the session. Possible states include: br ext log local may_dirty Session is being bridged, that is, in transparent mode. Session is created by a firewall session helper. Session is being logged Session is originating from, or destined for, a local stack. Session is created by a policy. For example, the session for FTP channel control will have this state but the FTP data channel will not. Session will be checked by an IPS signature. Session will be checked by an IPS anomaly. Session will possibly be offloaded to NPU. Session is handled by WCCP.
Table 43: protection profile applied information Keyword/Variable misc=0 vd=0 Description misc displays the protection profile ID. Each protection profile has an identifier such as 20004. If this session has a protection profile applied to it, misc indicates which one it is. vd is the VDOM this protection profile applies to. The ID number of the security policy that matches this session. If an authentication policy is applied, this displays the ID of that policy. For example an IBP would be listed here.
policy_id=0 auth_info=0
Table 44: bi-directional statistics statistic(bytes/packets/allow_err): org=39032/119/1 reply=0/0/0 The bytes, packets, and errors sent from the original direction. The bytes, packets, and errors sent from the reply direction.
Table 45: serial=0002dcfe tos=ff/ff dd_type=0 dd_rule_id=0 Table 46: per_ip_bandwidth meter: addr=172.20.120.225, bps=112 The IP address this meter applies to. The bytes per second bandwidth for this IP address. A counter that rolls over. This value is the same for parent and child sessions. Type of Service (TOS) from the TOS field in the packet header. The values apply to origin and reply directions accordingly. Data re-duplication (dd) values. These are associated with WAN Opt. Rule ID matches the WAN Opt rule number.
739
Syntax
get system session-info ttl
Parameters
None.
Usage/Remarks
Use this command to tell you the default time to live setting for sessions. All sessions created will have this length of time before they expire and need to create a new session table entry. A similar command is get system session-ttl . It provides similar output. Scope: Vdom
Output Example
FGT # get system session-info ttl default : 3600 port:
Keyword/Variable default port Description The default is one hour or 3600 seconds. The session port.
740
Syntax
get system startup-error-log
Parameters
None.
Usage/Remarks
Use this command to view the start-up configuration errors on the console. If there are no errors, this command displays the http-err webproxy replacement message settings. Scope: Global and Vdom
Output Example
FGT # get system startup-error-log >>> config system replacemsg webproxy "http-err" >>> set buffer "<html><head><title>%%HTTP_ERR_CODE%% %%HTTP_ERR_DESC%%</title></head><body><font size=2><table width=\"100%\"><tr><td bgcolor=#3300cc align=\"center\" colspan=2><font color=#ffffff><b>%%HTTP_ERR_CODE%% %%HTTP_ERR_DESC%%</b></font></td></tr></table><br><br>The webserver for %%PROTOCOL%%%%URL%% reported that an error occurred while trying to access the website. Please click <u><a href=\"javascript:history.back()\">here</a></u> to return to the previous page.<br><br><hr></font></body></html>" >>> set header http >>> set format html
741
Syntax
get system status
Parameters
None.
Usage/Remarks
Use this command to display basic information about your FortiGate unit such as firmware version, serial number, hostname, number of VDOMs, HA mode, and system time. Scope: Global and Vdom
Output Example
FGT # get system status Version: Fortigate-3810A v4.0,build0418,110209 (Interim) Virus-DB: 11.00782(2010-05-07 00:42) Extended DB: 1.00001(2010-05-21 13:37) IPS-DB: 2.00910(2010-12-02 17:49) FortiClient application signature package: 1.393(2011-06-06 17:13) Serial-Number: FG3K8A3407600241 BIOS version: 04000009 Log hard disk: Not available Hostname: FG3K8A3407600241 Operation Mode: NAT Current virtual domain: root Max number of virtual domains: 10 Virtual domains status: 1 in NAT mode, 0 in TP mode Virtual domain configuration: disable FIPS-CC mode: disable Current HA mode: standalone Distribution: International Branch point: 418 Release Version Information: Interim System time: Tue Jun 7 14:40:16 2011
742
get test
get test
Displays information statistics, control proxies, and status.
Syntax
get test <application> <level>
Parameters
<application>
acd Aggregate Controller ddnscd ddnscd daemon dhcprelay dhcprelay dnsproxy dns proxy ftpd ftp proxy http http proxy im im proxy imap imap proxy ipldbd ipldbd daemon ipsengine ips sensor ipsmonitor ips monitor l2tpcd l2tpcd nntp nntp proxy pop3 pop3 proxy pptpcd pptp client proxyacceptor proxy acceptor proxyworker proxy worker scanunit scanning unit sflowd sflowd smtp smtp proxy snmpd snmpd daemon urlfilter urlfilter daemon vs virtual-server wad wan optimization proxy wccpd -wccp daemon
743
get test
<level>
1: Dump Memory Usage 2: Drop all connections 22: Drop max idle connections 222: Drop all idle connections 4: Display connection stat 44: Display info per connection 444: Display connections per state 4444: Display per-VDOM statistics 44444: Display information about idle connections 5: Toggle AV Bypass mode. Toggle AV bypass mode. You can use this level to diagnose AV scanning. When bypass mode is activated, no AV scanning is done on traffic handled by the proxy. Note: Antivirus scanning is disabled. 6: Toggle Print Stat mode every ~40 seconds 7: Toggle Backlog Drop 8: Clear stats 88: Toggle statistic recording stats cleared 9: Toggle Accounting info for display 99: Restart proxy. When you suspect a abnormal behavior of the proxy, you can use this level value to restore it to its normal state. Note: You will have a disruption in services. 11: Display the SSL session ID cache statistics 12: Clear the SSL session ID cache statistics 13: Display the SSL session ID cache 14: Clear the SSL session ID cache
NOTE: Not all level numbers may be applicable to all applications. Use the command diagnose test application <application> 0 to see a list of valid commands.
Usage/Remarks
Use this command to display information about advanced FortiOS applications such as SSL, and VoIP. Scope: Global
Output Examples
FGT # get test ftpd 1 HTTP Proxy Test Usage Fortigate-1000# malloc memory usage ================== pool buffer size: 2048 count: 2143 available: 2139 total memory used by buffer pools: 4286 (kB) total allocated (malloc/realloc) memory: 0 (kB) shm memory usage ================== buffer pool not initialized total allocated memory 0
744
get test
Keyword/Variable
Description
FGT # get test http 44 diagnose test application http 44 id=17 clt=914(r=1, w=0) srv=915(r=1, w=0) c:192.168.50.2:3608 -> s:192.168.135.21:80 c2s/s2c=0/0 state=RESPONSE_PASS_STATE duration=0 expire=3590 Current connections = 1/2368
Keyword/Variable 44 Description The first number is the counter of currently sessions in the connection pool of the proxy. The second number is the maximum size of the proxy connection pool table.
FG # get test imap 4 Current connections = 5/2670 Fortigate-1000# Running time (HH:MM:SS:usec) = 22:45:40:124613 Bytes sent = 65 (kb) Bytes received = 2895 (kb) Error Count (alloc) = 0 Error Count (accept) = 0 Error Count (bind) = 0 Error Count (connect) = 0 Error Count (read) = 0 Error Count (write) = 0 Error Count (poll) = 0 Last Error = 0 Scan Backlog drop = 0 Emails clean = 3 Emails detected = 2 Emails with scan errors = 0 Worms = 0 Blocked = 0 Virus = 2 Suspicious = 0 Fragmented emails = 0 Spam Detected = 0 Content Filtered emails = 0 Oversize Email Pass = 0 Oversize Email Blocked = 0 AV Bypass is off Print is off Drop on backlog is off Account is on setup_ok=7 setup_fail=0 poll_ok=2576/2576/1 sel_fail=0 conn_ok=0 conn_inp=7 step1=0 step2=0 scan=5 listen=7 cmdb=2 clt=2304 srv=258
745
get test
FG # get test ipsengine 7 FG # PACKET STATISTICS: total packets 3487023 tcp packets 87 udp packets 0 icmp packets 2476747 discard packets 0 alert packets 45 log packets 0 pass packets 0 fragment packets 0 frag_trackers 0 rebuilt_frags 0 frag_incomplete 0 frag_timeout 0 rebuild_element 0 frag_mem_faults 0 tcp_stream_pkts 87 rebuilt_tcp 5 tcp_streams 4 rebuilt_segs 0 str_mem_faults 0 FG FG FG FG # # # # get test ipsmonitor 2 enable ipsengine? no diagnose test ipsmonitor 2 enable ipsengine? Yes
FG # get test pop3 444 FG # [OVERSIZE_STATE ] 1/1 FG # get test smtp 44 FG # id=0 clt=10(r=1, w=0) srv=11(r=1, w=0) c:192.168.200.2:60811 -> s:192.168.50.2:25 c2s/s2c=0/0 state=CONNECTED_STATE duration=0 expire=3581 Current connections = 1/2669
746
Syntax
get test application urlfilter <number>
Parameters
<number>
1 This menu 2 Clear cache 3 Display WF cache contents 4 Display WF cache TTL list 5 Display WF cache LRU list 6 Display WF cache in tree format 7 Toggle switch for dumping unrated packet 8 Increase timeout for polling 9 Decrease timeout for polling 10 Print debug values 11 Clear Spam Filter cache 12 Clear AV Query cache 13 Toggle switch for dumping expired license packets 14 Show running timers (except request timers) 144 Show running timers (including request timers) 15 Send INIT requests 16 Display WF cache contents of prefix type 99 Restart the urlfilter daemon
Usage/Remarks
Use this command to troubleshoot and work with the URL filter engine. If you do not include one of the numbers listed above, the list of numbers will be displayed for you. Scope: Global
Output Example
FGT # get test urlfilter 3 utree_stat: keylen=223 nodes=15 leaf=11 com.cisco.www cate = 52 len=13 ch=1 dhtml_pulldown/dropdownlib-100.js cate = 52 len=33 ch=0 niffer/snifflib-100.js cate = 52 len=22 ch=0 potlight/spotlightlib-120.js cate = 52 len=28 ch=0 offer/sp/cookie.js cate = 52 len=18 ch=0 cisco_detect.js cate = 52 len=15 ch=0 flyouts.js cate = 52 len=10 ch=0 global.js cate = 52 len=9 ch=0 hbx.js cate = 52 len=6 ch=0 sitewide_tools.js cate = 52 len=17 ch=0 windowutil.vb cate = 52 len=13 ch=0
747
Syntax
get vpn ipsec stats crypto
Parameters
None.
Usage/Remarks
Use this command to display which crypto devices are used with VPN such as 3DES, SHA1, and so on. A zero indicates that type of crypto is not used with any VPN connections. Scope: Vdom
Output Example
FG10CH3G09603750 # get vpn ipsec stats crypto IPsec crypto devices in use: CP6 (encrypted/decrypted): null: 0 0 des: 0 0 3des: 0 0 aes: 0 0 CP6 (generated/validated): null: 0 0 md5: 0 0 sha1: 0 0 sha256: 0 0 SOFTWARE (encrypted/decrypted): null: 0 0 des: 0 0 3des: 0 0 aes: 0 0 SOFTWARE (generated/validated): null: 0 0 md5: 0 0 sha1: 0 0 sha256: 0 0
748
Syntax
get vpn ipsec stats tunnel
Parameters
None.
Usage/Remarks
Use this command to display information about IPsec VPN tunnels. Scope: Vdom
Output Example
FG10CH3G09603750 # get vpn ipsec stats tunnel tunnels total: 1 static/ddns: 1 dynamic: 0 manual: 0 errors: 0 selectors total: 1 up: 1
749
Syntax
get vpn ipsec tunnel details
Parameters
None.
Usage/Remarks
Use this command to display in depth information about IPSec VPN tunnels. This command is useful when troubleshooting VPN tunnels due to the amount of information displayed. Scope: Vdom
Output Example
FG10CH3G09603750 # get vpn ipsec tunnel details gateway name: 'ph1' type: policy-based local-gateway: 172.16.68.34:0 (dynamic) remote-gateway: 172.16.68.35:0 (static) mode: ike-v1 interface: 'port4' (12) rx packets: 0 bytes: 0 errors: 0 tx packets: 0 bytes: 0 errors: 0 dpd: enabled/negotiated idle: 5000ms retry: 3 count: 0 selectors name: 'ph2' auto-negotiate: enable mode: tunnel src: 0:0.0.0.0/0.0.0.0:0 dst: 0:0.0.0.0/0.0.0.0:0 SA lifetime/rekey: 180/123 mtu: 1436 tx-esp-seq: 1 replay: enabled inbound spi: 585e89b2 enc: 3des 40a50330e01e36fbb58cbf26f2d77e4e57fc5c1fc41d20ec auth: sha1 1f1292da090bde71f955f4e8cb23d4e0c7768a8e outbound spi: efd4667a enc: 3des 66bfeaf3fcd635d1e309be18a8eea41d53630371590ff8e0 auth: sha1 c7ec4ac4632a22785b713644a4d1581269b29788 SA
750
lifetime/rekey: 180/120 mtu: 1436 tx-esp-seq: 1 replay: enabled inbound spi: 585e89b1 enc: 3des 69e72f1bf0a0cd76aded631c0010f17e5d1acf558dad0329 auth: sha1 ed96712db7e633bfa9720b2bf7a276d198b7661a outbound spi: efd4667b enc: 3des 28d49a7e392487e6078907bac49560e00b21428a5bfcf8be auth: sha1 84eb5525df4511a36c3ac291ff5526bbf0be9ef2
751
Syntax
get vpn ipsec tunnel summary
Parameters
None.
Usage/Remarks
Use this command to display brief information about IPSec VPN tunnels including their name, IP address and port, how many selectors that tunnel has, and packets received, sent, and in error. This information is displayed for each tunnel defined. Scope: Vdom
Output Example
FG10CH3G09603750 # get vpn ipsec tunnel summary 'ph1' 172.16.68.35:0 selectors(total,up): 1/1 rx(pkt,err): 0/0 tx(pkt,err): 0/0
752
Syntax
get vpn status ssl hw-acceleration-status
Parameters
None.
Usage/Remarks
Use this command to display the status of SSL hardware accelerated VPN connections. This is useful if you need to troubleshoot a VPN connection that should be accelerated but is not. Scope: Vdom
Output Example
FGT # get vpn status ssl hw-acceleration-status Acceleration hardware detected: kxp=on cipher=on
753
Syntax
get vpn status ssl list
Parameters
None.
Usage/Remarks
Use this command to display the status of SSL list of VPN connections. Scope: Vdom
Output Example
FGT # diagnose vpn status ssl list SSL VPN is disabled.
754
Syntax
get webfilter fortiguard statistics list ?
Parameters
None.
Usage/Remarks
Use this command to display details about your FortiGuard statistics. These numbers can be useful in determining the the source of a problem. For example DNS failures can reveal the source of problems that may be widespread and hard to track back to the source. Scope: Global
Output Example
FGT # get webfilter fortiguard statistics list Rating Statistics: ===================== DNS failures : 3 DNS lookups : 16 Data send failures : 876 Data read failures : 0 Wrong package type : 0 Hash table miss : 1 Unknown server : 0 Incorrect CRC : 0 Proxy request failures : 0 Request timeout : 292 Total requests : 0 Requests to FortiGuard servers : 0 Server errored responses : 11 Relayed rating : 0 Invalid profile : 0 Allowed Blocked Logged Errors Cache Statistics: ===================== Maximum memory Memory usage Nodes Leaves Prefix nodes Exact nodes : : : : 0 0 0 0
: : : : : :
0 0 0 0 0 0
755
Requests Misses Hits Prefix hits Exact hits No cache directives Add after prefix Invalid DB put DB updates Percent full Branches Leaves Prefix nodes Exact nodes Miss rate Hit rate Prefix hits Exact hits
Keyword/Variable DNS lookups Data send failures Request timeout Total requests Requests to FortiGuard servers Relayed rating Maximum memory Memory usage Prefix nodes Exact nodes Description
: : : : : : : : : : : : : : : : : : 0 0
0 0 0
0 0 0 0 0% 0% 0% 0% 0% 0% 0% 0% 0%
Number of DNS look-ups for the domain name of the requested URL. Number of non-responsive servers. NUmber of seconds for the request time-out. A FortiGate unit sends the URL rating request every 2 seconds. Total number of URL rating requests to cache and FortiGuard servers. Total number of URL rating requests to FortiGuard servers. The number of times the master communicates with FortiGuard servers and relays all URL rating requests from the slaves in a HA cluster. Amount of memory assigned to FortiGuard cache. The default is 2%. The amount of memory used to store the URL tree. The number of prefixes used for a URL to increase the cache hit rate. The number of exact matches used for a URL.
756
Syntax
get webfilter status <refresh rate>
Parameters
<refresh rate>
How often to refresh the server list(s).
Usage/Remarks
Use this command to display webfilter statistics and server information if the service is enabled. If the service is not enabled, this command displays the language of the locale and states the service is not enabled. This command was previously called diag debug rating. Scope: Global and Vdom
Output Example
FGT # get webfilter status 4 Locale : english License : Contract Expiration : Wed Feb 11 02:00:00 2009 Hostname : service.fortiguard.net -=- Server List (Mon May 26 22:36:34 2008) -=IP Weight RTT Flags 212.95.252.121 10 77 62.209.40.73 0 86 62.209.40.72 0 92 DI 82.71.226.65 10 98 D 212.95.252.120 10 95 69.20.236.179 60 198 66.117.56.42 60 189 66.117.56.37 60 192 69.20.236.180 60 213 209.52.128.90 60 268 121.111.236.179 80 383 121.111.236.180 80 404 72.52.72.243 90 289 218.106.244.81 90 455 69.90.198.55 90 297 D
Keyword/Variable Locale License Description Local environment language. The license status: Contract Expired Trial
757
Description The date and time the license expires. The FortiGuard server the FortiGate connects to obtain the service. The FortiGuard server will return the information to the FortiGate. The default is service.fortiguard.net The IP address of other FortiGuard servers. The priority value which the FortiGate uses to send the URL rating request. The lower weight value takes higher preference. The weight is calculated by time zone, packet round-trip time, and success rate. The round-trip time between the URL rating request and the response time from the FortiGuard server. Time zone of the FortiGuard server (Greenwich Mean Time +/- the number). Total packets sent to the FortiGuard server. The number of times the request is retried in a timeout period. The default is 15 seconds. Total number of unresponsive requests.
IP Weight
758
759
D. You have visible power problems E. You have a suspected defective FortiOS unit
2 If that fixes your problem, you are done. 3 If it doesnt fix your problem, go to E. You have a suspected defective FortiOS unit.
760
FSSO issues
Note: FortiOS units ship with a baud rate of 9600 by default. If you have access, parse an archived configuration file for the term baudrate or verify this setting with the CLI command: config system console get
7 Did the reboot fix the problem? If that fixes your problem, you are done. If that doesnt fix your problem, go to E. You have a suspected defective FortiOS unit
FSSO issues
The following is a flow chart for troubleshooting FSSO issues. A. Initial information gathering B. The CA is not running and not connected C. The CA is running but not connected D. The CA is connected E. There are at least some users logged on F. Test user does not appear on the FSSO list
761
FSSO issues
D. The CA is connected
1 Are you seeing groups on the FortiGate? If not, check the group filter on the CA. 2 Are the FortiGate and CA groups using the same mode? If not, change the modes to match. 3 Are you seeing logon events on the FortiGate unit? You can check this with the following CLI commands. diagnose debug enable diagnose debug authd fsso list If there are any users logged in, go to step . Otherwise, continue on. 4 Are DC agents installed on all Domain Controllers? If not install the DC Agents.
762
FSSO issues
5 Are you using an LDAP server on the FSSO connector? To check go to User > Directory Service > Edit FSSO connector > LDAP. If an LDAP server is configured, disable it and go to step 3. If there is no LDAP server configured, contact support and open a support ticket.
Has the user been moved to a new If yes, disable group caching. group recently? If the user is in the CA log: Were there any DNS errors in the CA for the host name? Did the user time out? These include the collector agent unable to resolve the host name at all or resolving to an incorrect IP. If yes, check the DNS server. If the CA logs show the user timed out, the collector agent was not able to connect to the host on port 139 & 445 to verify the user. Check which domain controller authenticated the host (run echo %logonserver% on the host) and troubleshoot that domain controller.
Does the logon server have the If not, install the DC agent. DC agent installed? If it is installed, enable logging on the DC agent on the logon server. Use the logs produced for farther troubleshooting.
763
FSSO issues
764
765
766
UTM overview
Ranging from the FortiGate-30 series for small businesses to the FortiGate-5000 series for large enterprises, service providers and carriers, the FortiGate line combines a number of security features to protect your network from threats. As a whole, these features, when included in a single Fortinet security appliance, are referred to as Unified Threat Management (UTM). The UTM features your FortiGate model includes are: AntiVirus Intrusion Prevention System (IPS) Anomaly protection (DoS policies) One-armed IPS (Sniffer policies) Web filtering E-mail filtering, including protection against spam and grayware Data Leak Prevention (DLP) Application Control (for example, IM and P2P).
Firewall policies limit access, and while this and similar features are a vital part of securing your network, they are not covered in this document. The following topics are included in this section: UTM components UTM profiles/lists/sensors
UTM components
AntiVirus
Your FortiGate unit stores a virus signature database that can identify more than 15,000 individual viruses. FortiGate models that support additional virus databases are able to identify hundreds of thousands of viruses. With a FortiGuard AntiVirus subscription, the signature databases are updated whenever a new threat is discovered. AntiVirus also includes file filtering. When you specify files by type or by file name, the FortiGate unit will stop the matching files from reaching your users. FortiGate units with a hard drive or configured to use a FortiAnalyzer unit can store infected and blocked files for that you can examine later.
767
UTM components
UTM overview
Web filtering
Web filtering includes a number of features you can use to protect or limit your users activity on the web. FortiGuard Web Filtering is a subscription service that allows you to limit access to web sites. More than 60 million web sites and two billion web pages are rated by category. You can choose to allow or block each of the 77 categories. URL filtering can block your network users from access to URLs that you specify. Web content filtering can restrict access to web pages based on words and phrases appearing on the web page itself. You can build lists of words and phrases, each with a score. When a web content list is selected in a web filter profile, you can specify a threshold. If a user attempts to load a web page and the score of the words on the page exceeds the threshold, the web page is blocked.
Email filtering
FortiGuard AntiSpam is a subscription service that includes an IP address black list, a URL black list, and an email checksum database. These resources are updated whenever new spam messages are received, so you do not need to maintain any lists or databases to ensure accurate spam detection. You can use your own IP address lists and email address lists to allow or deny addresses, based on your own needs and circumstances.
768
UTM overview
UTM profiles/lists/sensors
UTM profiles/lists/sensors
A profile is a group of settings that you can apply to one or more firewall policies. Each UTM feature is enabled and configured in a profile, list, or sensor. These are then selected in a security policy and the settings apply to all traffic matching the policy. For example, if you create an antivirus profile that enables antivirus scanning of HTTP traffic, and select the antivirus profile in the security policy that allows your users to access the World Wide Web, all of their web browsing traffic will be scanned for viruses. Because you can use profiles in more than one security policy, you can configure one profile for the traffic types handled by a set of firewall policies requiring identical protection levels and types, rather than repeatedly configuring those same profile settings for each individual security policy. For example, while traffic between trusted and untrusted networks might need strict protection, traffic between trusted internal addresses might need moderate protection. To provide the different levels of protection, you might configure two separate sets of profiles: one for traffic between trusted networks, and one for traffic between trusted and untrusted networks. The UTM profiles include: antivirus profile IPS sensor Web filter profile Email filter profile Data Leak Prevention profile Application Control list VoIP profile
Although theyre called profiles, sensors, and lists, theyre functionally equivalent. Each is used to configure how the feature works. In this example the signing CA certificate name is Example_CA. This name comes from the certificate file and key file name. If you want the certificate to have a different name, change these file names.
769
UTM profiles/lists/sensors
UTM overview
770
Network defense
This section describes in general terms the means by which attackers can attempt to compromise your network and steps you can take to protect it. The goal of an attack can be as complex as gaining access to your network and the privileged information it contains, or as simple as preventing customers from accessing your web server. Even allowing a virus onto your network can cause damage, so you need to protect against viruses and malware even if they are not specifically targeted at your network. The following topics are included in this section: Monitoring Blocking external probes Defending against DoS attacks Traffic inspection Content inspection and filtering
Monitoring
Monitoring, in the form of logging, alert email, and SNMP, does not directly protect your network. But monitoring allows you to review the progress of an attack, whether afterwards or while in progress. How the attack unfolds may reveal weaknesses in your preparations. The packet archive and sniffer policy logs can reveal more details about the attack. Depending on the detail in your logs, you may be able to determine the attackers location and identity. While log information is valuable, you must balance the log information with the resources required to collect and store it.
Address sweeps
An address sweep is a basic network scanning technique to determine which addresses in an address range have active hosts. A typical address sweep involves sending an ICMP ECHO request (a ping) to each address in an address range to attempt to get a response. A response signifies that there is a host at this address that responded to the ping. It then becomes a target for more detailed and potentially invasive attacks.
771
Network defense
Address sweeps do not always reveal all the hosts in an address range because some systems may be configured to ignore ECHO requests and not respond, and some firewalls and gateways may be configured to prevent ECHO requests from being transmitted to the destination network. Despite this shortcoming, Address sweeps are still used because they are simple to perform with software tools that automate the process. Use the icmp_sweep anomaly in a DoS sensor to protect against address sweeps. There are a number of IPS signatures to detect the use of ICMP probes that can gather information about your network. These signatures include AddressMask, Traceroute, ICMP.Invalid.Packet.Size, and ICMP.Oversized.Packet. Include ICMP protocol signatures in your IPS sensors to protect against these probes/attacks.
Port scans
Potential attackers may run a port scan on one or more of your hosts. This involves trying to establish a communication session to each port on a host. If the connection is successful, a service may be available that the attacker can exploit. Use the DoS sensor anomaly tcp_port_scan to limit the number of sessions (complete and incomplete) from a single source IP address to the configured threshold. If the number of sessions exceed the threshold, the configured action is taken. Use the DoS sensor anomaly udp_scan to limit UDP sessions in the same way.
772
Network defense
You can set anti-replay protection to the following settings: disable No anti-replay protection. loose Perform packet sequence checking and ICMP anti-replay checking with the following criteria: The SYN, FIN, and RST bit can not appear in the same packet. The FortiGate unit does not allow more than one ICMP error packet through before it receives a normal TCP or UDP packet. If the FortiGate unit receives an RST packet, and check-reset-range is set to strict, the FortiGate unit checks to determine if its sequence number in the RST is within the un-ACKed data and drops the packet if the sequence number is incorrect.
strict Performs all of the loose checking but for each new session also checks to determine of the TCP sequence number in a SYN packet has been calculated correctly and started from the correct value for each new session. Strict anti-replay checking can also help prevent SYN flooding.
If the FortiGate unit receives an ICMP error packet that contains an embedded IP(A,B) | TCP(C,D) header, then if FortiOS can locate the A:C->B:D session it checks to make sure that the sequence number in the TCP header is within the range recorded in the session. If the sequence number is not in range then the ICMP packet is dropped. Strict checking also affects how the anti-replay option checks packets.
773
Network defense
Evasion techniques
Attackers employ a wide range of tactics to try to disguise their techniques. If an attacker disguises a known attack in such a way that it is not recognized, the attack will evade your security and possibly succeed. FortiGate security recognizes a wide variety of evasion techniques and normalizes data traffic before inspecting it.
Packet fragmentation
Information sent across local networks and the Internet is encapsulated in packets. There is a maximum allowable size for packets and this maximum size varies depending on network configuration and equipment limitations. If a packet arrives at a switch or gateway and it is too large, the data it carries is divided among two or more smaller packets before being forwarded. This is called fragmentation. When fragmented packets arrive at their destination, they are reassembled and read. If the fragments do not arrive together, they must be held until all of the fragments arrive. Reassembly of a packet requires all of the fragments. The FortiGate unit automatically reassembles fragmented packets before processing them because fragmented packets can evade security measures. Both IP packets and TCP packets are reassembled by the IPS engine before examination. For example, you have configured the FortiGate unit to block access to the example.org web site. Any checks for example.com will fail if a fragmented packet arrives and one fragment contains http://www.exa while the other contains mple.com/. Viruses and malware can be fragmented and avoid detection in the same way. The FortiGate unit will reassemble fragmented packets before examining network data to ensure that inadvertent or deliberate packet fragmentation does not hide threats in network traffic.
Non-standard ports
Most traffic is sent on a standard port based on the traffic type. The FortiGate unit recognizes most traffic by packet content rather than the TCP/UDP port and uses the proper IPS signatures to examine it. Protocols recognized regardless of port include DHCP, DNP3, FTP, HTTP, IMAP, MS RPC, NNTP, POP3, RSTP, SIP, SMTP, and SSL, as well as the supported IM/P2P application protocols. In this way, the FortiGate unit will recognize HTTP traffic being sent on port 25 as HTTP rather than SMTP, for example. Because the protocol is correctly identified, the FortiGate unit will examine the traffic for any enabled HTTP signatures.
Negotiation codes
Telnet and FTP servers and clients support the use of negotiation information to allow the server to report what features it supports. This information has been used to exploit vulnerable servers. To avoid this problem, the FortiGate unit removes negotiation codes before IPS inspection.
774
Network defense
Table 47: HTTP URL obfuscation types Encoding type No encoding Decimal encoding URL encoding ANSI encoding Directory traversal Example http://www.example.com/cgi.bin/ http://www.example.com/cgi.bin ;/ http://www.example.com/%43%47%49%2E%42%49%4E%2F http://www.example.com/%u0063%u0067%u0069%u002E%u0062%u 0069%u006E/ http://www.example.com/cgi.bin/test/../
The message is scanned for any enabled HTTP IPS signatures once these problems are corrected.
The FortiGate unit reassembles the fragments into their original form before inspection.
775
Network defense
Any network traffic the target system receives has to be examined, and then accepted or rejected. TCP, UDP, and ICMP traffic is most commonly used, but a particular type of TCP traffic is the most effective. TCP packets with the SYN flag are the most efficient DoS attack tool because of how communication sessions are started between systems.
Server
Connection initiated: ACK
Client
The three-way handshake is a simple way for the server and client to each agree to establish a connection and acknowledge the other party expressing its intent. Unfortunately, the three-way handshake can be used to interfere with communication rather than facilitate it.
SYN flood
When a client sends a SYN packet to a server, the server creates an entry in its session table to keep track of the connection. The server then sends a SYN+ACK packet expecting an ACK reply and the establishment of a connection. An attacker intending to disrupt a server with a denial of service (DoS) attack can send a flood of SYN packets and not respond to the SYN+ACK packets the server sends in response. Networks can be slow and packets can get lost so the server will continue to send SYN+ACK packets until it gives up, and removes the failed session from the session table. If an attacker sends enough SYN packets to the server, the session table will fill completely, and further connection attempts will be denied until the incomplete sessions time out. Until this happens, the server is unavailable to service legitimate connection requests.
776
Network defense
Server
Connection initiation request: SYN Request acknowledgement: SYN/ACK
Client
SYN floods are seldom launched from a single address so limiting the number of connection attempts from a single IP address is not usually effective.
SYN spoofing
With a flood of SYN packets coming from a single attacker, you can limit the number of connection attempts from the source IP address or block the attacker entirely. To prevent this simple defense from working, or to disguise the source of the attack, the attacker may spoof the source address and use a number of IP addresses to give the appearance of a distributed denial of service (DDoS) attack. When the server receives the spoofed SYN packets, the SYN+ACK replies will go to the spoofed source IP addresses which will either be invalid, or the system receiving the reply will not know what to do with it.
Figure 85: A client launches a SYN spoof attack
Client
Connection initiation request: SYN Request acknowledgement: SYN/ACK
Server
Connection initiation request: SYN Request acknowledgement: SYN/ACK
777
Network defense
Server
Connection initiation request: SYN Request acknowledgement: SYN/ACK
The distributed SYN flood is more difficult to defend against because multiple clients are capable of creating a larger volume of SYN packets than a single client. Even if the server can cope, the volume of traffic may overwhelm a point in the network upstream of the targeted server. The only defence against this is more bandwidth to prevent any choke-points.
SYN proxy
FortiGate units with network acceleration hardware, whether built-in or installed in the form of an add-on module, offer a third action for the tcp_syn_flood threshold. Instead of Block and Pass, you can choose to Proxy the incomplete connections that exceed the threshold value. When the tcp_syn_flood threshold action is set to Proxy, incomplete TCP connections are allowed as normal as long as the configured threshold is not exceeded. If the threshold is exceeded, the FortiGate unit will intercept incoming SYN packets from clients and respond with a SYN+ACK packet. If the FortiGate unit receives an ACK response as expected, it will replay this exchange to the server to establish a communication session between the client and the server, and allow the communication to proceed.
778
Network defense
Traffic inspection
Traffic inspection
When the FortiGate unit examines network traffic one packet at a time for IPS signatures, it is performing traffic analysis. This is unlike content analysis where the traffic is buffered until files, email messages, web pages, and other files are assembled and examined as a whole. DoS policies use traffic analysis by keeping track of the type and quantity of packets, as well as their source and destination addresses. Application control uses traffic analysis to determine which application generated the packet. Although traffic inspection doesnt involve taking packets and assembling files they are carrying, the packets themselves can be split into fragments as they pass from network to network. These fragments are reassembled by the FortiGate unit before examination. No two networks are the same and few recommendations apply to all networks. This topic offers suggestions on how you can use the FortiGate unit to help secure your network against content threats.
IPS signatures
IPS signatures can detect malicious network traffic. For example, the Code Red worm attacked a vulnerability in the Microsoft IIS web server. Your FortiGates IPS system can detect traffic attempting to exploit this vulnerability. IPS may also detect when infected systems communicate with servers to receive instructions.
IPS recommendations
Enable IPS scanning at the network edge for all services. Use FortiClient endpoint IPS scanning for protection against threats that get into your network. Subscribe to FortiGuard IPS Updates and configure your FortiGate unit to receive push updates. This will ensure you receive new IPS signatures as soon as they are available. Your FortiGate unit includes IPS signatures written to protect specific software titles from DoS attacks. Enable the signatures for the software you have installed and set the signature action to Block. You can view these signatures by going to UTM Profiles > Intrusion Protection > Predefined and sorting by, or applying a filter to, the Group column. Because it is critical to guard against attacks on services that you make available to the public, configure IPS signatures to block matching signatures. For example, if you have a web server, configure the action of web server signatures to Block.
779
Traffic inspection
Network defense
DoS policies
DDoS attacks vary in nature and intensity. Attacks aimed at saturating the available bandwidth upstream of your service can only be countered by adding more bandwidth. DoS policies can help protect against DDoS attacks that aim to overwhelm your server resources.
Application control
While applications can often be blocked by the ports they use, application control allows convenient management of all supported applications, including those that do not use set ports.
780
Network defense
AntiVirus
The FortiGate antivirus scanner can detect viruses and other malicious payloads used to infect machines. The FortiGate unit performs deep content inspection. To prevent attempts to disguise viruses, the antivirus scanner will reassemble fragmented files and uncompress content that has been compressed. Patented Compact Pattern Recognition Language (CPRL) allows further inspection for common patterns, increasing detection rates of virus variations in the future.
AntiVirus recommendations
Enable antivirus scanning at the network edge for all services. Use FortiClient endpoint antivirus scanning for protection against threats that get into your network. Subscribe to FortiGuard AntiVirus Updates and configure your FortiGate unit to receive push updates. This will ensure you receive new antivirus signatures as soon as they are available. Enable the Extended Virus Database if your FortiGate unit supports it. Examine antivirus logs periodically. Take particular notice of repeated detections. For example, repeated virus detection in SMTP traffic could indicate a system on your network is infected and is attempting to contact other systems to spread the infection using a mass mailer. The builtin-patterns file filter list contains nearly 20 file patterns. Many of the represented files can be executed or opened with a double-click. If any of these file patterns are not received as a part of your normal traffic, blocking them may help protect your network. This also saves resources since files blocked in this way do not need to be scanned for viruses. To conserve system resources, avoid scanning email messages twice. Scan messages as they enter and leave your network or when clients send and retrieve them, rather than both.
781
Network defense
Email filter
Spam is a common means by which attacks are delivered. Users often open email attachments they should not, and infect their own machine. The FortiGate email filter can detect harmful spam and mark it, alerting the user to the potential danger.
DLP
Most security features on the FortiGate unit are designed to keep unwanted traffic out of your network while DLP can help you keep sensitive information from leaving your network. For example, credit card numbers and social security numbers can be detected by DLP sensors.
DLP recommendations
Rules related to HTTP posts can be created, but if the requirement is to block all HTTP posts, a better solution is to use application control or the HTTP POST Action option in the web filter profile. While DLP can detect sensitive data, it is more efficient to block unnecessary communication channels than to use DLP to examine it. If you dont use instant messaging or peer-to-peer communication in your organization, for example, use application control to block them entirely.
782
AntiVirus
This section describes how to configure the antivirus options. From an antivirus profile you can configure the FortiGate unit to apply antivirus protection to HTTP, FTP, IMAP, POP3, SMTP, IM, and NNTP sessions. If your FortiGate unit supports SSL content scanning and inspection, you can also configure antivirus protection for HTTPS, IMAPS, POP3S, SMTPS, and FTPS sessions. The following topics are included in this section: Antivirus concepts Enable antivirus scanning Enable the file quarantine Enable grayware scanning Testing your antivirus configuration Antivirus examples
Antivirus concepts
The word antivirus refers to a group of features that are designed to prevent unwanted and potentially malicious files from entering your network. These features all work in different ways, which include checking for a file size, name, or type, or for the presence of a virus or grayware signature. The antivirus scanning routines your FortiGate unit uses are designed to share access to the network traffic. This way, each individual feature does not have to examine the network traffic as a separate operation, and the overhead is reduced significantly. For example, if you enable file filtering and virus scanning, the resources used to complete these tasks are only slightly greater than enabling virus scanning alone. Two features do not require twice the resources.
783
Antivirus concepts
AntiVirus
Since the FortiGate unit has a limited amount of memory, files larger than a certain size do not fit within the memory buffer. The default buffer size is 10 MB. You can use the uncompsizelimit CLI command to adjust the size of this memory buffer. Files larger than the buffer are passed to the destination without scanning. You can use the Oversize File/Email setting to block files larger than the antivirus buffer if allowing files that are too large to be scanned is an unacceptable security risk.
784
AntiVirus
Antivirus concepts
Figure 87: Antivirus scanning order when using the normal, extended, or extreme database
No
Yes
Pass
Block
Yes
Block
Block file/email
Yes
Block
Block file/email
No
Allow
No
Allow
Yes
No
No
No
Yes
Block
Pass file/email
No
Yes
Block
Pass file/email
No
Yes
Allow
Allow
If a file fails any of the tasks of the antivirus scan, no further scans are performed. For example, if the file fakefile.EXE is recognized as a blocked file pattern, the FortiGate unit will send the end user a replacement message, and delete or quarantine the file. The unit will not perform virus scan, grayware, heuristics, and file type scans because the previous checks have already determined that the file is a threat and have dealt with it.
785
Antivirus concepts
AntiVirus
Figure 88: Antivirus scanning order when using the flow-based database
Yes
No
Yes
No
Yes
Block
Block file/email
No
Allow
Block
No
No
Allow
Pass file/email
Antivirus databases
The antivirus scanning engine relies on a database to detail the unique attributes of each infection. The antivirus scan searches for these signatures, and when one is discovered, the FortiGate unit determines the file is infected and takes action. All FortiGate units have the normal antivirus signature database but some models have additional databases you can select for use. Which you choose depends on your network and security needs.
Normal Includes viruses currently spreading as determined by the FortiGuard Global Security Research Team. These viruses are the greatest threat. The Normal database is the default selection and it is available on every FortiGate unit. Includes the normal database in addition to recent viruses that are no-longer active. These viruses may have been spreading within the last year but have since nearly or completely disappeared. Includes the extended database in addition to a large collection of zoo viruses. These are viruses that have not spread in a long time and are largely dormant today. Some zoo viruses may rely on operating systems and hardware that are no longer widely used. The flow-based database is a subset of the extreme database. Flow-based scans can not detect polymorphic and packed-file viruses so those signatures and not included in the flow-based database. Note that flow-based scanning is not just another database, but a different type of scanning. For more information, see How antivirus scanning works on page 783.
Extended
Extreme
Flow
786
AntiVirus
Antivirus techniques
The antivirus features work in sequence to efficiently scan incoming files and offer your network optimum antivirus protection. The first four features have specific functions, the fifth, heuristics, protects against any new, previously unknown virus threats. To ensure that your system is providing the most protection available, all virus definitions and signatures are updated regularly through the FortiGuard antivirus services. The features are discussed in the order that they are applied, followed by FortiGuard antivirus.
Virus scan
If the file passes the file pattern scan, the FortiGate unit applies a virus scan to it. The virus definitions are kept up-to-date through the FortiGuard Distribution Network (FDN). For more information, see FortiGuard Antivirus on page 787.
Grayware
If the file passes the virus scan, it will be checked for grayware. Grayware configurations can be turned on and off as required and are kept up to date in the same manner as the antivirus definitions. For more information, see Enable grayware scanning on page 794.
Heuristics
After an incoming file has passed the grayware scan, it is subjected to the heuristics scan. The FortiGate heuristic antivirus engine, if enabled, performs tests on the file to detect virus-like behavior or known virus indicators. In this way, heuristic scanning may detect new viruses, but may also produce some false positive results.
Note: You can configure heuristics only through the CLI. See the FortiGate CLI Reference.
FortiGuard Antivirus
FortiGuard Antivirus services are an excellent resource which includes automatic updates of virus and IPS (attack) engines and definitions, as well as the local spam DNS black list (DNSBL), through the FDN. The FortiGuard Center web site also provides the FortiGuard Antivirus virus and attack encyclopedia. The connection between the FortiGate unit and FortiGuard Center is configured in System > Maintenance > FortiGuard.
787
AntiVirus
To enable antivirus scanning CLI You need to configure the scan option for each type of traffic you want scanned. In this example, antivirus scanning of HTTP traffic is enabled in the profile. config antivirus profile edit my_av_profile config http set options scan end end
788
AntiVirus
To change the antivirus database web-based manager 1 Go to UTM Profiles > AntiVirus > Virus Database. 2 Select the antivirus database the FortiGate unit will use as the default database to perform antivirus scanning of your network traffic. 3 Select Apply. To change the antivirus database CLI config antivirus settings set default-db extended end
789
AntiVirus
790
AntiVirus
You can also use the maximum file size to help secure your network. If youre using a proxy-based virus scan, the proxy scan buffer size limits the size of the files that can be scanned for infection. Files larger than this limit are passed without scanning. If you configure the maximum file size to block files larger than the scan buffer size, large infected files will not by-pass antivirus scanning. In this example, the maximum file size will be configured to block files larger than 10 megabytes, the largest file that can be antivirus scanned with the default settings. You will need to configure a protocol options profile and add it to a security policy. Create a protocol options profile to block files larger than 10 MB 1 Go to Policy > Policy > Protocol Options. 2 Select Create New. 3 Enter 10MB_Block for the protocol options policy name. 4 For the comment, enter Files larger than 10MB are blocked. 5 Expand each protocol listed and select Block for the Oversized File/Email setting. Also confirm that the Threshold is set to 10. 6 Select OK. The protocol options profile is configured, but to block files, you must select it in the firewall profiles handling the traffic that contains the files you want blocked. To select the protocol options profile in a security policy 1 Go to Policy > Policy > Policy. 2 Select a security policy. 3 Select the Edit icon. 4 Enable UTM. 5 Select 10MB_Block from the Protocol Options list. 6 Select OK to save the security policy. Once you complete these steps, any files in the traffic handled by this policy that are larger than 10MB will be blocked. If you have multiple firewall policies, examine each to determine if you want to apply similar file blocking the them as well.
791
AntiVirus
If the user tries to download the same file again within a short period of time, the cached URL is matched and the download is blocked. The client receives the Infection cache message replacement message as a notification that the download has been blocked. The number of URLs in the cache is limited by the size of the cache.
Caution: Client comforting can send unscanned and therefore potentially infected content to the client. You should only enable client comforting if you are prepared to accept this risk. Keeping the client comforting interval high and the amount low will reduce the amount of potentially infected data that is downloaded.
Client comforting is available for HTTP and FTP traffic. If your FortiGate unit supports SSL content scanning and inspection, you can also configure client comforting for HTTPS and FTPS traffic. Enable and configure client comforting 1 Go to Policy > Policy > Protocol Options. 2 Select a protocol options profile and choose Edit, or select Create New to make a new one. 3 Expand HTTP, FTP, and if your FortiGate unit supports SSL content scanning and inspection, expand HTTPS and FTPS as well. 4 To enable client comforting, select Comfort Clients for each of the protocols in which you want it enabled. 5 Select OK to save the changes. 6 Select this protocol options profile in any security policy for it to take effect on all traffic handled by the policy. The default values for Interval and Amount are 10 and 1, respectively. This means that when client comforting takes effect, 1 byte of the file is sent to the client every 10 seconds. You can change these values to vary the amount and frequency of the data transferred by client comforting.
792
AntiVirus
2 Go to UTM Profiles > AntiVirus > Profile and edit an existing antivirus profile or create a new one. In the Quarantine row, select the check boxes of the protocols for which you want the quarantine enabled. The Quarantine option only appears if your FortiGate unit has a local disk or if your FortiGate unit is configured to use a FortiAnalyzer unit to quarantine files.
Note: Antivirus profiles also have a configurable feature called Quarantine Virus Sender (to Banned User List). This is a different feature unrelated to the Quarantine option.
3 If you have not previously done so, go to Policy > Policy > Policy and add the antivirus profile to a security policy.
793
AntiVirus
Antivirus examples
The following examples provide a sample antivirus configuration scenario for a fictitious company.
794
AntiVirus
Antivirus examples
795
Antivirus examples
AntiVirus
7 Select the basic_antivirus profile from the list. 8 Select OK to save the security policy. To select the antivirus profile in a security policy CLI config firewall policy edit 1 set utm-status enable set profile-protocol-options default set av-profile basic_antivirus end HTTP, IMAP, POP3, and SMTP traffic handled by the security policy you modified will be scanned for viruses. A small office may have only one security policy configured. If you have multiple policies, consider enabling antivirus scanning for all of them.
796
AntiVirus
Antivirus examples
797
Antivirus examples
AntiVirus
798
Email filter
This section describes how to configure FortiGate email filtering for IMAP, POP3, and SMTP email. Email filtering includes both spam filtering and filtering for any words or files you want to disallow in email messages. If your FortiGate unit supports SSL content scanning and inspection, you can also configure spam filtering for IMAPS, POP3S, and SMTPS email traffic. The following topics are included in this section: Email filter concepts Enable email filter Configure email traffic types to inspect Configure the spam action Configure the tag location Configure the tag format Configure FortiGuard email filters Configure local email filters Email filter examples
799
Email filter
800
Email filter
801
Email filter
802
Email filter
To configure the spam action 1 Go to UTM Profiles > Email Filter > Profile. 2 The default email filter profile is presented. To edit another profile, select it from the drop down in the Edit Email Filter Profile title bar. 3 The Spam Action row has a drop-down selection under the SMTP and SMTPS traffic type. Select Discard or Tagged. No selection is available for POP3, IMAP, POP3S or IMAPS traffic. Tagged is the only applicable action for those traffic types. By default, the tag location for any traffic set to Tagged is Subject and the tag format is Spam. If you want to change these settings, continue with Configure the tag location on page 803 and Configure the tag format on page 803. 4 Select Apply. Select the edited email filter profile in a security policy, and the traffic controlled by the security policy will be scanned according to the settings you configured. You may select the email filter profile in more than one security policy if required.
803
Email filter
3 The Tag Format row has a field for each traffic type. Note that if the spam action for SMTP traffic is set to discard, the tag format will not be available.Enter the text the FortiGate unit will use as the tag for each traffic type. 4 Select Apply.
804
Email filter
To enable FortiGuard phishing URL detection 1 Go to UTM Profiles > Email Filter > Profile. 2 The default email filter profile is presented. To edit another profile, select it from the drop down in the Edit Email Filter Profile title bar. 3 Under the heading FortiGuard Spam Filtering, select Detect Phishing URLs in Email. 4 Select Apply. Select the edited email filter profile in a security policy, and the traffic controlled by the security policy will be scanned according to the settings you configured. You may select the email filter profile in more than one security policy if required.
To enable FortiGuard Spam submission 1 Go to UTM Profiles > Email Filter > Profile. 2 The default email filter profile is presented. To edit another profile, select it from the drop down in the Edit Email Filter Profile title bar. 3 Under the heading FortiGuard Email Filtering, select Spam Submission. 4 Select Apply. Select the edited email filter profile in a security policy, and the traffic controlled by the security policy will be scanned according to the settings you configured. You may select the email filter profile in more than one security policy if required.
805
Email filter
806
Email filter
5 Select the action: Mark as Clear: Messages from clients with matching IP addresses will be allowed, bypassing further email filtering. Mark as Reject: Messages from clients with matching IP addresses will be rejected. The FortiGate unit will return a reject message to the client. Mark as Reject only applies to mail delivered by SMTP. If an IP address black/white list is used with POP3 or IMAP mail, addresses configured with the Mark as Reject action will be marked as spam. Mark as Spam: Messages from clients with matching IP addresses will be treated as spam, subject to the action configured in the applicable email filter profile. For more information, see Configure the spam action on page 802. 6 By default, the address is enabled and the FortiGate unit will perform the action if the address is detected. To disable checking for the address, clear the Enable check box. 7 Select OK.
807
Email filter
808
Email filter
7 By default, the address is enabled and the FortiGate unit will perform the action if the address is detected. To disable checking for the address, clear the Enable check box. 8 Select OK to save the address.
809
Email filter
Pattern type
Assigned score
Comment
Wildcard Wildcard
20 20
The pattern appears twice but multiple occurrences are only counted once. Although each word in the phrase appears in the message, the words do not appear together as they do in the pattern. There are no matches. The wildcard represents any number of any character. A match occurs as long as word appears before phrase regardless of what is in between them. Since the wildcard character can represent any characters, this pattern is a match because email message appears in the message.
word*phrase
Wildcard
20
20
mail*age
Wildcard
20
20
In this example, the message is treated as spam if the banned word threshold is set to 60 or less.
810
Email filter
4 Optionally, enter a description or comments about the list. 5 Select OK to save the banned word list. When a new banned word list is created, it is empty. To perform any actions, you must add words to the list.
811
Email filter
2 The default email filter profile is presented. To edit another profile, select it from the drop down in the Edit Email Filter Profile title bar. 3 Under the heading Local Spam Filtering, select Banned Word Check. 4 Select the banned word list to use from the drop-down list. 5 Enter a threshold value. If the total score of the banned words appearing in the message exceeds this threshold, the FortiGate unit treats the message as spam. 6 Select Apply. Select the edited email filter profile in a security policy, and the traffic controlled by the security policy will be scanned according to the settings you configured. You may select the email filter profile in more than one security policy if required.
812
Email filter
813
Email filter
To enable Email Filter 1 Go to UTM Profiles > Email Filter > Profile. 2 Select the email filter profile that is used by the firewall policies handling email traffic from the email filter profile drop down list. 3 In the row Tag Location, select Subject for all three mail protocols. 4 In the row Tag Format, enter SPAM: in all three fields. 5 Select Enable Spam Detection and Filtering. 6 Ensure that the check boxes labeled IMAP, POP3, and SMTP in the header row are selected. 7 Under Local Spam Filtering, enable E-mail Address BWL Check and select the email address list you created in the previous procedure from the drop down list. 8 Select OK. When this email filter profile is selected in a security policy, the FortiGate unit will add SPAM: to the subject of any email message from an address ending with @example.net for all email traffic handled by the security policy. Recipients can ignore the message or they can configure their email clients to automatically delete messages with SPAM: in the subject.
814
Intrusion protection
The FortiGate Intrusion Protection system combines signature detection and prevention with low latency and excellent reliability. With intrusion protection, you can create multiple IPS sensors, each containing a complete configuration based on signatures. Then, you can apply any IPS sensor to any security policy. This section describes how to configure the FortiGate Intrusion Protection settings. If you enable virtual domains (VDOMs) on the FortiGate unit, intrusion protection is configured separately for each virtual domain. The following topics are included: IPS concepts Enable IPS scanning Configure IPS options Enable IPS packet logging IPS examples
IPS concepts
The FortiGate intrusion protection system protects your network from outside attacks. Your FortiGate unit has two techniques to deal with these attacks: anomaly- and signature-based defense.
Anomaly-based defense
Anomaly-based defense is used when network traffic itself is used as a weapon. A host can be flooded with far more traffic than it can handle, making the host inaccessible. The most common example is the denial of service (DoS) attack, in which an attacker directs a large number of computers to attempt normal access of the target system. If enough access attempts are made, the target is overwhelmed and unable to service genuine users. The attacker does not gain access to the target system, but it is not accessible to anyone else. The FortiGate DoS feature will block traffic above a certain threshold from the attacker and allow connections from other legitimate users.
Signature-based defense
Signature-based defense is used against known attacks or vulnerability exploits. These often involve an attacker attempting to gain access to your network. The attacker must communicate with the host in an attempt to gain access and this communication will include particular commands or sequences of commands and variables. The IPS signatures include these command sequences, allowing the FortiGate unit to detect and stop the attack.
815
IPS concepts
Intrusion protection
Signatures
IPS signatures are the basis of signature-based intrusion protection. Every attack can be reduced to a particular string of commands or a sequence of commands and variables. Signatures include this information so your FortiGate unit knows what to look for in network traffic. Signatures also include characteristics about the attack they describe. These characteristics include the network protocol in which the attack will appear, the vulnerable operating system, and the vulnerable application. To view the complete list of predefined signatures, go to UTM Profiles > Intrusion Protection > Predefined.
Protocol decoders
Before examining network traffic for attacks, the IPS engine uses protocol decoders to identify each protocol appearing in the traffic. Attacks are protocol-specific, so your FortiGate unit conserves resources by looking for attacks only in the protocols used to transmit them. For example, the FortiGate unit will only examine HTTP traffic for the presence of a signature describing an HTTP attack. To view the protocol decoders, go to UTM Profiles > Intrusion Protection > Protocol Decoder.
IPS engine
Once the protocol decoders separate the network traffic by protocol, the IPS engine examines the network traffic for the attack signatures.
IPS sensors
The IPS engine does not examine network traffic for all signatures, however. You must first create an IPS sensor and specify which signatures are included. Add signatures to sensors individually using signature entries, or in groups using IPS filters. To view the IPS sensors, go to UTM Profiles > Intrusion Protection > IPS Sensor.
IPS filters
IPS sensors contain one or more IPS filters. A filter is a collection of signature attributes that you specify. The signatures that have all of the attributes specified in a filter are included in the IPS filter. For example, if your FortiGate unit protects a Linux server running the Apache web server software, you could create a new filter to protect it. By setting OS to Linux, and Application to Apache, the filter will include only the signatures that apply to both Linux and Apache. If you wanted to scan for all the Linux signatures and all the Apache signatures, you would create two filters, one for each. To view the filters in an IPS sensor, go to UTM Profiles > Intrusion Protection > IPS Sensor, select the IPS sensor containing the filters you want to view, and choose Edit.
816
Intrusion protection
Policies
To use an IPS sensor, you must select it in a security policy or an interface policy. An IPS sensor that it not selected in a policy will have no effect on network traffic. IPS is most often configured as part of a security policy. Unless stated otherwise, discussion of IPS sensor use will be in regards to firewall policies in this document.
When IPS is enabled, an IPS sensor is selected in a security policy, and all network traffic matching the policy will be checked for the signatures in the IPS sensor.
817
Intrusion protection
Target
OS
Protocol
Application
Tags
818
Intrusion protection
All predefined signatures have an Enable attribute that is set to on or off. Select Accept signature defaults use the Enable default setting for each included signature. This means that if a signature included in the filter has an Enable setting of off, traffic matching the signature will not be detected even though the signature is included in the filter. Select Enable all to enable all the signatures included in the filter, regardless of their Enable setting. Similarly, you may select Disable all to disable all the signatures included in the filter.
Action When Signature All predefined signatures have an Action attribute that is set to Pass or Drop. Select Accept signature defaults use the default action for Is Triggered each included signature. This means that if a signature included in the filter has an Action setting of Pass, traffic matching the signature will be detected and then allowed to continue to its destination. Select Monitor all to pass all traffic matching the signatures included in the filter, regardless of their default Action setting. Similarly, you may select Block all to drop traffic matching any the signatures included in the filter. Quarantine Enable this option to add the source of the offending traffic to the Banned User list. Attackers (to Banned Users List) Packet Logging Select to enable packet logging for the filter. When you enable packet logging on a filter, the unit saves a copy of the packets that match any signatures included in the filter. The packets can be analyzed later. For more information about packet filtering, see Viewing and saving logged packets on page 946
5 Select OK. The filter is created and added to the filter list.
Searching manually
Signatures are displayed in a paged list, with 50 signatures per page. The bottom of the screen shows the current page and the total number of pages. You can enter a page number and press enter, to skip directly to that page. Previous Page and Next Page buttons move you through the list, one page at a time. The First Page and Last Page button take you to the beginning or end of the list.
Applying filters
You can enter criteria for one of more columns, and only the signatures matching all the conditions you specify will be listed.
819
Intrusion protection
To apply filters 1 Go to UTM Profiles > Intrusion Protection > Predefined. 2 Select Filter Settings. 3 Select Add New Filter. 4 Select column by which to filter. 5 Select the item or items by which to filter. 6 Continue to add more filters to narrow your search, if required. 7 Select OK. The available options vary by column. For example, Enable allows you to choose between two options, while OS has multiple options, and you may select multiple items together. Filtering by name allows you to enter a text string and all signature names containing the string will be displayed.
When a pre-defined signature is specified in an entry, the default status and action attributes of the signature are ignored. These settings must be explicitly set when creating the entry. To create an IPS signature entry 1 Go to UTM Profiles > Intrusion Protection > IPS Sensor. 2 Select the IPS sensor to which you want to add the entry from the sensor drop down list in the Edit IPS Sensor window title bar. 3 Select the Create New drop down and choose either Pre-defined Entry or Custom Entry, depending on the type of IPS signature entry you require. 4 For the Action, select Pass, Block, or Reset. When the entry is enabled, the action determines what the FortiGate will do with traffic containing the specified signature. 5 Select Packet Log to save the packets containing the specified signature. For more information, see Enable IPS packet logging on page 833. 6 Select the Browse icon and choose the signature to include in the entry. 7 Select Enable. 8 Select OK.
UTM Guide for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
820
Intrusion protection
821
Intrusion protection
Table 48: Valid syntax for custom signature fields (Continued) Field KEYWORD Valid Characters Each keyword must start with a pair of dashes (--), and consist of a string of 1 to 19 characters. Normally, keywords are an English word or English words connected by an underscore (_). Keywords are case insensitive. Usage The keyword is used to identify a parameter. See Custom signature keywords on page 822 for tables of supported keywords.
VALUE
The value is set specifically for a Double quotes (") must be used around parameter identified by a keyword. the value if it contains a space and/or a semicolon (;). If the value is NULL, the space between the KEYWORD and VALUE can be omitted. Values are case sensitive. Note: If double quotes are used for quoting the value, the double quotes are not considered as part of the value string.
--attack_id <id_int>; Use this optional value to identify the signature. It cannot be the same value as any other custom rules. If an attack ID is not specified, the FortiGate automatically assigns an attack ID to the signature. If you are using VDOMs, custom signatures appear only in the VDOM in which you create them. You can use the same attack ID for signatures in different VDOMs. An attack ID you assign must be between 1000 and 9999. Example: --attack_id 1234; --name <name_str>; Enter the name of the rule. A rule name must be unique. If you are using VDOMs, custom signatures appear only in the VDOM in which you create them. You can use the same rule name for signatures in different VDOMs. The name you assign must be a string greater than 0 and less than 64 characters in length. Example: --name "Buffer_Overflow";
822
Intrusion protection
Specify the traffic direction and state to be inspected. They can --flow {from_client[,reversed] | be used for all IP traffic. from_server[,reversed] | Example: --src_port 41523; --flow bi_direction; bi_direction }; The signature checks traffic to and from port 41523. If you enable quarantine attacker, the optional reversed keyword allows you to change the side of the connection to be quarantined when the signature is detected. For example, a custom signature written to detect a brute-force log in attack is triggered when Login Failed is detected from_server more than 10 times in 5 seconds. If the attacker is quarantined, it is the server that is quarantined in this instance. Adding reversed corrects this problem and quarantines the actual attacker. Previous FortiOS versions used to_client and to_server values. These are now deprecated, but still function for backwards compatibility. --service {HTTP | TELNET | FTP | DNS | SMTP | POP3 | IMAP | SNMP | RADIUS | LDAP | MSSQL | RPC | SIP | H323 | NBSS | DCERPC | SSH | SSL}; Specify the protocol type to be inspected. This keyword allows you to specify the traffic type by protocol rather than by port. If the decoder has the capability to identify the protocol on any port, the signature can be used to detect the attack no matter what port the service is running on. Currently, HTTP, SIP, SSL, and SSH protocols can be identified on any port based on the content.
Table 51: Content keywords Keyword and value --byte_jump <bytes_to_convert>, <offset>[, relative] [, big] [, little] [, string] [, hex] [, dec] [, oct] [, align]; Description Use the byte_jump option to extract a number of bytes from a packet, convert them to their numeric representation, and jump the match reference up that many bytes (for further pattern matching or byte testing). This keyword allows relative pattern matches to take into account numerical values found in network data. The available keyword options include: <bytes_to_convert>: The number of bytes to examine from the packet. <offset>: The number of bytes into the payload to start processing. relative: Use an offset relative to last pattern match. big: Process the data as big endian (default). little: Process the data as little endian. string: The data is a string in the packet. hex: The converted string data is represented in hexadecimal notation. dec: The converted string data is represented in decimal notation. oct: The converted string data is represented in octal notation. align: Round up the number of converted bytes to the next 32-bit boundary.
823
Intrusion protection
Table 51: Content keywords (Continued) Keyword and value --byte_test <bytes_to_convert>, <operator>, <value>, <offset>[, relative] [, big] [, little] [, string] [, hex] [, dec] [, oct]; Description Use the byte_test keyword to compare a byte field against a specific value (with operator). This keyword is capable of testing binary values or converting representative byte strings to their binary equivalent and testing them. The available keyword options include: <bytes_to_convert>: The number of bytes to compare. <operator>: The operation to perform when comparing the value (<,>,=,!,&). <value>: The value to compare the converted value against. <offset>: The number of bytes into the payload to start processing. relative: Use an offset relative to last pattern match. big: Process the data as big endian (default). little: Process the data as little endian. string: The data is a string in the packet. hex: The converted string data is represented in hexadecimal notation. dec: The converted string data is represented in decimal notation. oct: The converted string data is represented in octal notation. Use the depth keyword to search for the contents within the specified number of bytes after the starting point defined by the offset keyword. If no offset is specified, the offset is assumed to be equal to 0. If the value of the depth keyword is smaller than the length of the value of the content keyword, this signature will never be matched. The depth must be between 0 and 65535. Use the distance keyword to search for the contents within the specified number of bytes relative to the end of the previously matched contents. If the within keyword is not specified, continue looking for a match until the end of the payload. The distance must be between 0 and 65535. Deprecated, see pattern and context keywords. Use the content keyword to search for the content string in the packet payload. The content string must be enclosed in double quotes. To have the FortiGate search for a packet that does not contain the specified context string, add an exclamation mark (!) before the content string. Multiple content items can be specified in one rule. The value can contain mixed text and binary data. The binary data is generally enclosed within the pipe (|) character. The double quote ("), pipe sign(|) and colon(:) characters must be escaped using a back slash if specified in a content string. If the value of the content keyword is greater than the length of the value of the depth keyword, this signature will never be matched.
--depth <depth_int>;
--distance <dist_int>;
--content [!]"<content_str>";
824
Intrusion protection
Table 51: Content keywords (Continued) Keyword and value --context {uri | header | body | host}; Description Specify the protocol field to look for the pattern. If context is not specified for a pattern, the FortiGate unit searches for the pattern anywhere in the packet buffer. The available context variables are: uri: Search for the pattern in the HTTP URI line. header: Search for the pattern in HTTP header lines or SMTP/POP3/SMTP control messages. body: Search for the pattern in HTTP body or SMTP/POP3/SMTP email body. host: Search for the pattern in HTTP HOST line. Example: --pattern "GET " --context uri --pattern "yahoo.com" --context host --no_case --pcre "/DESCRIBE\s+\/\s+RTSP\//i" --context header Use the no-case keyword to force the FortiGate unit to perform a case-insensitive pattern match. Use the offset keyword to look for the contents after the specified number of bytes into the payload. The specified number of bytes is an absolute value in the payload. Follow the offset keyword with the depth keyword to stop looking for a match after a specified number of bytes. If no depth is specified, the FortiGate unit continues looking for a match until the end of the payload. The offset must be between 0 and 65535. The FortiGate unit will search for the specified pattern. A pattern keyword normally is followed by a context keyword to define where to look for the pattern in the packet. If a context keyword is not present, the FortiGate unit looks for the pattern anywhere in the packet buffer. To have the FortiGate search for a packet that does not contain the specified URI, add an exclamation mark (!) before the URI. Example: --pattern "/level/" --pattern "|E8 D9FF FFFF|/bin/sh" --pattern !"|20|RTSP/"
--pattern [!]"<pattern_str>";
825
Intrusion protection
Table 51: Content keywords (Continued) Keyword and value --pcre [!]"(/<regex>/|m<delim><re gex><delim>)[ismxAEGRUB]"; Description Similarly to the pattern keyword, use the pcre keyword to specify a pattern using Perl-compatible regular expressions (PCRE). A pcre keyword can be followed by a context keyword to define where to look for the pattern in the packet. If no context keyword is present, the FortiGate unit looks for the pattern anywhere in the packet buffer. For more information about PCRE syntax, go to http://www.pcre.org. The switches include: i: Case insensitive. s: Include newlines in the dot metacharacter. m: By default, the string is treated as one big line of characters. ^ and $ match at the beginning and ending of the string. When m is set, ^ and $ match immediately following or immediately before any newline in the buffer, as well as the very start and very end of the buffer. x: White space data characters in the pattern are ignored except when escaped or inside a character class. A: The pattern must match only at the start of the buffer (same as ^ ). E: Set $ to match only at the end of the subject string. Without E, $ also matches immediately before the final character if it is a newline (but not before any other newlines). G: Invert the greediness of the quantifiers so that they are not greedy by default, but become greedy if followed by ?. R: Match relative to the end of the last pattern match. (Similar to distance:0;). U: Deprecated, see the context keyword. Match the decoded URI buffers. Deprecated, see pattern and context keywords. Use the uri keyword to search for the URI in the packet payload. The URI must be enclosed in double quotes ("). To have the FortiGate unit search for a packet that does not contain the specified URI, add an exclamation mark (!) before the URI. Multiple content items can be specified in one rule. The value can contain mixed text and binary data. The binary data is generally enclosed within the pipe (|) character. The double quote ("), pipe sign (|) and colon (:) characters must be escaped using a back slash (\) if specified in a URI string. Use this together with the distance keyword to search for the contents within the specified number of bytes of the payload. The within value must be between 0 and 65535.
--uri [!]"<uri_str>";
--within <within_int>;
826
Intrusion protection
Table 52: IP header keywords Keyword and Value --dst_addr [!]<ipv4>; Description Use the dst_addr keyword to search for the destination IP address. To have the FortiGate search for a packet that does not contain the specified address, add an exclamation mark (!) before the IP address. You can define up to 28 IP addresses or CIDR blocks. Enclose the comma separated list in square brackets. Example: dst_addr [172.20.0.0/16, 10.1.0.0/16,192.168.0.0/16] Check the IP ID field for the specified value. Use the ip_option keyword to check various IP option settings. The available options include: rr: Check if IP RR (record route) option is present. eol: Check if IP EOL (end of list) option is present. nop: Check if IP NOP (no op) option is present. ts: Check if IP TS (time stamp) option is present. sec: Check if IP SEC (IP security) option is present. lsrr: Check if IP LSRR (loose source routing) option is present. ssrr: Check if IP SSRR (strict source routing) option is present. satid: Check if IP SATID (stream identifier) option is present. any: Check if IP any option is present. Check the IP TOS field for the specified value.
--ip_id <field_int>; --ip_option {rr | eol | nop | ts | sec | lsrr | ssrr | satid | any};
--ip_tos <field_int>;
--ip_ttl [< | >] <ttl_int>; Check the IP time-to-live value against the specified value. Optionally, you can check for an IP time-to-live greater-than (>) or less-than (<) the specified value with the appropriate symbol. --protocol {<protocol_int> | tcp | udp | icmp}; --src_addr [!]<ipv4>; Check the IP protocol header. Example: --protocol tcp; Use the src_addr keyword to search for the source IP address. To have the FortiGate unit search for a packet that does not contain the specified address, add an exclamation mark (!) before the IP address. You can define up to 28 IP addresses or CIDR blocks. Enclose the comma separated list in square brackets. Example: src_addr 192.168.13.0/24
827
Intrusion protection
Table 53: TCP header keywords Keyword and Value --ack <ack_int>; --dst_port [!]{<port_int> | :<port_int> | <port_int>: | <port_int>:<port_int>}; Description Check for the specified TCP acknowledge number. Use the dst_port keyword to specify the destination port number. You can specify a single port or port range: <port_int> is a single port. :<port_int> includes the specified port and all lower numbered ports. <port_int>: includes the specified port and all higher numbered ports. <port_int>:<port_int> includes the two specified ports and all ports in between. Check for the specified TCP sequence number. Use the src_port keyword to specify the source port number. You can specify a single port or port range: <port_int> is a single port. :<port_int> includes the specified port and all lower numbered ports. <port_int>: includes the specified port and all higher numbered ports. <port_int>:<port_int> includes the two specified ports and all ports in between. Specify the TCP flags to match in a packet. S: Match the SYN flag. A: Match the ACK flag. F: Match the FIN flag. R: Match the RST flag. U: Match the URG flag. P: Match the PSH flag. 1: Match Reserved bit 1. 2: Match Reserved bit 2. 0: Match No TCP flags set. !: Match if the specified bits are not set. *: Match if any of the specified bits are set. +: Match on the specified bits, plus any others. The first part if the value (<SAFRUP120>) defines the bits that must be present for a successful match. For example: --tcp_flags AP only matches the case where both A and P bits are set. The second part ([,<SAFRUP120>]) is optional, and defines the additional bits that can be present for a match. For example: tcp_flags S,12 matches the following combinations of flags: S, S and 1, S and 2, S and 1 and 2. The modifiers !, * and + cannot be used in the second part. Check for the specified TCP window size. You can specify the window size as a hexadecimal or decimal integer. A hexadecimal value must be preceded by 0x. To have the FortiGate search for the absence of the specified window size, add an exclamation mark (!) before the window size.
--window_size [!]<window_int>;
828
Intrusion protection
Table 54: UDP header keywords Keyword and Value --dst_port [!]{<port_int> | :<port_int> | <port_int>: | <port_int>:<port_int>}; Description Specify the destination port number. You can specify a single port or port range: <port_int> is a single port. :<port_int> includes the specified port and all lower numbered ports. <port_int>: includes the specified port and all higher numbered ports. <port_int>:<port_int> includes the two specified ports and all ports in between. Specify the source port number. You can specify a single port or port range: <port_int> is a single port. :<port_int> includes the specified port and all lower numbered ports. <port_int>: includes the specified port and all higher numbered ports. <port_int>:<port_int> includes the two specified ports and all ports in between.
Table 55: ICMP keywords Keyword and Value --icmp_code <code_int>; --icmp_id <id_int>; --icmp_seq <seq_int>; --icmp_type <type_int>; Usage Specify the ICMP code to match. Check for the specified ICMP ID value. Check for the specified ICMP sequence value. Specify the ICMP type to match.
Table 56: Other keywords Keyword and Value --data_size {<size_int> | <<size_int> | ><size_int> | <port_int><><port_int>}; Description Test the packet payload size. With data_size specified, packet reassembly is turned off automatically. So a signature with data_size and only_stream values set is wrong. <size_int> is a particular packet size. <<size_int> is a packet smaller than the specified size. ><size_int> is a packet larger than the specified size. <size_int><><size_int> is a packet within the range between the specified sizes. Verify that the payload has data at a specified offset, optionally looking for data relative to the end of the previous content match.
829
Intrusion protection
Table 56: Other keywords (Continued) Keyword and Value --rate <matches_int>,<time_int>; Description Instead of generating log entries every time the signature is detected, use this keyword to generate a log entry only if the signature is detected a specified number of times within a specified time period. <matches_int> is the number of times a signature must be detected. <time_int> is the length of time in which the signature must be detected, in seconds. For example, if a custom signature detects a pattern, a log entry will be created every time the signature is detected. If --rate 100,10; is added to the signature, a log entry will be created if the signature is detected 100 times in the previous 10 seconds. Use this command with --track to further limit log entries to when the specified number of detections occur within a certain time period involving the same source or destination address rather than all addresses. Check for RPC application, version, and procedure numbers in SUNRPC CALL requests. The * wildcard can be used for version and procedure numbers. Check that the source and the destination have the same IP addresses. When used with --rate, this keyword narrows the custom signature rate totals to individual addresses. client has the FortiGate unit maintain a separate count of signature matches for each source address. server has the FortiGate unit maintain a separate count of signature matches for each destination address. block_int has the FortiGate unit block connections for the specified number of seconds, from the client or to the server, depending on which is specified. For example, if --rate 100,10 is added to the signature, a log entry will be created if the signature is detected 100 times in the previous 10 seconds. The FortiGate unit maintains a single total, regardless of source and destination address. If the same custom signature also includes --track client; matches are totalled separately for each source address. A log entry is added when the signature is detected 100 times in 10 seconds within traffic from the same source address. The --track keyword can also be used without --rate. If an integer is specified, the client or server will be blocked for the specified number of seconds every time the signature is detected.
--rpc_num <app_int>[, <ver_int> | *][, <proc_int> | *>]; --same_ip; --track {client | server}[,block_int];
830
Intrusion protection
Active-passive
In an active-passive HA cluster, the primary unit processes all traffic just as it would in a stand-alone configuration. Should the primary unit fail, a secondary unit will assume the role of the primary unit and begin to process network traffic. By default, the state of active communication sessions are not shared with secondary units and will not survive the failover condition. Once the sessions are reestablished however, traffic processing will continue as normal. If your network requires that active sessions are taken over by the new primary unit, select Enable Session Pick-up in your HA configuration. Because session information must be sent to all subordinate units on a regular basis, session pick-up is a resource-intensive feature and is not enabled by default.
Active-active
The fail-over process in an active-active cluster is similar to an active-passive cluster. When the primary unit fails, a secondary unit takes over and traffic processing continues. The load-balancing schedule used to distribute sessions to the cluster members is used by the new primary unit to redistribute sessions among the remaining subordinate units. If session pick-up is not enabled, the sessions active on the failed primary are lost, and the sessions redistributed among the secondary units may also be lost. If session pick-up is enabled, all sessions are handled according to their last-known state. For more information about HA options and settings, see High Availability on page 1721.
831
Intrusion protection
Configuring fail-open
If the IPS engine fails for any reason, it will fail open by default. This means that traffic continues to flow without IPS scanning. If IPS protection is more important to your network than the uninterrupted flow if network traffic, you can disable this behavior using the fail-open CLI command: config ips global set fail-open {enable | disable} end The default setting is enable.
832
Intrusion protection
833
IPS examples
Intrusion protection
To enable packet logging for a signature 1 Create either a pre-defined or custom entry in an IPS sensor. For more information, see Creating a signature entry on page 820. 2 Before saving the entry, select Packet Log. 3 Select the IPS sensor in the security policy that allows the network traffic the FortiGate unit will examine traffic for the signature. To enable packet logging for a filter 1 Create a filter in an IPS sensor. For more information, see Creating an IPS filter on page 818. 2 Before saving the filter, select Enable All for Packet Logging. 3 Select the IPS sensor in the security policy that allows the network traffic the FortiGate unit will examine for the signature. For information on viewing and saving logged packets, see Viewing and saving logged packets on page 946.
IPS examples
Configuring basic IPS protection
Small offices, whether they are small companies, home offices, or satellite offices, often have very simple needs. This example details how to enable IPS protection on a FortiGate unit located in a satellite office. The satellite office contains only Windows clients.
834
Intrusion protection
IPS examples
835
IPS examples
Intrusion protection
Internal Network
Po Po rt 2
rt 1
Ex
Main Firewall
ter
na
Web Server
The FortiGate unit is configured with: a virtual IP to give the web server a unique address accessible from the Internet. a security policy to allow access to the web server from the Internet using the virtual IP.
To protect the web server using intrusion protection, you need to create an IPS sensor, populate it with filters, then enable IPS scanning in the security policy. To create an IPS sensor 1 Go to UTM Profiles > Intrusion Protection > IPS Sensor and select Create New. 2 Enter web_server as the name of the new IPS sensor. 3 Select OK. The new IPS sensor is created but it has no filters, and therefore no signatures are included. The web server operating system is Linux, so you need to create a filter for all Linux server signatures. To create the Linux server filter 1 Go to UTM Profiles > Intrusion Protection > IPS Sensor and select the web_server IPS sensor and select the Edit icon. 2 Select Add Filter. 3 Enter Linux Server as the name of the new filter. 4 For Target, select Specify and choose server. 5 For OS, select Specify and choose Linux. 6 Select OK.
836
Intrusion protection
IPS examples
The filter is saved and the IPS sensor page reappears. In the filter list, find the Linux Server filter and look at the value in the Count column. This shows how many signatures match the current filter settings. You can select the View Rules icon to see a listing of the included signatures. The web server software is Apache, so you need to create a second filter for all Apache signatures. To create the Apache filter 1 Go to UTM Profiles > Intrusion Protection > IPS Sensor and select the web_server IPS sensor and select the Edit icon. 2 Select Add Filter. 3 Enter Apache as the name of the new filter. 4 For Application, select Specify and choose Apache from the Available list. 5 Select the right-arrow to move Apache to the Selected list. 6 Select OK. The filter is saved and the IPS sensor page reappears. It might seem that you can skip a step and create one filter that specifies both Linux server and Apache signatures. However, this would include a smaller number of filters. It would not include signatures to detect attacks against the operating system directly, for example. You have created the IPS sensor and the two filters that include the signatures you need. To have it start scanning traffic, you must edit the security policy. To edit the security policy 1 Go to Policy > Policy > Policy, select security policy that allows access to the web server, and select the Edit icon. 2 Enable UTM. 3 Select the Enable IPS option and choose the web_server IPS sensor from the list. 4 Select OK. Since IPS is enabled and the web_server IPS sensor is specified in the security policy controlling the web server traffic, the IPS sensor examines the web server traffic for matches to the signatures it contains.
837
IPS examples
Intrusion protection
3 Rather than search through the signature list, use the name filter by selecting the filter icon in the header of the Name column. 4 In the Filters list, select Name. 5 Select Enable. 6 In the Field selection, choose Contains. 7 Enter EICAR in the Text field. 8 Select OK. 9 Select the EICAR.AV.Test.File.Download signature. 10 Select OK. 11 Select Enable, Logging, and Packet Log. 12 Select OK. 13 Select Block as the Action. 14 Select OK to save the IPS sensor. You are returned to the IPS sensor list. The EICAR test sensor appears in the list. Add the IPS sensor to the security policy allowing Internet access 1 Go to Policy > Policy > Policy. 2 Select the security policy that allows you to access the Internet. 3 Select the Edit icon. 4 Enable Log Allowed Traffic. 5 Enable UTM. 6 Select Enable IPS. 7 Choose EICAR test from the available IPS sensors. 8 Select OK. With the IPS sensor configured and selected in the security policy, the FortiGate unit blocks any attempt to download the EICAR test file. Test the IPS sensor 1 Using your web browser, go to http://www.eicar.org/anti_virus_test_file.htm. 2 Scroll to the bottom of the page and select eicar.com from the row labeled as using the standard HTTP protocol. 3 The browser attempts to download the requested file and, If the file is successfully downloaded, the custom signature configuration failed at some point. Check the custom signature, the IPS sensor, and the firewall profile. If the download is blocked with a high security alert message explaining that youre not permitted to download the file, the EICAR test file was blocked by the FortiGate unit antivirus scanner before the IPS sensor could examine it. Disable antivirus scanning and try to download the EICAR test file again. If no file is downloaded and the browser eventually times out, the custom signature successfully detected the EICAR test file and blocked the download.
838
Intrusion protection
IPS examples
Viewing the packet log 1 Go to Log&Report > Log & Archive Access > UTM Log. 2 Locate the log entry that recorded the blocking of the EICAR test file block. The Message field data will be tools: EICAR.AV.Test.File.Download. 3 Select the View Packet Log icon in the Packet Log column. 4 The packet log viewer is displayed.
839
IPS examples
Intrusion protection
5 Specify the traffic type. Use the --protocol tcp keyword to limit the effect of the custom signature to only TCP traffic. This will save system resources by not unnecessarily scanning UDP and ICMP traffic. F-SBID( --name "Block.example.com"; --pattern "example.com"; --service HTTP; --protocol tcp; ) The FortiGate unit will limit its search for the pattern to TCP traffic and ignore UDP and ICMP network traffic. 6 Ignore case sensitivity By default, patterns are case sensitive. If a user directed his or her browser to Example.com, the custom signature would not recognize the URL as a match. Use the --no_case keyword to make the pattern matching case insensitive. F-SBID( --name "Block.example.com"; --pattern "example.com"; --service HTTP; --no_case; ) Unlike all of the other keywords in this example, the --no_case keyword has no value. Only the keyword is required. 7 Limit pattern scans to only traffic sent from the client The --flow command can be used to further limit the network traffic being scanned to only that send by the client or by the server. F-SBID( --name "Block.example.com"; --pattern "example.com"; --service HTTP; --no_case; --flow from_client; ) Web servers do not contact clients until clients first open a communication session. Therefore, using the --flow from_client command will force the FortiGate to ignore all traffic from the server. Since the majority of HTTP traffic flows from the server to the client, this will save considerable system resources and still maintain protection. 8 Specify the context When the client browser tries to contact example.com, a DNS is first consulted to get the example.com server IP address. The IP address is then specified in the URL field of the HTTP communication. The domain name will still appear in the host field, so this custom signature will not function without the --context host keyword/value pair. F-SBID( --name "Block.example.com"; --pattern "example.com"; --service HTTP; --no_case; --flow from_client; --context host; )
840
Intrusion protection
IPS examples
1 Enter the custom signature basic format All custom signatures have a header and at least one keyword/value pair. The header is always the same: F-SBID( ) The keyword/value pairs appear within the parentheses and each pair is followed by a semicolon. 2 Choose a name for the custom signature Every custom signature requires a name, so it is a good practice to assign a name before you add any other keywords. Use the --name keyword to assign the custom signature a name. The name value follows the keyword after a space. Enclose the name value in double-quotes: F-SBID( --name "Block.SMTP.VRFY.CMD"; ) The signature, as it appears here, will not do anything if you try to use it. It has a name, but does not look for any patterns in network traffic. You must specify a pattern that the FortiGate unit will search for. 3 Add a signature pattern Use the --pattern keyword to specify what the FortiGate unit will search for: F-SBID( --name "Block.SMTP.VRFY.CMD"; --pattern "vrfy"; ) The signature will now detect the vrfy command appearing in network traffic. The custom signature should only detect the command in SMTP traffic, however. Any other traffic with the pattern should be allowed to pass. For example, an email message discussing the vrfy command should not be stopped. 4 Specify the service Use the --service keyword to limit the effect of the custom signature to only the HTTP protocol. F-SBID( --name "Block.SMTP.VRFY.CMD"; --pattern "vrfy"; --service SMTP; ) The FortiGate unit will limit its search for the pattern to the SMTP protocol. Even though the SMTP protocol uses only TCP traffic, the FortiGate will search for SMTP protocol communication in TCP, UDP, and ICMP traffic. This is a waste of system resources that you can avoid by limiting the search further, as shown below. 5 Specify the traffic type. Use the --protocol tcp keyword to limit the effect of the custom signature to only TCP traffic. This will save system resources by not unnecessarily scanning UDP and ICMP traffic. F-SBID( --name "Block.SMTP.VRFY.CMD"; --pattern "vrfy"; --service SMTP; --protocol tcp; ) The FortiGate unit will limit its search for the pattern to TCP traffic and ignore the pattern in UDP and ICMP network traffic. 6 Ignore case sensitivity By default, patterns are case sensitive. If a user directed his or her browser to Example.com, the custom signature would not recognize the URL as a match. Use the --no_case keyword to make the pattern matching case insensitive.
841
IPS examples
Intrusion protection
F-SBID( --name "Block.SMTP.VRFY.CMD"; --pattern "vrfy"; --service SMTP; --no_case; ) Unlike all of the other keywords in this example, the --no_case keyword has no value. Only the keyword is required. 7 Specify the context The SMTP vrfy command will appear in the SMTP header. The --context host keyword/value pair allows you to limit the pattern search to only the header. F-SBID( --name "Block.SMTP.VRFY.CMD"; --pattern "vrfy"; --service SMTP; --no_case; --context header; )
Assumptions
As shown in other examples and network diagrams throughout this document, the Example Corporation has a pair of FortiGate-620B units in an HA cluster. To simplify this example, the cluster is replaced with a single FortiGate-620B. An ASM-CE4 is installed in the FortiGate-620B. The network is configured as shown in Figure 90.
Network configuration
The Example Corporation network needs minimal changes to incorporate the ASM-CE4. Interface amc-sw1/1 of the ASM-CE4 is connected to the Internet and interface amc-sw1/1 is connected to the web server. Since the main office network is connected to port2 and the Internet is connected to port1, a switch is installed to allow both port1 and amc-sw1/1 to be connected to the Internet.
842
Intrusion protection
IPS examples
port2: 10.11.101.100
amc-sw1/2: 10.11.201.100
port1: 172.20.120.141
amc-sw1/1: 172.20.120.212
Switch
Internet
The switch used to connect port1 and amc-sw1/1 to the Internet must be able to handle any SYN flood, all of the legitimate traffic to the web site, and all of the traffic to and from the Example Corporation internal network. If the switch can not handle the bandwidth, or if the connection to the service provider can not provide the required bandwidth, traffic will be lost.
843
IPS examples
Intrusion protection
Create a DoS sensor for SYN flood protection 1 Go to UTM Profiles > Intrusion Protection > DoS Sensor. 2 Select Create New. 3 Enter Web site SYN protection for the DoS sensor name. 4 Select OK to create the sensor. The default tcp_syn_flood threshold is 2000. This means that the configured action will be triggered when the number of TCP packets with the SYN flag set exceeds 2000 per second. For some applications, this value will be too high, while for others it will be too low. One way to find the correct values for your environment is to set the action to Pass and enable logging. Observe the logs and adjust the threshold values until you can determine the value at which normal traffic begins to generate attack reports. Set the threshold above this value with the margin you want. Note that the smaller the margin, the more protected your network will be from DoS attacks, but your network traffic will also be more likely to generate false alarms. Configure a DoS sensor for SYN flood protection 1 Go to UTM Profiles > Intrusion Protection > DoS Sensor. 2 Select the Web site SYN protection sensor and select the Edit icon. 3 Select Enable and Logging for the tcp_syn_flood anomaly. 4 Select the Proxy action for the tcp_syn_flood anomaly. 5 Enter the threshold value for the tcp_syn_flood anomaly. 6 Select OK. With the action configured as Proxy, TCP packets with the SYN flag set will be passed until the threshold value is exceeded. At that point, TCP packets with the SYN flag set until their numbers fall below the threshold value. The ASM-CE4 security module will intercept the packet, and reply to the client with a TCP packet that has the SYN and ACK flags set. If the connection request is legitimate, the client will reply with a packet that has the ACK flag set. The ASM-CE4 will then replay this exchange to the server and allow the client and server to communicate directly. If the client does not reply with the expected packet, the ASM-CE4 will close the connection. Therefore, if the security module receives a flood of SYN packets, they will be blocked. Only the legitimate connections will be allowed through to the server.
844
Intrusion protection
IPS examples
7 Enable DoS Sensor and select the Web site SYN protection sensor from the list. 8 Select OK.
Virtual IP configuration
Traffic destined for the web server will arrive at the amc-sw1/1 interface. You must create a virtual IP mapping to have the ASM-CE4 direct the traffic to the web server. Create a virtual IP mapping 1 Go to Firewall Objects > Virtual IP > Virtual IP. 2 Select Create New. 3 In the Name field, enter web_server. 4 Select amc-sw1/1 as the External Interface. 5 Enter 172.20.120.212 as the External IP Address/Range. 6 Enter 10.11.201.120 as the Mapped IP Address/Range. 7 Select OK.
845
IPS examples
Intrusion protection
The number of proxied TCP connection attempts since the FortiGate unit was restarted. This value is the sum of the working and retired connection totals. The number of TCP connection attempts currently being proxied. The number of proxied TCP connection attempts dropped or allowed. These connection attempts are nolonger being serviced. This value is the sum of the valid and attacks totals. The number of valid proxied TCP connection attempts. The number of proxied TCP connection attempts in which the client did not reply. These are typically attacks. The number of valid client connection attempts in which the server does not reply. The number of valid client connection attempts in which the server resets the connection. The client time-out duration. The server time-out duration.
Valid TCP Connections Attacks, No Ack From Client No SynAck From Server Rst By Server (service not supported) Client timeout setting Server timeout setting
846
Web filter
This section describes FortiGate web filtering for HTTP traffic. The three main parts of the web filtering function, the Web Content Filter, the URL Filter, and the FortiGuard Web Filtering Service interact with each other to provide maximum control over what the Internet user can view as well as protection to your network from many Internet content threats. Web Content Filter blocks web pages containing words or patterns that you specify. URL filtering uses URLs and URL patterns to block or exempt web pages from specific sources. FortiGuard Web Filtering provides many additional categories you can use to filter web traffic. This section describes the Web Content Filter and URL Filter functions. For information on FortiGuard Web Filtering, see FortiGuard Web Filter on page 861. The following topics are included in this section: Web filter concepts Web content filter URL filter SafeSearch Advanced web filter configuration Web filtering example
As the number and severity of threats increase on the World Wide Web, the risk potential increases within a company's network as well. Casual non-business related web surfing has caused many businesses countless hours of legal litigation as hostile environments have been created by employees who download and view offensive content. Web-based attacks and threats are also becoming increasingly sophisticated. Threats and web-based applications that cause additional problems for corporations include:
847
Web filter
spyware/grayware phishing pharming instant messaging peer-to-peer file sharing streaming media blended network attacks.
Spyware, also known as grayware, is a type of computer program that attaches itself to a users operating system. It does this without the users consent or knowledge. It usually ends up on a computer because of something the user does such as clicking on a button in a pop-up window. Spyware can track the users Internet usage, cause unwanted pop-up windows, and even direct the user to a host web site. For further information, visit the FortiGuard Center. Some of the most common ways of grayware infection include: downloading shareware, freeware, or other forms of file-sharing services clicking on pop-up advertising visiting legitimate web sites infected with grayware.
Phishing is the term used to describe attacks that use web technology to trick users into revealing personal or financial information. Phishing attacks use web sites and email that claim to be from legitimate financial institutions to trick the viewer into believing that they are legitimate. Although phishing is initiated by spam email, getting the user to access the attackers web site is always the next step. Pharming is a next generation threat that is designed to identify and extract financial, and other key pieces of information for identity theft. Pharming is much more dangerous than phishing because it is designed to be completely hidden from the end user. Unlike phishing attacks that send out spam email requiring the user to click to a fraudulent URL, pharming attacks require no action from the user outside of their regular web surfing activities. Pharming attacks succeed by redirecting users from legitimate web sites to similar fraudulent web sites that have been created to look and feel like the authentic web site. Instant messaging presents a number of problems. Instant messaging can be used to infect computers with spyware and viruses. Phishing attacks can be made using instant messaging. There is also a danger that employees may use instant messaging to release sensitive information to an outsider. Peer-to-peer (P2P) networks are used for file sharing. Such files may contain viruses. Peer-to-peer applications take up valuable network resources and may lower employee productivity but also have legal implications with the downloading of copyrighted or sensitive company material. Streaming media is a method of delivering multimedia, usually in the form of audio or video to Internet users. Viewing streaming media impacts legitimate business by using valuable bandwidth. Blended network threats are rising and the sophistication of network threats is increasing with each new attack. Attackers learn from each previous successful attack and enhance and update attack code to become more dangerous and fast spreading. Blended attacks use a combination of methods to spread and cause damage. Using virus or network worm techniques combined with known system vulnerabilities, blended threats
848
Web filter
can quickly spread through email, web sites, and Trojan applications. Examples of blended threats include Nimda, Code Red, Slammer, and Blaster. Blended attacks can be designed to perform different types of attacks, which include disrupting network services, destroying or stealing information, and installing stealthy backdoor applications to grant remote access.
The final method is the focus of this topic. The following information shows how the filters interact and how to use them to your advantage.
849
Web filter
The web content filter feature scans the content of every web page that is accepted by a security policy. The system administrator can specify banned words and phrases and attach a numerical value, or score, to the importance of those words and phrases. When the web content filter scan detects banned content, it adds the scores of banned words and phrases in the page. If the sum is higher than a threshold set in the web filter profile, the FortiGate unit blocks the page.
850
Web filter
The following table describes how these rules are applied to the contents of a web page. Consider the following, a web page that contains only this sentence: The score for each word or phrase is counted only once, even if that word or phrase appears many times in the web page.
Table 57: Banned Pattern Rules Score added to the sum for the entire page 20 40
Banned pattern
Assigned score
Threshold score
Comment
20 20
20 20
Appears twice but only counted once. Web page is blocked. Each word appears twice but only counted once giving a total score of 40. Web page is blocked word appears twice, sentence does not appear, but since any word in a phrase without quotation marks is counted, the score for this pattern is 20. Web page is blocked. This phrase does not appear exactly as written. Web page is allowed. This phrase appears twice but is counted only once. Web page is blocked.
word sentence
20
20
20
word sentence
20
20
word or phrase
20
20
20
Enabling the web content filter and setting the content threshold
When you enable the web content filter, the web filter will block any web pages when the sum of scores for banned content on that page exceeds the content block threshold. The threshold will be disregarded for any exemptions within the web filter list.
851
URL filter
Web filter
To enable the web content filter and set the content block threshold 1 Go to UTM Profiles > Web Filter > Profile. 2 Select the Create New icon on the Edit Web Filter Profile window title bar. 3 In the Name field, enter the name of the new web filter profile. 4 Optionally, you may also enter a comment. The comment can remind you of the details of the sensor. 5 Select the Inspection Method. Proxy-based detection involves buffering the file and examining it as a whole. Advantages of proxy-based detection include a more thorough examination of attachments, especially archive formats and nesting. Flow-based detection examines the file as it passes through the FortiGate unit without any buffering. Advantages of flow-based detection include speed and no interruption of detection during conserve mode. 6 Expand the Advanced Filter heading. 7 Enable Web Content Filter. 8 Select the required web filter content list from the Web Content Filter drop-down list. 9 Select Apply. The web filter profile configured with web content filtering is ready to be added to a firewall profile.
URL filter
You can allow or block access to specific URLs by adding them to the URL filter list. You add the URLs by using patterns containing text and regular expressions. The FortiGate unit allows or blocks web pages matching any specified URLs or patterns and displays a replacement message instead.
Note: URL blocking does not block access to other services that users can access with a web browser. For example, URL blocking does not block access to ftp:// ftp.example.com. Instead, use firewall policies to deny ftp connections.
When adding a URL to the URL filter list, follow these rules: Type a top-level URL or IP address to control access to all pages on a web site. For example, www.example.com or 192.168.144.155 controls access to all pages at this web site. Enter a top-level URL followed by the path and file name to control access to a single page on a web site. For example, www.example.com/news.html or 192.168.144.155/news.html controls access to the news page on this web site. To control access to all pages with a URL that ends with example.com, add example.com to the filter list. For example, adding example.com controls access to www.example.com, mail.example.com, www.finance.example.com, and so on. Control access to all URLs that match patterns using text and regular expressions (or wildcard characters). For example, example.* matches example.com, example.org, example.net and so on.
Note: URLs with an action set to exempt or pass are not scanned for viruses. If users on the network download files through the FortiGate unit from a trusted web site, add the URL of this web site to the URL filter list with an action to pass it so the FortiGate unit does not virus scan files downloaded from this URL. UTM Guide for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
852
Web filter
URL filter
Block
Attempts to access any URLs matching the URL pattern are denied. The user will be presented with a replacement message.
Allow
Any attempt to access a URL that matches a URL pattern with an allow action is permitted. The traffic is passed to the remaining antivirus proxy operations, including FortiGuard Web Filter, web content filter, web script filters, and antivirus scanning. Allow is the default action. If a URL does not appear in the URL list, it is permitted.
Pass
Traffic to, and reply traffic from, sites matching a URL pattern with a pass action will bypass all antivirus proxy operations, including FortiGuard Web Filter, web content filter, web script filters, and antivirus scanning. Make sure you trust the content of any site you pass.
Exempt
Exempt is similar to Pass in that it allows trusted traffic to bypass the antivirus proxy operations, but it functions slightly differently. In general, if youre not certain that you need to use the Exempt action, use Pass. HTTP 1.1 connections are persistent unless declared otherwise. This means the connections will remain in place until closed or the connection times out. When a client loads a web page, the client opens a connection to the web server. If the client follows a link to another page on the same site before the connection times out, the same connection is used to request and receive the page data. When you add a URL pattern to a URL filter list and apply the Exempt action, traffic sent to and replies traffic from sites matching the URL pattern will bypass all antivirus proxy operations, as with the Pass action. The difference is that the connection itself inherits the exemption. This means that all subsequent reuse of the existing connection will also bypass all antivirus proxy operations. When the connection times out, the exemption is cancelled. For example, consider a URL filter list that includes example.com/files configured with the Exempt action. A user opens a web browser and downloads a file from the URL example.com/sample.zip. This URL does not match the URL pattern so it is scanned for viruses. The user then downloads example.com/files/beautiful.exe and since this URL does match the pattern, the connection itself inherits the exempt action. The user then downloads example.com/virus.zip. Although this URL does not match the exempt URL pattern, a previously visited URL did, and since the connection inherited the exempt action and was re-used to download a file, the file is not scanned. If the user next goes to an entirely different server, like example.org/photos, the connection to the current server cannot be reused. A new connection to example.org is established. This connection is not exempt. Unless the user goes back to example.com before the connection to that server times out, the server will close the connection. If the user returns after the connection is closed, a new connection to example.com is created and it is not exempt until the user visits a URL that matches the URL pattern.
853
URL filter
Web filter
Web servers typically have short time-out periods. A browser will download multiple components of a web page as quickly as possible by opening multiple connections. A web page that includes three photos will load more quickly if the browser opens four connections to the server and downloads the page and the three photos at the same time. A short time-out period on the connections will close the connections faster, allowing the server to avoid unnecessarily allocating resources for a long period. The HTTP session time-out is set by the server and will vary with the server software, version, and configuration. Using the exempt action can have unintended consequences in certain circumstances. You have a web site at example.com and since you control the site, you trust the contents and configure example.com as exempt. But example.com is hosted on a shared server with a dozen other different sites, each with a unique domain name. Because of the shared hosting, they also share the same IP address. If you visit example.com, your connection your site becomes exempt from any antivirus proxy operations. Visits to any of the 12 other sites on the same server will reuse the same connection and the data you receive is exempt from scanned. Use of the exempt action is not suitable for configuration in which connections through the FortiGate unit use an external proxy. For example, you use proxy.example.net for all outgoing web access. Also, as in the first example, URL filter list that includes a URL pattern of example.com/files configured with the Exempt action. Users are protected by the antivirus protection of the FortiGate unit until a user visits a URL that matches the of example.com/files URL pattern. The pattern is configured with the Exempt action so the connection to the server inherits the exemption. With a proxy however, the connection is from the user to the proxy. Therefore, the user is entirely unprotected until the connection times out, no matter what site he visits. Ensure you are aware of the network topology involving any URLs to which you apply the Exempt action.
The URL filter list in use has a single entry: www.domain.com/files/content/. The users browser is configured to use an external web proxy. All user browsing takes advantage of this proxy.
854
Web filter
URL filter
With an exempt action, the user downloads www.example.com/files/content/eicar.com through the proxy. This matches the URL filter list entry so the file is not scanned. Further, the connection to the proxy inherits the exemption. The user next downloads www.eicar.org/virus/eicar.com through the proxy. Although this does not match the URL filter list entry, the existing connection to the proxy will be used so the file is not scanned. In fact, until the user stops browsing long enough for the connection to time out, all the user web traffic is exempt and will not be scanned. With a pass action, the user downloads www.example.com/files/content/eicar.com through the proxy. This matches the URL filter list entry so the file is not scanned. The user next downloads www.eicar.org/virus/eicar.com through the proxy. This does not match the URL filter entry so it will be scanned. The pass action does not affect the connection and every URL the user accesses is checked against the URL filter list.
855
SafeSearch
Web filter
SafeSearch
SafeSearch is a feature of popular search sites that prevents explicit web sites and images from appearing in search results. Although SafeSearch is a useful tool, especially in educational environments, the resourceful user may be able to simply turn it off. Enabling SafeSearch for the supported search sites enforces its use by rewriting the search URL to include the code to indicate the use of the SafeSearch feature. Three search sites are supported:
Google Enforce the strict filtering level of safe search protection for Google search results by adding &safe=on to search URL requests. Strict filtering removes both explicit text and explicit images from the search results. Enforce the strict filtering level of safe search protection for Yahoo! search results by adding &vm=r to search URL requests. Strict filtering removed adult web, video, and images from search results. Enforce the strict filtering level of safe search protection for Bing search results by adding adlt=strict to search URL requests. Strict filtering removes explicit text, images, and video from the search results.
Yahoo!
Bing
Enabling SafeSearch CLI config webfilter profile edit default config web set safe-search bing google yahoo end end This enforces the use of SafeSearch in traffic controlled by the firewall policies using the web filter you configure.
ActiveX filter
Enable to filter ActiveX scripts from web traffic. Web sites using ActiveX may not function properly with this filter enabled.
Cookie filter
Enable to filter cookies from web traffic. Web sites using cookies may not function properly with this enabled.
856
Web filter
Block
857
Web filter
School district
The background for this scenario is a school district with more than 2300 students and 500 faculty and staff in a preschool, three elementary schools, a middle school, a high school, and a continuing education center. Each elementary school has a computer lab and the high school has three computer labs with connections to the Internet. Such easy access to the Internet ensures that every student touches a computer every day. With such a diverse group of Internet users, it was not possible for the school district to set different Internet access levels. This meant that faculty and staff were unable to view websites that the school district had blocked. Another issue was the students use of proxy sites to circumvent the previous web filtering system. A proxy server acts as a go-between for users seeking to view web pages from another server. If the proxy server has not been blocked by the school district, the students can access the blocked website. When determining what websites are appropriate for each school, the district examined a number of factors, such as community standards and different needs of each school based on the age of the students. The district decided to configure the FortiGate web filtering options to block content of an inappropriate nature and to allow each individual school to modify the options to suit the age of the students. This way, each individual school was able to add or remove blocked sites almost immediately and have greater control over their students Internet usage. In this simplified example of the scenario, the district wants to block any websites with the word example on them, as well as the website www.example.com. The first task is to create web content filter lists for the students and the teachers. To create a web content filter list for the students config webfilter content edit 5 set name "Student Web Content List" config entries edit example set action block set status enable end end It might be more efficient if the Teacher Web Content List included the same blocked content as the student list. From time to time a teacher might have to view a blocked page. It would then be a matter of changing the Action from Block to Allow as the situation required. To create a web content filter list for the teachers config webfilter content edit 5 set name "Teacher Web Content List" config entries edit example set action exempt set status enable end end URL filter lists with filters to block unwanted web sites must be created for the students and teachers. For this example the URL www.example.com will be used.
858
Web filter
To create a URL filter for the students 1 Go to UTM Profiles > Web Filter > URL Filter. 2 Select Create New. 3 Enter Student URL List as the URL filter Name. 4 Enter optional comments to describe the contents of the list. 5 Select OK. The URL filter for the students has been created. Now it must be configured. 6 Select Create New. 7 Enter example.com in the URL field. 8 Select Simple from the Type list. 9 Select Block from the Action list. 10 Select Enable. 11 Select OK. 12 Select OK. The teachers should be able to view the students blocked content, however, so an addition URL filter is needed. To create a URL filter for the teachers 1 Go to UTM Profiles > Web Filter > URL Filter. 2 Select Create New. 3 Enter Teacher URL List as the URL filter Name. 4 Enter optional comments to describe the list. 5 Select OK. The URL filter for the students has been created. Now it must be configured. 6 Select Create New. 7 Enter www.example.com in the URL field. 8 Select Simple from the Type list. 9 Select Exempt from the Action list. 10 Select Enable. 11 Select OK. 12 Select OK. A web filter profile must be created for the students and the teachers. To create a web filter profile for the students 1 Go to UTM Profiles > Web Filter > Profile. 2 Select the Create New icon in the Edit Web Filter window title bar. 3 Enter Students as the Profile Name. 4 Enter optional comments to identify the profile. 5 Expand the Advanced Filter heading. 6 Enable Web Content Filter. 7 Select Student Web Content List from the Web Content Filter drop-down list. 8 Enable Web URL Filter.
FortiOS Handbook v3: UTM Guide 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
859
Web filter
9 Select Student URL List from the Web URL Filter drop-down list. 10 Enable Web Resume Download Block. Selecting this setting will block downloading parts of a file that have already been downloaded and prevent the unintentional download of virus files hidden in fragmented files. Note that some types of files, such as PDFs, are fragmented to increase download speed, and that selecting this option can cause download interruptions with these types. 11 Select OK. To create a security policy for the students 1 Go to Policy > Policy > Policy. 2 Select Create New. 3 Enable UTM. 4 Select Enable Web Filter. 5 Select Students from the web filter drop-down list. 6 Enter optional comments. 7 Select OK. To create a web filter profile for the teachers 1 Go to UTM Profiles > Web Filter > Profile. 2 Select the Create New icon in the Edit Web Filter window title bar. 3 Enter Teachers as the Profile Name. 4 Enter optional comments to identify the profile. 5 Expand the Advanced Filter heading. 6 Enable Web Content Filter. 7 Select Teacher Web Content List from the Web Content Filter drop-down list. 8 Enable Web URL Filter. 9 Select Teacher URL List from the Web URL Filter drop-down list. 10 Enable Web Resume Download Block. 11 Select OK. To create a security policy for Teachers 1 Go to Policy > Policy > Policy. 2 Select Create New. 3 Enable UTM. 4 Select Enable Web Filter. 5 Select Teachers from the web filter drop-down list. 6 Enter optional comments. 7 Select OK.
860
861
862
Deny access to the URL and stop any running quota timer
Block
Allow
Block
Yes
Allow
No
No
Allow
Block
No
Allow Is there a classification for this URL? Yes Is the URL classification set to block or allow? Is FortiGuard Quota enabled for the Category? Is there any time remaining for this category quota?
Yes Start the category timer and allow access to the URL
Yes
No
Block
No
No
Deny access to the URL and stop any running quota timer
Deny access to the URL and stop any running quota timer Is FortiGuard Quota exempt for the classification? Yes
No
Allow access to the URL and stop any running quota timer
Yes
Yes
No
Allow access to the URL Is there any time remaining for this category group quota? No Yes
Deny access to the URL and stop any running quota timer
Deny access to the URL and stop any running quota timer
Start the category group timer and allow access to the URL
863
864
When a user first attempts to access a URL, theyre prompted to authenticate with the FortiGate unit. When they provide their username and password, the FortiGate unit recognizes them, determines their quota allowances, and monitors their web use. The category and classification of each page they visit is checked and FortiGate unit adjusts the users remaining available quota for the category or classification.
Note: Editing the web filter profile resets the quota timers for all users.
To configure the FortiGuard Web Filter categories 1 Go to UTM Profiles > Web Filter > Profile. 2 Select the web filter profile in which you want to enable FortiGuard Web Filter from the drop down list in the Edit Web Filter Profile window title bar, or select Create New to add a new web filter profile. 3 Select Create New. 4 Select a Filter Type of Category. 5 Select the required category groups. You may also expand the category groups to select individual categories. 6 Select the Monitor action. 7 Enable Enforce Quota to activate the quota for the selected categories and category groups. 8 Select Hours, Minutes, or Seconds and enter the number of hours, minutes, or seconds. This is the daily quota allowance for each user. 9 Select OK. 10 Select Apply. Apply the web filter profile to an identity-based security policy. All the users subject to that policy are restricted by the quotas.
Quota hierarchy
You can apply quotas to categories and category groups. Only one quota per user can be active at any one time. The one used depends on how you configure the FortiGuard Web Filter.
865
When a user visits a URL, the FortiGate unit queries the FortiGuard servers for the category of the URL. From highest to lowest, the relative priority of the quotas are: 1 Category 2 Category group So for example, the General Interest - Business category group contains the Information and Computer Security category. When a user visits a page in the Information and Computer Security category, the FortiGate unit will check for quotas in sequence: Is there is a quota set for the Information and Computer Security category? If there is, the category quota timer is started and the user is allowed access to the URL. If no time remains in the category quota, the URL is blocked and the user cannot access it for the remainder of the day. If no quota is set for the category, is there a quota set for the General Interest Business category group? If there is, the category group quota timer is started and the user is allowed access to the URL. If no time remains in the category group quota, the URL is blocked and the user cannot access it for the remainder of the day. If there is no category group quota, the user is allowed to access the URL. Getting to this point means there are no quotas set for the page. The FortiGate unit will stop any running quota timer because the current URL has no quota.
Only one quota timer can be running at any one time for a single user. Whenever a quota timer is started or a page is blocked, the timer running because of the previous URL access, is stopped. Similarly, a URL with no quotas will stop a quota timer still running because of the URL the user previously accessed.
Quota exempt
The quota checking sequence occurs for every URL the user accesses. This is true for every web page, and every element of the web page that is loaded. For example, if a user loads a web page, the quota is checked for the web page as soon as it is loaded. If there is a photo on the page, it is also checked and the quota is adjusted accordingly. This can cause unexpected behavior. For example, if the web page a user loads is in the Information and Computer Security category and it has a quota, the quota timer is started. The web page includes a number of graphics, so as these are loaded, each is checked and the appropriate quota is started. If they all share the same category rating, which they often will, there is no problem. However, if the last graphic or page element loaded comes from another site, the quota may not work as you expect. If the last graphic is an ad, loaded from a site categorized as Advertising, the Information and Computer Security category quota timer will stop almost as soon as it is started because the FortiGate unit sees the ad URL and finds that it belongs to the Advertising category. If Advertising has a quota, its timer will start. If it is blocked or allowed, the Information and Computer Security category quota timer is stopped and the user can view the page without using the quota set to limit the Information and Computer Security category. To solve this problem, you can configure a categories and category groups as exempt. This effectively allows the quota system to ignore it entirely. Any quota timer running when an exempt URL is encountered continues to run. An exempt category or category group, or classification can not have a quota. This may sound the same as simply disabling the quota and setting the FortiGuard Web Filter action to allow, but there is a difference. This difference is that the allow and block actions stop an already running quota timer, while the exempt action does not. The exempt action is generally used for commonly accessed web pages that load elements from other sites that have different category ratings. Pages that load ads from advertising sites are the most common example.
UTM Guide for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
866
To set a category or category group, see the CLI Reference for the exempt-quota webfilter command.
Strict Blocking
This setting determines when the FortiGate unit blocks a site. Enable strict blocking to deny access to a site if any category or classification assigned to the site is set to Block. Disable strict blocking to deny access to a site only if all categories and classifications assigned to the site are set to Block.
FortiOS Handbook v3: UTM Guide 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
867
All rated URLs are assigned one or more categories. URLs may also be assigned a classification. If Rate URLs by domain and IP address is enabled, the site URL and IP address each carry separately assigned categories and classifications. Depending on the FortiGuard rating and the FortiGate configuration, a site could be assigned to at least two categories and up to two classifications.
868
4 Optionally, you may enter a comment. 5 Select the most appropriate category and classification for the URL. 6 Select Submit to send your submission to the FortiGuard web filter team.
869
870
School district
Continuing with the example in the Web filter section, you can use FortiGuard Web Filter to protect students from inappropriate material. For the first part of this example, see Web filtering example on page 857. To enable FortiGuard Web Filter 1 Go to UTM Profiles > Web Filter > Profile. 2 Select the web filter profile named Students. 3 Enable HTTPS Scanning. 4 Select OK. The Students web filter profile has no FortiGuard Web Filtering filter. You must create and configure a filter to use FortiGuard Web Filter. To configure the sites to block 1 Go to UTM Profiles > Web Filter > Profile. 2 Select the web filter profile named Students. 3 In the FortiGuard Categories table, select these categories: Potentially Liable, Controversial, and Bandwidth Consuming. 4 Select Block from the Change Action for Selected Categories to drop-down list.
FortiOS Handbook v3: UTM Guide 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
871
5 Select Apply to save the web filter profile. The students will not be able to access any of the web sites in those three general categories or the categories within them.
872
DLP sensor
A DLP sensor is a package of filters. To use DLP, you must enable it in a security policy and select the DLP sensor to use. The traffic controlled by the security policy will be searched for the patterns defined in the filters contained in the DLP sensor. Matching traffic will be passed or blocked according to how you configured the filters.
DLP filter
Each DLP sensor has one or more filters configured within it. Filters can examine traffic for known files using DLP fingerprints, for files of a particular type or name, for files larger than a specified size, for data matching a specified regular expression, or for traffic matching an advanced rule or compound rule. You can configure the action taken when a match is detected. The actions include Log Only, Block, Exempt, and Quarantine User, IP address, or Interface. Logging is enabled by default, but you can also choose to archive matching traffic or generate an archive summary.
873
Fingerprint
Fingerprint scanning allows you to create a library of files for the FortiGate unit to examine. It will create checksum fingerprints so each file can be easily identified. Then, when files appear in network traffic, the FortiGate will generate a checksum fingerprint and compare it to those in the fingerprint database. A match triggers the configured action.
File filter
File filters use file filter lists to examine network traffic for files that match either file names or file types. For example, you can create a file filter list that will find files called secret.* and also all JPEG graphic files. You can create multiple file filter lists and use them in filters in multiple DLP sensors as required.
File size
This filter-type checks for files exceeding a configured size. All files larger than the specified size are subject to the configured action.
Regular expression
The FortiGate unit checks network traffic for the regular expression specified in a regular expression filter. Matching traffic is subject to the configured action.
Advanced rule
Each advanced rule includes a single condition and the type of traffic in which the condition is expected to appear. For more information about the supplied advanced rules, see Understanding the default advanced rules on page 881.
Compound rule
Compound rules combine multiple advanced rules and require that all the conditions in the included advanced rules are true before the compound rule is triggered. For more information about the supplied compound rules, see Understanding the default compound rules on page 883
874
875
Files in the network traffic are filtered by size. Enter a file size in kilobytes. Files larger than the specified size are treated according to the selected action. Network traffic is examined for the pattern described by the regular expression. Enter a regular expression. Traffic matching the regular expression is treated according to the selected action. For details about regular expression syntax, see Using wildcards and Perl regular expressions on page 948. Advanced rules detect a variety of data patterns in network traffic. Select an advanced rule. Traffic matching the selected advanced rule is treated according to the selected action. Compound rules detect a variety of data patterns in network traffic. Compound rules are made of multiple advanced rules and all of the conditions must match for the compound rule to take effect. Select a compound rule. Traffic matching the selected compound rule is treated according to the selected action.
Advanced Rule
876
6 Select the Action the FortiGate unit will take against network traffic matching the rule. A number of actions are available:
Log Only The FortiGate unit will take no action on network traffic matching a rule with this action. The filter match is logged, however. Other matching filters in the same sensor may still operate on matching traffic. Traffic matching a filter with the block action will not be delivered. The matching message or download is replaced with the data leak prevention replacement message. If the user is authenticated, this action blocks all traffic to or from the user using the protocol that triggered the rule and adds the user to the Banned User list. If the user is not authenticated, this action blocks all traffic of the protocol that triggered the rule from the users IP address. If the banned user is using HTTP, FTP, or NNTP (or HTTPS if the FortiGate unit supports SSL content scanning and inspection) the FortiGate unit displays the Banned by data leak prevention replacement message for the protocol. If the user is using IM, the IM and P2P Banned by data leak prevention message replaces the banned IM message and this message is forwarded to the recipient. If the user is using IMAP, POP3, or SMTP (or IMAPS, POP3S, SMTPS if your FortiGate unit supports SSL content scanning and inspection) the Mail Banned by data leak prevention message replaces the banned email message and this message is forwarded to the recipient. These replacement messages also replace all subsequent communication attempts until the user is removed from the banned user list. This action blocks access for any IP address that sends traffic matching a filter with this action. The IP address is added to the Banned User list. The FortiGate unit displays the NAC Quarantine DLP Message replacement message for all connection attempts from this IP address until the IP address is removed from the banned user list.
Block
Quarantine User
Quarantine IP Address
Quarantine Interface This action blocks access to the network for all users connecting to the interface that received traffic matching a filter with this action. The FortiGate unit displays the NAC Quarantine DLP Message replacement message for all connection attempts to the interface until the interface is removed from the banned user list. Exempt The exempt action prevents any filters from taking action on matching traffic. This action overrides the action assigned to any other matching filters.
Quarantine User, Quarantine IP, and Quarantine Interface provide functionality similar to NAC quarantine. However, these DLP actions block users and IP addresses at the application layer while NAC quarantine blocks IP addresses and interfaces at the network layer.
Caution: If you have configured DLP to block IP addresses and if the FortiGate unit receives sessions that have passed through a NAT device, all traffic from that NAT device not just traffic from individual users could be blocked. You can avoid this problem by implementing authentication.
Tip: To view or modify the replacement message text, go to System > Config > Replacement Message.
877
Do not archive network traffic matching the rule. Archive a summary of matching network traffic. For example, if applied to a rule governing email, the information archived includes the sender, recipient, message subject, message size, and other details. Archive the matching network traffic in addition to the summary information. For example, full archiving of email traffic includes the email messages and any attached files.
Full
Note: Archiving requires a FortiAnalyzer device or a subscription to the FortiGuard Analysis and Management Service.
8 Select OK. The filter is added to the sensor. You may select Create New to add more filters, if required.
Fingerprinted Documents
The FortiGate unit must have access to the documents for which it generates fingerprints. One method is to manually upload documents to be fingerprinted directly to the FortiGate unit. The other is to allow the FortiGate unit to access a network share that contains the documents to be fingerprinted. If only a few documents are to be fingerprinted, a manual upload may be the easiest solution. If many documents require fingerprinting, or if the fingerprinted documents are frequently revised, using a network share makes user access easier to manage. To configure manual document fingerprints 1 Go to UTM Profiles > Data Leak Prevention > Document Fingerprinting. 2 In the Manual Document Fingerprints section, select Create New. 3 Select the file to be fingerprinted. 4 Choose a security level.
878
5 If the file is an archive containing other files, select Process files inside archive if you also want the individual files inside the archive to have fingerprints generated in addition to the archive itself. 6 Select OK. The file is uploaded and a fingerprint generated. To configure a fingerprint document source 1 Go to UTM Profiles > Data Leak Prevention > Document Fingerprinting. 2 In the Document Sources section, select Create New. 3 Configure the settings:
Name Server Address User Name Password Path Filename Pattern Enter a descriptive name for the document source. Enter the IP address of the server. Enter the user name and password of the account the FortiGate unit uses to access the server network share. Enter the path to the document folder. You may enter a filename pattern to restrict fingerprinting to only those files that match the pattern. To fingerprint all files, enter an asterisk (*). Select a severity level. The severity is a tag for your reference that is included in the log files. It does not change how fingerprinting works. To have the files on the document source scanned on a regular basis, select this option. This is useful if files are added or changed regularly. Once selected, you can choose Daily, Weekly, or Monthly update options, and enter the time of day the files are fingerprinted. Expand the Advanced heading for additional options.
Severity Level
Scan Periodically
Advanced
Fingerprint files By default, only the files in the specified path are fingerprinted. in subdirectories Files in subdirectories are ignored. Select this option to fingerprint files in subdirectories of the specified path. Remove fingerprints for deleted files Keep previous fingerprints for modified files Select this option to retain the fingerprints of files deleted from the document source. If this option is disabled, fingerprints for deleted files will be removed when the document source is rescanned. Select this option to retain the fingerprints of previous revisions of updated files. If this option is disabled, fingerprints for previous version of files will be deleted when a new fingerprint is generated.
4 Select OK.
879
File filter
File filter
File filter is a DLP option that allows you to block files based on their file name or their type. File patterns are a means of filtering based purely on the names of files. They may include wildcards (*). For example, blocking *.scr will stop all files with an scr file extension, which is commonly used for Windows screen saver files. Files trying to pass themselves off as Windows screen saver files by adopting the file-naming convention will also be stopped. Files can specify the full or partial file name, the full or partial file extension, or any combination. File pattern entries are not case sensitive. For example, adding *.exe to the file pattern list also blocks any files ending with .EXE. Files are compared to the enabled file patterns from top to bottom, in list order. In addition to the built-in patterns, you can specify more file patterns to block. For details, see Creating a file filter list on page 880. File types are a means of filtering based on an examination of the file contents, regardless of the file name. If you block the file type Archive (zip), all zip archives are blocked even if they are renamed with a different file extension. The FortiGate examines the file contents to determine what type of file it is and then acts accordingly.
The FortiGate unit can take either of the following actions toward the files that match a configured file pattern or type: Block: the file is blocked and a replacement message is sent to the user. If both file pattern filtering and virus scan are enabled, the FortiGate unit blocks files that match the enabled file filter and does not scan these files for viruses. Allow: the file is allowed to pass.
The FortiGate unit also writes a message to the UTM log and sends an alert email message if configured to do so.
Note: File filter does not detect files within archives. You can use file filter to block or allow the archives themselves, but not the contents of the archives.
880
Advanced rules
4 Select OK. The new list is created and the edit file filter list window appears. The new list is empty. You need to populate it with one or more file patterns or file types.
Advanced rules
A number of advanced rules are provided with your FortiGate unit. If you require additional rules, you can create your own.
881
Advanced rules
Note: These rules affect only unencrypted traffic types. If you are using a FortiGate unit that can decrypt and examine encrypted traffic, you can enable those traffic types in these rules to extend their functionality if required.
Caution: Before using the rules, examine them closely to ensure you understand how they will affect the traffic on your network.
All-Email, All-FTP, These rules will detect all email, FTP, HTTP, instant messaging, and All-HTTP, All-IM, All-NNTP NNTP traffic. Email-AmEx, Email-Canada-SIN, Email-US-SSN, Email-Visa-Mastercard HTTP-AmEx, HTTP-Canada-SIN, HTTP-US-SSN, HTTP-Visa-Mastercard These four rules detect American Express numbers, Canadian Social Insurance Numbers, U.S. Social Security Numbers, or Visa and Mastercard numbers within the message bodies of SMTP, POP3, and IMAP email traffic. These four rules detect American Express numbers, Canadian Social Insurance Numbers, U.S. Social Security Numbers, or Visa and Mastercard numbers sent using the HTTP POST command. The HTTP POST command is used to send information to a web server. As written, these rules are designed to detect data the user is sending to web servers. This rule does not detect the data retrieved with the HTTP GET command, which is used to retrieve web pages. This rule detects files larger than 5MB attached to SMTP, POP3, and IMAP email messages. This rule detects files larger than 5MB sent using the FTP PUT command. Files received using FTP GET are not examined. This rule detects files larger than 5MB sent using the HTTP POST command. Files received using HTTP GET are not examined. These rules detect all traffic that is not generated by the WebEx web conference service. While not very useful on their own, these rules are used in the default compound rules.
882
Compound rules
Compound rules
A number of compound rules are provided with your FortiGate unit. If you require additional compound rules, you can create your own.
Caution: Before using the rules, examine them closely to ensure you understand how they will affect the traffic on your network.
Email-SIN
This rule combines the Email-Canada-SIN and Email-Not-Webex advanced rules. If you use the Webex web conferencing service, the Email-Canada-SIN advanced rule can be mistakenly triggered by Webex traffic. Combining the advanced rules in a compound rules ensures that the Email-Canada-SIN rule will be triggered only by nonWebex network traffic. This rule combines the HTTP-Canada-SIN and HTTP-Post-NotWebex advanced rules. If you use the Webex web conferencing service, the HTTP-Canada-SIN advanced rule can be mistakenly triggered by Webex traffic. Combining the advanced rules in a compound rules ensures that the HTTP-Canada-SIN rule will be triggered only by non-Webex network traffic.
HTTP-Post-SIN
883
DLP archiving
DLP archiving
DLP is typically used to prevent sensitive information from getting out of your company network, but it can also be used to record network use. This is called DLP archiving. The DLP engine examines email, FTP, IM, NNTP, and web traffic. Enabling archiving for rules when you add them to sensors directs the FortiGate unit to record all occurrences of these traffic types when they are detected by the sensor. Since the archive setting is configured for each rule in a sensor, you can have a single sensor that archives only the things you want. DLP archiving comes in two forms: Summary Only, and Full. Summary archiving records information about the supported traffic types. For example, when an email message is detected, the sender, recipient, message subject, and total size are recorded. When a user accesses the Web, every URL the user visits recorded. The result is a summary of all activity the sensor detected. For more detailed records, full archiving is necessary. When an email message is detected, the message itself, including any attachments, is archived. When a user accesses the Web, every page the user visits is archived. Far more detailed than a summary, full DLP archives require more storage space and processing. Because both types of DLP archiving require additional resources, DLP archives are saved to a FortiAnalyzer unit or the FortiGuard Analysis and Management Service (subscription required). Two sample DLP sensors are provided with DLP archiving capabilities enabled. If you select the Content_Summary sensor in a security policy, it will save a summary DLP archive of all traffic the security policy handles. Similarly, the Content_Archive sensor will save a full DLP archive of all traffic handled the security policy you apply it to. These two sensors are configured to detect all traffic of the supported types and archive them.
DLP examples
Blocking sensitive email messages
Someone in the Example.com corporation has been sending copies of the company presidents monthly update email messages to the press. These messages have included the full header. Rather than try to block them, the IT department at Example.com will find out who is sending the messages using DLP. All messages include the text From: president@example.com and Subject: XYZ Monthly Update where XYZ is the month the update applies to. You will create a rule for the email address and a rule for the subject, combine them in a compound rule, and add the compound rule to a DLP sensor. You will then add the DLP sensor to the security policy that controls outgoing email traffic. To create the address rule config dlp rule edit "President address" set description "Finds president@example.com in email" set protocol email set sub-protocol imap pop3 smtp set field body set regexp-wildcard enable set regexp president@example.com
UTM Guide for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
884
DLP examples
end To create the subject rule config dlp rule edit "President subject" set description "Finds XYZ Monthly Update in email subject" set protocol email set sub-protocol imap pop3 smtp set field subject set regexp-wildcard enable set regexp "* Monthly Update" end The asterisk (*) can represent any characters so the rule will match any monthly update. Adding these two rules to a DLP sensor may generate a large number of false positives because any rule in a sensor will trigger the action. If the action were to log messages matching the address and subject rules in this example, then left as individual rules, the DLP sensor would log Monthly Updates from any employee and log all the presidents email messages. In this case, you only want to know when both rules are true for a single message. To do this, you must first add the rules to a compound rule. To create the president + subject compound rule. config dlp compound edit "President + Subject" set protocol email set sub-protocol imap pop3 smtp set member "President address" set member "President subject" end To create the president DLP sensor 1 Go to UTM Profiles > Data Leak Prevention > Sensor. 2 Select the Create New icon on the Edit DLP Sensor window title bar. 3 In the Name field, enter president. 4 In the Comments field, enter Finds president@example.com and XYZ Monthly Update in email. 5 Select OK to save the new sensor. 6 Select Create New to add a rule to the sensor. 7 Enter President + Subject for the Filter Name. 8 Set Filter By to Compound Rule. 9 Set Advanced Rule to President + Subject. 10 Set Archive to Full. 11 Select OK. With the DLP sensor ready for use, you need to select it in the security policy. To select the DLP sensor in the security policy 1 Go to Policy > Policy > Policy. 2 Select the security policy that controls outgoing email traffic. 3 Select the Edit icon.
FortiOS Handbook v3: UTM Guide 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
885
DLP examples
4 Enable UTM. 5 Select the Enable DLP Sensor option. 6 Select the president sensor from the list. 7 Select OK to save the security policy. With the DLP sensor specified in the correct security policy, any email message with both president@example.com and Monthly Update in the subject will trigger the sensor and the email message will be archived.
886
Application control
Using the application control UTM feature, your FortiGate unit can detect and take action against network traffic depending on the application generating the traffic. Based on FortiGate Intrusion Protection protocol decoders, application control is a user-friendly and powerful way to use Intrusion Protection features to log and manage the behavior of application traffic passing through the FortiGate unit. Application control uses IPS protocol decoders that can analyze network traffic to detect application traffic even if the traffic uses non-standard ports or protocols. The FortiGate unit can recognize the network traffic generated by a large number of applications. You can create application control sensors that specify the action to take with the traffic of the applications you need to manage and the network on which they are active, and then add application control sensors to the firewall policies that control the network traffic you need to monitor. This section describes how to configure the application control settings. If you enable virtual domains (VDOMs) on the Fortinet unit, you need to configure application control separately for each virtual domain. The following topics are included in this section: Application control concepts Enable application control Application traffic shaping Application control monitor Application control packet logging Application considerations Application control examples
887
Application control
To see the complete list of applications supported by FortiGuard Application Control go to the FortiGuard Application Control List. This web page lists all of the supported applications. You can select any application name to see details about the application.
To add an application entry to an application sensor 1 Go to UTM Profiles > Application Control > Application Sensor. 2 Select an application sensor from the drop-down list in the Edit Application Sensor window title bar. 3 Select the Create New drop-down icon in the sensor and choose Entry.
888
Application control
4 Using the Category selection, choose the type of application you want to add. For example, if you want to add Facebook chat, choose im. The Category selection displays only the options available in the Application you select. If you want to see all the applications listed, leave Category set to All Categories. 5 Using the Application selection, choose the application you want to add. The applications available to you will be limited to those in the category you select. 6 Select the Action the FortiGate unit will take when it detects network traffic from the application: Block will stop all traffic from the application and log all occurrences. Monitor allows the application traffic to flow normally and log all occurrences. If you set the action to Monitor, you have the option of enabling traffic shaping for the application or applications specified in this application list entry. For more information about application control traffic shaping, see Application traffic shaping on page 892 7 Enable Session TTL to specify a time-to-live value for the session, in seconds. If this option is not enabled, the TTL defaults to the setting of the CLI command config system session-ttl. 8 Select Enable Packet Log to have the FortiGate unit save the packets that application control used to determine the traffic came from the application. 9 Some applications have additional options:
IM Options (for some IM applications) Block Login Block File Transfers Block Audio Inspect Non-standard Port Select to prevent users from logging in to the selected IM system. Select to prevent the sending and receiving of files using the selected IM system. Select to prevent audio communication using the selected IM system. Select to allow the FortiGate unit to examine nonstandard ports for the IM client traffic.
Display DLP meta-information on Select to include meta-information detected for the IM system on the FortiGate unit dashboard. the system dashboard Other Options Command Some traffic types include a command option. These include FTP.Command, NNTP.Command, POP3.Command, and SMTP.Command. Specify a command that appears in the traffic that you want to block or pass. For example, enter GET as a command in the FTP.Command application to have the FortiGate unit examine FTP traffic for the GET command. Multiple commands can be entered. A method option is available for HTTP, RTSP, and SIP protocols. Specify a method that appears in the traffic that you want to block or pass. For example, enter POST as a method in the HTTP.Method application to have the FortiGate unit examine HTTP traffic for the POST method. Multiple methods can be entered.
Method
889
Application control
Program Number
Enter the program number appearing in Sun Remote Procedure Calls (RPC) that you want to block or pass. Multiple program numbers can be entered. Enter the UUID appearing in Microsoft Remote Procedure Calls (MSRPC) that you want to block or pass. Multiple UUIDs can be entered.
UUID
To add an application filter to an application sensor 1 Go to UTM Profiles > Application Control > Application Sensor. 2 Select an application sensor from the drop-down list in the Edit Application Sensor window title bar. 3 Select the Create New drop-down icon in the sensor and choose Filter. 4 Configure the filter that you require. Applications matching all of the characteristics you specify in the filter will be included in the filter.
Category Select Specify and choose an application category to include in the filter. All applications within the category will be included. Some categories have one or more subcategories to allow you to narrow the included applications. For example, selecting IM will include all of the instant messaging applications, but the VoIP subcategory will restrict the applications to only those related to VoIP. If you select All, the category attribute will not be used to determine which signatures are included in the filter. Select Specify and choose a vendor to include all of that vendors applications in the filter. If you select All, the vendor attribute will not be used to determine which signatures are included in the filter. Select Specify and choose the type of application behavior to include. For example, selecting Encrypted-Tunneling will include all applications providing or related to encrypted tunneling. If you select All, the behavior attribute will not be used to determine which signatures are included in the filter. Select Specify and choose the technology of the applications to include. Options include web-browser, peer-to-peer, client, and server. If you select All, the technology attribute will not be used to determine which signatures are included in the filter. Select Specify and choose the network protocols the applications use. If you select All, the Protocol attribute will not be used to determine which signatures are included in the filter. Tags are a means by which you can apply customized labels to your application filters. Specified tags are displayed only within the filter itself on the Edit Application Filter page. By default, the tag feature is disabled on all but the largest FortiGate models. If the Tags option is not visible, you must go to System > Admin > Settings and enable Display Object Tagging and Coloring to enable it. For more information about tags, see Tag management on page 539. Applied Tags Add tags View Matched rules Displays the tags that you have applied to the filter. Enter a tag and then select the plus (+) icon to add the tag to the filter. This also adds the tag to the Applied tags list. Select view a list of all the applications included in the filter with the current settings.
Vendor
Behavior
Technology
Protocol
Tags
890
Application control
Action
Select the Action the FortiGate unit takes when it detects network traffic from the application: Block will stop all traffic from the application and log all occurrences. Monitor allows the application traffic to flow normally and log all occurrences. Reset will reset the network session the application is using. If you set the action to Monitor, you have the option of enabling traffic shaping for the application or applications specified in this application list entry. For more information about application control traffic shaping, see Application traffic shaping on page 892. Enable Session TTL to specify a time-to-live value for the session, in seconds. If this option is not enabled, the TTL defaults to the setting of the CLI command config system session-ttl. Select to enable packet logging for the filter. When you enable packet logging on a filter, the unit saves a copy of the packets that match any signatures included in the filter. The packets can be analyzed later. For more information about packet filtering, see Viewing and saving logged packets on page 946
Session TTL
Packet Logging
5 Select OK. The filter is created and added to the filter list.
monitor-all
This sensor allows all application traffic and enables the application control monitoring for all traffic.
Searching manually
Applications are displayed in a paged list, with 50 applications per page. The bottom of the screen shows the current page and the total number of pages. You can enter a page number and press enter, to skip directly to that page. Previous Page and Next Page buttons move you through the list, one page at a time. The First Page and Last Page button take you to the beginning or end of the list.
891
Application control
3 Select Add New Filter. 4 Select column by which to filter. 5 Select the item or items by which to filter. 6 Continue to add more filters to narrow your search, if required. 7 Select OK. The options available to you will vary by column. For example, Category allows you to choose one option from a list, while Behavior allows you to select multiple items. Filtering by name allows you to enter a text string and all application names containing the string will be displayed.
892
Application control
Shaper re-use
Shapers are created independently of firewall policies and application sensors so you are free to reuse the same shapers in multiple list entries and policies. Shared shapers can be configured to apply separately to each security policy or across all policies. This means that if a shaper is configured to guaranteed 1000 KB/s bandwidth, each security policy using the shaper will have its own 1000 KB/s reserved, or all of the policies using the shaper will share a pool if 1000 KB/s, depending on how it is configured. The same thing happens when a shaper is used in application sensors. If an application sensor using a shaper is applied to two separate policies, how the bandwidth is limited or guaranteed depends on whether the shaper is set to apply separately to each policy or across all policies. In fact, if a shaper is applied directly to one security policy, and it is also included in an application sensor that is applied to another security policy, the same issue occurs. How the bandwidth is limited or guaranteed depends on the shaper configuration. If a shaper is used more than once within a single application sensor, all of the applications using the shaper are restricted to the maximum bandwidth or share the same guaranteed bandwidth. For example, you want to limit the bandwidth used by Skype and Facebook chat to no more than 100 KB/s. Create a shaper, enable Maximum Bandwidth, and enter 100. Then create an application sensor with an entry for Skype and another entry for Facebook chat. Apply the shaper to each entry and select the application sensor in the security policy that allows your users to access both services. This configuration uses the same shaper for each entry, so Skype and Facebook chat traffic are limited to no more than 100 KB/s in total. That is, traffic from both applications is added and the total is limited to 100 KB/s. If you want to limit Skype traffic to 100 KB/s and Facebook chat traffic to 100 KB/s, you must use separate shapers for each application control entry.
893
Application control
894
Application control
To display the application monitor charts 1 Go to Log&Report > Report Access > Executive Summary. 2 Select Add Widget. 3 Select the chart you want from the Widgets list. The three application monitor charts correspond to the three chart selections in the security policy. They are listed in the list as: top10-application-bw-X-0 top10-media-user-X-0 top10-p2p-user-bw-X-0 If you have application monitor enabled in multiple firewall policies, one chart of each type per policy will be available for you to choose. The X in the chart name is the security policy number. 4 Select a Daily or Weekly schedule. The chart will display the data collected from only the current day or current week, depending on the setting. The chart will be reset daily on the hour specified, or weekly on the hour and day specified. 5 Select OK.
To enable application control packet logging 1 Create an entry in an application sensor. For more information, see Adding applications to an application sensor on page 888. 2 Before saving the entry, select Packet Log. 3 Select the application sensor in the security policy that allows the network traffic the FortiGate unit will examine for the application or applications. For information on viewing and saving logged packets, see Viewing and saving logged packets on page 946.
895
Application considerations
Application control
Application considerations
Some applications behave differently from most others. You should be aware of these differences before using application control to regulate their use.
IM applications
Application control regulates most instant messaging applications by preventing or allowing user access to the service. Selecting Block Login will not disconnect users who are logged in when the change is made. Once users log out, however, they will not be able to log in again.
Skype
Based on the NAT firewall type, Skype takes advantage of several NAT firewall traversal methods, such as STUN (Simple Traversal of UDP through NAT), ICE (Interactive Connectivity Establishment) and TURN (Traversal Using Relay NAT), to make the connection. The Skype client may try to log in with either UDP or TCP, on different ports, especially well-known service ports, such as HTTP (80) and HTTPS (443), because these ports are normally allowed in firewall settings. A client who has previously logged in successfully could start with the known good approach, then fall back on another approach if the known one fails. The Skype client could also employ Connection Relay. This means if a reachable host is already connected to the Skype network, other clients can connect through this host. This makes any connected host not only a client but also a relay server.
896
Application control
To enable application control and select the application sensor 1 Go to Policy > Policy > Policy. 2 Select the security policy that allows the network users to access the Internet and choose Edit. 3 Enable UTM. 4 Select Enable Application Control. 5 Select the no IM application sensor. 6 Select OK. No IM use will be allowed by the security policy. If other firewall policies handle traffic that users could use for IM, enable application control with the no IM application sensor for those as well.
897
Application control
To create an application sensor CLI config application list edit Updates_Only config entries edit 1 set category 17 set action pass end set other-application-action block set unknown-application-action block end
898
DoS policy
Denial of Service (DoS) policies are primarily used to apply DoS sensors to network traffic based on the FortiGate interface it is entering as well as the source and destination addresses. DoS sensors are a traffic anomaly detection feature to identify network traffic that does not fit known or common traffic patterns and behavior. A common example of anomalous traffic is the denial of service attack. A denial of service occurs when an attacking system starts an abnormally large number of sessions with a target system. The large number of sessions slows down or disables the target system, so that legitimate users can no longer use it. This section describes how to create and configure DoS sensors and policies to protect the publicly accessible servers on your network. The following topics are included in this section: DoS policy concepts Enable DoS DoS example
Enable DoS
A DoS policy examines network traffic arriving at an interface for anomalous patterns usually indicating an attack. Enable DoS sensors to protect your FortiGate unit from attack. To apply a DoS policy, you must follow the steps below in sequence: 1 Create a DoS sensor. 2 Create a DoS policy 3 Apply the DoS sensor to the DoS policy.
899
Enable DoS
DoS policy
Note: It is important to know normal and expected network traffic before changing the default anomaly thresholds. Setting the thresholds too low could cause false positives, and setting the thresholds too high could allow otherwise avoidable attacks.
To create a DoS sensor 1 Go to UTM Profiles > Intrusion Protection > DoS Sensor. 2 Select Create New. 3 In the Name field, enter the name of the DoS sensor. 4 Optionally, enter a description of the DoS sensor in the Comment field. 5 Select OK. The DoS sensor is created and the sensor configuration window appears. However, a newly created DoS sensor contains default values which may not be appropriate for your network. You can adjust these values by configuring the DoS sensor thresholds. To configure a DoS sensor 1 Go to UTM Profiles > Intrusion Protection > DoS Sensor. 2 Select the DoS sensor you want to configure and choose Edit. 3 The DoS sensor configuration window appears. The Anomalies Configuration table lists 12 types of network anomalies.
Anomaly tcp_syn_flood Description If the SYN packet rate of new TCP connections, including retransmission, to one destination IP address exceeds the configured threshold value, the action is executed. The threshold is expressed in packets per second. If the SYN packet rate of new TCP connections, including retransmission, from one source IP address exceeds the configured threshold value, the action is executed. The threshold is expressed in packets per second. If the number of concurrent TCP connections from one source IP address exceeds the configured threshold value, the action is executed. If the number of concurrent TCP connections to one destination IP address exceeds the configured threshold value, the action is executed. If the UDP traffic to one destination IP address exceeds the configured threshold value, the action is executed. The threshold is expressed in packets per second. If the number of UDP sessions originating from one source IP address exceeds the configured threshold value, the action is executed. The threshold is expressed in packets per second. If the number of concurrent UDP connections from one source IP address exceeds the configured threshold value, the action is executed. If the number of concurrent UDP connections to one destination IP address exceeds the configured threshold value, the action is executed. If the number of ICMP packets sent to one destination IP address exceeds the configured threshold value, the action is executed. The threshold is expressed in packets per second. If the number of ICMP packets originating from one source IP address exceeds the configured threshold value, the action is executed. The threshold is expressed in packets per second.
tcp_port_scan
udp_scan
icmp_sweep
900
DoS policy
Enable DoS
icmp_src_session icmp_dst_session
If the number of concurrent ICMP connections from one source IP address exceeds the configured threshold value, the action is executed. If the number of concurrent ICMP connections to one destination IP address exceeds the configured threshold value, the action is executed.
4 Select Enable to have the FortiGate unit examine traffic for the anomaly. 5 Select Logging to create an entry in the attack log if the anomaly is detected. 6 Select an Action for the anomaly. By default, the action is Pass, which allows the traffic containing the anomaly to pass uninterrupted. If set to Block, the anomalous traffic is blocked and will not flow through the FortiGate unit. With a Fortinet security processing module installed, FortiGate units that support these modules offer a third action for the tcp_syn_flood threshold. In addition to Block and Pass, you can choose to Proxy connect attempts when their volume exceeds the threshold value. When the tcp_syn_flood threshold action is set to Proxy, incomplete TCP connections are allowed as normal as long as the configured threshold is not exceeded. If the threshold is exceeded, the FortiGate unit will intercept incoming SYN packets with a hardware accelerated SYN proxy to determine whether the connection attempts are legitimate or a SYN flood attack. Legitimate connections are allowed while an attack is blocked.
Note: Because DoS sensors are configured before being applied to an interface, you can assign a DoS sensor with the Proxy action to an interface that does not have hardware SYN proxy support. In this circumstance, the Proxy action is invalid and a Pass action will be applied.
7 Set the Threshold value for the anomaly. See the table in step 3 for details about the threshold values for each anomaly. 8 Select OK.
901
DoS example
DoS policy
The CLI command for configuring DoS policies is config firewall interface-policy. The following command syntax shows how to add an example IPS sensor called all_default_pass to a DoS policy with policy ID 5 that was previously added from the web-based manager. config firewall interface-policy edit 5 set ips-sensor-status enable set ips-sensor all_default_pass end
DoS example
The Example.com corporation installed a web server and connected it to Port5 on its FortiGate unit. To protect against denial of service attacks, you will configure and apply a DoS sensor to protect the web server. To create the DoS sensor 1 Go to UTM Profiles > Intrusion Protection > DoS Sensor. 2 Select Create New. 3 Enter Web Server in the Name field. 4 In the Anomalies Configuration table, select the Enable check box in the table heading. This enables all the anomalies with a single selection. 5 Select OK to save the new DoS policy. As suggested in Defending against DoS attacks on page 775, the IT administrators will run the DoS policy with logging enabled and the anomaly actions set to Pass until they determine the correct threshold values for each anomaly. To create a DoS policy 1 Go to Policy > Policy > DoS Policy. 2 Select Create New. 3 In the Source Interface/Zone field, select Port1 which is the interface connected to the Internet. 4 In the Source Address field, select all.
902
DoS policy
DoS example
5 In the Destination Address field, select all. If there were more than one publicly accessible server connected to the FortiGate unit, you would specify the address of the web server in this field. 6 In the Service field, select ANY. 7 Select the DoS Sensor check box and choose Web Server from the list. 8 Select OK to save the DoS policy. The DoS policy will monitor all network traffic entering Port1 and log the violations if the thresholds in the Web Server DoS sensor are exceeded.
903
DoS example
DoS policy
904
Non-compliant endpoints can be either warned or blocked. Of the features listed above, enforcement of FortiClient licensing and FortiClient web content filtering can be configured only through the CLI using the config endpointcontrol profile command. Endpoint Control settings are grouped into one or more Endpoint Control profiles. You enable Endpoint Security in firewall policies and select an Endpoint Control profile.
User experience
Endpoint Control applies to users attempting to make a connection that is controlled by a firewall policy with Endpoint Security enabled. The user of a non-compliant endpoint using a web browser receives a replacement message HTML page from the FortiGate unit. The message explains the non-compliance. Depending on the endpoint profile, the user may be allowed to continue or id blocked from further access. For information about modifying these replacement pages, see Modifying Endpoint Security replacement pages on page 917.
905
If there is a FortiClient installer available for the users endpoint computer, a link is provided to download the installer from the location defined in UTM Profiles > Endpoint Control > Client Installers. If there is no installer available, the user is asked to contact the network administrator. If the action on the FortiClient application detection entry is Warn, there is a link at the bottom of the page to enable the user to continue to the requested web site without installing FortiClient Endpoint Security. Otherwise, the same message will be displayed for every connection attempt where Endpoint Security is in effect until the user installs FortiClient Endpoint Security.
The user needs to resolve the listed issues and retry the connection.
906
Configuration overview
Endpoint Control requires that all hosts using the firewall policy have the FortiClient Endpoint Security application installed. Make sure that all hosts affected by this policy are able to install this application. Currently, FortiClient Endpoint Security is available for Microsoft Windows (2000 and later) only. To set up Endpoint Control, you need to Enable Central Management by the FortiGuard Analysis & Management Service if you will use FortiGuard Services to update the FortiClient application or antivirus signatures. You do not need to enter account information. See Centralized Management in the System Administration chapter of this Handbook. Configure the minimum required version of FortiClient and the location from which noncompliant endpoints can download the FortiClient installer. See Configuring FortiClient required version and download location on page 907. Create an endpoint control profile or use a predefined profile. See About predefined profiles on page 910. If needed, modify the profiles predefined FortiClient application detection rules. You can select the action to take on endpoints that do not have FortiClient Endpoint Security and you can set conditions and actions regarding FortiClient features. Configure application detection rules for other applications that are required, allowed, or not allowed on endpoints. See About application detection and control on page 909. Enable Endpoint Security in firewall policies, selecting the appropriate Endpoint Control profile.
Note: You cannot enable Endpoint in firewall policies if Redirect HTTP Challenge to a Secure Channel (HTTPS) is enabled in User > User > Authentication.
Optionally, modify the inactivity timeout for endpoints. The default is 5 minutes. After that time period, the FortiGate unit rechecks the endpoint for Endpoint compliance. To change the timeout, adjust the compliance-timeout value in the config endpoint-control settings CLI command. Optionally, modify the Endpoint NAC Download Portal and the Endpoint NAC Recommendation Portal replacement messages.
907
2 Do one of the following: Select FortiGuard Distribution Network. FortiGuard must be configured on the FortiGate unit. Select This FortiGate. Users can download a FortiClient installer file from this FortiGate unit. This option is available only on FortiGate models that support upload of FortiClient installer files. Select Custom URL. Enter the URL from which users can download the FortiClient installer.
Note: Select This FortiGate or Custom URL if you want to provide a customized FortiClient application. This is required if a FortiManager unit will centrally manage FortiClient applications. For information about customizing the FortiClient application, see the FortiClient Administration Guide.
3 Optionally, select Enforce Minimum Version and select the minimum acceptable version number or Latest Available for the FortiClient Endpoint Security application. The list contains the FortiClient versions available from the selected FortiClient Installer Download Location. Fortinet recommends that administrators wait for a reasonable period of time after deploying a FortiClient version update before updating the minimum version required to the most recent version. This gives users some time to install the update. Configuring FortiClient requirement and download location - CLI In this example, users are required to have FortiClient version 4.1.3 or later. FortiGuard provides the FortiClient installer. config endpoint-control settings set enforce minimum-version enable set version-check minimum set version 4.1.3 set download-location fortiguard end
908
909
910
To set the action for endpoints not running FortiClient - CLI In this example, endpoints that do not have FortiClient Endpoint Security installed will be blocked. The other options for recommendation-disclaimer are enable to warn the endpoint and skip to simply monitor the endpoint. config endpoint-control profile edit profile1 set recommendation-disclaimer disable end To require endpoints to use FortiClient antivirus protection - web-based manager 1 Go to UTM Profiles > Endpoint Control > Profile and open the profile for editing. 2 Edit the FortiClient AV application detection entry. 3 In Condition, select Not Running to enforce use the antivirus feature, To also require use of an up-to-date AV database, select Not Running or Up-to-date. 4 In Action, select Block. 5 Select OK. To require endpoints to use FortiClient antivirus protection - CLI In this example, endpoint control is configured to require that FortiClient AV is enabled and its database is up-to-date. config endpoint-control profile edit profile1 set feature-enforcement enable set require-av enable set require-av-uptodate enable end To require endpoints to use FortiClient firewall protection - web-based manager 1 Go to UTM Profiles > Endpoint Control > Profile and open the profile for editing. 2 Edit the FortiClient Firewall application detection entry. 3 In Action, select Block. 4 Select OK. To require endpoints to use FortiClient firewall protection - CLI config endpoint-control profile edit profile1 set feature-enforcement enable set require-firewall enable end To require endpoints to use FortiClient web filtering This is a CLI-only configuration. In the following example, profile1 is configured to require endpoints to use web filtering. config endpoint-control profile edit profile1 set feature-enforcement enable set require-webfilter enable end
911
To require endpoints to use a licensed FortiClient application This is a CLI-only configuration. In the following example, profile1 is configured to require endpoints to use a licensed copy of FortiClient Endpoint Security. config endpoint-control profile edit profile1 set feature-enforcement enable set require-license enable end Optionally, you can set require-license to warn to warn rather than block users of unlicensed FortiClient software.
912
Application detection rule Application is allowed Application must be installed and running Application must be installed Application must not be running Application must not be installed Monitor endpoint with this application running Monitor endpoint with this application installed
Action Allow Block or Warn Block or Warn Block or Warn Block or Warn Monitor Monitor
Condition N/A Not Running Not Installed Running Installed Running Installed
The Warn option permits users to connect after viewing a warning. 5 Select OK. 6 To create additional application detection entries, repeat steps 1 through 5. To create an application detection list - CLI This example creates an application sensor that denies access to endpoints with peer-topeer file sharing applications installed. All other applications are allowed. config endpoint-control app-detect rule-list edit "applist1" config entries edit 1 set application 0 set category 15 set vendor 0 set status installed set action deny end set other-application-action allow end config endpoint-control profile edit profile1 set application-detection enable set application-detection-rule-list profile1.list end
913
The list contains the following information. You can select the name of any column to sort the data by that field. You can also create filters on each column.
Application Database page Lists all the applications that are provided by FortiGuard Services Column Settings Filter Settings Category Name Vendor Select the columns to display in the list. You can also determine the order in which they appear. Set and clear column display filters. The type of application. Example: Document Viewers The name of the application. The vendor that the application is associated with. For example, the Adobe Reader is associated with the vendor, Adobe Systems Incorporated. Unique application ID. Another categorization of the applications. Groups are not used in application sensor rules. Shows the current page number in the list. Select the left and right arrows to display the first, previous, next or last page of known endpoints. The total number of application signatures currently in the database.
914
3 Select OK. To configure the firewall policy - CLI In this example, the LAN connects to Port 2 and the Internet is connected to Port 1. An Endpoint Control profile is applied. config firewall policy edit 0 set srcintf port2 set dstintf port1 set srcaddr LANusers set dstaddr all set action accept set schedule "always" set service "ANY" set nat enable set endpoint-check enable set endpoint-profile "our_profile" end
915
Monitoring endpoints
Monitoring endpoints
You can view statistical information about the endpoints that were subject to endpoint control. Data is gathered every 15 minutes and the display statistics are for the past 24 hours.
Endpoint status
Endpoint Status displays a pie chart showing the proportions of the endpoint population that: do not have FortiClient Endpoint Security installed have FortiClient Endpoint Security installed, but do not completely comply with the endpoint profile are fully compliant with the endpoint security profile.
To view this display, go to UTM Profiles > Monitor > Endpoint Monitor and in Report by select Status. You can click on the chart for a detailed list of endpoints.
Figure 97: Endpoint Monitor detailed endpoints list
Endpoint Traffic
Endpoint Traffic displays a bar chart of the top ten endpoints by traffic volume. The counts include all endpoints with FortiClient Endpoint Security installed that are subject to endpoint control. You can select any of the chart bars to see a list of the top ten applications on that endpoint by traffic volume. To view this display, go to UTM Profiles > Monitor > Endpoint Monitor and in Report by select Traffic.
916
To modify endpoint security replacement messages - web-based manager 1 Go to UTM Profiles > Endpoint Control > Profile and open the profile for editing. 2 Select Customize Endpoint Messages and then select the Edit icon. The Edit Message window opens. 3 In the Message box, select the message that you want to modify. 4 In the Message HTML box, modify the message HTML code. 5 Select OK. 6 Select OK to save the changes to the profile.
917
Example
Example
The Example company has the following requirements for employee computers: must run FortiClient Endpoint Security version 4.1.3 with firewall enabled must have OpenOffice installed cannot have any peer-to-peer file sharing applications installed must not have any games running all other applications are allowed
918
Example
To configure the FortiClient Firewall application detection entry 1 Go to UTM Profiles > Endpoint Control > Profile and open your profile for editing. 2 Open the FortiClient Firewall entry for editing. 3 In Action, select Block. 4 Select OK. 5 Select OK to save the change to your profile. To configure the FortiClient Firewall application detection entry - CLI config endpoint-control profile edit profile1 set feature-enforcement enable set require-firewall enable end
3 Select Create New, enter the following information, and then select OK: This creates a rule denying users with P2P applications installed.
Category Application Action Status P2P File Sharing All Block Installed
4 Select Create New, enter the following information, and then select OK: This creates a rule denying users with games applications running.
Category Application Action Status Games All Block Running
5 Select the last application detection list entry, All, and edit it. In Action select Allow. 6 Select OK.
919
Example
7 Select OK to save the changes to your profile. To configure the application detection list and endpoint control profile - CLI By convention, the application detection entries In the CLI are contained in a rule list prefixed with the profile name. For example, the rule list for profile1 is profile1.list. The three application detection entries are entered in the same order as for the webbased manager, above. To find codes, use the ?. For example, set vendor ? lists the vendor codes. config endpoint-control app-detect rule-list edit profile1.list config entries edit 1 set application 77 set category 31 set status not-installed set action deny next edit 2 set category 15 set status installed set action deny next edit 3 set category 20 set status running set action deny end set other-application-action allow end config endpoint-control profile edit "our_profile" set application-detection enable set application-detection-rule-list profile1.list end
920
Example
Enable NAT Select the Endpoint Control profile that you configured earlier.
To configure the firewall policy - CLI In this example, the LAN connects to Port 2 and the Internet is connected to Port 1. config firewall policy edit 0 set srcintf port2 set dstintf port1 set srcaddr LANusers set dstaddr all set action accept set schedule "always" set service "ANY" set nat enable set endpoint-check enable set endpoint-profile profile1 end
921
Example
922
Vulnerability Scan
The Network Vulnerability Scan helps you to protect your network assets (servers and workstations) by scanning them for security weaknesses. You can scan on-demand or on a scheduled basis. Results are viewable on the FortiGate unit, but results are also sent to an attached FortiAnalyzer unit. The FortiAnalyzer unit can collect the results of vulnerability scans from multiple FortiGate units at different locations on your network, compiling a comprehensive report about network security. This section describes how to configure a single FortiGate unit for network scanning and how to view the results of the scan.
Note: Some of the web-based manager configuration described in this document is not available in the initial release of FortiOS v4.0 MR2. Use the CLI commands instead.
The following topics are included in this section: Overview Selecting assets to scan Configuring scans Viewing scan results
Overview
Network vulnerability scanning has three main parts: Select the assets to scan Schedule scans or initiate them manually View the scan results
Discovering assets
The simplest way to build the Asset list is to perform a discovery scan on the range of IP addresses where your network assets are installed. To discover assets - web-based manager 1 Go to UTM Profiles > Vulnerability Scan > Asset Definition and select Create New.
923
Vulnerability Scan
2 Enter a Name for this scan. 3 In Type, select Range and then enter the IP address Range to scan. 4 Select OK. This creates an entry in the Asset list. 5 Select the asset list entry that you just created and then select Discover Assets. Above the table header, on the top right, the status of the current scan is shown. Depending on the number of computers to be discovered, the scan can take several minutes, until the web-based manager reports Scan completed. The number of assets discovered is listed to the left of the Discover Assets button. 6 Select Assets Found and then select Import. The discovered assets are added to the Asset list. By default, all are enabled for scanning. 7 Unless you want to discover assets on every scan, clear the Enable check box for this Asset discovery only asset. You might want to add authentication credentials to some of your assets. To edit an entry in the Asset list, select its check box (at the left side of the list) and then select Edit. For more information about individual asset settings, see Adding assets manually, below. To discover assets - CLI This example discovers assets in the range 10.11.101.10 to 10.11.101.200. 1 First configure the asset range to scan: config netscan assets edit 0 set name "office_discovery" set addr-type range set start-ip 10.11.101.10 set end-ip 10.11.101.200 set mode discovery set status enable end 2 Execute the discovery scan: execute netscan start discover 3 Check the status of the discovery scan: execute netscan status Repeat periodically until status is scan complete. 4 Optionally, view a list of the discovered assets: execute netscan list 5 Add the discovered assets to the asset list: execute netscan import
924
Vulnerability Scan
If you create an asset with an IP address range, any authentication credentials you enter will apply to all devices in the range. If this is not appropriate, you need to create individual entries for each computer instead. To add an asset - web-based manager 1 Go to UTM Profiles > Vulnerability Scan > Asset Definition and select Create New. 2 Enter the following information and select OK:
Name Type IP Address Range Scan Type Enter a name for this asset. Select Host to configure a single IP address. Select Range to configure a range of IP addresses to scan. Enter the IP address of the asset. (Type is Host.) Enter the start and end of the IP address range. (Type is Range.) Select Vulnerability Scan.
Windows Authentication Select to use authentication on a Windows operating system. Enter the username and password in the fields provided. For more information, see Requirements for authenticated scanning on page 926. Unix Authentication Select to use authentication on a Unix operating system. Enter the username and password in the fields provided. For more information, see Requirements for authenticated scanning on page 926.
To add an asset - CLI This example adds a single computer to the Asset list: config netscan assets edit 0 set name "server1" set addr-type ip set start-ip 10.11.101.20 set mode scan set auth-windows enable set win-username admin set win-password zxcvbnm set status enable end This example adds an address range to the Asset list. Authentication is not used: config netscan assets edit 0 set name "fileservers" set addr-type range set start-ip 10.11.101.160 set end-ip 10.11.101.170 set mode scan set status enable end
925
Vulnerability Scan
or
Setting Windows Firewall: Protect all network connections Windows Firewall: Allow remote administration exception Allow unsolicited messages from
1
Windows Firewall: Allow file and printer sharing exception Allow unsolicited messages from1
926
Vulnerability Scan
Configuring scans
Enabled *
prompts you for a range of IP addresses. Enter either * or the IP address of the Fortinet appliance that is performing the vulnerability scan.
Unix hosts
The user account provided for authentication must be able at a minimum to execute these commands: The account must be able to execute "uname" in order to detect the platform for packages. If the target is running Red Hat, the account must be able to read /etc/redhat-release and execute "rpm". If the target is running Debian, the account must be able to read /etc/debian-version and execute "dpkg".
Configuring scans
You can configure regular network scans on a daily, weekly, or monthly basis. There are three scan modes. Full scan checks every TCP and UDP port and takes the most time. Standard scan checks the ports used by most known applications. Quick scan checks only the most commonly used ports. For a detailed list of the TCP and UDP ports examined by each scan mode, see Table 58 on page 928. Also, the get netscan settings CLI command lists the TCP and UDP ports scanned in the current scan mode. See the tcp-ports and udp-ports fields. You can also initiate the configured scan manually.
927
Configuring scans
Vulnerability Scan
Table 58: Ports scanned in each scan mode Standard TCP: 1-3, 5, 7, 9, 11, 13, 15, 17-25, 27, 29, 31, 33, 35, 37-39, 41-223, 242-246, 256265, 280-282, 309, 311, 318, 322-325, 344-351, 363, 369-581, 587, 592-593, 598, 600, Scan 606-620, 624, 627, 631, 633-637, 666-674, 700, 704-705, 707, 709-711, 729-731, 740742, 744, 747-754, 758-765, 767, 769-777, 780-783, 786, 799-801, 860, 873, 886-888, 900-901, 911, 950, 954-955, 990-993, 995-1001, 1008, 1010-1011, 1015, 1023-1100, 1109-1112, 1114, 1123, 1155, 1167, 1170, 1207, 1212, 1214, 1220-1222, 1234-1236, 1241, 1243, 1245, 1248, 1269, 1313-1314, 1337, 1344-1625, 1636-1774, 1776-1815, 1818-1824, 1901-1909, 1911-1920, 1944-1951, 1973, 1981, 1985-2028, 2030, 20322036, 2038, 2040-2049, 2053, 2065, 2067, 2080, 2097, 2100, 2102-2107, 2109, 2111, 2115, 2120, 2140, 2160-2161, 2201-2202, 2213, 2221-2223, 2232-2239, 2241, 2260, 2279-2288, 2297, 2301, 2307, 2334, 2339, 2345, 2381, 2389, 2391, 2393-2394, 2399, 2401, 2433, 2447, 2500-2501, 2532, 2544, 2564-2565, 2583, 2592, 2600-2605, 26262627, 2638-2639, 2690, 2700, 2716, 2766, 2784-2789, 2801, 2908-2912, 2953-2954, 2998, 3000-3002, 3006-3007, 3010-3011, 3020, 3047-3049, 3080, 3127-3128, 31413145, 3180-3181, 3205, 3232, 3260, 3264, 3267-3269, 3279, 3306, 3322-3325, 3333, 3340, 3351-3352, 3355, 3372, 3389, 3421, 3454-3457, 3689-3690, 3700, 3791, 3900, 3984-3986, 4000-4002, 4008-4009, 4080, 4092, 4100, 4103, 4105, 4107, 4132-4134, 4144, 4242, 4321, 4333, 4343, 4443-4454, 4500-4501, 4567, 4590, 4626, 4651, 46604663, 4672, 4899, 4903, 4950, 5000-5005, 5009-5011, 5020-5021, 5031, 5050, 5053, 5080, 5100-5101, 5145, 5150, 5190-5193, 5222, 5236, 5300-5305, 5321, 5400-5402, 5432, 5510, 5520-5521, 5530, 5540, 5550, 5554-5558, 5569, 5599-5601, 5631-5632, 5634, 5678-5679, 5713-5717, 5729, 5742, 5745, 5755, 5757, 5766-5767, 5800-5802, 5900-5902, 5977-5979, 5997-6053, 6080, 6103, 6110-6112, 6123, 6129, 6141-6149, 6253, 6346, 6387, 6389, 6400, 6455-6456, 6499-6500, 6515, 6558, 6588, 6660-6670, 6672-6673, 6699, 6767, 6771, 6776, 6831, 6883, 6912, 6939, 6969-6970, 7000-7021, 7070, 7080, 7099-7100, 7121, 7161, 7174, 7200-7201, 7300-7301, 7306-7308, 7395, 7426-7431, 7491, 7511, 7777-7778, 7781, 7789, 7895, 7938, 7999-8020, 8023, 8032, 8039, 8080-8082, 8090, 8100, 8181, 8192, 8200, 8383, 8403, 8443, 8450, 8484, 8732, 8765, 8886-8894, 8910, 9000-9001, 9005, 9043, 9080, 9090, 9098-9100, 9400, 9443, 9535, 9872-9876, 9878, 9889, 9989-10000, 10005, 10007, 10080-10082, 10101, 10520, 10607, 10666, 11000, 11004, 11223, 12076, 12223, 12345-12346, 12361-12362, 12456, 12468-12469, 12631, 12701, 12753, 13000, 13333, 14237-14238, 15858, 16384, 16660, 16959, 16969, 17007, 17300, 18000, 18181-18186, 18190-18192, 18194, 18209-18210, 18231-18232, 18264, 19541, 20000-20001, 20011, 20034, 20200, 20203, 20331, 21544, 21554, 21845-21849, 22222, 22273, 22289, 22305, 22321, 22555, 22800, 22951, 23456, 23476-23477, 25000-25009, 25252, 25793, 25867, 26000, 26208, 26274, 27000-27009, 27374, 27665, 29369, 29891, 30029, 30100-30102, 30129, 30303, 30999, 31336-31337, 31339, 31554, 31666, 31785, 31787-31788, 32000, 32768-32790, 33333, 33567-33568, 33911, 34324, 37651, 40412, 40421-40423, 42424, 44337, 47557, 47806, 47808, 49400, 50505, 50766, 51102, 51107, 51112, 53001, 54321, 57341, 60008, 61439, 61466, 65000, 65301, 65512 UDP: 7, 9, 13, 17, 19, 21, 37, 53, 67-69, 98, 111, 121, 123, 135, 137-138, 161, 177, 371, 389, 407, 445, 456, 464, 500, 512, 514, 517-518, 520, 555, 635, 666, 858, 1001, 10101011, 1015, 1024-1049, 1051-1055, 1170, 1243, 1245, 1434, 1492, 1600, 1604, 1645, 1701, 1807, 1812, 1900, 1978, 1981, 1999, 2001-2002, 2023, 2049, 2115, 2140, 2801, 3024, 3129, 3150, 3283, 3527, 3700, 3801, 4000, 4092, 4156, 4569, 4590, 4781, 50005001, 5036, 5060, 5321, 5400-5402, 5503, 5569, 5632, 5742, 6073, 6502, 6670, 6771, 6912, 6969, 7000, 7300-7301, 7306-7308, 7778, 7789, 7938, 9872-9875, 9989, 10067, 10167, 11000, 11223, 12223, 12345-12346, 12361-12362, 15253, 15345, 16969, 20001, 20034, 21544, 22222, 23456, 26274, 27444, 30029, 31335, 31337-31339, 31666, 31785, 31789, 31791-31792, 32771, 33333, 34324, 40412, 40421-40423, 40426, 47262, 50505, 50766, 51100-51101, 51109, 53001, 61466, 65000 Full Scan All TCP and UDP ports (1-65535) Quick Scan TCP: 11, 13, 15, 17, 19-23, 25, 37, 42, 53, 66, 69-70, 79-81, 88, 98, 109-111, 113, 118119, 123, 135, 139, 143, 220, 256-259, 264, 371, 389, 411, 443, 445, 464-465, 512-515, 523-524, 540, 548, 554, 563, 580, 593, 636, 749-751, 873, 900-901, 990, 992-993, 995, 1080, 1114, 1214, 1234, 1352, 1433, 1494, 1508, 1521, 1720, 1723, 1755, 1801, 20002001, 2003, 2049, 2301, 2401, 2447, 2690, 2766, 3128, 3268-3269, 3306, 3372, 3389, 4100, 4443-4444, 4661-4662, 5000, 5432, 5555-5556, 5631-5632, 5634, 5800-5802, 5900-5901, 6000, 6112, 6346, 6387, 6666-6667, 6699, 7007, 7100, 7161, 7777-7778, 8000-8001, 8010, 8080-8081, 8100, 8888, 8910, 9100, 10000, 12345-12346, 20034, 21554, 32000, 32768-32790 UDP: 7, 13, 17, 19, 37, 53, 67-69, 111, 123, 135, 137, 161, 177, 407, 464, 500, 517-518, 520, 1434, 1645, 1701, 1812, 2049, 3527, 4569, 4665, 5036, 5060, 5632, 6502, 7778, 15345
928
Vulnerability Scan
Configuring scans
To configure scanning - web-based manager 1 Go to UTM Profiles > Vulnerability Scan > Scan. 2 Enter the following information and select Apply.
Scan Mode Quick check only the most commonly used ports Standard check the ports used by most known applications Full check all TCP and UDP ports For a detailed list of the TCP and UDP ports examined by each scan mode, see Table 58 on page 928. Manually perform scan on request only Schedule use the following fields to configure a schedule Select Daily, Weekly, or Monthly. If you select Weekly, the Day of Week drop-down list appears. If you select Monthly, the Day of Month drop-down list appears. Select the time of day to start the scan, in the format HH:MM. For a weekly scan, select the day of the week. For a monthly scan, select the day of the month.
Schedule Recurrence
To configure scanning - CLI To configure, for example, a standard scan to be performed every Sunday at 2:00am, you would enter: config netscan settings set scan-mode standard set schedule enable set time 02:00 set recurrence weekly set day-of-week sunday end To perform a vulnerability scan manually - web-based manager 1 Go to UTM Profiles > Vulnerability Scan > Asset. 2 Select the Enable check box for each asset you want to scan. 3 Select Start Scan. Above the table header, on the top right, the status of the current scan is shown. Depending on the number of computers to be discovered, the scan can take several minutes, until the web-based manager reports Scan completed. To perform a vulnerability scan manually - CLI You must have some assets configured with mode set to scan. 1 Execute the discovery scan: execute netscan start scan 2 Check the status of the discovery scan: execute netscan status Repeat periodically until status is scan complete.
929
Vulnerability Scan
930
Vulnerability Scan
Creating reports
You can use the FortiGate units Log&Report features to generate reports on the results of network vulnerability scanning. To create a report of scanning results 1 Go to Log&Report > Report Config > Layout and select Create New. 2 Enter a Name for the report. 3 Optionally select a Report Theme. 4 Enter a Title to appear on the report.
931
Vulnerability Scan
5 Choose each Option and Output Format that you require. 6 If you want to have the report generated on a regular basis, create a Schedule. 7 Select the Report Components. The components are listed in order below the Report Components heading. For a network vulnerability scan report, you will need to select Chart components from the Vulnerability category. The following vulnerability charts are available:
Table 60: Executive summary widgets for network scan Chart Vulnerabilities by Category Vulnerabilities by Severity Top Vulnerable Operating Systems Detected Top Vulnerable Services Detected Top Vulnerable TCP Services Detected Top Vulnerable UDP Services Detected Component name vulner-by-category-last24h vulner-by-severity-last24h top-vulner-os-last24h top-vulner-service-last24h top-vulner-tcp-service-last24h top-vulner-udp-service-last24h
8 Optionally select other components, such as headings and text. 9 Select OK. The report will be generated at the scheduled time. To generate a report manually 1 Go to Log&Report > Report Config > Layout. 2 Select the required report. 3 Select Run.
Viewing reports
Go to Log&Report > Report Access > Disk to view generated reports.
Figure 100: List of reports
If HTML output was enabled, you can select the Report File name to view the report in a separate browser window. If PDF output was enabled, you can select the link in the Other Formats column to view the report.
932
Sniffer policy
Sniffer policies are used to configure a physical interface on the FortiGate unit as a onearm intrusion detection system (IDS). Traffic sent to the interface is examined for matches to the configured IPS sensor and application control list. Matches are logged and then all received traffic is dropped. Sniffing only reports on attacks. It does not deny or otherwise influence traffic. This section describes how to configure your network topology to use the FortiGate unit as a one-arm intrusion detection system. It also describes how to configure and enable a sniffer policy. The following topics are included in this section: Sniffer policy concepts Before you begin Enable one-arm sniffing Sniffer example
933
Sniffer policy
Figure 101: How the intrusion detection system uses sniffer policies to examine traffic
Start
Does the packet source address, destination address, and type match a sniffer policy? No
Yes
Does this packet trigger any threshold violation in the specified DoS sensor? No
Does this packet match any signatures in the specified IPS sensor? No
End
Does this packet come from any application in the specified application control list? No
End
934
Sniffer policy
Connecting the sniffer interface to a regular switch interface will not work because no traffic is addressed to the sniffer interface. A SPAN port is a special-purpose interface that mirrors all the traffic the switch receives. Traffic is handled normally on every other switch interface, but the SPAN port sends a copy of everything. If you connect your FortiGate unit sniffer interface to the switch SPAN port, all the network traffic will be examined without any being lost because of the examination.
Figure 102: A network configured for intrusion detection using a sniffer policy
Main Firewall
Switch
935
Sniffer policy
Designating a sniffer interface 1 Go to System > Network > Interface. 2 Select the interface. 3 Select the Edit icon. Caution: When an interface is configured as a sniffer interface, all traffic received by the interface is dropped after being examined by the sniffer policy. 4 Select the Enable one-arm sniffer check box. If the check box is not available, the interface is in use. Ensure that the interface is not selected in any firewall policies, routes, virtual IPs or other features in which a physical interface is specified. 5 Select OK.
936
Sniffer policy
Sniffer example
8 To have the sniffer policy log traffic from applications specified in an application control list, select the Application Black/White List check box and choose the application control list. 9 Select OK. DoS sensors, IPS sensors, and application control lists all allow you to choose actions and log traffic. When included in a sniffer sensor, these settings are ignored. Actions in these other settings do not apply, and all matches are logged regardless of the logging setting.
Sniffer example
An IDS sniffer configuration
The Example.com Corporation uses a pair of FortiGate-620B units to secure the head office network. To monitor network attacks and create complete log records of them, the network administrator has received approval to install a FortiGate-82C to record all IPS signature matches in incoming and outgoing network traffic using a sniffer policy. This example details the set-up and execution of this network configuration. Although this example uses a separate FortiGate unit for sniffer-mode operation, the sniffer traffic can be sent to the FortiGate unit protecting the network. The switch must still be configured to create a copy of the data because the sniffer interface drops all incoming traffic. In this case, the administrator requested a FortiGate-82C for this purpose because sniffer-mode operation is resource intensive, and using a separate FortiGate unit frees the FortiGate-620B cluster from this task. The FortiGate-82C unit also has four internal hard drives, making it ideal for storing large log files.
m t1 r or fe P nif
(s
P or t1 P or t1 P or t2
Switch
od e)
2
P or t3
P or t1
937
Sniffer example
Sniffer policy
The company Internet feed is connected to Port1 of the switch. The FortiGate units are connected to Port2 and Port3 of the switch. Since they are configured as an HA cluster, they must both have access to the Internet in the event of a failure. To allow a FortiGate unit sniffer interface to examine the network traffic, the switch must be configured to create a copy of all network traffic entering or leaving Port2 and Port3 and send it out Port8. When configured this way, the switch port sending the duplicate traffic is called a mirror port or a SPAN port. Consult the switch documentation for instructions on how to configure a SPAN port.
Note: The traffic between Port1 and Port2/Port3 is not modified or diverted in any way by the creation of a SPAN port. The traffic is duplicated with the copy being send out of the SPAN port.
To configure the sniffer mode interface web-based manager 1 Log in to the FortiGate-82C web-based manager. 2 Go to System > Network > Interface. 3 Select the Port1 interface. 4 Select Edit. 5 Select Enable one-arm sniffer. 6 Select OK. To configure the sniffer mode interface CLI config system interface edit port1 set ips-sniffer-mode enable end
938
Sniffer policy
Sniffer example
5 In the Filters section, select Create New. 6 In the name field, enter All signatures, logged. 7 For the Logging setting under Signatures Settings, select Enable all. 8 Select OK to save the filter. 9 Ensure Enable Logging is selected in the sensor. 10 Select OK to save the IPS sensor. To create an IPS sensor CLI config ips sensor edit IPS_sniffer set comment "IPS sensor for use in the sniffer policy." config filter edit "All signatures, logged" set log enable end end
939
Sniffer example
Sniffer policy
940
Conserve mode
FortiGate units perform all UTM processing in physical RAM. Since each model has a limited amount of memory, conserve mode is activated when the remaining free memory is nearly exhausted or the AV proxy has reached the maximum number of sessions it can service. While conserve mode is active, the AV proxy does not accept new sessions.
The AV proxy
Most content inspection the FortiGate unit performs requires that the files, email messages, URLs, and web pages be buffered and examined as a whole. The AV proxy performs this function, and because it may be buffering many files at the same time, it uses a significant amount of memory. Conserve mode is designed to prevent all the component features of the FortiGate unit from trying to use more memory than it has. Because the AV proxy uses so much memory, conserve mode effectively disables it in most circumstances. As a result, the content inspection features that use the AV proxy are also disabled in conserve mode. All of the UTM features use the AV proxy with the exception of IPS, application control, DoS as well as flow-based antivirus, DLP, and web filter scanning. These features continue to operate normally when the FortiGate unit enters conserve mode.
941
Conserve mode
The FortiGate unit will leave conserve mode only when the available physical memory exceeds about 30%. When exiting conserve mode, all new sessions configured to be scanned with features requiring the AV proxy will be scanned as normal, with the exception of a unit configured with the one-shot option.
off
The off setting forces the FortiGate unit to stop all traffic that is configured for content inspection by UTM features that use the AV proxy. New sessions are not allowed but current sessions continue to be processed normally unless they request more memory. Sessions requesting more memory are terminated. For example, if a security policy is configured to use antivirus scanning, the traffic it permits is blocked while in conserve mode. A policy with IPS scanning enabled continues as normal. A policy with both IPS and antivirus scanning is blocked because antivirus scanning requires the AV proxy. Use the off setting when security is more important than a loss of access while the problem is rectified.
pass
The pass setting allows traffic to bypass the AV proxy and continue to its destination. Since the traffic is bypassing the proxy, no UTM scanning that requires the AV proxy is performed. UTM scanning that does not require the AV proxy continues normally. Use the pass setting when access is more important than security while the problem is rectified. Pass is the default setting.
one-shot
The one-shot setting is similar to pass in that traffic is allowed when conserve mode is active. The difference is that a system configured for one-shot will force new sessions to bypass the AV proxy even after it leaves conserve mode. The FortiGate unit resumes use of the AV proxy only when the av-failopen setting is changed or the unit is restarted.
idledrop
The idledrop setting will recover memory and session space by terminating all the sessions associated with the host that has the most sessions open. The FortiGate may force this session termination a number of times, until enough memory is available to allow it to leave conserve mode. The idledrop setting is primarily designed for situations in which malware may continue to open sessions until the AV proxy cannot accept more new sessions, triggering conserve mode. If your FortiGate unit is operating near capacity, this setting could cause the termination of valid sessions. Use this option with caution.
942
Figure 104: FortiGate SSL content scanning and inspection packet flow
3 2 1
Decrypted packets 4 Content scanning and inspection applied (antivirus, web filtering, spam filtering, DLP, DLP archiving) SSL decrypt/encrypt process decrypts SSL sessions using session certificate and key Content scanning and inspection
UTM profiles
Encrypted packets
3 2
3 2
Firewall 6
Encrypted packets
HTTPS, IMAPS, POP3S or 1 SMTPS encrypted packets Client Starts ts HTTPS, IMAPS, accepted by firewall policy cy POP3S or SMTPS session
943
You can replace the default signing CA certificate, Fortinet_CA_SSLProxy, with another signing CA certificate. To do this, you need the signing CA certificate file, the CA certificate key file, and the CA certificate password. All SSL content scanning and inspection uses the same signing CA certificate. If your FortiGate unit is operating with virtual domains enabled, the same signing CA certificate is used by all virtual domains. To add a signing CA certificate for SSL content scanning and inspection 1 Obtain a copy of the signing CA certificate file, the CA certificate key file, and the password for the CA certificate. 2 Go to System > Certificates > Local Certificates and select Import. 3 Set Type to Certificate. 4 For Certificate file, use the Browse button to select the signing CA certificate file. 5 For Key file, use the Browse button to select the CA certificate key file. 6 Enter the CA certificate Password. 7 Select OK. The CA certificate is added to the Local Certificates list. In this example the signing CA certificate name is Example_CA. This name comes from the certificate file and key file name. If you want the certificate to have a different name, change these file names.
944
8 Add the imported signing CA certificate to the SSL content scanning and inspection configuration. Use the following CLI command if the certificate name is Example_CA. config firewall ssl setting set caname Example_CA end The Example_CA signing CA certificate will now be used by SSL content scanning and inspection for establishing encrypted SSL sessions.
Predefined The IMAPS, POP3S and SMTPS predefined services. You can select these firewall services services in a security policy and a DoS policy. Protocol recognition The TCP port numbers that the FortiGate unit inspects for HTTPS, IMAPS, POP3S, and SMTPS. Go to Policy > Policy > Protocol Options. Add or edit a protocol options profile, configure HTTPS, IMAPS, POP3S, SMTPS, and FTPS. Using Protocol Options, you can also configure the FortiGate unit to perform URL filtering of HTTPS or to use SSL content scanning and inspection to decrypt HTTPS so that the FortiGate unit can also apply antivirus and DLP content inspection and DLP archiving to HTTPS. Using SSL content scanning and inspection to decrypt HTTPS also allows you to apply more web filtering and FortiGuard Web Filtering options to HTTPS. To enable full SSL content scanning of web filtering, select Enable Deep Scanning under HTTPS in the protocol options profile. Antivirus options including virus scanning and file filtering for HTTPS, IMAPS, POP3S, and SMTPS. Go to UTM AntiVirus > Profile. Add or edit a profile and configure Virus Scan for HTTPS, IMAPS, POP3S, and SMTPS. Antivirus quarantine options to quarantine files in HTTPS, IMAPS, POP3S, SMTPS, and FTPS sessions. Go to UTM Profiles > AntiVirus > Quarantine. You can quarantine infected files, suspicious files, and blocked files found in HTTPS, IMAPS, POP3S, SMTPS, and FTPS sessions. Web filtering options for HTTPS: Web Content Filter Web URL Filter ActiveX Filter Cookie Filter Java Applet Filter Web Resume Download Block Block invalid URLs Go to UTM Profiles > Web Filter > Profile. Add or edit a web filter profile and configure web filtering for HTTPS.
Antivirus
Antivirus quarantine
Web filtering
945
Table 61: SSL content scanning and inspection settings (Continued) Setting Description
FortiGuard Web FortiGuard Web Filtering options for HTTPS: Filtering Enable FortiGuard Web Filtering Enable FortiGuard Web Filtering Overrides Provide Details for Blocked HTTP 4xx and 5xx Errors Rate Images by URL (Blocked images will be replaced with blanks) Allow Websites When a Rating Error Occurs Strict Blocking Rate URLs by Domain and IP Address Block HTTP Redirects by Rating Go to UTM Profiles > Web Filter > Profile. Add or edit a profile and configure FortiGuard Web Filtering for HTTPS. Email filtering Email filtering options for IMAPS, POP3S, and SMTPS: FortiGuard Email Filtering IP Address Check, URL check, E-mail Checksum Check, and Spam Submission IP Address BWL Check E-mail Address BWL Check Return S-mail DNS Check Banned Word Check Spam Action Tag Location Tag Format Go to UTM Profiles > Email Filter > Profile. Add or edit a profile and configure email filtering for IMAPS, POP3S, and SMTPS. DLP for HTTPS, IMAPS, POP3S, and SMTPS. To apply DLP, follow the steps below: Go to UTM Profiles > Data Leak Prevention > Sensor, create a new DLP sensor or edit an existing one and then add any combination of the DLP advanced rules, DLP compound rules, file filters, a Regular Expressions, and file size limits to a DLP sensor. Go to Policy > Policy > Protocol Options. Add or edit a profile and select Enable Deep Scan under HTTPS. Go to Policy > Policy > Policy, edit the required policy, enable UTM, select Enable DLP Sensor and select the DLP sensor. Go to Policy > Policy > Policy, edit the required policy, enable Protocol Options and select a profile that has Enable Deep Scan selected under HTTPS. Note: If no protocol options profile is selected, or if Enable Deep Scan is not selected within the protocol options profile, DLP rules cannot inspect HTTPS. DLP archiving for HTTPS, IMAPS, POP3S, and SMTPS. Add DLP Rules for the protocol to be archived. DLP archive information on the Log and Archive Statistics widget on the system dashboard for HTTPS, IMAPS, POP3S, and SMTPS. Go to Policy > Policy > Protocol Options. Add or edit a profile. For each protocol you want monitored on the dashboard, enable Monitor Content Information for Dashboard. These options display meta-information on the Statistics dashboard widget.
946
To view and save logged packets 1 Go to Log&Report > Log Access > Attack. 2 Depending on where the logs are configured to be stored, select the appropriate option:
Memory Disk Remote Select if logs are stored in the FortiGate unit memory. Select if the FortiGate unit has an internal hard disk and logs are stored there. Select if logs are sent to a FortiAnalyzer unit or to the FortiGuard Analysis and Management Service.
3 Select the Packet Log icon of the log entry you want to view. The IPS Packet Log Viewer window appears. 4 Select the packet to view the packet in binary and ASCII. Each table row represents a captured packet. 5 Select Save to save the packet data in a PCAP formatted file. PCAP files can be opened and examined in network analysis software such as Wireshark.
947
The packet-log-history command specifies how many packets are captured before and including the one in which the IPS signature is detected. If the value is more than 1, the packet containing the signature is saved in the packet log, as well as those preceding it, with the total number of logged packets equalling the packet-log-history setting. For example, if packet-log-history is set to 7, the FortiGate unit will save the packet containing the IPS signature match and the six before it. The acceptable range for packet-log-history is from 1 to 255. The default is 1.
Note: Setting packet-log-history to a value larger than 1 can affect the performance of the FortiGate unit because network traffic must be buffered. The performance penalty depends on the model, the setting, and the traffic load.
The packet-log-post-attack command specifies how many packets are logged after the one in which the IPS signature is detected. For example, if packet-log-postattack is set to 10, the FortiGate unit will save the ten packets following the one containing the IPS signature match. The acceptable range for packet-log-post-attack is from 0 to 255. The default is 0.
To match a special character such as '.' and * use the escape character \. For example: To match example.com, the regular expression should be: example\.com In Perl regular expressions, * means match 0 or more times of the character before it, not 0 or more times of any character. For example: exam*.com matches exammmm.com but does not match example.com To match any character 0 or more times, use .* where . means any character and the * means 0 or more times. For example, the wildcard match pattern exam*.com should therefore be exam.*\.com.
948
Word boundary
In Perl regular expressions, the pattern does not have an implicit word boundary. For example, the regular expression test not only matches the word test but also any word that contains test such as atest, mytest, testimony, atestb. The notation \b specifies the word boundary. To match exactly the word test, the expression should be \btest\b.
Case sensitivity
Regular expression pattern matching is case sensitive in the web and Email Filter filters. To make a word or phrase case insensitive, use the regular expression /i. For example, /bad language/i will block all instances of bad language, regardless of case.
949
Table 62: Perl regular expression formats (Continued) \x Tells the regular expression parser to ignore white space that is neither preceded by a backslash character nor within a character class. Use this to break up a regular expression into (slightly) more readable parts. Used to add regular expressions within other text. If the first character in a pattern is forward slash '/', the '/' is treated as the delimiter. The pattern must contain a second '/'. The pattern between / will be taken as a regular expressions, and anything after the second / will be parsed as a list of regular expression options ('i', 'x', etc). An error occurs if the second '/' is missing. In regular expressions, the leading and trailing space is treated as part of the regular expression.
/x
950
951
952
Introduction to authentication
Identifying users and other computersauthenticationis a key part of network security. This section describes some basic elements and concepts of authentication. The following topics are included in this section: What is authentication? Methods of authentication Types of authentication Users view of authentication FortiGate administrators view of authentication
What is authentication?
Businesses need to authenticate people who have access to company resources. In the physical world this may be a swipe card to enter the building, or a code to enter a locked door. If a person has this swipe card or code, they have been authenticated as someone allowed in that building or room. Authentication is the act of confirming the identity of a person or other entity. In the context of a private computer network, the identities of users or host computers must be established to ensure that only authorized parties can access the network. The FortiGate unit enables controlled network access and applies authentication to users of security policies and VPN clients.
Methods of authentication
FortiGate unit authentication is divided into three basic types: password authentication for people, certificate authentication for hosts or endpoints, and two-factor authentication for additional security beyond just passwords. An exception to this is that FortiGate units in an HA cluster and FortiManager units use password authentication. Password authentication verifies individual user identities, but access to network resources is based on membership in user groups. For example, a security policy can be configured to permit access only to the members of one or more user groups. Any user who attempts to access the network through that policy is then authenticated through a request for their username and password. Methods of authentication include: Local password authentication Server-based password authentication Certificate-based authentication Two-factor authentication
953
Methods of authentication
Introduction to authentication
Local user accounts work well for a single-FortiGate installation. If your network has multiple FortiGate units that will use the same accounts, the use of an external authentication server can simplify account configuration and maintenance. You create local user accounts in the web-based manager under User > User. This page is also used to create accounts where an external authentication server stores and verifies the password.
Dynamic profiles
Managed Security Service Providers (MSSPs) and carrier service providers can use the FortiOS dynamic profile configuration to dynamically assign profile groups to customer traffic. Using the dynamic profile, FortiOS can receive RADIUS Start records from service provider accounting systems when customers connect to service provider networks. In real time, FortiOS can extract identifying information and profile group names from these RADIUS Start records and match the identifying information with the customer communication session. FortiOS can then dynamically select and apply the profile group named in the RADIUS Start record to the communication session. Some parts of dynamic profiles and end points are FortiOS Carrier-only features. See Dynamic profiles and end points on page 1099.
954
Introduction to authentication
Methods of authentication
FSSO monitors user logons and sends the FortiGate unit the username, IP address, and the list of Windows AD user groups to which the user belongs. When the user tries to access network resources, the FortiGate unit selects the appropriate security policy for the destination. If the user belongs to one of the permitted user groups, the connection is allowed. For detailed information about FSSO, see FSSO integration with Windows AD or Novell on page 1059.
Certificate-based authentication
An RSA X.509 server certificate is a small file issued by a Certificate Authority (CA) that is installed on a computer or FortiGate unit to authenticate itself to other devices on the network. When one party on a network presents the certificate as authentication, the other party can validate that the certificate was issued by the CA. The identification is therefore as trustworthy as the Certificate Authority (CA) that issued the certificate. To protect against compromised or misused certificates, CAs can revoke any certificate by adding it to a Certificate Revocation List (CRL). Certificate status can also be checked online using Online Certificate Status Protocol (OCSP). RSA X.509 certificates are based on public-key cryptography, in which there are two keys: the private key and the public key. Data encrypted with the private key can be decrypted only with the public key and vice versa. As the names suggest, the private key is never revealed to anyone and the public key can be freely distributed. Encryption with the recipients public key creates a message that only the intended recipient can read. Encryption with the senders private key creates a message whose authenticity is proven because it can be decrypted only with the senders public key. Server certificates contain a signature string encrypted with the CAs private key. The CAs public key is contained in a CA root certificate. If the signature string can be decrypted with the CAs public key, the certificate is genuine.
Certificate authorities
A certificate authority can be: an organization, such as VeriSign Inc., that provides certificate services a software application, such as Microsoft Certificate Services or OpenSSH
For a company web portal or customer-facing SSL VPN, a third-party certificate service has some advantages. The CA certificates are already included in popular web browsers and customers trust the third-party. On the other hand, third-party services have a cost. For administrators and for employee VPN users, the local CA based on a software application provides the required security at low cost. You can generate and distribute certificates as needed. If an employee leaves the organization, you can simply revoke their certificate.
955
Types of authentication
Introduction to authentication
FortiGate units are also compatible with some Public Key Infrastructure systems. For an example of this type of system, see RSA ACE (SecurID) servers on page 998.
Two-factor authentication
A user can be required to provide both something they know (their username and password combination) and something they have (certificate or a random token code). Certificates are installed on the users computer. Two-factor authentication is available for PKI users. For more information, see Certificate on page 1008. Another type of two-factor authentication is to use a randomly generated token (multi-digit number) along with the username and password combination. One method is a FortiToken a one time passcode (OTP) generator that generates a unique code every 60 seconds. Others use email or SMS text messaging to deliver the random token code to the user or administrator. When one of these methods is configured, the user enters this code at login after the username and password have been verified. The FortiGate unit verifies the token code after as well as the password and username. For more information, see Two-factor authentication on page 1007
Types of authentication
FortiOS supports two different types of authentication based on your situation and needs. Security policy authentication, or identity-based policies, is easily applied to all users logging on to a network, or network service. For example if a group of users on your network such as the accounting department who have access to sensitive data need to access the Internet, it is a good idea to make sure the user is a valid user and not someone trying to send company secrets to the Internet. Security policy authentication can be applied to as many or as few users as needed, and it supports a number of authentication protocols to easily fit with your existing network. VPN authentication can be for both the remote VPN device as well as the VPN users. VPNs are used to communicate with locations outside the company network as if they were part of the company network. This level of trust, once a VPN is established, is easily established with authentication to verify the remote user is in fact a valid user. In this situation without authentication, anyone malicious or otherwise could connect to the company network with potentially full access.
FSSO
Fortinet Single Sign on (FSSO) provides seamless authentication support for Microsoft Windows Active Directory (AD) and Novell eDirectory users in a FortiGate environment.
User Authentication for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
956
Introduction to authentication
Types of authentication
On a Microsoft Windows or Novell network, users authenticate with the Active Directory or Novell eDirectory at logon. FSSO provides authentication information to the FortiGate unit so that users automatically get access to permitted resources. See Introduction to FSSO on page 1059.
NTLM
The NT LAN Manager (NTLM) protocol is used when the MS Windows Active Directory (AD) domain controller can not be contacted. NTLM is a browser-based method of authentication. The FSSO software is installed on each AD server and the FortiGate unit is configured to communicate with each FSSO client. When a user successfully logs into their Windows PC (and is authenticated by the AD Server), the FSSO client communicates the user's name, IP address, and group login information to the FortiGate unit. The FortiGate unit sets up a temporary access policy for the user, so when they attempt access through the firewall they do not need to re-authenticate. This model works well in environments where the FSSO client can be installed on all AD servers. In system configurations where it is not possible to install FSSO clients on all AD servers, the FortiGate unit must be able to query the AD servers to find out if a user has been properly authenticated. This is achieved using the NTLM messaging features of Active Directory and Internet Explorer. Even when NTLM authentication is used, the user is not asked again for their username and password. Internet Explorer stores the users credentials and the FortiGate unit uses NTLM messaging to validate them in the Windows AD environment. Note that if the authentication reaches the timeout period, the NTLM message exchange restarts. For more information on NTLM, see NTLM authentication on page 1034 and NTLM authentication with FSSO on page 1063, and
Certificates
Certificates can be used as part of an identity-based policy. All users being authenticated against the policy are required to have the proper certificate. See Certificate-based authentication on page 955
Dynamic profile
Dynamic profile is a remote authentication method that does not require any local users to be configured, and relies on RADIUS Start records to provide the FortiGate unit with authentication information. That information identifies the user and user group, which is then matched using a security policy. See Dynamic profiles and end points on page 1099
VPN authentication
Authentication involves authenticating the user. In IPsec VPNs authenticating the user is optional, but authentication of the peer device is required.
957
Types of authentication
Introduction to authentication
This section includes: Authenticating IPsec VPN peers (devices) Authenticating IPsec VPN users Authenticating SSL VPN users Authenticating PPTP and L2TP VPN users
The peer ID is a text string configured on the peer device. On a FortiGate peer or FortiClient Endpoint Security peer, the peer ID provided to the remote peer is called the Local ID.
958
Introduction to authentication
You need to create a user group for your SSL VPN. Simply create a firewall user group, enable SSL VPN access for the group, and select the web portal the users will access. SSL VPN access requires an SSL VPN security policy that permits access to members of your user group.
959
Introduction to authentication
The general process of setting up authentication is as follows: 1 If remote or external authentication is needed, configure the required servers. 2 Configure local and peer (PKI) user identities. For each local user, you can choose whether the FortiGate unit or a remote authentication server verifies the password. Peer members can be included in user groups for use in security policies. 3 Create user groups. Add local/peer user members to each user group as appropriate. You can also add an authentication server to a user group. In this case, all users in the servers database can authenticate. You can only configure peer user groups through the CLI. 4 Configure security policies and VPN tunnels that require authenticated access. For authentication troubleshooting, see the specific chapter for the topic or for general issues see Troubleshooting on page 1151.
960
User
The User menu allows you to configure authentication settings and user accounts. The User menu also allows you to configure user groups, remote servers, as well as monitor users. A user is a user account that consists of a user name, password and in some cases, other information that can be configured on the unit or on an external authentication server. Users can access resources that require authentication only if they are members of an allowed user group. For more information about user groups, see User groups on page 965. This topic contains the following: Local user accounts IM users Authentication settings
961
User
When configuring a user account, you can enable two-factor authentication. This feature allows you to add what is referred to as a FortiToken, which is a serial number used in log in credentials, and this FortiToken can be emailed to the user or sent to their mobile phone. Two-factor authentication is a security measure that provides an additional log in credential, in this case a FortiToken, that the user must enter so that they can log in. You must have the FortiToken device to use the FortiToken feature on your unit.
Two-factor Authentication
Ref.
New User page Provides settings for configuring whether to allow or block a local user from authenticating.
962
User
A name that identifies the user. Select to prevent this user from authenticating. Select to authenticate this user using a password stored on the unit and then enter the password. The password should be at least six characters.
Match users on Select to authenticate this user using a password stored on an LDAP server. Select the LDAP server from the list. LDAP servers You can select only an LDAP server that has been added to the FortiGate LDAP configuration. For more information, see LDAP on page 971. Match users on Select to authenticate this user using a password stored on a RADIUS server. RADIUS server Select the RADIUS server from the list. You can select only a RADIUS server that has been added to the FortiGate RADIUS configuration. For more information, see RADIUS on page 970. Match users on Select to authenticate this user using a password stored on a TACACS server. TACACS+ server Select the TACACS+ server from the list. You can select only a TACACS server that has been added to the FortiGate TACACS configuration. For more information, see TACACS+ on page 974. Enable Two-factor Authentication Deliver Token Code by FortiToken Select to enable the two-factor authentication feature. When you enable this feature, FortiToken, Email to and SMS appear below. You can enable two-factor authentication for FortiGate administrators as well as users When you enable two-factor authentication, you can send the FortiToken number to an email address or to a mobile phone. Select the serial number of the FortiToken that will be used by the user for generating the token password code. See FortiToken configuration settings on page 975. Enter the email address of the recipient that will be receiving the token password code. Enter the phone number of the mobile phone that will receive the token password code. You must first enter the SMS in the CLI before you can select one from the drop-down list.
Email to SMS
IM users
Instant Messenger (IM) protocols are gaining in popularity as an essential way to communicate between two or more individuals in real time. Some companies even rely on IM protocols for critical business applications such as Customer/Technical Support. The most common IM protocols in use today include AOL Instant Messenger, Yahoo Instant Messenger, MSN messenger, and ICQ. FortiGate units allow you to set up IM users that either allow or block the use of applications, to determine which applications are allowed.
963
User
Edit Delete
Modifies an IM users settings. When you select Edit, you are automatically redirected to the Edit User page. Removes an IM user from the list on the page. To remove multiple IM users from within the list, on the IM page, in each of the rows of users you want removed, select the check box and then select Delete. To remove all IM users from the list, on the IM page, select the check box in the check box column and then select Delete. Filter the information on the page using a specific protocol. For example, only ICQ users appear when the protocol selected is ICQ. You can use both Protocol and Policy to filter the information on the page. For example, only ICQ users that are blocked appear when protocol is set to ICQ and policy is set to Block Filter the information on the page using a specific policy. For example, only policies that are blocked appear when the policy selected is Block. You can use both Protocol and Policy to filter the information on the page. For example, only ICQ users that are blocked appear when protocol is set to ICQ and policy is set to Block The type of instant messaging protocol. For example, ICQ is for all ICQ instant messaging software. The name of the user. The type of action that will be taken when the protocol is detected. Displays the number of times the object is referenced to other objects. For example, av_1 profile is applied to a security policy; on the Profile page (UTM > Antivirus > Profile), 1 appears in Ref. . To view the location of the referenced object, select the number in Ref., and the Object Usage window appears displaying the various locations of the referenced object. To view more information about how the object is being used, use one of the following icons that is available within the Object Usage window: View the list page for these objects automatically redirects you to the list page where the object is referenced at. Edit this object modifies settings within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy and so, when this icon is selected, the user is redirected to the Edit Policy page. View the details for this object table, similar to the log viewer table, contains information about what settings are configured within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy, and that security policys settings appear within the table.
Protocol:
Policy:
Edit User page Provides settings for configuring an IM user. Protocol Username Policy Select an instant messaging protocol from the drop-down list. Enter the user name for accessing the IM user. Select the type of action that will be taken when the protocol is detected, for example, the protocol AIM will be blocked.
Authentication settings
The Authentication submenu provides settings for configuring authentication timeout, protocol support, and authentication certificates. When user authentication is enabled within a security policy, the authentication challenge is normally issued for any of the four protocols (depending on the connection protocol): HTTP (can also be set to redirect to HTTPS) HTTPS
964
User groups
FTP Telnet.
The selections made in the Protocol Support list of the Authentication Settings screen control which protocols support the authentication challenge. Users must connect with a supported protocol first so they can subsequently connect with other protocols. If HTTPS is selected as a method of protocol support, it allows the user to authenticate with a customized Local certificate. When you enable user authentication within a security policy, the security policy user will be challenged to authenticate. For user ID and password authentication, users must provide their user names and passwords. For certificate authentication (HTTPS or HTTP redirected to HTTPS only), you can install customized certificates on the unit and the users can also have customized certificates installed on their browsers. Otherwise, users will see a warning message and have to accept a default FortiGate certificate. Authentication settings are configured in User > User > Authentication. Use the following table when configuring authentication settings.
Authentication Settings Provides settings for defining how users authenticate a session. For example, the authentication timeout is configured for 10 minutes so a users session, if idle for 10 minutes, will log them out of the session automatically. Authentication Timeout Enter a length of time in minutes, from 1 to 480. Authentication timeout controls how long an authenticated firewall connection can be idle before the user must authenticate again. The default value is 30 Select the protocols to challenge during firewall user authentication. If using HTTPS protocol support, select the local certificate to use for authentication. Available only if HTTPS protocol support is selected. Select to apply the selections for user authentication settings. Note: When you use certificate authentication, if you do not specify any certificate when you create the security policy, the global settings will be used. If you specify a certificate, the per-policy setting will overwrite the global setting.
User groups
A user group is a list of user identities. An identity can be: a local user account (user name and password) stored on the FortiGate unit a local user account with a password stored on a RADIUS, LDAP, or TACACS+ server a RADIUS, LDAP, or TACACS+ server (all identities on the server can authenticate) a user or user group defined on a Directory Service server.
Each user group belongs to one of three types: Firewall, Directory Service or SSL VPN. In most cases, the unit authenticates users by requesting each user name and password. The unit checks local user accounts first. If the unit does not find a match, it checks the RADIUS, LDAP, or TACACS+ servers that belong to the user group. Authentication succeeds when the unit finds a matching user name and password. This topic contains the following: User Group Firewall user groups Fortinet Single Sign-On (FSSO) user groups SSL VPN user groups
965
User groups
User Group
For each resource that requires authentication, you specify which user groups are permitted access. You need to determine the number and membership of user groups appropriate to your authentication needs. Users that are associated with multiple groups have access to all services within all the user groups that they are associated with. This is only available in the CLI. The command used is auth-multi-group, which is enabled by default. This feature checks all groups a user belongs to for firewall authentication.
Members
Ref.
New User Group page Provides settings for configuring a list of users and/or groups. Note: The Remote authentication servers section does not appear unless there is a RADIUS, LDAP, or TACAS+ server configured. Name Enter the name of the user group. User Authentication for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
966
User groups
Type
Select the user group type. See Firewall user groups on page 967, SSL VPN user groups on page 968 and Fortinet Single Sign-On (FSSO) user groups on page 968. Select this group in any security policy that requires Firewall authentication. Select this group in any security policy that requires FSSO authentication. Select this group in any security policy with Action set to SSL VPN. This option is not available in Transparent mode. Select the type of SSL VPN access from the drop-down list. The list of Local users, RADIUS servers, LDAP servers, TACACS+ servers, Directory Service users/user groups, or PKI users that can be added to the user group. To add a member to Available Users list, select the name and then select the -> arrow. To remove a member from the Members list, select the member and then select the <- arrow. * Available Members displays only if the user group type is Directory Service. The list of Local users, RADIUS servers, LDAP servers, TACACS+ servers, Directory Service users/user groups, or PKI users that belong to the user group. To remove a member, select the name and then select the <- arrow.
Firewall Fortinet Single SignOn (FSSO) SSL VPN Allow SSL-VPN Access Available Users
Members
Remote authentication servers The following appear only if a RADIUS, LDAP or TACACS+ server has been configured and if Type is Firewall. Add Select to add a new remote authentication server. When you select add the following appear: remote server drop-down list Any and Specify and its field Delete icon Select a remote server from the drop-down list. Select to specify the group name or to have any group name. If you select Specify, you must enter the name in the field provided. If you want to specify more than one, use a comma to separate each name. Select to remove the remote server from within the list.
Delete
967
User groups
You can also use a firewall user group to provide override privileges for FortiGuard web filtering.
You cannot use FSSO user groups directly in FortiGate security policies. You must add FSSO groups to FortiGate user groups. An FSSO group should belong to only one FortiGate user group. If you assign it to multiple FortiGate user groups, the unit recognizes only the last user group assignment. You can also use an FSSO user group to provide override privileges for FortiGuard web filtering.
For information on configuring user groups, see User groups on page 965.
Note: By default, the web-based manager displays Firewall options. You cannot add local users to a group that is used to authenticate administrators
968
Remote
For the unit to dynamically assign an IP address, the VPN users must be configured for RADIUS authentication and you must include the IP address to assign to the user in the Framed-IP-Address RADIUS field on your RADIUS server. You configure each type of VPN differently. In each case you are associating the configuration that assigns IP addresses to users with a user group. Assigning IP addresses from a RADIUS record replaces dynamically assigning IP addresses from an address range. You cannot include an IP address range and assigning IP addresses from a RADIUS record in the same configuration. See also User groups
Remote
Remote authentication is generally used to ensure that employees working offsite can remotely access their corporate network with appropriate security measures in place. In general terms, authentication is the process of attempting to verify the (digital) identity of the sender of a communication such as a login request. The sender may be someone using a computer, the computer itself, or a computer program. Since a computer system should be used only by those who are authorized to do so, there must be a measure in place to detect and exclude any unauthorized access. On a unit, you can control access to network resources by defining lists of authorized users, called user groups. To use a particular resource, such as a network or VPN tunnel, the user must: belong to one of the user groups that is allowed access correctly enter a user name and password to prove his or her identity, if asked to do so. Administrators RADIUS LDAP TACACS+
Administrators
A local administrator account, admin, is configured by default on all FortiOS units. If you have remote servers configured, you can create remote administrator accounts as well. These are accounts with local administrator privileges that use remote authentication. One version of this are wildcard administrator accounts. See Example wildcard admin accounts - CLI on page 993. Configuring a remote administrator account is the same as a local administrator account with the following differences: You must have a remote authentication server and user group with an associated authentication server configured before creating the administrator account. Even though the administrator account with be authenticated remotely, when creating the account using the web-based manager you must enter a password or the account will not be created. You are not prompted for the password if the account is created in the CLI. This password acts as a backup password in case the remote server does not responde during authentication. The exception to this is when wildcard admin is selected for wildcard administrators, the password field is skipped over.
969
Remote
RADIUS
Remote Authentication and Dial-in User Service (RADIUS) servers provide authentication, authorization, and accounting functions. FortiGate units use the authentication function of the RADIUS server. You must configure the server before you configure the FortiGate users or user groups that will need it to use the RADIUS server for authentication. If you have configured RADIUS support and a user is required to authenticate using a RADIUS server, the unit sends the users credentials to the RADIUS server for authentication. If the RADIUS server can authenticate the user, the user is successfully authenticated with the unit. If the RADIUS server cannot authenticate the user, the unit refuses the connection. You can override the default authentication scheme by selecting a specific authentication protocol or changing the default port for RADIUS traffic.
Note: The default port for RADIUS traffic is 1812. If your RADIUS server is using port 1645, use the CLI command, config system global, to change the default RADIUS port.
If you want to configure settings for UTF-8 encoding, you must enable this in the CLI using the config vpn ssl setting command.
Delete
970
Remote
Ref.
Displays the number of times the object is referenced to other objects. For example, av_1 profile is applied to a security policy; on the Profile page (UTM > Antivirus > Profile), 1 appears in Ref. . To view the location of the referenced object, select the number in Ref., and the Object Usage window appears displaying the various locations of the referenced object. To view more information about how the object is being used, use one of the following icons that is available within the Object Usage window: View the list page for these objects automatically redirects you to the list page where the object is referenced at. Edit this object modifies settings within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy and so, when this icon is selected, the user is redirected to the Edit Policy page. View the details for this object table, similar to the log viewer table, contains information about what settings are configured within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy, and that security policys settings appear within the table.
New RADIUS Server page Provides settings for configuring a RADIUS server. Name Type Primary Server Name/IP Primary Server Secret Enter the name that is used to identify the RADIUS server on the unit. Select either Query or Dynamic Start. Enter the domain name or IP address of the primary RADIUS server. Enter the RADIUS server secret key for the primary RADIUS server. The primary server secret key should be a maximum of 16 characters in length. Note: The server secret key should be a maximum of 16 characters in length.
Secondary Enter the domain name or IP address of the secondary RADIUS server, if you Server Name/IP have one. Secondary Server Secret Authentication Scheme Enter the RADIUS server secret key for the secondary RADIUS server. The secondary server secret key should be a maximum of 16 characters in length. Select Use Default Authentication Scheme to authenticate with the default method. The default authentication scheme uses PAP, MS-CHAP-V2, and CHAP, in that order. Select Specify Authentication Protocol to override the default authentication method, and choose the protocol from the list: MS-CHAP-V2, MS-CHAP, CHAP, or PAP, depending on what your RADIUS server needs. Enter the NAS IP address and Called Station ID (for more information about RADIUS Attribute 31, see RFC 2548 Microsoft Vendor-specific RADIUS Attributes). If you do not enter an IP address, the IP address that the FortiGate interface uses to communicate with the RADIUS server will be applied.
Include in every Select the check box beside Enable to have the RADIUS server automatically included in all user groups. User Group
LDAP
Lightweight Directory Access Protocol (LDAP) is an Internet protocol used to maintain authentication data that may include departments, people, groups of people, passwords, email addresses, and printers. An LDAP consists of a data-representation scheme, a set of defined operations, and a request/response network. If you have configured LDAP support and require a user to authenticate using an LDAP server, the unit contacts the LDAP server for authentication. To authenticate with the unit, the user enters a user name and password. The unit sends this user name and password to the LDAP server. If the LDAP server can authenticate the user, the unit successfully authenticates the user. If the LDAP server cannot authenticate the user, the unit refuses the connection.
FortiOS Handbook v3: User Authentication 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
971
Remote
FortiGate LDAP supports password renewal, and these settings are configured in the CLI. There are settings for a warning that the password is going to expire, and threshold of the expiry as well.
Delete
Edit
Common Name Identifier The common name identifier for the LDAP server. Most LDAP servers use cn. However, some servers use other common name identifiers such as uid. Distinguished Name The distinguished name used to look up entries on the LDAP servers use. The distinguished name reflects the hierarchy of LDAP database object classes above the common name identifier. Displays the number of times the object is referenced to other objects. For example, av_1 profile is applied to a security policy; on the Profile page (UTM > Antivirus > Profile), 1 appears in Ref. . To view the location of the referenced object, select the number in Ref., and the Object Usage window appears displaying the various locations of the referenced object. To view more information about how the object is being used, use one of the following icons that is available within the Object Usage window: View the list page for these objects automatically redirects you to the list page where the object is referenced at. Edit this object modifies settings within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy and so, when this icon is selected, the user is redirected to the Edit Policy page. View the details for this object table, similar to the log viewer table, contains information about what settings are configured within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy, and that security policys settings appear within the table.
Ref.
New LDAP Server page Provides settings for configuring an LDAP server. Name Server Name/IP Enter the name that identifies the LDAP server on the FortiGate unit. Enter the domain name or IP address of the LDAP server.
972
Remote
Server Port
Enter the TCP port used to communicate with the LDAP server. By default, LDAP uses port 389. If you use a secure LDAP server, the default port changes when you select Secure Connection.
Common Name Identifier Enter the common name identifier for the LDAP server. The maximum number of characters is 20. Distinguished Name Enter the base distinguished name for the server using the correct X.500 or LDAP format. The unit passes this distinguished name unchanged to the server. The maximum number of characters is 512. View the LDAP server Distinguished Name Query tree for the LDAP server that you are configuring so that you can cross-reference to the Distinguished Name. The Query icon is located beside the Distinguished Name field. For more information, see Using Query on page 973. Select the type of binding for LDAP authentication. Connect to the LDAP server directly with user name/password, then receive accept or reject based on search of given values. When you select Regular, the Use DN and Password fields appear. Connect as an anonymous user on the LDAP server, then retrieve the user name/password and compare them to given values. Connect directly to the LDAP server with user name/password authentication. Enter the Distinguished name of the user to be authenticated. Available if Bind Type is Regular. Enter the password of the user to be authenticated. This is available if Bind Type is Regular. Select to use a secure LDAP server connection for authentication. Select a secure LDAP protocol to use for authentication. Depending on your selection, the value in Server Port will change to the default port for the selected protocol. This is available only if Secure Connection is selected. LDAPS: port 636 STARTTLS: port 389 Select a certificate to use for authentication from the list. The certificate list comes from CA certificates at System > Certificates > CA Certificates.
Query icon
Certificate
Using Query
The LDAP Distinguished Name Query list displays the LDAP Server IP address, and all the distinguished names associated with the Common Name Identifier for the LDAP server. The tree helps you to determine the appropriate entry for the DN field. You can see the distinguished name associated with the Common Name identifier, by expanding CN identifier and then selecting the DN from the list. The DN you select is displayed in the Distinguished Name field. You must select OK to save your selection in the Distinguished Name field of the LDAP Server configuration. If you want to see the users with the LDAP Server user group for the selected Distinguished Name, expand Distinguished Name in the LDAP Distinguished Name Query tree.
973
Remote
TACACS+
Terminal Access Controller Access-Control System (TACACS+) is a remote authentication protocol that provides access control for routers, network access servers, and other networked computing devices via one or more centralized servers. TACACS+ allows a client to accept a user name and password and send a query to a TACACS+ authentication server. The server host determines whether to accept or deny the request and sends a response back that allows or denies network access to the user. The default TCP port for a TACACS+ server is 49.
Delete
New TACACS+ Server page Provides settings for configuring a TACACS+ server. Name Server Name/IP Enter the name of the TACACS+ server. Enter the server domain name or IP address of the TACACS+ server.
974
FortiToken
Enter the key to access the TACACS+ server. The server key should be a maximum of 16 characters in length. Select the authentication type to use for the TACACS+ server. Selection includes: Auto, ASCII, PAP, CHAP, and MSCHAP. Auto authenticates using PAP, MSCHAP, and CHAP (in that order).
FortiToken
In User > FortiToken > FortiToken, you can add token password codes that are then used by users to authenticate when logging in, for example the FortiGate unit. These token password codes are generated by the FortiToken device, which is a small device that generates a unique token password code. This can then be activated by the unit so that it can then be used for authentication purposes. This code provides additional security for you and users. This is part of the two-factor authentication feature, providing an extra login credential to prove that the user is who they claim to be. For more information about FortiToken and two-factor authentication, see the Authentication chapter of the FortiOS Handbook.
Import
975
Drift
The synchronization of the units system time and the FortiTokens time, which can drfit away or become unsynchronized. When you synchronize the FortiToken, it calculates the units and its own drift. The drift is the number of minutes that the FortiToken has drifted away from the units system time. The minutes is shown in integers only. If drift is zero, then the FortiTokens internal time is the same as the units system time. If the drift is -1, the FortiToken is lagging behind the unit by one minute. If the drift is 1, then the FortiToken is ahead of the unit by one minute. The user that the FortiToken is currently being used by. Displays the number of times the object is referenced to other objects. For example, av_1 profile is applied to a security policy; on the Profile page (UTM > Antivirus > Profile), 1 appears in Ref. . To view the location of the referenced object, select the number in Ref., and the Object Usage window appears displaying the various locations of the referenced object. To view more information about how the object is being used, use one of the following icons that is available within the Object Usage window: View the list page for these objects automatically redirects you to the list page where the object is referenced at. Edit this object modifies settings within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy and so, when this icon is selected, the user is redirected to the Edit Policy page. View the details for this object table, similar to the log viewer table, contains information about what settings are configured within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy, and that security policys settings appear within the table.
User Ref.
Add new FortiToken page Provides settings for configuring multiple FortiToken serial numbers. Serial Number #<number> Enter the FortiTokens serial number that you see on the back of the FortiToken. You can add up to ten FortiTokens. Automatically Send Activate Request to FortiGuard By default, this is enabled. When this is selected, the serial numbers that were inputted in the fields are automatically sent to FortiGuard after selecting OK.
976
The domain controller (DC) agent must be installed on every domain controller to monitor user logins and send information about them to the collector agent. The collector agent must be installed on at least one domain controller to send the information received from the DC agents to the FortiGate unit.
The unit uses this information to maintain a copy of the domain controller user group database. Because the domain controller authenticates users, the unit does not perform authentication. It recognizes group members by their IP address. You must install the Fortinet Single Sign On Agent on the network and configure the unit to retrieve information from the Directory Service server. For more information about Fortinet Single Sign On Agent, see the User Authentication chapter in the FortiOS Handbook.
Edit User/Group
977
PKI
Ref.
Displays the number of times the object is referenced to other objects. For example, av_1 profile is applied to a security policy; on the Profile page (UTM > Antivirus > Profile), 1 appears in Ref. . To view the location of the referenced object, select the number in Ref., and the Object Usage window appears displaying the various locations of the referenced object. To view more information about how the object is being used, use one of the following icons that is available within the Object Usage window: View the list page for these objects automatically redirects you to the list page where the object is referenced at. Edit this object modifies settings within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy and so, when this icon is selected, the user is redirected to the Edit Policy page. View the details for this object table, similar to the log viewer table, contains information about what settings are configured within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy, and that security policys settings appear within the table.
New page Provides settings for configuring FSSO agents. You can configured up to five agents, either Collector or Novell eDirectory. Name FSSO Agent IP/Name Enter a name for the FSSO agent. Enter the IP address or name of the Directory Service server where this collector agent is installed. The maximum number of characters is 63. Enter the TCP port used for Directory Service. This must be the same as the FortiGate listening port specified in the Fortinet Single Sign On Agent collector agent configuration. Enter the password for the collector agent. This is required only if you configured your Fortinet Single Sign On Agent collector agent to require authenticated access. Select the check box and select an LDAP server to access the Directory Service.
Port
Password
LDAP Server
PKI
Caution: If you use the CLI to create a peer user, Fortinet recommends that you enter a value for either subject or ca. If you do not do so, and then open the user record in the web-based manager, you will be prompted to enter a subject or ca value before you can continue.
Public Key Infrastructure (PKI) authentication utilizes a certificate authentication library that takes a list of peers, peer groups, and/or user groups and returns authentication successful or denied notifications. Users only need a valid certificate for successful authenticationno user name or password are necessary. Firewall and SSL VPN are the only user groups that can use PKI authentication.
978
PKI
PKI page Lists each individual PKI user that you have created. On this page, you can edit, delete or create a new PKI user. Create New Delete Creates a new PKI user. When you select Create New, you are automatically redirected to the New PKI User page. Removes a PKI user from the list on the PKI page. The delete icon is not available if the peer user belongs to a user group. Remove it from the user group first. To remove multiple PKI users from within the list, on the PKI page, in each of the rows of users you want removed, select the check box and then select Delete. To remove all PKI users from the list, on the PKI page, select the check box in the check box column and then select Delete. Modifies settings within the PKI user configuration. When you select Edit, you are automatically redirected to the Edit PKI User page. The name of the PKI user. The text string that appears in the subject field of the certificate of the authenticating user. The CA certificate that is used to authenticate this user. Note: PKI certificate authentication supports the extraction of the user name from within the UPN field, which allows users to log in without having to enter their user name. This is available only in the CLI. Displays the number of times the object is referenced to other objects. For example, av_1 profile is applied to a security policy; on the Profile page (UTM > Antivirus > Profile), 1 appears in Ref. . To view the location of the referenced object, select the number in Ref., and the Object Usage window appears displaying the various locations of the referenced object. To view more information about how the object is being used, use one of the following icons that is available within the Object Usage window: View the list page for these objects automatically redirects you to the list page where the object is referenced at. Edit this object modifies settings within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy and so, when this icon is selected, the user is redirected to the Edit Policy page. View the details for this object table, similar to the log viewer table, contains information about what settings are configured within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy, and that security policys settings appear within the table.
Ref.
New PKI User page Provides settings for configuring a new PKI user. Name Subject CA Enter the name of the PKI user. Enter the text string that appears in the subject field of the certificate of the authenticating user. This field is optional. Enter the CA certificate that must be used to authenticate this user. This field is optional. Require this PKI user to authenticate by password in addition to certificate authentication. Enter the password that this PKI user must enter.
979
Monitor
You can add or modify other configuration settings for PKI authentication. Peer users are created in User > PKI > PKI for authentication; however, you must enter a value for at least one of the fields, Subject or CA. You can configure peer user groups only through the CLI.
Note: PKI certificate authentication supports the extraction of the user name from within the UPN field, which allows users to log in without having to enter their user name. This is available only in the CLI.
Monitor
You can go to the Monitor menu to view lists of currently authenticated users, authenticated IM users, and banned users. For each authenticated user, the list includes the user name, user group, how long the user has been authenticated (Duration), how long until the users session times out (Time left), and the method of authentication used. The list of IM users includes the source IP address, protocol, and last time the protocol was used. The Banned User list includes users configured by administrators in addition to those quarantined based on AV, IPS, or DLP rules. This topic contains the following: Firewall monitor list IM user monitor list The Banned User list
980
Monitor
Filter Settings
Select to filter the information on the page. Filters appears automatically after selecting Filter Settings, below the column headings. Use to configure filter settings. Note: Filter Settings configures all filter settings. Filter icons are used to configure filter settings within that column. To apply a filter setting, select the plus sign beside Add new filter and then select and enter the information required. Repeat to add other filter settings. To modify settings, select Change beside the setting and edit the settings. To clear all filter settings, select the icon beside Clear all filters. To use a filter icon to filter settings within a column, select the filter icon in the column; Filters appears. Within Filters, configure the settings for that column. Select to filter the information on the page. Filters appears automatically after selecting Filter Settings, below the column headings. Use to configure filter settings. Note: Filter Settings configures all filter settings. Filter icons are used to configure filter settings within that column.
De-authenticate All Stop authenticated sessions for all users in the Firewall user monitor list. Users must re-authenticate with the firewall to resume their communication Users session. Page Controls Column Settings User Name Use to navigate through the list. Customize the table view. You can select the columns to hide or display and specify the column displaying order in the table. The user names of all connected remote users. In the User Name column heading, there is a green arrow beside the name. This green arrow allows you to sort the list alphabetically. By default, the green arrow is up and when you select it, the green arrow is down. The green up arrow indicates that the list is in alphabetical order, starting with the letter A; when the green arrow is down, the list is the opposite. The user group that the remote user is part of. The policy identification number. Length of time since the user was authenticated. The users source IP address. The amount of traffic that is going through the unit, that is generated by the user. Authentication method used for the user by the unit (authentication methods can be Fortinet Single Sign On Agent, firewall authentication, or NTLM).
981
Monitor
IM page Lists all active IM users that are currently active. This page allows you to view blocked users as well as users that are currently using a particular IM protocol, such as MSN. Protocol # Protocol Filter the list by selecting the protocol for which to display current users: AIM, ICQ, MSN, or Yahoo. All current users can also be displayed. The position number of the IM user in the list. The protocol being used.
User Name The name selected by the user when registering with an IM protocol. The same user name can be used for multiple IM protocols. Each user name/protocol pair appears separately in the list. Source IP Block The IP address where the user initiated the IM session from. Select to add the user name to the permanent black list. Each user name/protocol pair must be explicitly blocked by the administrator. Last Login The last time the current user used the protocol.
Banned users are viewed from User > Monitor > Banned User.
Banned User page Lists all banned users. Page Controls Use to navigate through the list. Clear # Ban key Application Protocol Removes all users and IP addresses from the Banned User list. The position number of the user or IP address in the list. The Ban key. The protocol that was used by the user or IP address added to the Banned User list.
Cause or rule The FortiGate function that caused the user or IP address to be added to the Banned User list. Cause or rule can be IPS, Antivirus, or Data Leak Prevention. User Authentication for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
982
Monitor
Created Expires
The date and time the user or IP address was added to the Banned User list. The date and time the user or IP address will be automatically removed from the Banned User list. If Expires is Indefinite, you must manually remove the user or host from the list. Removes the selected user or IP address from the Banned User list.
Delete
983
Monitor
984
Authentication servers
FortiGate units support the use of external authentication servers. An authentication server can provide password checking for selected FortiGate users or it can be added as a member of a FortiGate user group. If you are going to use authentication servers, you must configure the servers before you configure FortiGate users or user groups that require them. This section includes the following topics: RADIUS servers LDAP servers TACACS+ servers FSSO servers RSA ACE (SecurID) servers
RADIUS servers
Remote Authentication and Dial-in User Service (RADIUS) is a broadly supported clientserver protocol that provides centralized authentication, authorization, and accounting functions. RADIUS clients are built into gateways that allow access to networks such as Virtual Private Network servers, Network Access Servers (NAS), as well as network switches and firewalls that use authentication. FortiGate units fall into the last category. RADIUS servers use UDP packets to communicate with the RADIUS clients on the network to authenticate users before allowing them access to the network, to authorize access to resources by appropriate users, and to account or bill for those resources that are used. RADIUS servers are currently defined by RFC 2865 (RADIUS) and RFC 2866 (Accounting), and listen on either UDP ports 1812 (authentication) and 1813 (accounting) or ports 1645 (authentication) and 1646 (accounting) requests. RADIUS servers exist for all major operating systems. You must configure the RADIUS server to accept the FortiGate unit as a client. FortiGate units use the authentication and accounting functions of the RADIUS server.
Note: FortiOS does not accept all characters from auto generated keys from MS Windows 2008. These keys are very long and as a result RADIUS authentication will not work. Maximum key length for MS Windows 2008 is 128 bytes. In older versions of FSAE, it was 40 bytes.
985
RADIUS servers
Authentication servers
usernames and passwords defined in a configuration file user account names and passwords configured on the computer where the RADIUS server is installed.
If users are members of multiple RADIUS groups, then the user group authentication timeout value does not apply. See Membership in multiple groups on page 1018.
When a configured user attempts to access the network, the FortiGate unit will forward the authentication request to the RADIUS server which will match the username and password remotely. Once authenticated the RADIUS server passes the authorization granted message to the FortiGate unit which grants the user permission to access the network. The RADIUS server uses a shared secret key along with MD5 hashing to encrypt information passed between RADIUS servers and clients, including the FortiGate unit. Typically only user credentials are encrypted. Additional security can be configured through IPSec tunnels.
Framed-IP-Address Address to be configured for the user. Fortinet-VSA Acct-Input-Octets Number of octets received from the port over the course of this service being provided. Used to charge the user for the amount of traffic they used. Acct-OutputOctets Number of octets sent to the port while delivering this service. Used to charge the user for the amount of traffic they used.
43
Table 64 describes the supported authentication events and the RADIUS attributes that are sent in the RADIUS accounting message.
986
Authentication servers
RADIUS servers
Table 64: RADIUS attributes sent in RADIUS accounting message RADIUS ATTRIBUTE AUTHENTICATION METHOD Web XAuth of IPsec (without DHCP) XAuth of IPsec (with DHCP) PPTP/L2TP (in PPP) SSL-VPN 1 2 3 4 5 6 7
D D D D D D D D D
D D D D D D D
D D D D D D D
Vendor-specific attributes
Vendor specific attributes (VSA) are the method RADIUS servers and client companies use to extend the basic functionality of RADIUS. Some major vendors, such as Microsoft, have published their VSAs, however many do not. In order to support vendor-specific attributes (VSA), the RADIUS server requires a dictionary to define which VSAs to support. This dictionary is typically supplied by the client or server vendor. The Fortinet RADIUS vendor ID is 12365. The FortiGate unit RADIUS VSA dictionary is supplied by Fortinet and is available through the Fortinet Knowledge Base (http://kb.forticare.com) or through Technical Support. Fortinets dictionary is configured this way: ## Fortinets VSAs # VENDOR fortinet 12356 BEGIN-VENDOR fortinet ATTRIBUTE Fortinet-Group-Name1 string ATTRIBUTE Fortinet-Client-IP-Address2 ipaddr ATTRIBUTE Fortinet-Vdom-Name3 string ATTRIBUTE Fortinet-Access-Profile6 string # # Integer Translations # END-VENDOR Fortinet Note that using the Fortinet-Vdom-Name, users can be tied to a specific VDOM on the FortiGate unit. See the documentation provided with your RADIUS server for configuration details.
A maximum of 10 remote RADIUS servers can be configured on the FortiGate unit. One or more servers must be configured on FortiGate before remote users can be configured. To configure remote users, see Creating users on page 1004.
987
RADIUS servers
Authentication servers
On the FortiGate unit, the default port for RADIUS traffic is 1812. Some RADIUS servers use port 1645. If this is the case with your server, you can either: or Change the FortiGate unit default RADIUS port to 1645 using the CLI: config system global set radius_port 1645 end Re-configure the RADIUS server to use port 1812. See your RADIUS server documentation for more information on this procedure.
One wildcard admin account can be added to the FortiGate unit when using RADIUS authentication. This uses the wildcard character to allow multiple admin accounts on RADIUS to use a single account on the FortiGate unit. See Example wildcard admin accounts - CLI on page 993. To configure the FortiGate unit for RADIUS authentication - web-based manager 1 Go to User > Remote > RADIUS and select Create New. 2 Enter a name for the RADIUS server. 3 Select Query as Type.
Note: Selecting a Type of Dynamic Start configures the Dynamic Profile feature. See Dynamic profiles and end points on page 1099.
4 In Primary Server Name/IP, enter the domain name or IP address of the RADIUS server. 5 In Primary Server Secret, enter the server secret key, such as radiusSecret. 6 Optionally, enter the information for a secondary RADIUS server in the Secondary Server Name/IP and Secondary Server Secret fields. 7 Select the Authentication Scheme checkbox. Use Default Authentication Scheme will usually work. Or, you can select Specify Authentication Protocol and select the protocol your RADIUS server requires. 8 Select OK. To configure the FortiGate unit for RADIUS authentication - CLI example config user radius edit ourRADIUS set auth-type auto set server 10.11.102.100 set secret radiusSecret end For more information about RADIUS server options, refer to the FortiGate CLI Reference.
Troubleshooting RADIUS
To test the connection to the RADIUS server use the following command: diagnose test authserver radius-direct <server_name or IP> <port number> <secret> For the port number, enter -1 to use the default port. Otherwise enter the port number to check.
988
Authentication servers
LDAP servers
LDAP servers
Lightweight Directory Access Protocol (LDAP) is an Internet protocol used to maintain authentication data that may include departments, people, groups of people, passwords, email addresses, and printers. LDAP consists of a data-representation scheme, a set of defined operations, and a request/response network. The scale of LDAP servers range from big public servers such as BigFoot and Infospace, to large organizational servers at universities and corporations, to small LDAP servers for workgroups that may be using OpenLDAP. This document focuses on the institutional and workgroup applications of LDAP. This section includes: Components and topology LDAP Information hierarchy Configuring the FortiGate unit to use an LDAP server Example wildcard admin accounts - CLI Example of LDAP to allow Dial-in through member-attribute - CLI Troubleshooting LDAP
Binding
Binding is the step where the LDAP server authenticates the user. If the user is successfully authenticated, binding allows the user access to the LDAP server based on that users permissions. The FortiGate unit can be configured to use one of three types of binding: anonymous - bind using anonymous user search
989
LDAP servers
Authentication servers
regular - bind using username/password and then search simple - bind using a simple password authentication without a search
You can use simple authentication if the user records all fall under one domain name (dn). If the users are under more than one dn, use the anonymous or regular type, which can search the entire LDAP database for the required username. If your LDAP server requires authentication to perform searches, use the regular type and provide values for username and password.
Supported versions
The FortiGate unit supports LDAP protocol functionality defined in RFC 2251: Lightweight Directory Access Protocol v3, for looking up and validating usernames and passwords. FortiGate LDAP supports all LDAP servers compliant with LDAP v3. In addition, FortiGate LDAP supports LDAP over SSL/TLS, which can be configured only in the CLI. FortiGate LDAP does not support proprietary functionality, such as notification of password expiration, which is available from some LDAP servers. FortiGate LDAP does not supply information to the user about why authentication failed.
In addition to the DN, the FortiGate unit needs an identifier for the individual person. Although the FortiGate unit GUI calls this the Common Name (CN), the identifier you use is not necessarily CN. On some servers, CN is the full name of a person. It might be more convenient to use the same identifier used on the local computer network. In this example, User ID (UID) is used.
990
Authentication servers
LDAP servers
One way to test this is with a text-based LDAP client program. For example, OpenLDAP includes a client, ldapsearch, that you can use for this purpose. Enter the following at the command line: ldapsearch -x '(objectclass=*)' The output is lengthy, but the information you need is in the first few lines: version: 2 # # filter: (objectclass=*) # requesting: ALL dn: dc=example,dc=com dc: example objectClass: top objectClass: domain dn: ou=People,dc=example,dc=com ou: People objectClass: top objectClass: organizationalUnit ... dn: uid=auser,ou=People,dc=example,dc=com uid: auser cn: Alex User In the output above, you can see auser (uid) and Alex User (cn). Also note the dn is ou=People, dc=example, dc=com.
991
LDAP servers
Authentication servers
5 Enter the Common Name Identifier (20 characters maximum). cn is the default, and is used by most LDAP servers. 6 In the Distinguished Name field, enter the base distinguished name for the server using the correct X.500 or LDAP format. The FortiGate unit passes this distinguished name unchanged to the server. The maximum number of characters is 512. If you dont know the distinguished name, leave the field blank and select the Query icon to the right of the field. See the Using the Query icon on page 992. 7 In Bind Type, select Regular. 8 In User DN, enter the LDAP administrators distinguished name. 9 In Password, enter the LDAP administrators password. 10 Select OK.
Note: To verify your Distinguished Name field is correct, you can select the Query icon. If your DN field entry is valid, you will see the part of the LDAP database it defines. If your DN field entry is not valid, it will display an error message and return no information.
For detailed information about configuration options for LDAP servers, see the online Help on your FortiGate unit. To configure the FortiGate unit for LDAP authentication - CLI example config user ldap edit ourLDAPsrv
set set set set set set server 10.11.101.160 cnid cn dn cn=users,dc=office,dc=example,dc=com type regular username cn=administrator,cn=users,dc=office,dc=example,dc=com password w5AiGVMLkgyPQ
end
992
Authentication servers
LDAP servers
Figure 106: LDAP server Distinguished Name Query tree Common Name Identifier (CN) Distinguished Name (DN)
993
LDAP servers
Authentication servers
In this example, where possible default values are used. If a specific value is not mentioned, it is set to its default value.
To configure LDAP server - CLI config user ldap edit "ldap_server" set server "192.168.201.3" set cnid "sAMAccountName" set dn "DC=example,DC=com,DC=au" set type regular set username "CN=Administrator,CN=Users,DC=example,DC=COM set password * set group CN=GRP,OU=training,DC=example,DC=COM set filter "" next end To configure the user group and add the LDAP server - CLI config user group edit "ldap_grp" set member "ldap" config match edit 1 set server-name "ldap" set group-name "TRUE" next end next end
994
Authentication servers
LDAP servers
next end For troubleshooting, test that the admin account is operational, and see Troubleshooting LDAP on page 996.
To configure user LDAP member-attribute settings - CLI config user ldap edit "ldap_server" set server "192.168.201.3" set cnid "sAMAccountName" set dn "DC=fortinet,DC=com,DC=au" set type regular set username "fortigate@example.com" set password ****** set filter "(&(uid=%u)(msNPAllowDialin=TRUE))" set member-attr "msNPAllowDialin" next end
995
LDAP servers
Authentication servers
next end next end Once these settings are in place, users can authenticate.
Troubleshooting LDAP
The examples in this section use the values from the previous example.
996
Authentication servers
TACACS+ servers
TACACS+ servers
When users connect to their corporate network remotely, they do so through a remote access server. As remote access technology has evolved, the need for security when accessing networks has become increasingly important. This need can be filled using a Terminal Access Controller Access-Control System (TACACS+) server. TACACS+ is a remote authentication protocol that provides access control for routers, network access servers, and other networked computing devices via one or more centralized servers. TACACS+ allows a client to accept a username and password and send a query to a TACACS+ authentication server. The server host determines whether to accept or deny the request and sends a response back that allows or denies the user access to the network. TACACS+ offers fully encrypted packet bodies, and supports both IP and AppleTalk protocols. TACACS+ uses TCP port 49, which is seen as more reliable than RADIUSs UDP protocol. There are several different authentication protocols that TACACS+ can use during the authentication process:
Protocol ASCII Definition Machine-independent technique that uses representations of English characters. Requires user to type a username and password that are sent in clear text (unencrypted) and matched with an entry in the user database stored in ASCII format. Password Authentication Protocol (PAP) Used to authenticate PPP connections. Transmits passwords and other user information in clear text. Challenge-Handshake Authentication Protocol (CHAP) Provides the same functionality as PAP, but is more secure as it does not send the password and other user information over the network to the security server. MicroSoft Challenge-Handshake Authentication Protocol v1 (MSCHAP) Microsoft-specific version of CHAP. The default protocol configuration, Auto, uses PAP, MS-CHAP, and CHAP, in that order.
PAP
CHAP
MS-CHAP default
997
FSSO servers
Authentication servers
To configure the FortiGate unit for TACACS+ authentication - CLI config user tacacs+ edit <server_name> set auth-type {ascii | auto | chap | ms_chap | pap} set key <server_key> set tacacs+-port <tacacs+_port_num> set server <domain> end
FSSO servers
Novell and Microsoft Windows networks provide user authentication based on directory services: eDirectory for Novell, Active Directory for Windows. Users can log on at any computer in the domain and have access to resources as defined in their user account. The Fortinet Single Sign On (FSSO) agent enables FortiGate units to authenticate these network users for security policy or VPN access without asking them again for their username and password. When a user logs in to the Windows or Novell domain, the FSSO agent sends the FortiGate unit the users IP address and the names of the user groups to which the user belongs. The FortiGate unit uses this information to maintain a copy of the domain controller user group database. Because the domain controller authenticates users, the FortiGate unit does not perform authentication. It recognizes group members by their IP address. In the FortiOS FSSO configuration, you specify the servers where the FSSO Collector agent is installed. The FortiGate unit retrieves the names of the Novell or Active Directory user groups from the domain controllers on the domains, and then the FortiGate unit gets them from the Collector agent. You cannot use these groups directly. You must define FSSO type user groups on your FortiGate unit and then add the Novell or Active Directory user groups to them. The FSSO user groups that you created are used in security policies and VPN configurations to provide access to different services and resources. For more information about Directory Services and FSSO, see FSSO integration with Windows AD or Novell on page 1059.
Components
When using SecurID, users carry a small device or token that generates and displays a random password. According to RSA, each SecurID authenticator token has a unique 64bit symmetric key that is combined with a powerful algorithm to generate a new code every 60 seconds. The token is time-synchronized with the SecurID RSA ACE/Server. The RSA ACE/Server is the management component of the SecurID system. It stores and validates the information about the SecurID tokens allowed on your network.
998
Authentication servers
The Agent Host is the server on your network, in this case it is the FortiGate unit, that intercepts user logon attempts. The Agent Host gathers the user ID and password entered from their SecurID token, and sends that information to the RSA ACE/Server to be validated. If valid, a reply comes back indicating it is a valid logon and the FortiGate unit allows the user access to the network resources specified in the associated security policy.
The following instructions are based on RSA ACE/Server version 5.1, and assume that you have successfully completed all the external RSA and RADIUS server configuration steps listed above. To configure the FortiGate unit as an Agent Host on the RSA ACE/Server 1 On the RSA ACE/Server computer, go to Start > Programs > RSA ACE/Server, and then Database Administration - Host Mode. 2 On the Agent Host menu, select Add Agent Host. 3 In the Name field, enter a name for the FortiGate unit. 4 In the Network address field, enter the FortiGate unit IP address. 5 Select Secondary Nodes and define all hostname/IP addresses that resolve to the FortiGate unit. If needed, refer to the RSA ACE/Server documentation for more information. To configure the FortiGate unit to use the RADIUS server 1 Go to User > Remote > RADIUS and select Create New. 2 In the Name field, enter the name of the RADIUS server. 3 In the Primary Server Name/IP and Primary Server Secret fields, enter the appropriate information about the RADIUS server you configured for use with SecurID. 4 Select OK. To create a SecurID user group 1 Go to User > User Group. 2 Select Create New. 3 In the Name field, enter a name for the group. 4 In the Available Users/Groups list, select the RADIUS server you configured for use with SecurID. 5 Move the selected server to the Members list on the right. 6 Select OK.
999
Authentication servers
The following sections assume the SecurID user group is called securIDgrp and has already been configured. Unless otherwise states, default values are used.
Security policy
To use SecurID in a security policy, you must include the SecurID user group in an identity-based security policy. This procedure will create a security policy that allows HTTP, FTP, and POP3 traffic from the internal interface to wan1. If these interfaces are not available on your FortiGate unit, substitute other similar interfaces. To configure a security policy with SecurID authentication - web-based manager 1 Go to Policy > Policy. 2 Select Create New. 3 Select internal for Source Interface/Zone. 4 Select wan1 for Destination Interface/Zone. 5 For both Source Address and Destination Address select all. 6 Select Enable identity-based Policy and select Add. 7 Move securIDgrp rom the Available User Groups to the list on the right. 8 Move HTTP, FTP, and POP3 from Available Services to the list on the right. 9 Select OK. You are returned to the security policy creation page, with the information you just entered in the identity-based policy (IBP) table as Rule ID 1. 10 Select OK. The SecurID security policy is configured. To generate usage reports on traffic authenticated with this policy, when you are adding the IBP rule, enable Log Traffic. To either limit traffic or guarantee minimum bandwidth for traffic that uses the SecurID security policy, when you are adding the IBP rule, select traffic shaping and select one of the default shapers from the list such as guarantee-100kbps. To customize any challenge pages or logon pages users will see when authenticating against this security policy, select Customize Authentication Messages and select the icon that appears. This takes you to the Edit Message page where you can customize the login challenge page, login failed page, and others. For more details on configuring security policies, see the FortiGate Fundamentals handbook chapter.
1000
Authentication servers
PPTP VPN
PPTP VPN is configured in the CLI. In the PPTP configuration (config vpn pptp), set usrgrp to the SecurID user group.
SSL VPN
In the SecurID user group, select the appropriate web portal for these users. In the security policy for the SSL VPN, include the SecurID user group in the list of selected user groups.
1001
Authentication servers
1002
Users
A user is a user account consisting of username, password, and in some cases other information, configured on the FortiGate unit or on an external authentication server. Users can access resources that require authentication only if they are members of an allowed user group. There are several different types of user accounts with slightly different methods of authentication:
Table 65: How the FortiGate unit authenticates different types of users User type Local user, password stored on the FortiGate unit Local user, password stored on a remote server Authentication server user FSSO user Authentication The username and password must match a user account stored on the FortiGate unit. Authentication by FortiGate security policy. The username must match a user account stored on the FortiGate unit and the username and password must match a user account stored on the remote authentication server. A FortiGate user group can include user accounts or groups that exist on a remote authentication server. With Fortinet Single Sign On (FSSO), users on a Microsoft Windows or Novell network can use their network authentication to access resources through the FortiGate unit. Access is controlled through FSSO user groups which contain Windows or Novell user groups as their members. A peer user is a digital certificate holder that authenticates using a client certificate. No password is required, unless two-factor authentication is enabled.
This section includes: Local users PKI or peer users Two-factor authentication FortiToken Monitoring users
1003
Users
Local users
Local users are defined on the FortiGate unit. To define a local user you need: a username a password or the name of the authentication server that contains the user account
Note: If the user is authenticated externally, the username on the FortiGate unit must be identical to the username on the authentication server.
Local users are authenticated through authentication security policies. See This section includes: Creating users Removing users Removing references to users
Creating users
Before configuring any authentication, except dynamic profiles, you must first create local users. For more about dynamic profiles, see Configuring dynamic profile on page 1106. When creating a new user, there are only two differences between a local and a remote user: local users require a password to be configured remote users do not require a password, but do require a remote authentication server to be configured
To create a local user - web-based manager 1 Go to User > User and select Create New. 2 Enter the username in the username field. Select Password and type a password. The password should be at least six characters long.
Note: To authenticate this user using an external authentication server, select the Match user option for the appropriate type of server and select the server name. Password is not required. You must configure the remote server access first. See Authentication servers on page 985.
3 Optionally select Enable Two-factor Authentication to use that option with this user. When enabled, additional options will be displayed. Select one of the following options and configure it as stated. Select FortiToken, and choose the FortiToken serial number to associate with this user. Select Email to and enter the users email address to email them the token code. Select SMS and enter the Mobile Provider from the list, and enter the users mobile phone number that will receive the token code in a text message. 4 Select OK.
Note: The Mobile Provider for SMS must be entered in the CLI using the config user sms-provider command before it will be available to select in the web-based manager.
1004
Users
To create a local user - CLI examples Locally authenticated user config user local edit user1 set type password set passwd ljt_pj2gpepfdw end User authenticated on an LDAP server config user local edit user2 set type ldap set ldap_server ourLDAPsrv end User authenticated on a RADIUS server config user local edit user3 set type radius set radius_server ourRADIUSsrv end User authenticated on a TACACS+ server config user local edit user4 set type tacacs+ set tacacs+_server ourTACACS+srv end User authenticated with a FortiToken config user local edit user5 set type password set passwd ljt_pj2gpepfdw set two_factor fortitoken set fortitoken 182937197 end User authenticated using email config user local edit user6 set type password set passwd ljt_pj4h7epfdw set two_factor email set email-to user6@sample.com end User authenticated using SMS text message config user sms-provider edit Sample Mobile Inc set mail-server mail.sample.com end config user local edit user7 set type password
FortiOS Handbook v3: User Authentication 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1005
Users
passwd 3ww_pjt68dw two_factor sms sms-provider Sample Mobile Inc sms-phone 2025551234
Removing users
When a user account is no longer in use, it should be deleted. Removing local and remote users from FortiOS involve the same steps. If the user account is references by any configuration objects those references must be removed before the user can be deleted. See Removing references to users on page 1006. To remove a user from the FortiOS configuration - web-based manager 1 Go to User > User. 2 Select the check box of the user that you want to remove. 3 Select Delete. 4 Select OK. To remove a user from the FortiOS configuration - CLI example config user local delete user4444 end
1006
Users
To create a peer user for PKI authentication - web-based manager 1 Go to User > PKI and select Create New. 2 Enter the username. 3 Fill in at least one of the following fields:
Subject CA The text string that appears in the Subject field of the users certificate. Select the CA certificate that must be used to authenticate this peer user.
4 Select OK. There are other configuration settings that can be added or modified for PKI authentication. For example, you can configure the use of an LDAP server to check access rights for client certificates. For information about the detailed PKI configuration settings only available through the CLI, see the FortiGate CLI Reference.
Two-factor authentication
The standard logon requires a username and password. This is one factor authenticationyour password is one piece of information you need to know to gain access to the system. Two factor authentication adds the requirement for another piece of information for you logon. Generally the two factors are something you know (password) and something you have (certificate, token, etc.). This makes it harder for a hacker to steal your logon information. For example if you have a FortiToken device, the hacker would need to both use it and know your password to gain entry to your account. Two-factor authentication is available on both user and admin accounts. But before you enable two-factor authentication on an administrator account, you should ensure you have a second administrator account configured to ensure access to the FortiGate unit if you are unable to authenticate for some reason.
Note: Two-factor authentication does not work with explicit proxies.
1007
Users
Certificate
You can increase security by requiring both certificate and password authentication for PKI users. Certificates are installed on the users computer. Requiring a password also protects against unauthorized use of that computer. Optionally peer users can enter the code from their FortiToken instead of the certificate. To create a peer user with two-factor authentication - web-based manager While configuring a peer user (see PKI or peer users on page 1006), select Require twofactor authentication and enter a password. To create a peer user with two-factor authentication - CLI example config user peer edit peer1 set subject E=peer1@mail.example.com set ca CA_Cert_1 set two-factor enable set passwd fdktguefheygfe end For more information on certificates, see Certificates overview on page 1042.
Email
Two-factor email authentication sends a randomly generated six digit numeric code to the specified email address. Enter that code when prompted at logon. This token code is valid for 60 seconds. If you enter this code after that time, it will not be accepted. A benefit is that you do not require mobile service to authenticate. However, a potential issue is if your email server does not deliver the email before the 60 second life of the token expires. The code will be generated and emailed at the time of logon, so you must have email access at that time to be able to receive the code. To enable email two-factor authentication - web-based manager 1 Go to the email server under Log&Report->Log Config->Alert e-mail. 2 Enter the SMTP Server and Email from address. 3 If applicable, enable Authentication on the SMTP server and enter the SMTP username and password to use. 4 Select Apply. 5 To modify an administrator account, go to System > Admin > Administrators. To modify a user account go to User > User. 6 Select an existing account or select Create New. 7 Select Enable Two-factor Authentication. 8 Select Email to. 9 Enter the email address. 10 Select OK.
User Authentication for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1008
Users
SMS
SMS two-factor authentication sends the token code in an SMS text message to the mobile device indicated when this user attempts to logon. This token code is valid for 60 seconds. If you enter this code after that time, it will not be accepted. Enter this code when prompted at logon to be authenticated. SMS two-factor authentication has the benefit that you do not require email service before logging on. A potential issue is if the mobile service provider does not send the SMS text message before the 60 second life of the token expires. Before configuring SMS, you must configure the email server for sending email from the FortiGate unit and one or more SMS providers in the CLI. To configure the SMTP email address for your FortiGate unit - web-based manager 1 Go to the email server under Log&Report->Log Config->Alert e-mail. 2 Enter the SMTP Server and Email from address. 3 If applicable, enable Authentication on the SMTP server and enter the SMTP username and password to use. 4 Select Apply. To configure an SMS provider - CLI config user sms-provider edit <provider_name> set mail-server <server_email> next end To configure SMS two-factor authentication - web-based manager 1 To modify an: administrator account, go to System > Admin > Administrators, or user account go to User > User. 2 Select an existing account or select Create New. 3 Select Enable Two-factor Authentication. 4 Select SMS. 5 Choose the SMS provider from the drop down list. 6 Enter the phone number of the mobile device that will receive the SMS text messages. If you have problems receiving the token codes via SMS messaging, contact your mobile provider to ensure you are using the correct phone number format to receive text messages and that your current mobile plan allows text messages.
FortiToken
FortiToken is a disconnected one-time password (OTP) generator. It is a small physical device with a button that when pressed displays a six digit authentication code. This code is entered with a users username and password as two-factor authentication. The code displayed changes every 60 seconds, and when not in use the LCD screen is blanked to extend the battery life.
1009
Users
FortiTokens have a small hole in one end. This is intended for a lanyard to be inserted so the device can be worn around the neck, or easily stored with other electronic devices. Do not put the FortiToken on a key ring as the metal ring and other metal objects can damage it. The FortiToken is an electronic device like a cell phone and should be treated with similar care. Any time information about the FortiToken is transmitted, it is encrypted. When the FortiGate unit receives the code that matches the serial number for a particular FortiToken, it is delivered and stored encrypted. This is in keeping with the Fortinets commitment to keeping your network highly secured. FortiTokens can be added to user accounts that are local, IPSec VPN, SSL VPN, and even Administrators. See Associating FortiTokens with accounts on page 1012. A FortiToken can only be associated with one account at a time on a FortiGate unit. However, multiple FortiGate units can have the same FortiToken registered. This is useful for employees who travel between offices. If a user loses their FortiToken, it can be locked out using the FortiGate so it will not be used to falsely access the network. Later if found, that FortiToken can be unlocked on the FortiGate to allow access once again. See FortiToken maintenance on page 1013. There are three tasks to complete before FortiTokens can be used to authenticate accounts: 1 Adding FortiTokens to the FortiGate 2 Activating a FortiToken on the FortiGate 3 Associating FortiTokens with accounts
1010
Users
RTINET
198490
4. FortiGate validates user credentials, and prompts user for FortiToken code. 6. User enters FortiToken code. 8. If FortiToken has drifted, user prompted to enter next code. 10. User enters second FortiToken code. 11. FortiGate validates the code and allows access to network (Internet). 7. FortiGate validates the code and allows access to network (Internet).
When configured the FortiGate unit accepts the username and password, authenticates them either locally or remotely, and prompts the user for the FortiToken code. The FortiGate then authenticates the FortiToken code. When FortiToken authentication is enabled, the prompt field for entering the FortiToken code is automatically added to the authentication screens. Even when an Administrator is logging in through a serial or Telnet connection and their account is linked to a FortiToken, that Administrator will be prompted for the tokens code at each login.
Note: If you have attempted to add invalid FortiToken serial numbers, there will be no error message. The serial numbers will simply not be added to the list.
1011
Users
To import multiple FortiTokens to the FortiGate - web-based manager 1 Go to User > FortiToken > FortiToken. 2 Select Import. 3 Browse to the local file location on your local computer. The file must be a text file with one FortiToken serial number per line. 4 Select OK. To add two FortiTokens to the FortiGate - CLI config user fortitoken edit <serial_number> next edit <serial_number2> next end
To activate a FortiToken on the FortiGate unit - web-based manager 1 Go to User > FortiToken. 2 Select one or more FortiTokens with a status of New. 3 Select Activate. 4 Refresh web browser. The status of selected FortiTokens will change to Activated. The selected FortiTokens are now available for use with user and admin accounts. To activate a FortiToken on the FortiGate unit - CLI config user fortitoken edit <token_serial_num> set status activate next end
1012
Users
4 Select Enable Two-factor Authentication. 5 Select FortiToken, and select the serial number from the list that matches that user's FortiToken. 6 Select OK. To add a FortiToken to a local user account - CLI config user local edit <username> set type password set passwd myPassword set two-factor fortitoken set fortitoken <serial_number> set status enable next end To add a FortiToken to an administrator account - web-based manager 1 Ensure that your FortiToken serial number has been added to the FortiGate successfully, and its status is Activated. 2 Go to System > Admin > Administrators, and select an admin account. This account is assumed to be configured except for two-factor authentication. 3 Select Enable Two-factor Authentication. 4 Select FortiToken, and select the serial number from the list that matches that user's FortiToken. 5 Select OK. To add a FortiToken to a local user account - CLI config user local edit <username> set type password set passwd myPassword set two-factor fortitoken set fortitoken <serial_number> set status enable next end The fortitoken keyword will not be visible until fortitoken is selected for the twofactor keyword.
Note: Before a new FortiToken can be used, it may need to be synchronized due to clock drift.
FortiToken maintenance
Once FortiTokens are entered into the FortiGate unit, there are only two tasks to maintain them changing the status, To change the status of a FortiToken between Activated and Locked - CLI config user fortitoken edit <token_serial_num> set status lock
FortiOS Handbook v3: User Authentication 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1013
Users
next end Any user attempting to login using this FortiToken will not be able to authenticate. To list the drift on all FortiTokens configured on this FortiGate unit - CLI # diag fortitoken drift FORTITOKEN DRIFT This command lists the serial number and drift for each FortiToken configured on this FortiGate unit. This command is useful to check if it is necessary to synchronize the FortiGate and any particular FortiTokens.
Monitoring users
To monitor user activity in the web-based manager, go to Users > Monitor > Firewall. The list of users who are logged on is displayed with some information about them such as their user group, security policy ID, how long they have been logged on, their IP address, traffic volume, and their authentication method as one of FSSO, NTLM, or firewall (FWauth). From this screen you can de-authenticate all users who are logged on. The deauthenticate button is at the top left of this screen. To see information about banned users go to User > Monitor > Banned Users. Displayed information about users who have been banned includes what application the triggered the ban (Application Protocol), the reason for the ban (Cause or rule), Created, and when the ban expires.
For example, to create a filter to display only users with an IP address of 10.11.101.x who authenticated using one of security policies five through eight, and who belong to the user group Accounting. To configure a user monitor filter - web-based manager 1 Go to User > Monitor > Firewall.
User Authentication for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1014
User groups
2 Select filter icon for IP address. 3 Enter 10.11.101.0. 4 Select Add new filter. 5 From the list of fields select Policy ID and enter 5-8. 6 Select Add new filter. 7 From the list of fields select User Group and enter Accounting. 8 Select Apply.
User groups
A user group is a list of user identities. An identity can be: a local user account (username/password) stored on the FortiGate unit a local user account with the password stored on a RADIUS, LDAP, or TACACS+ server a PKI user account with digital client authentication certificate stored on the FortiGate unit a RADIUS, LDAP, or TACACS+ server, optionally specifying particular user groups on that server a user group defined on an FSSO server.
Identity-based policies and some types of VPN configurations allow access to specified user groups only. Users must be in a group and that group must be part of the security policy.
Note: You cannot change the type of a group unless the group is empty.
In most cases, the FortiGate unit authenticates users by requesting their username and password. The FortiGate unit checks local user accounts first. If a match is not found, the FortiGate unit checks the RADIUS, LDAP, or TACACS+ servers that belong to the user group. Authentication succeeds when a matching username and password are found. If the user belongs to multiple groups on a server, those groups will be matched as well.
Note: FortiOS does not allow username overlaps between RADIUS, LDAP, or
TACACS+ servers. There are two types of FortiGate user groups: Firewall user groups, and FSSO user groups.
1015
User groups
Configuring a firewall user group User group timeouts Viewing, editing and deleting user groups
For more information, see the IPsec VPN chapter of the FortiOS Handbook.
To create a Firewall user group - web-based manager 1 Go to User > User Group and select Create New. 2 Enter a name for the user group. 3 In Type, select Firewall. 4 From the Available Users list, select users and then select the right arrow button to move the names to the Members list. If you select an authentication server as a group member, by default all user accounts on the authentication server are members of this FortiGate user group. Follow steps 5 through 8 if you want to include only specific user groups from the authentication server. Otherwise, select OK. 5 Select Add. 6 To add a remote authentication server, select Add and select the authentication server from the drop down Remote Server list. The option to add remote servers is available only if at least one remote server has been configured.
1016
User groups
7 In the Group Name field, either select Any to match all possible groups, or select Specify and enter the group name in the appropriate format for the type of server. For example, an LDAP server requires LDAP format, such as: cn=users,dn=office,dn=example,dn=com 8 Repeat steps 5 through 7 to add all the authentication server user groups that are required. 9 Select OK. To create a firewall user group - CLI example In this example, the members of accounting_group are User1 and all of the members of rad_accounting_group on myRADIUS external RADIUS server. config user group edit accounting_group set group-type firewall set member User1 myRADIUS config match edit 0 set server-name myRADIUS set group-name rad_accounting_group end end
Note: Matching user group names from an external authentication server might not work if the list of group memberships for the user is longer than 8000 bytes. Group names beyond this limit are ignored.
server_name is the name of the RADIUS, LDAP, or TACACS+ server, but it must be a member of this group first and must also be a configured remote server on the FortiGate unit. group_name is the name of the group on the RADIUS, LDAP, or TACACS+ server such as "engineering" or "cn=users,dc=test,dc=com". Before using group matching with TACACS+, you must first enable authentication. For example if you have a configured TACACS+ server called myTACS, use the following CLI commands. config user tacacs+ edit myTACS set authorization enable next end For more information about user group CLI commands, see the Fortinet CLI Guide.
1017
User groups
For example, userA belongs to user_group1, user_group2, user_group3, and user_group4; previously userA could only access services within one of those four groups, typically the group that matches the first security policy. This can be annoying if HTTP access is in user_group1, FTP access is in user_group2, and email access is in user_group3. Now userA can access services within user_group1, user_group2, user_group3, and user_group4. This feature is available only in the CLI and is enabled by default. It applies to RADIUS, LDAP, and TACACS+ servers. The new command for this feature is auth-multi-group found in config user settings and checks all groups a user belongs to for authentication.
Idle timeout
The default type of timeout is idle timeout. When a user initiates a session, it starts a timer. As long as data is transferred in this session, the timer continually resets. If data flow stops, the timer is allowed to advance until it reaches its limit. At that time the user has been idle for too long, and the user is forced to re-authenticate before traffic is allowed to continue in that session. To configure user group authentication idle timeout - CLI config user settings set auth-timeout-type idle-timeout end config user group edit example_group set auth-timeout 480 next
User Authentication for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1018
User groups
end
Hard timeout
Where the idle timeout is reset with traffic, the hard timeout is absolute. From the time the first session a user establishes starts, the hard timeout counter starts. When the timeout is reached, all the sessions for that user must be re-authenticated. This timeout is not affected by any event. To configure user group authentication hard timeout - CLI config user settings set auth-timeout-type hard-timeout end config user group edit example_group set auth-timeout 480 next end
Session timeout
The session timeout works much like the hard timeout in that its an absolute timer that can not be affected by events. However, when the timeout is reached existing sessions may continue but new sessions are not allowed until re-authentication takes place. The timeout can be set from 1 to 480 minutes. Setting the timeout value to zero removes the timeout value allowing the user to remain logged on without limit. To configure a user group authentication new session hard timeout - CLI config user setting set auth-timeout-type new-session end config user group edit example_group set authtimeout 30 next end
1019
User groups
1020
User groups
4 Select OK. To remove a user group - CLI example config user group delete Group2 end
1021
User groups
1022
Authentication timeout
An important feature of the security provided by authentication is that it is temporarya user must re-authenticate after logging out. Also if a user is logged on and authenticated for an extended period of time, it is a good policy to have them re-authenticate at set periods. This ensures a users session is cannot be spoofed and used maliciously for extended periods of time re-authentication will cut any spoof attempts short. Shorter timeout values are more secure.
1023
Password policy
Password policy
Password authentication is effective only if the password is sufficiently strong and is changed periodically. By default, the FortiGate unit requires only that passwords be at least eight characters in length. You can set a password policy to enforce higher standards for both length and complexity of passwords. Password policies can apply to administrator passwords or IPsec VPN preshared keys. To set a password policy in the web-based manager, go to System > Admin > Settings. In the CLI, use the config system password-policy command. The default minimum password length on the FortiGate unit is eight characters, but up to 32 characters is permitted. Fortinet suggests a minimum length of 14 characters. Users usually create passwords composed of alphabetic characters and perhaps some numbers. Password policy can require the inclusion of uppercase letters, lowercase letters, numerals or punctuation characters.
The minimum number of each of these types of characters can be set in both the webbased manager and the CLI. The following procedures show how to force administrator passwords to contain at least two uppercase, four lower care, two digits, and one non-alphanumeric characters. Leave the minimum length at the default of eight characters. To change administrator password minimum requirements - web-based manager 1 Go to System > Admin > Settings. 2 Select Enable Password Policy. 3 Select Must Contain. 4 Enter the following information:
uppercase Letters lower care Letters Numerical Digits Non-alphanumeric Letters 2 4 2 1
5 Under Apply Password Policy to, select Admin Password. 6 Select Apply. To change administrator password minimum requirements - CLI config system password-policy set status enable set apply-to admin-password set min-upper-case-letter 2 set min-lower-case-letter 4 set min-number 2
User Authentication for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1024
Authentication protocols
Authentication protocols
When user authentication is enabled on a security policy, the authentication challenge is normally issued for any of the four protocols, HTTP, HTTPS, FTP, and Telnet, which are dependent on the connection protocol. By making selections in the Protocol Support list, the user controls which protocols support the authentication challenge. The user must connect with a supported protocol first, so that they can subsequently connect with other protocols. For example, if you have selected HTTP, FTP, or Telnet, a username and password-based authentication occurs. The FortiGate unit then prompts network users to input their security username and password. If you have selected HTTPS, certificate-based authentication (HTTPS, or HTTP redirected to HTTPS only) occurs.
Note: FTP and Telnet authentication replacement messages cannot be customized. For HTTP and HTTPS replacement messages see Authentication replacement messages on page 1027.
For certificate-based authentication, you must install customized certificates on the FortiGate unit and on the browsers of network users. If you do not install certificates on the network users web browser, the network users may see an SSL certificate warning message and have to manually accept the default FortiGate certificate. The network users web browser may deem the default certificate as invalid.
1025
When you use certificate authentication, if you do not specify any certificate when you create the security policy, the global settings are used. If you specify a certificate, the perpolicy setting will overwrite the global setting. For more information about the use of certification authentication see Certificate-based authentication on page 1041. To set the authentication protocols 1 Go to User > User > Authentication. 2 In Protocol Support, select the required authentication protocols. 3 If using HTTPS protocol support, in Certificate, select a Local certificate from the dropdown list. 4 Select Apply.
This section includes: Enabling authentication protocols Authentication replacement messages Access to the Internet Configuring authentication security policies Identity-based policy FSSO authentication NTLM authentication Certificate authentication Dynamic profile Restricting number of concurrent user logons
1026
To enable support for authentication protocols - web-based manager 1 Go to User > User > Authentication. 2 Select one or more of HTTP, HTTPS, FTP, Telnet, or Redirect HTTP Challenge to a Secure Channel (HTTPS). Only selected protocols will be available for use in authentication. 3 Select the Certificate to use, for example Fortinet_Factory. 4 Select Apply. To enable support for authentication protocols - CLI config user setting set auth-type ftp http https telnet set auth-cert Fortinet_Factory end
1027
Table 66: List of authentication replacement messages Replacement message name (CLI name) Login challenge page (auth-challenge-page) Description This HTML page is displayed if security users are required to answer a question to complete authentication. The page displays the question and includes a field in which to type the answer. This feature is supported by RADIUS and uses the generic RADIUS challengeaccess auth response. Usually, challenge-access responses contain a Reply-Message attribute that contains a message for the user (for example, Please enter new PIN). This message is displayed on the login challenge page. The user enters a response that is sent back to the RADIUS server to be verified. The Login challenge page is most often used with RSA RADIUS server for RSA SecurID authentication. The login challenge appears when the server needs the user to enter a new PIN. You can customize the replacement message to ask the user for a SecurID PIN. This page uses the %%QUESTION%% tag. Prompts user to accept the displayed disclaimer when leaving protected network. The web-based manager refers to this as User Authentication Disclaimer, and it is enabled with a security policy that also includes at least one identity-based policy. When a security user attempts to browse a network through the FortiGate unit using HTTP or HTTPS this disclaimer page is displayed. The extra pages seamlessly extend the size of the page from 8 192 characters to 16 384 and 24 576 characters respectively. When configuring the disclaimer page in the web-based manager this is shown by its size being 24 576 characters. See Disclaimer on page 1030. The page prompting a user to enter their email token. See Email on page 1008. The page prompting a user to enter their FortiToken code. See FortiToken on page 1009. The HTML page displayed with security authentication keepalive is enabled using the following CLI command: config system global set auth-keepalive enable end Authentication keepalive keeps authenticated firewall sessions from ending when the authentication timeout ends. In the web-based manager, go to User > Options to set the Authentication Timeout. This page includes %%TIMEOUT%%. The Disclaimer page replacement message does not re-direct the user to a redirect URL or the security policy does not include a redirect URL. When a user selects the button on the disclaimer page to decline access through the FortiGate unit, the Declined disclaimer page is displayed. The authentication HTML page displayed when users who are required to authenticate connect through the FortiGate unit using HTTP or HTTPS. Prompts the user for their username and password to login. This page includes %%USERNAMEID%% and %%PASSWORDID%% tags.
Email token page (auth-email-token-page) FortiToken page (auth-fortitoken-page) Keepalive page (auth-keepalive-page)
Declined disclaimer page The page displayed if a user declines the disclaimer page. See Disclaimer on page 1030. (auth-reject-page)
1028
Table 66: List of authentication replacement messages Replacement message name (CLI name) SMS Token page (auth-sms-token-page) Success message (auth-success-msg) Description The page prompting a user to enter their SMS token. See SMS on page 1009. The page displayed when a user successfully authenticates. Prompts user to attempt their connection again (as the first was interrupted for authentication).
1029
Disclaimer
When configuring any authentication security policy, there is an option to enable a disclaimer. The disclaimer is a replacement message that when enabled, web traffic matching this policy will be presented with the disclaimer that the user must choose to agree or decline. The default disclaimer contains a warning that any content the user is about to access is the responsibility of the user and not the company or owner of the network. It is presented in Figure 108. You can customize the text and the appearance to as required. To change the disclaimer 1 Go to System > Config > Replacement messages. 2 Expand Authentication 3 Select Disclaimer page to edit. 4 Select the existing disclaimer text, and copy it to a separate file. 5 Make changes
Figure 108: Default disclaimer message
1030
Changing the disclaimer at System > Config > Replacement messages is not the same as selecting to customize a disclaimer used in a policy. The System > Config location is the default message that all disclaimers inherit. The security policy location is a customized disclaimer that inherits the default format for the disclaimer message, but then can be customized for this policy.
Note: If identity-based policy is enabled, the disclaimer option is not available. Instead Customize Authentication messages is available in the Enable identity-based Policy section. Selecting the Edit icon allows you to customize the listed authentication replacement messages which includes the disclaimer.
To customize the disclaimer for a security policy - web-based manager 1 Go to Policy > Policy. Either select an existing policy and edit or select Create New. 2 Enable Disclaimer, and select Customize Disclaimer Message. 3 Select the edit icon to edit the Disclaimer page, and change your text or layout as needed.
To enable logging within an existing security policy - web-based manager 1 Go to Policy > Policy. 2 Expand to reveal the policy list of a policy. 3 Select the security policy you want to enable logging on and then select Edit. 4 To log all general firewall traffic, select the check box beside Log Allowed Traffic. 5 On the security policys page, select the check box beside UTM. 6 Select the protocol option list from the drop-down list beside Protocol Options. By default, the Protocol Options check box is selected. You must choose a list from the drop-down list. 7 For each row under UTM, select the check box beside each of the profiles and/or sensors that you want applied to the policy; then select the profile or sensor from the drop-down list as well. 8 To apply other options, such as application lists, repeat step 7 and choose the option from the drop-down list.
FortiOS Handbook v3: User Authentication 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1031
9 Select OK.
Identity-based policy
An identity-based policy (IBP) performs user authentication in addition to the normal security policy duties. If the user does not authenticate, access to network resources is refused. User authentication can occur through any of the following supported protocols, including: HTTP, HTTPS, FTP, and Telnet. The authentication style depends on which of these protocols is included in the selected security services group and which of those enabled protocols the network user applies to trigger the authentication challenge. For username and password-based authentication (HTTP, FTP, and Telnet) the FortiGate unit prompts network users to enter their username, password, and token code if twofactor authentication is selected for that user account. See Two-factor authentication on page 1007. For certificate-based authentication, including HTTPS or HTTP redirected to HTTPS only, see Certificate authentication on page 1035.
Note: Enable identity-based Policy and Enable Dynamic Profile are mutually exclusive. When one of the two options is selected, the other is hidden. When both are not selected, both are visible again.
Set the ACCEPT Action, and select Enable identity-based Policy. In the web-based manager you can confirm this by changing Action from the default of ACCEPT to DENY. Note that nearly all of the fields are not available until you switch back to ACCEPT. Set these commands in the CLI to see the other identity-based commands that were hidden before. In the following procedure, this is policy number 7. config firewall policy edit 7 set action ACCEPT set identity-based enable next end With identity-based policies, once the FortiGate unit matches the source and destination addresses, it processes the identity sub-policies for the user groups and services. This means unique security policies should be placed before an identity-based policy. When the identity-based policy has been configured, the option to customize authentication messages is available. This allows you to change the text, style, layout, and graphics of the replacement messages associated with this firewall policy. When enabled, customizing these messages follows the same method as changing the disclaimer. See Disclaimer on page 1030. The types of authentication available in identity-based policies are FSSO authentication NTLM authentication Certificate authentication
Identity-based sub-policies
Once IBP is enabled in a policy, a table appears. Selecting Add allows you to configure authentication rules which are added to this table as sub-policies.
1032
Just as with regular security policies, with these identity-based sub-policies traffic is matched from the top of the list of sub-policies down until the criteria is met. If there is no matching policy packets are dropped, even if they have been authenticated. Each subpolicy has its own UTM profile fields, traffic shaping, logging, and so on that take effect when the User Group, Service and Schedule are matched. The order of these sub-policies is just as important as with regular security policies. For example if a user is a member of two groups, and each group has a separate sub-policy entry, the top one in the list will be matched first.
FSSO authentication
Identity-based security policies are an integral part of any FSSO configuration. These policies are how user information is acquired to sent to the FSSO Collector agent and the AD domain controllers. See FSSO authentication on page 1033. In the following procedure, Example.com is a company that has its employees and authentication servers on an internal network. The FortiGate unit intercepts all traffic leaving the internal network and requires FSSO authentication to access network resources on the Internet. The following procedure configures the security policy for FSSO authentication. FSSO is installed and configured including the RADIUS server, FSSO Collector agent, and user groups on the FortiGate For the following procedure, the internal interface is port1 and the external interface connected to the Internet is port2. There is an address group for the internal network called company_network. The FSSO user group is called fsso_group, and the FSSO RADIUS server is fsso_rad_server. To configure an FSSO authentication security policy - web-based manager 1 Go to Policy > Policy. 2 Select Create New. 3 Enter the following information.
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Action Enable NAT port1 company_network port2 all ACCEPT enabled
4 Select Enable identity-based Policy. 5 Select Add to add groups of users to this authentication policy. 6 Select the fsso_group, and the FSSO_Guest_users usergroups In the Available User Groups list and move them to the Selected User Groups list. FSSO_Guest_users is a default user group enabled when FSSO is configured. It allows guest users on the network who do not have FSSO account to still authenticate and have access to network resources. See Enabling guest access through FSSO security policies on page 1089. 7 Select HTTP, HTTPS, FTP, and Telnet for in the Available Services list, and move them to the Selected Services list. 8 Select always for the Schedule. 9 Enable Log Allowed Traffic.
1033
10 Select UTM, and enable default AntiVirus, IPS, Web Filter, an Email filter. 11 Select OK. A new line of information will appear in the identity-based policy table. The table lists the ID, user group or groups, the service or services, schedule, UTM, and logging selected for the rule. Use this display to verify your information was entered correctly. 12 Select Fortinet Single Sign-On (FSSO). 13 Optionally select Customize Authentication messages to change the default authentication messages to suit example.coms company design and policies. 14 Select OK. 15 Ensure the FSSO authentication policy is at the top of the list so it will be attempted to be matched before any other policy. An Example.com employee on the internal company network logs on to the internal network using their RADIUS username and password. When that user attempts to access the Internet, which requires FSSO authentication, the FortiGate authentication security policy intercepts the session, checks with the FSSO Collector agent to verify the users identity and credentials, and then if everything is verified the user is allowed access to the Internet
NTLM authentication
The NT LAN Manager (NTLM) protocol is used when the MS Windows Active Directory (AD) domain controller can not be contacted. NTLM uses web browsers to send and receive authentication information. See NTLM on page 957 and NTLM authentication with FSSO on page 1063. NTLM authentication is enabled when you configure FSSO and enable NTLM in the identity-based policy (IBP). There must be at least one FSSO Collector agent configured on the FortiGate. Any users and user groups associated with the security policy will use NTLM to authenticate without farther configuration. However some extra configuration in the CLI may be required for certain cases including guest access, and defining NTLM enabled browsers.
Note: If there are multiple domains, a trust relation must exist between them. This is automatic if they are in a forest. With the trust relation, only one FSSO DC agent needs to be installed. Without the trust relation, FSSO DC agents must be installed on each domain controller.
1034
Certificate authentication
Certificates can be used as part of an identity-based policy. A customized certificate must be installed on the FortiGate unit and in the web browser, which the FortiGate unit will attempt to match. All users being authenticated against the policy are required to have the proper certificate, which must be imported into the FortiGate unit. See Certificate-based authentication on page 1041. To require the user to accept a disclaimer to connect to the destination, select Enable Disclaimer. If the user is to be redirected after accepting the disclaimer, enter the URL in the Redirect URL to field. You can edit the User Authentication Disclaimer replacement message text in System > Config > Replacement Messages.
1035
VPN authentication
Dynamic profile
Only one security policy can be configured for dynamic profile in a VDOM. Also only one RADIUS server and one dynamic profile group can be configured per VDOM. When one dynamic profile security policy has been configured, the option is not visible when creating other policies. After deleting the dynamic profile security policy, the option is again visible when configuring other security policies.
Note: Enable identity-based Policy and Enable Dynamic Profile are mutually exclusive. When one of the two options is selected, the other is hidden. When both are not selected, both are visible again.
By enabling the Dynamic Profile Users Only option, other non-dynamic profile users will not match this policy. This can be useful if you want to enforce all users to be part of the dynamic profile groupin which case you have a deny all profile after this one. For more information, see Configuring dynamic profile-based security policies on page 1111.
To enable authenticated user concurrent session restrictions - CLI config system global set auth-policy-concurrent enable end
VPN authentication
All VPN configurations require users to authenticate. Authentication based on user groups applies to: SSL VPNs PPTP and L2TP VPNs
User Authentication for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1036
VPN authentication
an IPsec VPN that authenticates users using dialup groups a dialup IPsec VPN that uses XAUTH authentication (Phase 1)
You must create user accounts and user groups before performing the procedures in this section. If you create a user group for dialup IPsec clients or peers that have unique peer IDs, their user accounts must be stored locally on the FortiGate unit. You cannot authenticate these types of users using a RADIUS or LDAP server.
1037
VPN authentication
Name for group of dialup users using the VPN for authentication. List of the types of remote gateways for VPN. Select Dialup User. List of authentication methods available for users. Select Preshared Key and enter the preshared key. Select Accept peer ID in dialup group. Select the user group that is to be allowed access to the VPN. The listed user groups contain only users with passwords on the FortiGate unit.
Note: The Accept peer ID in dialup group option does not support authentication of users through an authentication server. The user accounts must exist on the FortiGate unit.
3 Select Advanced to reveal additional parameters and configure other VPN gateway parameters as needed. 4 Select OK. To configure user group authentication for dialup IPsec - CLI example The peertype and usrgrp options configure user group-based authentication. config vpn ipsec phase1 edit office_vpn set interface port1 set type dynamic set psksecret yORRAzltNGhzgtV32jend set proposal 3des-sha1 aes128-sha1 set peertype dialup set usrgrp Group1 end
To configure authentication for a dialup IPsec VPN - web-based manager 1 Configure the users who are permitted to use this VPN. Create a user group and add the users to the group. For more information, see Users and user groups on page 1003. 2 Go to VPN > IPsec > Auto Key (IKE). 3 Select Create Phase 1 and configure the basic VPN phase1 settings. Remote Gateway must be Dialup User. 4 Select Advanced to reveal additional parameters and enter the following information.
1038
VPN authentication
Select Enable as Server. Select PAP, CHAP, or AUTO. Use CHAP whenever possible. Use PAP with all implementations of LDAP and with other authentication servers that do not support CHAP, including some implementations of Microsoft RADIUS. Use AUTO with the Fortinet Remote VPN Client and where the authentication server supports CHAP but the XAuth client does not. Select the user group that is to have access to the VPN. The list of user groups does not include any group that has members whose password is stored on the FortiGate unit.
User Group
5 Select OK. For more information about XAUTH configuration, see the IPsec VPN chapter of this FortiOS Handbook. To configure authentication for a dialup IPsec VPN - CLI example The xauthtype and authusrgrp fields configure XAuth authentication. config vpn ipsec phase1 edit office_vpn set interface port1 set type dynamic set psksecret yORRAzltNGhzgtV32jend set proposal 3des-sha1 aes128-sha1 set peertype dialup set xauthtype pap set authusrgrp Group1 end Some parameters specific to setting up the VPN itself are not shown here. For detailed information about configuring IPsec VPNs, see the IPsec VPN handbook chapter.
1039
VPN authentication
1040
Certificate-based authentication
This section provides an overview of how the FortiGate unit verifies the identities of administrators, SSL VPN users, or IPsec VPN peers using X.509 security certificates. The following topics are included in this section: What is a security certificate? Certificates overview Managing X.509 certificates Configuring certificate-based authentication Example Generate a CSR on the FortiGate unit Example Generate and Import CA certificate with private key pair on OpenSSL Example Generate an SSL certificate in OpenSSL
Security CERtificate Usually binary DER form, but Base64-encoded Internet security CeRTificate certificates are common too. Internet security certificate PKCS#7 SignedData Structure without data, just certificates or CRLs. PKCS#7 is a standard for signing or encrypting (officially called "enveloping") data.
1041
Certificates overview
Certificate-based authentication
Table 68: Common certificate filename extensions .p12 .pfx PKCS#12 personal information exchange (PFX) May contain certificate(s) (public) and private keys (password protected) Older format. Came before PKCS#12. Usually today data is in PKCS#12 format.
Certificates overview
Certificates play a major role in authentication of clients connecting to network services via HTTPS, both for administrators and SSL VPN users. Certificate authentication is optional for IPsec VPN peers. Certificates and protocols IPsec VPNs and certificates Certificate types on the FortiGate unit
Optionally, you can install an X.509 server certificate issued by a certificate authority (CA) on the FortiGate unit. You can then configure the FortiGate unit to identify itself using the server certificate instead of the self-signed certificate. For more information, see Authenticating SSL VPN users with security certificates on page 1052. After successful certificate authentication, communication between the client browser and the FortiGate unit is encrypted using SSL over the HTTPS link.
1042
Certificate-based authentication
Certificates overview
Certificate-related protocols
There are multiple protocols that are required for handling certificates. These include the Online Certificate Status Protocol (OCSP), Secure Certificate Enrollment Protocol (SCEP), and Server-based Certificate Validation Protocol (SCVP).
Local certificates
Local certificates are issued for a specific server, or web site. Generally they are very specific, and often for an internal enterprise network. For example a personal web site for John Smith at www.example.com (such as http://www.example.com/home/jsmith) would have its own local certificate. These can optionally be just the certificate file, or also include a private key file and PEM passphrase for added security.
1043
Certificate-based authentication
Remote certificates
Remote certificates are public certificates without a private key. For dynamic certificate revocation, you need to use an Online Certificate Status Protocol (OCSP) server. The OCSP is configured in the CLI only. Installed Remote (OCSP) certificates are displayed in the Remote Certificates list.
CA root certificates
CA root certificates are similar to local certificates, however they apply to a broader range of addresses or to whole company; they are one step higher up in the organizational chain. Using the local certificate example, a CA root certificate would be issued for all of www.example.com instead of just the smaller single web page.
Certificate signing
The trust in a certificate comes from the authority that signs it. For example if VeriSign signs your CA root certificate, it is trusted by everyone. While these certificates are universally accepted, it is cumbersome and expensive to have all certificates on a corporate network signed with this level of trust. With self-signed certificates nobody, except the other end of your communication, knows who you are and therefore they do not trust you as an authority. However this level is useful for encryption between two points neither point may care about who signed the certificate, just that it allows both points to communicate. This is very useful for internal networks and communications. A general rule is that CA signed certificates are accepted and sometimes required, but it is easier to self-sign certificates when you are able. For more on the methods of certificate signing see Generating a certificate signing request on page 1045.
1044
Certificate-based authentication
Generating a certificate signing request Generating certificates with CA software Obtaining a signed server certificate from an external CA Installing a CA root certificate and CRL to authenticate remote clients
4 Enter values in the Subject Information area to identify the FortiGate unit: If the FortiGate unit has a static IP address, select Host IP and enter the public IP address of the FortiGate unit. If the FortiGate unit does not have a public IP address, use an email address (or fully qualified domain name (FQDN) if available) instead. If the FortiGate unit has a static IP address and subscribes to a dynamic DNS service, use a FQDN if available to identify the FortiGate unit. If you select Domain Name, enter the FQDN of the FortiGate unit. Do not include the protocol specification (http://) or any port number or path names.
Note: If a domain name is not available and the FortiGate unit subscribes to a dynamic DNS service, an unable to verify certificate type message may be displayed in the users browser whenever the public IP address of the FortiGate unit changes.
If you select E-Mail, enter the email address of the owner of the FortiGate unit.
1045
Certificate-based authentication
5 Enter values in the Optional Information area to further identify the FortiGate unit.
Organization Unit Organization Locality (City) State/Province Country e-mail Name of your department. You can enter a series of OUs up to a maximum of 5. To add or remove an OU, use the plus (+) or minus (-) icon. Legal name of your company or organization. Name of the city or town where the FortiGate unit is installed. Name of the state or province where the FortiGate unit is installed. Select the country where the FortiGate unit is installed. Contact email address.
6 From the Key Size list, select 1024 Bit, 1536 Bit or 2048 Bit. Larger keys are slower to generate but more secure. 7 In Enrollment Method, you have two methods to choose from. Select File Based to generate the certificate request, or Online SCEP to obtain a signed SCEP-based certificate automatically over the network. For the SCEP method, enter the URL of the SCEP server from which to retrieve the CA certificate, and the CA server challenge password. 8 Select OK. The request is generated and displayed in the Local Certificates list with a status of PENDING. 9 Select the Download button to download the request to the management computer. 10 In the File Download dialog box, select Save and save the Certificate Signing Request on the local file system of the management computer. 11 Name the file and save it on the local file system of the management computer. The certificate request is ready for the certificate to be generated.
Server certificate
1 Generate a Certificate Signing Request (CSR) on the FortiGate unit. 2 Copy the CSR base-64 encoded text (PKCS10 or PKCS7) into the CA software and generate the certificate. PKCS10 is the format used to send the certificate request to the signing authority. PKCS7 is the format the signing authority can use for the newly signed certificate. 3 Export the certificate as a X.509 DER encoded binary file with .CER extension
1046
Certificate-based authentication
4 Upload the certificate file to the FortiGate unit Local Certificates page (type is Certificate).
CA certificate
1 Retrieve the CA Certificate from the CA software as a DER encoded file. 2 Upload the CA certificate file to the FortiGate unit CA Certificates page at System > Certificates > CA Certificates.
PKI certificate
1 Generate a Certificate Signing Request (CSR) on the FortiGate unit. 2 Copy the CSR base-64 encoded text (PKCS#10 or PKCS#7) into the CA software and generate the certificate. PKCS10 is the format used to send the certificate request to the signing authority. PKCS7 is the format the signing authority can use for the newly signed certificate. 3 Export the certificate as a X.509 DER encoded binary file with .CER extension. 4 Install the certificate in the users web browser or IPsec VPN client as needed.
1047
Certificate-based authentication
To install a CA root certificate 1 After you download the root certificate of the CA, save the certificate on the management computer. Or, you can use online SCEP to retrieve the certificate. 2 On the FortiGate unit, go to System > Certificates > CA Certificates. 3 Select Import. 4 Do one of the following: To import using SCEP, select SCEP. Enter the URL of the SCEP server from which to retrieve the CA certificate. Optionally, enter identifying information of the CA, such as the filename. To import from a file, select Local PC, then select Browse and find the location on the management computer where the certificate has been saved. Select the certificate, and then select Open. 5 Select OK, and then select Return. The system assigns a unique name to each CA certificate. The names are numbered consecutively (CA_Cert_1, CA_Cert_2, CA_Cert_3, and so on). To import a certificate revocation list A Certificate Revocation List (CRL) is a list of the CA certificate subscribers paired with certificate status information. The list contains the revoked certificates and the reason(s) for revocation. It also records the certificate issue dates and the CAs that issued them. When configured to support SSL VPNs, the FortiGate unit uses the CRL to ensure that the certificates belonging to the CA and remote peers or clients are valid. You must download the CRL from the CA web site on a regular basis. 1 After you download the CRL from the CA web site, save the CRL on the management computer. 2 Go to System > Certificates > CRL. 3 Select Import. 4 Do one of the following: To import using an HTTP server, select HTTP and enter the URL of the HTTP server. To import using an LDAP server, select LDAP and select the LDAP server from the list. To import using an SCEP server, select SCEP and select the Local Certificate from the list. Enter the URL of the SCEP server from which the CRL can be retrieved. To import from a file, select Local PC, then select Browse and find the location on the management computer where the CRL has been saved. Select the CRL and then select Open. 5 Select OK, and then select Return.
1048
Certificate-based authentication
Local certificates
In the config vpn certificate local command, you can specify automatic certificate renewal. The relevant fields are:
scep-url <URL_str> scep-password <password_str> auto-regenerate-days <days_int> auto-regenerate-dayswarning <days_int> The URL of the SCEP server. This can be HTTP or HTTPS. The password for the SCEP server. How many days before expiry the FortiGate unit requests an updated local certificate. The default is 0, no auto-update. How many days before local certificate expiry the FortiGate generates a warning message. The default is 0,no warning.
In this example, an updated certificate is requested three days before it expires. config vpn certificate local edit mycert set scep-url http://scep.example.com/scep set scep-server-password my_pass_123 set auto-regenerate-days 3 set auto-regenerate-days-warning 2 end
CA certificates
In the config vpn certificate ca command, you can specify automatic certificate renewal. The relevant fields are:
scep-url <URL_str> auto-update-days <days_int> auto-update-dayswarning <days_int> The URL of the SCEP server. This can be HTTP or HTTPS. How many days before expiry the FortiGate unit requests an updated CA certificate. The default is 0, no auto-update. How many days before CA certificate expiry the FortiGate generates a warning message. The default is 0,no warning.
In this example, an updated certificate is requested three days before it expires. config vpn certificate ca edit mycert set scep-url http://scep.example.com/scep set auto-update-days 3 set auto-update-days-warning 2 end
1049
Certificate-based authentication
scep-cert Local certificate used for SCEP communication for CRL auto-update. <scep_certificate> scep-url <scep_url> update-interval <seconds> update-vdom <update_vdom> URL of the SCEP CA server used for automatic CRL certificate updates. This can be HTTP or HTTPS. How frequently, in seconds, the FortiGate unit checks for an updated CRL. Enter 0 to update the CRL only when it expires. VDOM used to communicate with remote SCEP server for CRL autoupdate.
In this example, an updated CRL is requested only when it expires. config vpn certificate crl edit cert_crl set http-url http://scep.example.com/scep set scep-cert my-scep-cert set scep-url http://scep.ca.example.com/scep set update-interval 0 set update-vdom root end
To export a server certificate and private key - CLI This procedure exports a server (local) certificate and private key together as a password protected PKCS12 file. The export file is created through a customer-supplied TFTP server. Ensure that your TFTP server is running and accessible to the FortiGate unit before you enter the command. 1 Connect to the FortiGate unit through the CLI. 2 Type the following command: execute vpn certificate local export tftp <cert_name> <exp_filename>
<tftp_ip>
where: <cert_name> is the name of the server certificate; typing ? displays a list of installed server certificates.
User Authentication for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1050
Certificate-based authentication
<exp_filename> is a name for the output file. <tftp_ip> is the IP address assigned to the TFTP server host interface.
3 Move the output file from the TFTP server location to the management computer for future reference. To import a server certificate and private key - web-based manager 1 Go to VPN > Certificates > Local Certificates and select Import. 2 In Type, select PKCS12 Certificate. 3 Select Browse. Browse to the location on the management computer where the exported file has been saved, select the file, and then select Open. 4 In the Password field, type the password needed to upload the exported file. 5 Select OK, and then select Return. To import separate server certificate and private key files - web-based manager Use the following procedure to import a server certificate and the associated private key file when the server certificate request and private key were not generated by the FortiGate unit. The two files to import must be available on the management computer. 1 Go to VPN > Certificates > Local Certificates and select Import. 2 In Type, select Certificate. 3 Select the Browse button beside the Certificate file field. Browse to the location on the management computer where the certificate file has been saved, select the file, and then select Open. 4 Select the Browse button beside the Key file field. Browse to the location on the management computer where the key file has been saved, select the file, and then select Open. 5 If required, in the Password field, type the associated password, and then select OK. 6 Select Return.
1051
Certificate-based authentication
In the administrator account configuration, select PKI as the account Type and select the User Group to which the administrator belongs.
1052
Certificate-based authentication
3 Install the certificate revocation list (CRL) from the issuing CA on the remote peer or client. If the remote peer is a FortiGate unit, see To import a certificate revocation list on page 1048. 4 In the VPN phase 1 configuration, set Authentication Method to RSA Signature and from the Certificate Name list select the certificate that you installed in Step 1. To authenticate a VPN peer using a certificate, you must install a signed server certificate on the peer. Then, on the FortiGate unit, the configuration depends on whether there is only one VPN peer or if this is a dialup VPN that can he multiple peers. To configure certificate authentication of a single peer 1 Install the CA root certificate and CRL. 2 Create a PKI user to represent the peer. Specify the text string that appears in the Subject field of the users certificate and then select the corresponding CA certificate. 3 In the VPN phase 1 Peer Options, select Accept this peer certificate only and select the PKI user that you created. To configure certificate authentication of multiple peers (dialup VPN) 1 Install the corresponding CA root certificate and CRL. 2 Create a PKI user for each remote VPN peer. For each user, specify the text string that appears in the Subject field of the users certificate and then select the corresponding CA certificate. 3 Use the config user peergrp CLI command to create a peer user group. Add to this group all of the PKI users who will use the IPsec VPN. 4 In the VPN phase 1 Peer Options, select Accept this peer certificate group only and select the peer group that you created.
Since the IP address is private, we will use the FQDN instead. 4 Select Domain Name, and enter http://myfortigate.example.com.
1053
Example Generate and Import CA certificate with private key pair on OpenSSL
Certificate-based authentication
5 Enter values in the Optional Information area to further identify the FortiGate unit.
Organization Unit Organization Locality (City) State/Province Country e-mail Sales. Example.com Greenwhich London England john.smith@myfortigate.example.com
6 From the Key Size list, select 2048 Bit or the most secure option available to you. 7 In Enrollment Method, select File Based to generate the certificate request 8 Select OK. The request is generated and displayed in the Local Certificates list with a status of PENDING. 9 Select the Download button to download the request to the management computer. 10 In the File Download dialog box, select Save and save the Certificate Signing Request on the local file system of the management computer. 11 Name the file and save it on the local file system of the management computer.
Example Generate and Import CA certificate with private key pair on OpenSSL
This example explains how to generate a certificate using OpenSSL on MS Windows. OpenSSL is available for Linux and Mac OS as well, however their terminology will vary slightly from what is presented here.
Assumptions
Before starting this procedure, ensure that you have downloaded and installed OpenSSL on Windows. One source is http://www.slproweb.com/products/Win32OpenSSL.html.
1054
Certificate-based authentication
openssl req -new -x509 -days 3650 -extensions v3_ca -key fgtcapriv.key -out fgtca.crt This step generates an X509 CA certificate good for 10 years that uses the key generated in the previous step. The certificate filename is fgtca.crt. You will be prompted to enter information such as PEM Pass Phrase from the previous step, Country Name, State, Organization Name, Organizational Unit (such as department name), Common Name (the FQDN), and Email Address. To import the certificate to the FortiGate unit - web-based manager 1 Go to System > Certificates > Local Certificates. 2 Select Import. 3 Select Certificate for Type. Fields for Certificate file, Key file, and Password are displayed. 4 For Certificate file, enter c:\OpenSSL-Win32\bin\fgtca.crt. 5 For Key file, enter c:\OpenSSL-Win32\bin\fgtcapriv.key. 6 For Password, enter the PEM Pass Phrase you entered, such as fortinet. 7 Select OK. The Certificate should be added to the list of Local Certificates and be ready for use. It will appear in the list as the filename you uploaded fgtca.You can add comments to this certificate to make it clear where its from and how it should be used. If you download the certificate from FortiOS, it is a .CER file. It can now be used in Authenticating IPsec VPN users with security certificates on page 1052, and Authenticating SSL VPN users with security certificates on page 1052. Optionally, you can install the certificate as a CA Certificate. CA certificates are used in HTTPS proxy/inspection. To do this, under CA Certificates select Import. Select Local PC and enter the certificate file c:\OpenSSL-Win32\bin\fgtca.crt. Then select OK. This certificate will be displayed in the CA Certificate list under the name CA_Cert_1.
Assumptions
Before starting this procedure, ensure that you have downloaded and installed OpenSSL on MS Windows. One download source is http://www.slproweb.com/products/Win32OpenSSL.html.
1055
Certificate-based authentication
you have already completed Example Generate and Import CA certificate with private key pair on OpenSSL on page 1054 successfully.
To generate the CA signed SSL certificate 1 At the Windows command prompt, go to the OpenSSL bin directory. If you installed to the default location this will be the following command: cd c:\OpenSSL-Win32\bin 2 Enter the following command to generate the private key. You will be prompted to enter your PEM pass phrase. Choose something easy to remember such as fortinet. openssl genrsa -des3 -out fgtssl.key 2048 This command generates an RSA DES3 2038-bit encryption key. 3 Create a certificate signing request for the SSL certificate. This step requires you to enter the information listed in step 3 of the previous example To generate the private key and certificate on page 1054. You can leave the Challenge Password blank. openssl req -new -key fgtssl.key -out fgtssl.csr 4 Using the CSR from the previous step, you can now create the SSL certificate using the CA certificate that was created in Example Generate and Import CA certificate with private key pair on OpenSSL on page 1054. openssl x509 -req -days 365 -in fgtssl.csr -CA fgtca.crt CAkey fgtcapriv.key -set_serial 01 -out fgtssl.crt This will generate an X.509 certificate good for 365 days signed by the CA certificate fgtca.crt .
1056
Certificate-based authentication
4 For Certificate file, enter c:\OpenSSL-Win32\bin\fgtssl.crt. 5 For Key file, enter c:\OpenSSL-Win32\bin\fgtssl.key. 6 For Password, enter the PEM Pass Phrase you entered, such as fortinet. 7 Select OK. The SSL certificate you just uploaded can be found under System > Certificates > Local Certificates under the name of the file you uploaded fgtssl. To confirm the certificate is uploaded properly - CLI config vpn certificate local edit fgtssl get end The get command will display all the certificates information. If it is not there or the information is not correct, you will need to remove the corrupted certificate (if it is there) and upload it again from your PC. To use the new SSL certificate - CLI config vpn ssl settings set servercert fgtssl end This assigns the fgtssl certificate as the SSL server certificate. For more information see the SSL VPN handbook chapter.
1057
Certificate-based authentication
1058
Introduction to FSSO
The Fortinet Single Sign On (FSSO) agent connects FortiGate Fortinet security appliances to the corporate authentication servers, such as Microsoft Active Directory and Novell E-Directory, allowing security policies to be defined on the FortiGate unit based on the user information residing on the corporate authentication servers. FSSO, a component installed on the authentication server or a standalone server, provides user authentication information to the FortiGate unit so users can automatically gain access to the permitted resources with a single sign on. Older versions were called Fortinet Server Authentication Extension (FSAE). On a Microsoft Windows or Novell network, users authenticate with the Active Directory or Novell eDirectory at logon. It would be inconvenient if users then had to enter another username and password for network access through the FortiGate unit. FSSO provides authentication information to the FortiGate unit so that users automatically get access to permitted resources. There are several mechanisms for passing user authentication information to the FortiGate unit: FSSO software installed on a Windows AD network monitors user logons and sends the required information to the FortiGate unit. The FSSO software can obtain this information by polling the AD domain controllers or by using an FSSO agent on each AD domain controller that monitors user logons in real time. Optionally, a FortiGate unit running FortiOS 3.0 MR6 or later can obtain group information directly from AD using Lightweight Directory Access Protocol (LDAP). See Using FSSO in a Windows AD environment on page 1060. On a Windows AD network, the FSSO software can also serve NT LAN Manager (NTLM) requests coming from client browsers (forwarded by the FortiGate unit) with only one or more Controller agents installed. See NTLM authentication with FSSO on page 1063.
1059
Introduction to FSSO
FSSO software installed on a Novell network monitors user logons and sends the required information to the FortiGate unit. The FSSO software can obtain information from the Novell eDirectory using either the Novell API or LDAP. See Using FSSO in a Novell eDirectory environment on page 1066.
Consult the latest FortiOS and FSSO Release Notes for operating system compatibility information.
SSO is very convenient for users, but may not be supported across all platforms. NTLM is not as convenient, but it enjoys wider support. FSSO is certified for the Microsoft Windows Server 2003 (32- and 64-bit editions) and is supported on the Microsoft Windows Server 2008 (32- and 64-bit editions) operating systems.
FSSO security
When the different components of FSSO are communicating there are some inherent security features. FSSO installation requires an account with network admin privileges. The security inherent in these types of accounts helps ensure access to FSSO configurations is not tampered with. User passwords are never sent between FSSO components. The information that is sent is information to identify a user including the username, group or groups, and IP address. NTLM uses base-64 encoded packets, and uses a unique randomly generated challenge nonce to avoid sending user information and password between the client and the server. For more information on NTLM, see NTLM authentication with FSSO on page 1063.
1060
Introduction to FSSO
When the user tries to access network resources, the FortiGate unit selects the appropriate security policy for the destination. The selection consist of matching the FSSO group or groups the user belongs to with the security policy or policies that match that group. If the user belongs to one of the permitted user groups associated with that policy, the connection is allowed. Otherwise the connection is denied. With Windows AD, FSSO can use one of two different working modes to monitor user logon activity: DC Agent mode or Polling mode.
Table 69: FSSO DC Agent mode versus Polling mode DC Agent mode Installation Complex Multiple installations: one agent per DC plus Controller agent, requires a reboot Shares resources with DC system Each DC agent requires minimum 64kpbs bandwidth, adding to network load Captures all logons Polling Mode Easy only Controller agent installation, no reboot required Has own resources Increase polling period during busy period to reduce network load Potential to miss a login if polling period is too great
Level of Confidence
DC Agent mode
DC Agent mode is the standard mode for FSSO. In DC Agent mode (see Figure 109), a Fortinet authentication agent is installed on each domain controller. These DC agents monitor user logon events and pass the information to the Collector agent, which stores the information and sends it to the FortiGate unit. The DC agent installed on the domain controllers is not a service like the Collector agent it is a DLL file called dcagent.dll and is installed in the Windows\system32 directory. It must be installed on all domain controllers of the domains that are being monitored.
1061
Introduction to FSSO
5. Access granted to user based on login info from CA and firewall policy
ate rtiG Fo
t uni
Cl ie nt
1. U
ser
log
U se r
in t
o th
eD
om
ain
DC Agent mode provides reliable user logon information, however you must install a DC agent on every domain controller. A reboot is needed after the agent is installed. Each installation requires some maintenance as well. For these reasons it may not be possible to use the DC Agent mode. Each domain controller connection needs a minimum guaranteed 64kpbs bandwidth to ensure proper FSSO functionality. You can optionally configure traffic shapers on the FortiGate unit to ensure this minimum bandwidth is guaranteed for the domain controller connections.
Polling mode
In Polling mode there are two options NetAPI polling, and Event log polling. Both share the advantages of being transparent and agentless. NetAPI polling is used to retrieve server logon sessions. This includes the logon event information for the Controller agent. NetAPI runs faster than Event log polling but it may miss some user logon events under heavy system load. It requires a query round trip time of less than 10 seconds. Event log polling may run a bit slower, but will not miss events, even when the installation site has many users that require authentication. It does not have the 10 second limit or NetAPI polling. Event log polling requires fast network links. Event log polling is required if there are Mac OS users logging into Windows AD.
1062
Introduction to FSSO
In Polling mode (see Figure 110), the Collector agent polls port 445 of each domain controller for user logon information every few seconds and forwards it to the FortiGate unit. There are no DC Agents installed, so the Collector agent polls the domain controllers directly.
Figure 110: FSSO in Polling mode
update
poll
A major benefit of Polling mode is that no FSSO DC Agents are required. If it is not possible to install FSSO DC Agents on your domain controllers, this is the alternate configuration available to you. Polling mode results in a less complex install, and reduces ongoing maintenance. The minimum permissions required in Polling mode are to read the event log or call NetAPI. To install FSSO with minimum permissions, see Installing FSSO without using an administrator account on page 1069.
C lie nt
U se r
1063
Introduction to FSSO
4. F FGT verifies user membership with CA 2. FortiGate requests domain/user and password
1. User attempts to access Internet with browser 3. Users browser sends information to FortiGate
C lie nt U se r
If the NTLM authentication with the Windows AD network is successful, and the user belongs to one of the groups permitted in the applicable security policy, the FortiGate unit allows the connection. Fortinet has tested NTLM authentication with Internet Explorer and Firefox browsers.
1064
Introduction to FSSO
u ate rtiG Fo
nit
O r FSS ecto ll Co nt e ag
C D SO t FS en g A
in2 ma r Do trolle n Co D AD om ain 3
er D b A m r e M rve se
C D SO t FS en g A
in3 ma r Do trolle n Co A o DD ma in3
http
://
Understanding the NTLM authentication process 1 The user attempts to connect to an external (internet) HTTP resource. The client application (browser) on the users computer issues an unauthenticated request through the FortiGate unit. 2 The FortiGate is aware that this client has not authenticated previously, so responds with a 401 Unauthenticated status code, and tells the client which authentication method to reply with in the header: Proxy-Authenticated: NTLM. Then the initial session is dismantled. 3 The client application connects again to the FortiGate, and issues a GET-request, with a Proxy-Authorization: NTLM <negotiate string> header. <negotiate-string> is a base64-encoded NTLM Type 1 negotiation packet. 4 The FortiGate unit replies with a 401 proxy auth required status code, and a Proxy-Authenticate: NTLM <challenge string> (a base 64-encoded NTLM Type 2 challenge packet). In this packet is the challenge nonce, a random number chosen for this negotiation that is used once and prevents replay attacks.
Note: The TCP connection must be kept alive, as all subsequent authentication-related information is tied to the TCP connection. If it is dropped, the authentication process must start again from the beginning.
5 The client sends a new GET-request with a header: Proxy-Authenticate: NTLM <authenticate string>, where <authenticate string> is a NTLM Type 3 Authentication packet that contains: username and domain the challenge nonce encoded with the client password (it may contain the challenge nonce twice using different algorithms).
C lie nt
U se r
1065
6 If the negotiation is successful and the user belongs to one of the groups permitted in the security policy, the connection is allowed, Otherwise, the FortiGate unit denies the authentication by issuing a 401 return code and prompts for a username and password. Unless the TCP connection is broken, no further credentials are sent from the client to the proxy.
Note: If the authentication policy reaches the authentication timeout period, a new NTLM handshake occurs.
When the user tries to access network resources, the FortiGate unit selects the appropriate security policy for the destination. If the user belongs to one of the permitted user groups, the connection is allowed. FSSO is supported on the Novell E-Directory 8.8 operating system
FSSO is supported on Microsoft Windows Server 2003 (32- and 64-bit editions) and Microsoft Windows Server 2008 (32- and 64-bit editions) operating systems.
FSSO Installation
The FSSO installer first installs the Collector agent. You can then continue with installation of the DC agent, or you can install it later by going to Start > Programs > Fortinet > Fortinet Server Authentication Extension > Install DC Agent. The installer will install a DC agent on the domain controllers of all of the trusted domains in your network.
1066
Note: Each domain controller connection needs a minimum guaranteed 64kpbs bandwidth to ensure proper FSSO functionality.Traffic shapers configured on the FortiGate can help guarantee these minimum bandwidths.
You can create a redundant configuration if you install the Collector agent on two or more servers. This provides improved reliability. If the current Collector agent fails, the FortiGate unit will switch to the next Collector agent in its list. The list can have up to five Collector agents.
Note: In Windows 2008 by default, you do not have administrative user rights if you are logged on as a user other than as the built-in administrator, even if you were added to the local Administrators group on the computer.
Ensure you have administrative rights on the servers where you are installing FSSO. It is recommended that you install FSSO using the built-in local administrator account. If you are logged on to another account and try to install FSSO, you may see a security alert dialog box requesting your permission to use or install the program. Fortinet recommends that before installing FSSO, you create a dedicated account with administrator privileges and a password that does not expire. Optionally, you can install FSSO without an admin account. See Installing FSSO without using an administrator account on page 1069.
1067
To install the Collector agent 1 Create an account with administrator privileges and a password that does not expire. See Microsoft Advanced Server documentation for help with this task. To use a non-admin read only account, see Installing FSSO without using an administrator account on page 1069. 2 logon to the account that you created in Step 1. 3 Double-click the FSSOSetup.exe file. The FSSO InstallShield Wizard starts. 4 Select Next. Optionally, you can change the installation location. 5 Select Next.
Note: This procedure will install using the currently running account. If you want FSSO to use another existing admin account, change the username: field in the InstallShield Wizard to the correct username using the format DomainName \ UserName. For example if the account is jsmith and the domain is example_corp you would enter example_corp\jsmith in the UserName: field.
6 In the Password field, enter the password for the account listed in the username field. This is the account you are logged onto currently. 7 Select Next. 8 By default, FSSO authenticates users both by monitoring logons and by accepting authentication requests using the NTLM protocol. If you want to support only NTLM authentication Clear the Monitor user logon events and send the information to Fortinet check box. Select the Serve NTLM authentication requests coming from FortiGate check box. If you do not want to support NTLM authentication Clear the Serve NTLM authentication requests coming from FortiGate check box. Select the Monitor user logon events and send the information to Fortinet check box. You can change these options after installation. 9 Select the access method to use for Windows Directory: Select Standard to use Windows domain and username credentials. Select Advanced if you will set up LDAP access to Windows Directory. See Standard versus Advanced mode on page 1067. 10 Select Next and then select Install. 11 For DC Agent mode, when the FSSO InstallShield Wizard completes Collector agent installation, ensure that Launch DC Agent Install Wizard is selected and then select Finish.
Note: If you see an error such as Service Fortinet Single Sign On agent (service_FSAE) failed to start, there are two possible reasons for this. Verify the user account you selected has sufficient privileges to run the FSSO service. Also verify the computer system you are attempting to install on is a supported operating system and version.
1068
To install the DC Agent 1 If you have just installed the Collector agent, the FSSO - Install DC Agent wizard starts automatically. Otherwise, go to Start > Programs > Fortinet > Fortinet Single Sign On > Install DC Agent. 2 Verify the Collector agent IP address. If the Collector agent computer has multiple network interfaces, ensure that the one that is listed is on your network. The listed Collector agent listening port is the default. You should change this only if the port is already used by some other service. 3 Select Next. 4 Select the domains to monitor and select Next. If any of your required domains are not listed, cancel the wizard and set up the proper trusted relationship with the domain controller. Then run the wizard again by going to Start > Programs > Fortinet > Fortinet Single Sign On > Install DC Agent. 5 Optionally, select users that you do not want monitored. These users will not be able to authenticate to FortiGate units using FSSO. You can also do this later. See Configuring Fortinet Single Sign On with Windows AD on page 1071. 6 Select Next. 7 Optionally, clear the check boxes of domain controllers on which you do not want to install the DC Agent. 8 Select the Working Mode as DC Agent Mode. While you can select Polling Mode here, in that situation you would not be installing a DC Agent. For more information, see DC Agent mode on page 1061 and Polling mode on page 1062. 9 Select Next. 10 Select Yes when the wizard requests that you reboot the computer.
Note: If you reinstall the FSSO software on this computer, your FSSO configuration is replaced with default settings.
If you want to create a redundant configuration, repeat the procedure To install the Collector agent on page 1068 on at least one other Windows AD server.
Note: When you start to install a second Collector agent, when the Install Wizard dialog appears the second time, cancel it. From the configuration GUI, the monitored domain controller list should show your domain controllers un selected. Select the ones you wish to monitor with this Collector agent, and select Apply.
Before you can use FSSO, you need to configure it on both Windows AD and on the FortiGate units. The next section and Configuring FSSO on FortiGate units on page 1081 will help you accomplish these two tasks.
1069
Windows 2003
There are two methods in Windows 2003 AD for installing FSSO without an admin account add the non-admin user to the security log list, and use a non-admin account with read-only permissions. A problem with the first method is that full rights (read, write, and clear) are provided to the event log. This can be a problem when audits require limited or no write access to logs. In those situations, the non-admin account with read-only permissions is the solution. To add the non-admin user account to the Windows 2003 security log list 1 Go to Default Domain Controller Security Settings > Security Settings > User Rights Assignment > Manage auditing and security log. 2 Add the user account to this list. 3 Repeat these steps on every domain controller in Windows 2003 AD. 4 A reboot is required. To use a non-admin account with read-only permissions to install FSSO on Windows 2003 The following procedure provides the user account specified with read only access to the Windows 2003 AD Domain Controller Security Event Log which allows FSSO to function. 1 Find out the SID of the account you intend to use. Tools for this can be downloaded for free from http://technet.microsoft.com/enus/sysinternals/bb897417. 2 Then create the permission string. For example: (A;;0x1;;;S-1-5-21-4136056096-764329382-1249792191-1107) A means Allow, 0x1 means Read, and S-1-5-21-4136056096-764329382-1249792191-1107 is the SID. 3 Then, append it to the registry key 4 HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Eventlog\Sec urity\CustomSD. 5 Repeat these steps on every domain controller in Windows 2003 AD. 6 A reboot is required.
Windows 2008
In Windows 2008 AD, if you do not want to use the Domain Admin account then the user account that starts the FSSO agent needs to be added to the Event Log Readers group. When the user is added to the Event Log Readers group, that user is now allowed to have read only access to the event log and this is the minimal rights required for FSSO to work.
1070
To update FSSO in DCAgent mode 1 Go to the system32 directory on all DC's and rename the dcagent.dll file to dcagent.dll.old. This ensures the when the upgrade is pushed to the DC it does not overwrite the old file. If there are any problems this makes it easy to revert to the old version. 2 Run the FSSO setup .exe file to update the collector. When this is completed, ignore any reboot message. 3 Go to Programs > Fortinet > Fortinet Single Sign On > Install DC Agent and push the DC agent out to all servers. All DC's will now need to be rebooted so that the new dll file is loaded. 4 4. After the reboot, go to all DCs and delete the dcagent.dll.old files.
For more information on Fortinet Single Sign On Agent or authentication issues, see the FortiOS Authentication handbook chapter.
1071
Note: If you change a users group membership, the change does not take effect until the user logs off and then logs on again.
Note: The FSSO Agent sends only Domain Local Security Group and Global Security Group information to FortiGate units. You cannot use Distribution group types for FortiGate access. No information is sent for empty groups.
Refer to Microsoft documentation for information about creating and managing Windows AD user groups.
1072
Logging Log level Log file size limit (MB) View Log Log logon events in separate logs Select the minimum severity level of logged messages. Enter the maximum size for the log file in MB. View all Fortinet Single Sign On agent logs. Record user login-related information separately from other logs. The information in this log includes data received from DC agents user logon/logoff information workstation IP change information data sent to FortiGate units If Log logon events in separate logs is enabled, you can view user login-related information.
Require authenticated Select to require the FortiGate unit to authenticate before connection from FortiGate connecting to the Collector agent. Password Enter the password that FortiGate units must use to authenticate. The maximum password length is 16 characters. The default password is fortinetcanada.
Timers Workstation verify interval Enter the interval in minutes at which the Fortinet Single Sign On Collector agent connects to client computers to (minutes) determine whether the user is still logged on. The default is every 5 minutes. The interval may be increased if your network has too much traffic. Note: This verification process creates security log entries on the client computer. If ports 139 or 445 cannot be opened on your network, set the interval to 0 to prevent checking. See Configuring FSSO ports on page 1078. Dead entry timeout interval Enter the interval in minutes after which Fortinet Single Sign On Agent purges information for user logons that it cannot verify. The default is 480 minutes (8 hours). Dead entries usually occur because the computer is unreachable (such as in standby mode or disconnected) but the user has not logged off. A common reason for this is when users forget to logoff before leaving the office for the day. You can also prevent dead entry checking by setting the interval to 0. IP address change verify interval Fortinet Single Sign On Agent periodically checks the IP addresses of logged-in users and updates the FortiGate unit when user IP addresses change. IP address verification prevents users from being locked out if they change IP addresses, as may happen with DHCP assigned addresses. Enter the verification interval in seconds. The default is 60 seconds. You can enter 0 to prevent IP address checking if you use static IP addresses. Note: This does not apply to users authenticated through NTLM. Cache user group lookup result Enable caching. Caching can reduce group lookups and increase performance.
1073
Fortinet Single Sign On Agent caches group information for logged-in users. Enter the duration in minutes after which the cache entry expires. If you enter 0, the cache never expires. A long cache expire interval may result in more stale user group information. This can be an issue when a users group information is changed. Clear group information of logged-in users. Note: This affects all logged-in users, and may force them to re-logon.
Common Tasks Show Service Status View information about the status of the Collector agent and connected FortiGate units. See Viewing FSSO component status on page 1079. Shows detailed information about connected Domain Controller agents. Use the Select DC to Monitor button to select domain controllers to monitor and choose Working Mode. See Selecting Domain Controllers and working mode for monitoring on page 1080. View a list of currently logged-in users. Select the column headers to sort the list.
Select Domains to Monitor Select this button to remove domains that you do not want to monitor. From the Domain Filter dialog box that displays, clear check boxes for unwanted domains and select OK. Set Directory Access Information Set Group Filters Set Ignore User List See Configuring Directory Access settings on page 1074. Configure group filtering for each FortiGate unit. See Configuring FortiGate group filters on page 1076. Exclude users such as system accounts that do not authenticate to any FortiGate unit. See Configuring the Ignore User List on page 1076. Copy this Collector agent's Ignore User List and Group Filters to the other Collector agents to synchronize the configuration. You are asked to confirm synchronization for each Collector agent. Export Fortinet Single Sign On Agent configuration to a text file. The file is named saved_config.txt and is saved in the Fortinet Single Sign On Agent program directory. Save the modified settings and exit. Apply changes now. Change all settings to the default values. View the online Help. Note: To view the version and build number information for your FSSO Collector Agent configuration, selecting the Fortinet icon in the upper left corner of the Collector agent Configuration screen and select About Fortinet Single Sign On Agent configuration.
1074
Advanced the FSSO Collector Agent obtains user group information using LDAP. The benefit of this method is that it is possible to nest groups within groups. This is option is available on FortiOS 3.0 MR6 and later. The group information is in standard LDAP format.
Note: If you change AD access mode, you must reconfigure your group filters to ensure that the group information is in the correct format.
To configure Directory Access settings 1 From the Start menu select Programs > Fortinet > Fortinet Single Sign On Agent > Configure Fortinet Single Sign On Agent. 2 In the Common Tasks section, select Set Directory Access Information. The Set Directory Access Information dialog box opens. 3 From the AD access mode list, select either Standard or Advanced.
1075
4 If you selected Advanced AD access mode, select Advanced Setting and configure the following settings and then select OK:
AD server address AD server port BaseDN username Password Enter the address of your networks global catalog server. The default AD server port is 3268. This must match your server port. Enter the Base distinguished name for the global catalog. This is the point in the tree that will be considered the starting point by default. If the global catalog accepts your Fortinet Single Sign On Agent agents credentials, you can leave these fields blank. Otherwise, enter credentials for an account that can access the global catalog.
BaseDN example
An example DN for Training Fortinet, Canada is DN = ou=training, ou=canada, dc=fortinet, dc=com. If you set the BaseDN to ou=canada, dc=fortinet, dc=com then when Fortinet Single Sign On Agent is looking up user credentials, it will only search the Canada organizational unit, instead of all the possible countries in the company. Its a short cut to entering less information and faster searches. However, you may have problems if you narrow the BaseDN too much when you have international employees from the company visiting different offices. If someone from Fortinet Japan is visiting the Canada office in the example above, their account credentials will not be matched because they are in DN = ou=japan, dc=fortinet, dc=com instead of the BaseDN ou=canada, dc=fortinet, dc=com. The easy solution is to change the BaseDN to simply be dc=fortinet, dc=com. Then any search will check all the users in the company.
1076
The maximum number of Windows AD user groups allowed on a FortiGate depends on the model. Low end models up to 300A support 256 Windows AD user groups, where mid and high end models support 1024 groups. This is per VDOM if VDOMs are enabled on the FortiGate unit. You do not need to configure a group filter on the Collector agent if the FortiGate unit retrieves group information from Windows AD using LDAP. In that case, the Collector agent uses the list of groups you selected on the FortiGate unit as its group filter. The filter list is initially empty. You need to configure filters for your FortiGate units using the Add function. At minimum, you should create a default filter that applies to all FortiGate units that do not have a specific filter defined for them.
Note: If no filter is defined for a FortiGate unit and there is no default filter, the Collector agent sends all Windows AD group and user logon events to the FortiGate unit. While this normally is not a problem, limiting the amount of data sent to the FortiGate unit improves performance by reducing the amount of memory the unit uses to store the group list and resulting logs.
To configure a FortiGate group filter 1 From the Start menu select Programs > Fortinet > Fortinet Single Sign On Agent > Configure Fortinet Single Sign On Agent. 2 In the Common Tasks section, select Set Group Filters. The FortiGate Filter List opens. It has the following columns:
FortiGate SN Description Monitored Groups Add Edit Remove OK Cancel The serial number of the FortiGate unit to which this filter applies. An optional description of the role of this FortiGate unit. The Windows AD user groups that are relevant to the security policies on this FortiGate unit. Create a new filter. Modify the filter selected in the list. Remove the filter selected in the list. Save the filter list and exit. Cancel changes and exit.
3 Select Add to create a new filter. If you want to modify an existing filter, select it in the list and then select Edit.
1077
Advanced Remove
1078
To configure alternate user IP address tracking 1 On the computer where the Collector agent is installed, go to Start > Run. 2 Enter regedit or regedt32 and select OK. The Registry Editor opens. 3 Find the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Fortinet\FSAE\collectoragent. 4 Set the supportFSAEauth value (dword) to 00000001. 5 Close the Registry Editor. 6 From the Start menu select Programs > Fortinet > Fortinet Single Sign On Agent > Configure Fortinet Single Sign On Agent. 7 Select Apply. The Fortinet Single Sign On Agent service restarts with the updated registry settings.
To view Collector agent status 1 From the Start menu select Programs > Fortinet > Fortinet Single Sign On Agent > Configure Fortinet Single Sign On Agent. 2 In the Common Tasks section, select Show Service Status. The Fortinet Single Sign On Collector agent Status window opens. Optionally select Get NTLM statistics in the Status window to display NTLM information such as number of messages received, processed, failed, in the queue.
1079
To change which DC agents are monitored or change the working mode for logon event monitoring, select Select DC to Monitor.
1080
To install the FSSO eDirectory agent 1 Create an account with administrator privileges and a password that does not expire. See Novell documentation for more information. 2 logon to the account that you created in Step 1. 3 Double-click the FSSO_Setup_edirectory.exe file. The Fortinet eDirectory Agent InstallShield Wizard starts. 4 Optionally, fill in the username and Organization fields. 5 Select the Anyone who uses this computer (all users) option. 6 Select Next. 7 Optionally, enter any of the following information:
eDirectory Server Server Address Use secure connection (SSL) Search Base DN eDirectory Authentication username User password Enter a username that has access to the eDirectory, using LDAP format. Enter the password. Enter the IP address of the eDirectory server. Select to connect to the eDirectory server using SSL security. Enter the base Distinguished Name for the user search.
10
1081
Optionally, specify a guest protection profile to allow guest access. See Enabling guest access through FSSO security policies on page 1089.
1082
You can expand any of the DNs that contain entries. When you select an expandable DN, the Distinguished Name field is updated. Look for the DN that contains the users or groups whose logon you want to monitor. 10 Select the DN that you want to monitor and then select OK. This closes the window and updates the Distinguished Name field of the LDAP Server configuration with the selected Domain Name Identifier (DNI). 11 Check the following fields and select OK:
Name Common Name Identifier Secure Connection Enter a name to identify the LDAP server. The default common name identifier is cn. This is correct for most LDAP servers. However some servers use other identifiers such as uid. Do not select. The Collector agent does not support secure connection.
To configure LDAP for FSSO - CLI example config user ldap edit "ADserver" set server "10.11.101.160" set cnid "cn" set dn "cn=users,dc=office,dc=example,dc=com" set type regular set username "cn=administrator,cn=users,dc=office,dc=example,dc=com" set password set_a_secure_password next end
1083
Password
LDAP Server
To specify the FSSO Collector agent - CLI config user fsso edit WinGroups set ldap-server ADserver set password ENC G7GQV7NEqilCM9jKmVmJJFVvhQ2+wtNEe9T0iYA5Sa+EqT2J8zhOrbkJFD r0RmY3c4LaoXdsoBczA1dONmcGfthTxxwGsigzGpbJdC71spFlQYtj set server 10.11.101.160 set port 8000 end
1084
To select Windows user groups - web-based manager 1 Go to User > FSSO > FSSO Agent. The list of FSSO agent servers is displayed. 2 Select the Edit Users/Groups icon. The FortiGate unit performs an LDAP query and displays the result. 3 Select the check boxes of the user groups that you want to monitor and then select OK. You can also use the Add User/Group icon to select a group by entering its distinguished name.
Domain Groups
1085
Create New Name Server Domain Groups FSSO Collector IP Delete icon Edit icon Refresh icon Add User/Group
Add a new FSSO agent server. The name defined for the FSSO agent server. Domain name imported from the FSSO agent server. The group names imported from the FSSO agent server. The IP address of the FSSO agent on the server Delete this server definition. Edit this server definition. Get user group information from the FSSO agent server. Add a user or group to the list. You must know the distinguished name for the user or group. This is available for Windows AD in Advanced AD access mode only. Select users and groups to add to the list. See Selecting Windows user groups (LDAP only) on page 1084. This is available in Advanced AD access mode only.
Edit Users/Groups
1086
4 Select Enable identity-based Policy. 5 Select Add to add groups of users to this authentication policy. 6 Select the fsso_group, and the FSSO_Guest_users usergroups in the Available User Groups list and move them to the Selected User Groups list. FSSO_Guest_users is a default user group enabled when FSSO is configured. It allows guest users on the network who do not have FSSO account to still authenticate and have access to network resources. See Enabling guest access through FSSO security policies on page 1089. 7 Select HTTP, HTTPS, FTP, and Telnet for in the Available Services list, and move them to the Selected Services list. 8 Select always for the Schedule. 9 Enable Log Allowed Traffic. Logging FSSO logon events helps troubleshoot any FSSO related issues. 10 Select UTM, and enable default AntiVirus, IPS, Web Filter, an Email filter. 11 Select OK. A new line of information will appear in the identity-based policy table. The table lists the ID, user group or groups, the service or services, schedule, UTM, and logging selected for the rule. Use this display to verify your information was entered correctly. 12 Select Fortinet Single Sign-On (FSSO).
FortiOS Handbook v3: User Authentication 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1087
13 Optionally select Customize Authentication messages to change the default authentication messages to suit example.coms company design and policies. 14 Select OK. 15 Ensure the FSSO authentication policy is at the top of the list so it will be attempted to be matched before any other policy. To create a security policy for FSSO authentication - CLI config firewall policy edit 0 set srcintf internal set dstintf wan1 set srcaddr company_network set dstaddr all set action accept set identity-based enable set nat enable config identity-based-policy edit 1 set schedule any set groups company_network FSSO_guest_users set service HTTP HTTPS FTP TELNET end end Here is an example of how this FSSO authentication policy is used. Example.com employee on the internal company network logs on to the internal network using their RADIUS username and password. When that user attempts to access the Internet, which requires FSSO authentication, the FortiGate authentication security policy intercepts the session, checks with the FSSO Collector agent to verify the users identity and credentials, and then if everything is verified the user is allowed access to the Internet.
1088
Authenticating through multiple groups allows administrators to assign groups for specific services, and users who are members of each group have access to those services. For example there could be an FTP group, an email group, and a Telnet group.
1089
To enable event logging 1 Go to Log&Report > Log Config > Log Setting. 2 In the Event Log Settings section, select the check box beside Enable. 3 You must select the following events:
System activity event Admin event All system-related events, such as ping server failure and gateway status. All administration events, such as user logins, resets, and configuration updates.
Firewall All firewall-related events, such as user authentication. authentication event CPU & memory usage Real-time CPU and memory events only, at 5-minute intervals. (every 5 min)
Optionally you can enable any or all of the other logging event options. 4 Select Apply. 5 Select OK.
To view log messages - web-based manager 1 Go to Log&Report > Log & Archive Access. 2 Select the log menu that you want to view log messages in. For example, the attack log messages in Log&Report > Log & Archive Access > Traffic Log. 3 Within the page, use any one of the following to view each log message: Download Raw Log downloads the log file to your PC. Column Settings customize what columns display on the page. Filter Settings filter the information within the page. Detailed Information display the log table on the right side of the page, at the bottom (default), or hide the log table. For more on viewing logs, see the Log and Reporting handbook chapter. 4 To display current log messages on the page, select Refresh.
User Authentication for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1090
To view log messages - CLI 1 Enter the following to configure how the log messages will be displayed, as well as what log messages you want to display: execute log filter category <category_number> execute log filter start-line <line_number> execute log filter view-lines <lines_per_view> 2 Enter the following to display the logs messages within the CLI: execute log display 3 Log messages appear and stop when the maximum number of view-lines is reached.
Figure 116: Authentication log messages
Table 70: List of FSSO related log messages Message ID Severity 43008 43009 43010 43011 43012 43013 43014 43015 43016 43017 Notification Notification Warning Notification Notification Notification Notification Notification Notification Notification Description Authentication was successful Authentication session failed Authentication locked out Authentication timed out FSSO authentication was successful FSSO authentication failed FSSO user logged on FSSO user logged off NTLM authentication was successful NTLM authentication failed
For more information on logging, see the Log and Reporting handbook chapter.
1091
Testing FSSO
Testing FSSO
Once FSSO is configured, you can easily test to ensure your configuration is working as expected. For additional FSSO testing, see Troubleshooting FSSO on page 1092. 1 Logon to one of the stations on the FSSO domain, and access an Internet resource. 2 Connect to the CLI of the FortiGate unit, and if possible log the output. 3 Enter the following command: diagnose debug authd fsso list 4 Check the output. If FSSO is functioning properly you should see something similar to the following: ----FSSO logons---IP: 192.168.1.230 User: ADMINISTRATOR Groups: VLAD-AD/DOMAIN USERS IP: 192.168.1.240 User: ADMINISTRATOR Groups: VLAD-AD/DOMAIN USERS Total number of users logged on: 2 ----end of FSSO logons---Note: The exact information will vary based on your installation.
5 Check the FortiGate event log, for FSSO-auth action or other FSSO related events with FSSO information in the message field. For a list of FSSO log message IDs, see Table 70 on page 1091. 6 To check server connectivity, run the following commands from the CLI: FGT# diagnose debug enable FGT# diagnose debug authd fsso server-status FGT# Server Name Connection Status --------------------------SBS-2003 connected
Troubleshooting FSSO
When installing, configuring, and working with FSSO some problems are quite common. A selection of these problems follows including explanations and solutions. Some common Windows AD problems include: General troubleshooting tips for FSSO User status Not Verified on the Collector agent After initial configuration, there is no connection to the Collector agent FortiGate performance is slow on a large network with many users Users from the Windows AD network are not able to access the network Users on a particular computer (IP address) can not access the network Guest users do not have access to network Cant find the DCagent service User logon events not received by FSSO Collector agent
1092
Troubleshooting FSSO
1093
Troubleshooting FSSO
Solution
There are a few things that can cause the Collector agent not to be able to connect to the user's work station. Below is a list of the most common causes: Most commonly, a host firewall on the user's workstation or a router on the network prevents remote access on ports 139 and/or 445. Try opening the ports on the host firewall. If the remote registry service is not running on the user's workstation, the Collector agent will not be able to connect to the registry remotely. Make sure the remote registry service is running. This problem may also be caused by a known MS upgrade issue. Using Regedit.exe, edit HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Control\SecurePipeServers, set permissions for winreg and allow Local Service with R and W permissions.
Solution
If there are no network problems that can be identified, one of the following solutions should solve the issue. The Windows AD network must be configured before configuring the FortiGate unit. This includes the domain controller agents, and Collector agents. Ensure the DC agents point to the correct collector agent port and IP address. Ensure that TCP port 8000, and UDP port 8002 are not blocked. FSSO is very dependent on DNS, ensure the forward DNS zone has no stale records and after adding it to the domain if the DNS entry is not in the zone add it. An error in the DNI field on the FortiGate unit will prevent connections. Select the browse button next to the field to confirm it can connect correctly to the Windows AD server and return information. See If the secure check box is selected, ensure that LDAP v3 is being used since earlier LDAP does not support secure TLS connections.
1094
Troubleshooting FSSO
Ensure that the default LDAP ports are not being blocked on the network. These ports include port 389, and port 636. If you change the default ports, ensure both the FortiGate unit and the Windows AD server are using the same port numbers and that those ports are allowed through all firewalls on your network. If you are using FSSO in polling mode, ensure that port 445 is not blocked by firewalls.
Solution
Add users to the Ignore User list. This is ideal for admin accounts whose logon information will not be sent to the FortiGate unit. This is useful for automated accounts that may logon many times. Examples of accounts in this category include: IIS services AV other system accounts
For more information on configuring the Ignore users list, see Configuring the Ignore User List on page 1076.
Users from the Windows AD network are not able to access the network
If nobody can access the network and your network has only one Collector agent, when it goes offline no users will have access. However if only some users can not access the network, it is likely that user group changes were made recently that are causing the problems.
Solutions
If there is only one Collector agent, configure additional Collector agents in the domain to act as backups. They will provide the redundancy required if the original collector goes offline. Remember to add them to the FortiGate FSSO entry under User > FSSO > FSSO Agent on the web-based manager or config user fsso in the CLI. If the server and port for the new agent are not in the list, it will not be contacted. Ensure the Collector agent has at least 64kbps bandwidth to the FortiGate unit. If not, information FSSO information may not reach the FortiGate unit resulting in outages. The best solution is to configure traffic shaping between the FortiGate unit and the Collector agent to ensure that minimum bandwidth is always available.
1095
Troubleshooting FSSO
If some users can not connect, verify their Windows AD records to find groups in common, and investigate the state of those groups focusing on any recent changes. It may be a group or permission change is the reason.
Users on a particular computer (IP address) can not access the network
Windows AD Domain Controller agent gets the username and workstation where the logon attempt is coming from. If there are two computers with the same IP address and the same user trying to logon, it is possible for the authentication system to become confused and believe that the user on computer_1 is actually trying to access computer_2. Windows AD does not track when a user logs out. It is possible that a user logs out on one computer, and immediate logs onto a second computer while the system still believes the user is logged on the original computer. While this is allowed, information that should go to the session on one computer may mistakenly end up going to the other computer instead. The result would look similar to a hijacked session.
Solutions
Ensure each computer has separate IP addresses. Encourage users to logout on one machine before logging onto another machine. If multiple users have the same username, change the usernames to be unique. Shorten timeout timer to flush inactive sessions after a shorter time.
Solution
The group of the guest users was not included in a policy, so they do not fall under the guest account. To give them access, associate their group with a security policy. Additionally, there is a default group called FSSO_Guest_Users. Ensure that group is part of an identity-based security policy to allow traffic.
Solution
To verify that the DCagent is installed properly 1 Check that DCagent.dll exists in %windir%\system32 folder. 2 Check that the registry key exists: [HKEY_LOCAL_MACHINE\SOFTWARE\Fortinet\FSAE\dcagent] If both exist, the DCagent is properly installed.
1096
Troubleshooting FSSO
If polling mode is enabled, it is possible the polling interval is too large. Use a shorter polling interval to ensure the collector agent is capturing all logon events. If NetAPI polling mode is enabled, consider switching to Event log polling as it provides letter accuracy.
FSSO server is configured. I have received a list of windows AD groups. However, a user list is empty.
Solution
There could be 2 problems: In most cases, the FortiGate receives login information, but can't translate the Windows AD group into the protection profile. Make sure that all the required Windows AD groups are included in the FortiGate user groups and that all FortiGate user groups are included into the authentication security policy. There may be a problem with AD FSSO service running on the Windows AD server. To ensure the problem is on windows side 1 Go to Log&Report > Log Config. 2 Enable firewall authentication event logging and debug level logging on the FortiGate. 3 Ask one or more users to log in into windows. 4 Check the FortiGate logs for the logon event from the Windows AD server. If there is no new logon event entry in the logs, the problem is with Windows side. Use MS Windows AD documentation to troubleshoot the problem.
1097
Troubleshooting FSSO
1098
Overview
Network administrators can add customer identifying information and profile group names to their RADIUS server accounts. In response to a user connecting to the company network, if the RADIUS server successfully authenticates that user it sends a RADIUS Start record to FortiOS. In real time, FortiOS can extract identifying information and profile group names from these RADIUS Start records and match the identifying information with the customer communication session. FortiOS can then dynamically select and apply the profile group named in the RADIUS Start record to the communication session. The application of parental-type controls to user sessions at a school is a useful example of the dynamic profile and multiple profile groups with different levels of access. Administrators can create profile groups that provide different levels of parental controls. Then these different levels of controls can be applied to communication sessions; the level of parental control depending on the profile group name added to the user account in the accounting system. This would allow teachers and student accounts to have different parental control settings. It would also allow teachers and students to logon to the school network from different locations, with different IP addresses, and still have the same restrictions for their level of account. It would also allow for difference between younger and older student controls, as appropriate. Another example is on a mobile phone network with a mobile service provider. The mobile phone may access the network from many physical or network locations. With FortiOS Carrier dynamic profiles enabled on the provider network, that user will be identified as the same user and given the same privileges no matter where they logon. This makes it easier for mobile providers to track customers and provide extended services where warranted, or block access to some resources as may also be warranted. It also allows carriers to treat customers from other carriers who are using their network differently according to any agreements that might exist between carriers or even countries.
1099
Overview
Note: While FortiOS Carrier dynamic profiles and end points are very similar to those objects defined in FortiOS, in FortiOS Carrier there are some differences. These differences will be noted in the documentation. For definitions of carrier related terms, see the FortiOS Carrier chapter in the Handbook. Figure 117: Information flow between customers, the accounting system, and FortiOS
Accounting server identifies the 2 customer Customer 1 connects to the provider network (mobile or other)
Accounting server sends RADIUS Start record to FortiOS. Includes 3 source IP, end point, and profile group name.
3 2
Customer session received by FortiOS FortiOS applies the dynamic profile firewall policy to the session using information from the RADIUS server 5
1100
Overview
End points
The term for customer identifying information is an end point. An end point can be any information the service provider uses to identify a customer and the device that the customer is using to connect to the network. For example, if the customer is using a mobile phone, the end point could be the phones MSISDN number. The end point information must be included in the RADIUS Start record and must be available in the customer communication session (for example, in the HTTP header). This is not the Endpoint Control feature referred to in other parts of FortiOS that is a different feature for application control. End points in this chapter are used with the dynamic profile feature and RADIUS records to identify users.
Note: In most cases, FortiOS Carrier can find the end point and IP address in customer communication sessions. An important exception is WAP traffic. Because WAP traffic may have the source IP address changed from the customers IP address to the IP address of the WAP server, extra configuration may be required to extract the end point and source IP address from WAP traffic. See FortiCarrier Handbook chapter for information on configuring FortiOS Carrier for WAP traffic. In fact the HTTP header options always control how FortiOS Carrier extracts information from customer communication sessions.
Without the end point, customers can only be identified by the IP address of the device that they are using. Because IP addresses may not be permanent or multiple users may be behind a NAT device and sharing a single IP address, the additional end point information is a more reliable and accurate way to identify individual customers. See Configuring end points on page 1113.
You can configure a maximum of one dynamic profile security policy per VDOM. The general steps to configure a dynamic profile security policy are: 1 Create a new UTM profile group with a name that matches the dynamic profile group name that will be in the RADIUS attribute. 2 Create a new security policy and set the required fields (source, destination, schedule, service and action) as normal. 3 Enable Dynamic Profile, and select the dynamic profile from the list. 4 Enable Dynamic Profile Users Only. 5 Select any other optional fields as required.
1101
Overview
When creating a dynamic profile UTM profile group, the group name must match the RADIUS server profile group name that was specified in the RADIUS server configuration. This group name is used to match traffic. To create a dynamic profile UTM profile group - web-based manager 1 Go to UTM > Profile Group. If this options is not visible, go to System > Admin > Settings and enable firewall related displays. 2 Select Create New. 3 Enter the name. For example, my_dyn_prof_group. It has to be the same as the dynamic profile group name used when configuring the RADIUS server for dynamic profiles. See RADIUS server configuration for dynamic profiles on page 1107. 4 Select default for the various UTM services. All entries have at least a default entry, and additional entries if they have been configured. For additional UTM configuration details, see the UTM handbook chapter. 5 Select the web and email protocols to apply dynamic profile to. This can optionally include HTTP, HTTPS, FTP, IMAP, POP3, SMTP, IM, and NNTP. If you do not use some of these protocols, do not configure them. For all protocols selected, enable monitor to ensure statistics are collected for the Dashboard. 6 Select OK. To create a dynamic profile UTM profile group - CLI config firewall profile-group edit my_dyn_prof_group set av_profile default set profile_protocol_options default set webfilter-profile default set spamfilter-profile default set ips-sensor default next end
1102
Overview
To create a dynamic profile security policy - web-based manager 1 Go to Policy. 2 Select Create New. 3 Enter the following information.
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Action wan1 all internal all ACCEPT
4 Select Enable Dynamic Profile. 5 Select my_dyn_prof_group for Profile. This is the UTM profile group created earlier. 6 Select UTM, and enable default configuration for AntiVirus, IPS, Web Filter, Email Filter, and Protocol Options. 7 Add the comment Dynamic Profile policy to help identify this security policy in a list of policies. 8 Select OK. To create a dynamic profile security policy - CLI config firewall policy edit 11 set srcintf wan1 set srcaddr any set dstintf internal set dstaddr any set action accept set dynamic-profile enable set dynamic-profile-access http imap pop3 smtp set dynamic-profile-group my_dyn_prof_group set utm-status enable set av-profile default set webfilter-profile default set spamfilter-profile default set ips-sensor default set profile-protocol-options default set comments Dynamic Profile policy next end
1103
Overview
Add a profile group name field to customer accounts on the RADIUS server so that the name is added to the RADIUS Start record sent by the accounting system to the FortiOS unit. Profile group names do not need to be added for all users, only to the accounts of customers who will use the dynamic profile feature on the FortiOS unit. If a profile group is not found in a RADIUS Start record regular RADIUS authentication will be used instead of dynamic profile if the user is configured for that type of authentication. See RADIUS authentication with a FortiGate unit on page 986. Configure your accounting system to send RADIUS Start records to the FortiOS unit. You can send the RADIUS Start records to any FortiOS network interface. If your FortiOS unit is operating with virtual domains (VDOMs) enabled, the RADIUS Start records must be sent to a network interface in the management VDOM.
1104
Overview
The dynamic profile extracts source IP, and protection profile name.
Dynamic profile process 3 Source IP, and protection profile name added to user context list.
User context list 6 Dynamic profile selection process queries the user context list for the profile group name Dynamic profile selection process 5 Dynamic profile selection process extracts source IP and carrier end point from the customer session. Profile group 7
3 2 1
Firewall 4 Firewall policy with profile group receives customer session 8b Traffic blocked by profile group 8a Traffic allowed by profile group
1105
To block all non-dynamic profile sessions, make the next policy in the list a deny policy that matches all traffic. You could select Log Violation Traffic in this policy to log all nondynamic profile sessions. To use traffic shaping to reduce the bandwidth available for non-dynamic profile sessions, apply a restrictive traffic shaper to the policy below the dynamic profile policy.
1106
1107
This example uses a RADIUS server called myRADIUS.example.com. This server uses Login-IP Host for both endpoint attribute and endpoint blocking. It uses Vendor-Specific for profile along with a value of forti_dyn_prof. This means when dynamic profile is trying to match the profile group, the group name it is looking to match will be in the VendorSpecific RADIUS attribute and the value will be forti_dyn_prof. You may use different attributes for your configuration as is required. The RADIUS server configuration will use the default settings where possible. This procedure assumes there is no existing dynamic profile server already configured. To configure a dynamic profile RADIUS server - web-based manager 1 Go to User > Remote > Radius. 2 Select Create New. 3 For Name, enter myRADIUS.example.com. This is the name of the RADIUS server on the network. 4 For Type, select Dynamic Start. This enables dynamic profiles. 5 Enter the following information, and select OK:
Endpoint Attribute Select the RADIUS attribute Login-IP Host from drop-down list. This attribute will be used to uniquely identify the user and enable extraction of endpoint information. Note: Some RADUIS attributes are only for use with FortiOS Carrier and carrier networks. These attributes relate to mobile devices such as *-Station-Id. Profile Attribute Select the RADIUS attribute Vendor-Specific from drop-down list. This attribute will be used to uniquely identify the user and enable extraction of security profile information. Note: Some RADUIS attributes are only for use with FortiOS Carrier and carrier networks. These attributes relate to mobile devices such as *-Station-Id. Endpoint Blocking Attribute Select the RADIUS attribute Login-IP Host from drop-down list. This attribute will be used to uniquely identify the user and enable extraction of endpoint blocking information. Note: Some RADUIS attributes are only for use with FortiOS Carrier and carrier networks. These attributes relate to mobile devices such as *-Station-Id. Send RADIUS Response Validate RADIUS Secret Profile Key Select this option. FortiOS will send RADIUS responses after receiving RADIUS Start and Stop records. This setting may be required by your accounting system. Select to use RADIUS shared secret for responses and validating requests for dynamic profile. For this example, enter forti_dyn_prof, short for (fortios dynamic profile).Contains the profile group name to be matched in Profile Attribute. This is the profile group from the RADIUS server that the user belongs to. The profile group is how RADIUS users can be divided into different groups and access levels. Select to log all possible dynamic profile related events. To select individual events, go to the CLI command dp-log-dyn_flags and select individual events to log. See Advanced dynamic profile RADIUS server configuration - CLI on page 1109.
Note: Dynamic profiles always use the RADIUS framed-ip-addr field to get the IP address associated with the end point.
1108
1109
dp-radius-response tells FortiOS to send a response when the system receives a RADIUS start message. Some RADIUS servers require this to be enabled. It allows the RADIUS server to ensure the Start Record was received, which will prevent retries and such which will in turn improve system performance overall. For additional dynamic profile configuration, see the CLI reference.
Carrier endpoints
When you are configuring the dynamic profile RADIUS server in the CLI, you have the option of configuring carrier endpoints as well. If you set endpoint-translation enable, this enables the endpoint series of CLI commands. See Configuring end points on page 1113.
dynamic_profile Enable dynamic profile feature. Default is disable. Note that identity-based policy and dynamic profile are mutual exclusive when one is enabled, the other is hidden. Note: When disabled, all related keywords (dp-*) are hidden. dp-carrier-endpointblock-attribute Select Login-IP Host. This is the RADIUS Attribute used to block the endpoint. The list of available attributes to use is extensive. Note: Some RADUIS attributes are only for use with FortiOS Carrier and carrier networks. These attributes relate to mobile devices such as *-Station-Id. dp-context-timeout Timeout value in seconds for user context table entries (0 = infinite). Default is 28 800 seconds. See Timeout options on page 1121. Time in seconds to hold in proxy connection state to receive RADIUS START. Default time is 5 seconds. Select one or more dynamic profile events to log. Events available include: accounting-event accounting-stop-missed context-missing endpoint-block none profile-missing protocol-error radiusd-other Minimum time period to use for event logs. Default is 0. Maximum percentage of system memory to use for context tables. Default is 4%. Select Vendor-Specific. This is the RADIUS Attribute used to hold the security profile group name. To extract a profile group name from the RADIUS Start record, set this field to the name of the RADIUS attribute that contains the profile group name. Note: Some RADUIS attributes are only for use with FortiOS Carrier and carrier networks. These attributes relate to mobile devices such as *-Station-Id. dp-profile-attribute-key You can enter a string in this field if the Profile Attribute always contains the same text string directly before the profile group name. For example, if the Profile Attribute always includes the string profile_name= before the profile group name (for example, profile_name=<profile_name_str>), set the Profile Key to profile_name. FortiOS uses the string in the Profile Key to extract the profile name from the complete Profile Attribute string.
dp-hold-time dp-log-dyn_flags
1110
dp-radius-response dp-radius-server-port
Enable/disable sending radius response packets If required, change the UDP port number used by the RADIUS accounting server for sending RADIUS records. The default is 1813. FortiOS Carrier listens for RADIUS Start and Stop records on this port. RADIUS shared secret for responses and validating requests for dynamic profile by the RADIUS accounting server. Enable to validate RADIUS request shared secret. Select if you want FortiOS Carrier to verify that the RADIUS secret matches the RADIUS secret in the RADIUS Start or End record. You can use the RADIUS secret to verify that the RADIUS record is valid.
dp-secret dp-validate-requestsecret
1111
concepts
Between identity-based policies, dynamic profiles, and traffic shaping there are many possible ways to configure your security policies to work with dynamic profiles. A few common ideas are presented here. While many security options such as AV, webfiltering, and endpoint control are not mentioned here they are perfectly valid for use with dynamic profile security policies and are critical to maintaining network security. These concepts include: Only allow dynamic profile users Only allow dynamic profile users, but traffic shape protocols Allow multiple dynamic profile groups Promote dynamic profile users Schedule-based policies
1112
Schedule-based policies
Up to now, no mention has been made of scheduling. It is possible to have a policy only active at certain times of the day, or certain days of the week. This would allow a school to configure during class and after school schedules that may vary. Or at a company, different policies might be used over the lunch hour, for example relaxin some company Internet browsing use policies. Schedules can be used by any security policy, but remember when that policy is offline you likely want a different policy in place allowing some traffic through. If you deny all traffic at times, you may run into problems with even administrator access and be forced to use the console interface to access the FortiOS unit.
1113
ep-carrier-endpoint-header Enable to allow custom information to be added to HTTP headers. This option is commonly used on carrier networks. Default is x-up-calling-line-id. ep-carrier-endpointheader-suppress ep-ip-header-suppress ep-missing-headerfallback ep-profile-query-type Select Enable to prevent use of HTTP headers
ep-carrier-endpoint-prefix Enable to prefix end point values with additional information Enable/disable HTTP header suppression. Specify either the policy-profile or the session-ip address to act as a backup when the extracted header is not present. Default is policy-profile. Specify the type of dynamic profile query as one of extract-carrier-endpoint extract-ip session-ip Use the IP address when the full carrier endpoint information is not available. The default is session-ip.
Controlling MMS service access based on a users end point - FortiCarrier Only
You can control access to MMS services for users according to their end point by configuring end point filtering (also called end point blocking). End point filtering can filter MM1, MM3, MM4, and MM7 messages according to the end points in the From or To addresses of the messages. For a definition of end points, see End points on page 1101. You configure end point filtering by creating an end point filter list containing end point patterns. A end point pattern can match one end point or can use wildcards or regular expressions to match multiple end points. For each pattern, you select the action that FortiOS Carrier takes on a message when the pattern matches a end point in the message. Actions include blocking the message, exempting the message from mass MMS scanning and exempting the message from all scanning. You can also intercept the message and archive the message to a FortiAnalyzer unit. To apply an end point filter list, you need to add the list to the MMS Scanning > Carrier End Point Block section of an MMS protection profile.
1114
1115
Pattern
Action
1116
To match a special character such as '.' and * use the escape character \. For example: To match fortinet.com, the regular expression should be: fortinet\.com In Perl regular expressions, * means match 0 or more times of the character before it, not 0 or more times of any character. For example: forti*.com matches fortiiii.com but does not match fortinet.com To match any character 0 or more times, use .* where . means any character and the * means 0 or more times. For example, the wildcard match pattern forti*.com should therefore be fort.*\.com.
Blocking access to the network based on end points - FortiOS Carrier only
You can use end point IP filtering to block traffic from source IP addresses associated with end points. You can also configure FortiOS Carrier to record log messages whenever end point IP filtering blocks traffic. End point IP filtering blocks traffic at the IP level, before the traffic is accepted by a security policy. For a definition of end points, see About carrier end points on page 44. To configure end point IP filtering, go to UTM > Carrier > IP Filter and add end points to the IP filter list. For each end point you can enable or disable both blocking traffic and logging blocked traffic.
Note: You cannot add end point patterns to the end point IP filter list. You must enter complete and specific end points that are valid for your network.
Note: The only action available is block. You cannot use end point IP filtering to exempt end points from IP filtering or to content archive or quarantine communication sessions.
FortiOS Carrier looks in the current user context list for the end points in the IP filter list and extracts the source IP addresses for these end points. Then any communication session with a source IP address that matches one of these IP addresses is blocked at the IP level, before the communication session is accepted by a security policy. FortiOS Carrier dynamically updates the list of IP addresses to block as the user context list changes. Only these updated IP addresses are blocked by end point IP filtering. For information about the user context list and how entries are added to and removed from this list, see About the user context list on page 45.
1117
Once the IP filters are configured, it is applied to all Carrier Endpoints as their traffic hits the security policies.
Carrier end point IP filter list Create New Edit Add a end point to the end point IP filter list. Edit the IP filter list entry. You can change the end point, enable or disable blocking, and enable or disable logging blocked traffic. If multiple entries are selected, Edit is not available. Delete one or more selected end points from the list. Select an end point entry, and select enable to enable blocking for that entry. The Enable icon will be green with a checkmark. Select an end point entry, and select disable to disable blocking for that entry. This effectively turns off this entry. The Enable Icon will be grey with an X. Remove all entries from the end point IP filter list. Select the check box to enable all entries on the end point IP filter list. FortiOS Carrier will then block all communication sessions from source IP addresses associated with these end points. Clear the check box to disable all entries on the IP filter list. Disabling all entries disables end point IP filtering. You can also select or clear individual check boxes to enable or disable individual end points. Select Create New to add a new end point IP address or select Edit to change an existing address. The end point and logging selections will appear in the end point filter list. Enter the end point. You must enter a single end point and not a end point pattern. Select to record a log message when carrier end point IP filtering blocks a communication session. Select to block traffic from the carrier end point. Block Traffic is selected by default.
Create new entry Adding or modifying a carrier end point pattern Carrier End Point Log Blocked Traffic Block Traffic
Example
You can use IP filtering on Carrier Endpoints when a handheld on your carrier network is known to be sending spam or malware. You can easily use IP filtering to block the traffic from that unit, log it, or both. This allows you to escalate your response, and even monitor afterwards as well. In this example the hand held IP address is 10.11.101.99 and since they are sending malware this IP address will be both logged and blocked. To create an IP filter list entry to block an address - web-based manager 1 Go to UTM > Carrier > IP Filter. 2 Select Create New. 3 Enter 10.11.101.199 for the Carrier End Point. 4 Select Log Blocked Traffic and Block Traffic. 5 Select OK.
1118
1119
3 Expand MMS Address Translation. 4 Select settings for MM1 and MM7 as required. 5 Select OK.
Sender Address Source Sender Address Identifier Select to extract the senders address from the HTTP Header Field or a Cookie. You must also specify the identifier that contains the carrier end point. Enter the sender address identifier that includes the carrier end point. The default identifier is x-up-calling-line-id. If the Sender Address Source is HTTP Header Field, the address and its identifier in the HTTP request header takes the format: <Sender Address Identifier>: <MSISDN_value> If the Sender Address Source is Cookie, the address and its identifier in the HTTP request headers Cookie field takes the format of attribute-value pairs: Cookie: id=<cookie-id>; <Sender Address Identifier>=<MSISDN Value>
Convert Sender Select to convert the sender address from ASCII to hexadecimal or from Address From / To hexadecimal to ASCII. This is required by some applications. Hex Add End Point Prefix for Logging / Notification Enable Select to enable adding the country code to the extracted carrier end point, such as the MSISDN, for logging and notification purposes. You can limit the number length for the test numbers used for internal monitoring without a country code. Enter a carrier end point prefix that should be added to all carrier end points. Use the prefix to add extra information to the carrier end point in the log entry. Enter the minimum length of the number. If this and Maximum Length are set to zero (0), length is not limited. Enter the maximum length of the number. If this and Minimum Length are set to zero (0), length is not limited.
1120
Timeout options
If the Sender Address Source is HTTP Header Field, the address and its identifier in the HTTP request header takes the format: <Sender Address Identifier>: <MSISDN_value> Where the <MSISDN_value> is the carrier end point. For example, the HTTP header might contain: x-up-calling-line-id: 9811301234 where x-up-calling-line-id would be the Sender Address Identifier, and 9811301234 would be the MSISDN.
Cookie example
If you want the address to persist, then you should use a cookie. Keep in mind that cookies are a less secure method than the HTTP header field option because of their persistence. For this example we are concerned about traffic to and from handsets and will only be using MM1. A non-standard field for Sender Address Identifier will be used: x-upcalling-cookie, and a country code of 467. The Sender Address does not need converting from hex. The prefix will be added to Logging/Notification using the MSISDN for the prefix. To configure MMS address translation using cookies - web-based manager 1 Go to UTM > Carrier > MMS Profile. 2 Select Create New. 3 Enter MMS_addr_cookie for the Profilename. 4 Expand MMS Address Translation. 5 Under MM1, select Cookie for Sender Address Source. 6 Under MM1, enter x-up-calling-cookie for Sender Address Identifier. 7 Select Enable for Add End Point Prefix for Logging / Notification. 8 Enter 467 for Prefix. 9 Select OK. For MM1 messages, a cookie can now be referenced for the Senders address. Any messages that trigger logging or notification that use this address translation will include the 467 prefix for added identification. A sample HTTP request header resulting from this configuration would be: Cookie: id=0123jf!a; x-up-calling-cookie=467301297 where 0123jf!a is the cookie id, x-up-calling-cookie is the Sender Address Identifier, and 467301297 is the MSISDN.
Timeout options
Dynamic profile timeouts control how long FortiOS keeps entries in the user context list. Entries are removed when a RADIUS stop record is received by FortiOS, but otherwise entries remain in the context list until they timeout. Usually you would not want entries staying in the user context list if they are not being used. A smaller list is easier and more efficient for FortiOS to manage. As well, because user context information can change, a smaller list means incorrect or out-of-date information is more likely to be removed.
1121
Timeout options
However, some situations may benefit from keeping the entries in the user context list for a longer period of time. This may reduce network load and provide other benefits, but the security risk must be kept in mind as well.
User Context Entry Enter the number of seconds that a user context entry can remain in the list without FortiOS Carrier receiving a communication session from the end point. Timeout If a user context entry is not being looked up, then the user must no longer be connected to the network. This timeout is only required if FortiOS Carrier does not receive the RADIUS Stop record. However, even if the accounting system does send RADIUS Stop records, this timeout should be set in case FortiOS Carrier misses one. The default user context entry timeout is 28800 seconds (8 hours). You can keep this timeout relatively high because it is not usually a problem to have a long list. But a timeout is usually required because FortiOS Carrier should remove entries that are no longer used. You might want to reduce this timeout if the accounting server does not send RADIUS Stop records. Also, if customer IP addresses change often, you might want to set this timeout lower so that out-of-date entries are removed from the list. Avoid entering a setting that is too low. FortiOS Carrier may remove user context entries for users who are still connected. Set the timeout to 0 if you do not want FortiOS Carrier to remove entries from the list except in response to RADIUS Stop messages. User Context Creation Timeout If FortiOS Carrier receives a communication session and cant find a corresponding end point and IP address in the user context list, the system waits for the User Context Creation Timeout. If a match is not found after this timeout, FortiOS Carrier applies the profile group in the security policy to the communication session. The default user context creation timeout is 5 seconds. You might want to increase this timeout if the default profile group, instead of the dynamic profile, is being applied to users. This could be happening if there is a delay before FortiOS Carrier receives the RADIUS Start record from the accounting server. If you set this timeout to 0, FortiOS Carrier blocks communication sessions that do not have a matching entry in the user context list.
1122
Log settings
Log settings
You can use Log settings to configure FortiOS Carrier to record event log messages for dynamic profile events. You can also set a log message period to group log messages.
Log Message Period Enter the time in seconds to group event log messages for dynamic profile events. For example, if the log message period is 30 seconds, FortiOS Carrier generates groups of single-event log messages every 30 seconds instead of generating event log messages continuously. The grouped log messages generated each period contain a count of how many events of that type occurred. If you set this period to 0, FortiOS Carrier generates all event log messages in real time. Select to have FortiOS generate event log messages if RADIUS protocol errors occur. One example could be a RADIUS record containing a RADIUS secret that does not match the one added to the dynamic profile. Select to have FortiOS generate an event log message whenever FortiOS Carrier cannot find a profile group name in a RADIUS start message that matches the name of a profile group added to FortiOS Carrier. Select to have FortiOS generate an event log message whenever a user context creation timeout expires indicating that FortiOS Carrier was not able to match a communication session because a matching entry was not found in the user context list.
Protocol Errors
Missed Accounting Select to have FortiOS generate an event log message whenever a user context entry timeout expires indicating that FortiOS Carrier removed an Stop Events entry from the user context list without receiving a RADIUS Stop message. Accounting Events Select to have FortiOS generate an event log message when FortiOS Carrier does not find the expected information in a RADIUS record. This may happen, for example, if a RADIUS record contains more than the expected number of addresses. Other Log Messages Select to have FortiOS generate event log messages for other events. The event is described in the log message. For example, a log message may be generated if the memory limit for the user context list is reached and the oldest entries in the table have been dropped.
1123
FortiOS Carrier cannot find a matching source IP address in the user context list: the end point is not added to log messages and the default profile group in the security policy is applied to the communication session. A match is found but the matching entry in the user context list does not contain a profile group name or the profile group name does not match the name of a profile group added to FortiOS Carrier: the end point is added to log messages but the default profile group in the security policy is applied to the communication session.
If FortiOS Carrier receives WAP sessions (or other sessions that are exceptions), you must change the HTTP header options to either Use Extracted IP Address or Use Extracted End Point and configure additional settings to extract the IP address and end point from the communication session. In some cases you may not be able to extract both the correct IP address and the correct end point. If this happens, you can configure HTTP header options settings to use only the available information. The following table illustrates what may happen when FortiOS Carrier receives a communication session, depending on the selected Profile Query Type:
Table 71: Profile Query Type settings and FortiOS Carrier behavior Profile Query Type Use Extracted IP Address Scenario
communication session, finds a matching IP address in the user context list, and uses the associated end point and profile group name in the user context list for the communication session. FortiOS Carrier cannot extract a end point from the HTTP header, so instead uses the one in the user context list.
FortiOS Carrier extracts the end point from the communication session,
finds a matching end point in the user context list, and uses the associated profile group name in the user context list for the communication session. FortiOS Carrier ignores the IP address in the user context list.
FortiOS Carrier cannot find the specified IP address header or end point Use Extracted IP header. If Missing Header: Use Session IP Address is selected, FortiOS Address or Use Extracted End Point Carrier matches the source IP address of the communication session with the user context list and uses the associated end point and profile group in the user context list with the communication session. FortiOS Carrier cannot find the specified IP address header or end point header. If Missing Header: Use Session IP Address is not selected, FortiOS Carrier processes the communication session as a normal communication session, that is without associating a end point or dynamically applying a profile group.
1124
To configure end point HTTP header options, go to System > Dynamic Profile > HTTP Header Options. Complete the fields as described in the table below and select Apply.
General Options Profile Query Type Select the specific type of dynamic profile query to be executed: Use Session IP Default setting. Use the actual source IP address of the communication Address session and the end point extracted from the communication session. No HTTP header configuration required. Use Extracted IP Use the actual source IP address of communication sessions and get the carrier end point from the user context list. Configure together with other Address HTTP header options described below to get the IP address from communication sessions. Use Extracted End Point Extract the end point from communication sessions and get the source IP address from the user context list. Configure together with other HTTP header options described below to get the end point from communication sessions.
The following options are available only if you select Use Extracted IP Address or Use Extracted End Point IP Address Header Specify the header field in the communication session that includes the source IP address. The default IP address header is X-Up-Forwarded-For. Suppress Select to delete the IP address header found in the specified IP Address Header field. You can use this feature to prevent your customers source IP addresses from appearing on the Internet. Specify the header field in the communication session that includes the end point. The default end point header is x-up-calling-line-id. Select to delete the end point header found in the specified End Point Header field. You can use this feature to prevent your customers end points from appearing on the Internet. Select this option to use the actual source IP address of the session if FortiOS Carrier cannot find the specified IP address header or if the specified IP address header does not contain an IP address. FortiOS Carrier matches this IP address with the IP addresses in the user context list. Configure FortiOS Carrier to find the communication sessions end point in the HTTP Header Field or in a Cookie in the HTTP session.
Header End Point in Select if the end point is encoded in the communication session using hexadecimal notation. FortiOS Carrier converts the end point from hex to Hex decimal. Carrier End Point Prefix Options Add End Point Prefix Prefix Minimum Length Maximum Length Select to add a prefix to the end point found in the communication session. The following options are available only if this option is selected. For more information, see Example: How FortiOS Carrier applies end point prefix options on page 1125. Enter the prefix to be added to the end point. Enter a minimum value. The prefix is not added to the end point if it has the same or fewer digits than the minimum length. Enter a maximum value. The prefix is not added to the end point if it has the same or more digits than the maximum length.
1125
You also have test messages on your networks from systems that are providing service quality checking or other functionality. These test messages include identifying numbers that are 4 to 6 digits long (i.e. smaller than MSISDNs which are usually 10 digits). These numbers are added to the same header as the MSISDNs. You can use the minimum length field to make sure that the numbers in the test messages are not changed. Its possible that some of the MSISDNs sent by the WAP server do include the country code. You would not want to add another country code in this case. You can use the maximum length field to make sure that MSISDN numbers with country codes are not changed Your system uses 10-digit MSISDNs. Adding the country code increases the MSISDN to 12 digits. Enable Add End Point Prefix. Set the Prefix to 44, which is the country code that you want to add. If you are operating with multiple virtual domains, you can set HTTP header options differently for each virtual domain. So you could add different country codes to different virtual domains. Set Minimum Length to 6 so that all numbers with 6 or fewer digits are not changed. Set Maximum Length to 12 so that all numbers with 12 or more digits are not changed.
1126
Pattern
1127
Action
Select the action taken by FortiOS Carrier for messages from a carrier end point that matches the carrier end point pattern: None - No action is taken. Block - MMS messages from the carrier end point are not delivered and FortiOS Carrier records a log message. Exempt from mass MMS - MMS messages from the carrier end point are delivered and are exempt from mass MMS filtering. Mass MMS filtering is configured in MMS protection profiles and is also called MMS Bulk Email Filtering and includes MMS message flood protection and MMS duplicate message detection. Exempt from all scanning - MMS messages from the carrier end point are delivered and are exempt from all MMS protection profile scanning. Note: MMS messages are not subject to protection profile filtering, just MMS protection profile filtering.
Content Archive
MMS messages from the carrier end point are delivered, the message content is DLP archived according to MMS DLP archive settings. Content archiving is also called DLP archiving. MMS messages from the carrier end point are delivered. Based on the quarantine configuration, attached files may be removed and quarantined. The pattern type: Wildcard, Regular Expression, or Single Carrier End Point. See Using wildcards and Perl regular expressions on page 73. Select to enable this carrier end point filter pattern.
Note: The only action available is block. You cannot use carrier end point IP filtering to exempt carrier end points from IP filtering or to content archive or quarantine communication sessions.
FortiOS Carrier looks in the current user context list for the carrier end points in the IP filter list and extracts the source IP addresses for these carrier end points. Then any communication session with a source IP address that matches one of these IP addresses is blocked at the IP level, before the communication session is accepted by a security policy. FortiOS Carrier dynamically updates the list of IP addresses to block as the user context list changes. Only these updated IP addresses are blocked by carrier end point IP filtering. For information about the user context list and how entries are added to and removed from this list, see About the user context list on page 45. Configuring end point IP filtering includes: Viewing and defining a carrier end point IP filter list Adding additional blocked IP addresses
User Authentication for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1128
Create new entry Adding or modifying a carrier end point pattern Carrier End Point Log Blocked Traffic Block Traffic
Example
You can use IP filtering on Carrier Endpoints when a handheld on your carrier network is known to be sending spam or malware. You can easily use IP filtering to block the traffic from that unit, log it, or both. This allows you to escalate your response, and even monitor afterwards as well.
1129
In this example the hand held device IP address is 10.11.101.99 and since they are sending malware this IP address will be both logged and blocked. The following general steps are required. 1 Create an IP filter list entry to block an address 2 Create an MMS protection profile to use this IP filter list 3 Create a firewall address for the blocked IP address, and create incoming and outgoing security policies that use the firewall address and MMS profile.
Note: Firewall configuration is not explained here. See the Fundamentals Handbook chapter.
To create an IP filter list entry to block an address - web-based manager 1 Go to UTM > Carrier > IP Filter. 2 Select Create New. 3 Enter 10.11.101.199 for the Carrier End Point. 4 Select Log Blocked Traffic and Block Traffic. 5 Select OK. To create an MMS protection profile to use the IP filter 1 Go to UTM > Carrier > MMS profile. 2 Select Create New. 3 Enter ipFilteringProfile as the Profilename. 4 Expand MMS Scanning. 5 Select all MMS protocols for Carrier End Point Block. 6 Select my IP filter list from the Option menu for Carrier End Point Block. 7 Select any other settings as required for this MMS protection profile. 8 Select OK.
1130
1131
In the following example, the command diagnose test application radiusd 3 displays three entries in the user context list. In this example, the carrier end points are listed under endpoint and they are all email addresses. This example output uses example IP addresses and domain names.
index,"time left (hh:mm:ss)",ip,endpoint,profile,rc,"Default Profile?",Blacklist? 1,07:08:07,"192.168.23.7","33example@example.com","PackageVAS2",1,No,No 2,07:23:32,"192.168.33.112","45example@example.com","PackageVAS2",1,No,No 3,07:28:32,"172.20.123.71","332example@example.com","PackageVAS1",1,No,No
1132
You can de-authenticate a user by selecting the Delete icon for that entry. You can filter the list of displayed users either by selecting the funnel icon for one of the column titles or selecting Filter Settings. Select Column Settings to add or remove columns to the display, or rearrange the order of the columns displayed. Optionally, you can select De-authenticate all users. This should only be used in extreme cases as all users will momentarily loose their network resource connections.
The first line, listing the username and IP address, is present for a user with either a webmode or tunnel-mode connection. The Subsession line is present only if the user has a tunnel mode connection. The Description column displays the virtual IP address assigned to the users tunnel-mode connection. For more information about SSL VPN, see the SSL VPN handbook chapter.
FortiOS Handbook v3: User Authentication 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1133
To monitor SSL VPN users - CLI To list all of the SSL VPN sessions and their index numbers: execute vpn sslvpn list The output looks like this: SSL-VPN Login Users: Index User Auth Type 0 user1 1
You can use the Index value in the following commands to disconnect user sessions: To disconnect a tunnel-mode user execute vpn sslvpn del-tunnel <index> To disconnect a web-mode user execute vpn sslvpn del-web <index> You can also disconnect multiple users: To disconnect all tunnel-mode SSL VPN users in this VDOM execute vpn ssl del-all tunnel To disconnect all SSL VPN users in this VDOM execute vpn ssl del-all
1134
17
2.2
rt 2 Po 00 1 . 01 1.1
Network_1 10.11.102.0/24
Overview
In this example, there is a Windows network connected to Port 2 on the FortiGate unit and another LAN, Network_1, connected to Port 3. All Windows network users authenticate when they logon to their network. Members of the Engineering and Sales groups can access the Internet without entering their authentication credentials again. The example assumes that the Fortinet Single Sign On (FSSO) has already been installed and configured on the domain controller.
1135
LAN users who belong to the Internet_users group can access the Internet after entering their username and password to authenticate. This example shows only two users, User1 is authenticated by a password stored on the FortiGate unit, User2 is authenticated on an external authentication server. Both of these users are referred to as local users because the user account is created on the FortiGate unit.
3 Select OK. To create a local user - CLI config user local edit user1 set type password set passwd hardtoguess end
To configure the remote authentication server - CLI config user radius edit OurRADIUSsrv set server 10.11.102.15 set secret OurSecret set auth-type auto end Creation of the user account is similar to the locally-authenticated account, except that you specify the RADIUS authentication server instead of the users password.
1136
To configure a remote user - web-based manager 1 Go to User > User and select Create New. 2 Enter the following information and select OK:
username RADIUS User2 Select Match user on RADIUS server and then select OurRADIUSsrv from the list.
To configure a remote user - CLI config user local edit User2 set name User2 set type radius set radius-server OurRADIUSsrv end
To configure LDAP for FSSO - web-based manager 1 Go to User > Remote > LDAP and select Create New. 2 Enter the following information:
Name Server Name / IP Distinguished Name Bind Type User DN Password ADserver 10.11.101.160 dc=office,dc=example,dc=com Regular
cn=FSSO_Admin,cn=users,dc=office,dc=example,dc=com
set_a_secure_password
Leave other fields at their default values. 3 Select OK. To configure LDAP for FSSO - CLI config user ldap edit "ADserver" set server "10.11.101.160" set dn "cn=users,dc=office,dc=example,dc=com"
FortiOS Handbook v3: User Authentication 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1137
set type regular set username "cn=administrator,cn=users,dc=office,dc=example,dc=com" set password set_a_secure_password next end To specify the collector agent for FSSO - web-based manager 1 Go to User > FSSO and select Create New. 2 Enter the following information and select OK:
Name Enter on one line Collector IP/Name Port Password LDAP Server 10.11.101.160 8000 fortinet_canada ADserver WinGroups
To specify the collector agent for FSSO - CLI config user fsso edit "WinGroups" set ldap-server "ADserver" set password ENC G7GQV7NEqilCM9jKmVmJJFVvhQ2+wtNEe9T0iYA5Sa+EqT2J8zhOrbkJFD r0RmY3c4LaoXdsoBczA1dONmcGfthTxxwGsigzGpbJdC71spFlQYtj set server "10.11.101.160" end To select Windows user groups to monitor - web-based manager 1 Go to User > FSSO > FSSO Agent. 2 Expand WinGroups, then select the Edit Users/Groups icon. 3 Select the Engineering and Sales groups and then select OK. To create the FSSO_Internet-users user group - web-based manager 1 Go to User > User Group and select Create New. 2 Enter the group name, FSSO_Internet_users. 3 Select Fortinet Single Sign-On (FSSO). 4 In the Available Members list, select the Engineering and Sales groups and then select the right arrow button to move them to the Members list. 5 Select OK. To create the FSSO_Internet-users user group - CLI config user group edit FSSO_Internet_users set group-type directory-service
1138
To create the firewall user group - CLI config user group edit Internet_users set group-type firewall set member User1 User2 end
1139
3 Select Enable identity-based Policy and then select Add. In the New Authentication Rule window, enter the following information, and then select OK:
User Group Service Schedule UTM FSSO_Internet_users ANY always Optionally, enable UTM options.
4 Select OK. To create a security policy for FSSO authentication - CLI config firewall policy edit 0 set srcintf port2 set dstintf port1 set srcaddr Windows_net set dstaddr all set action accept set identity-based enable set nat enable config identity-based-policy edit 1 set schedule always set groups FSSO_Internet_users set service ANY end end
To create a security policy for local user authentication - web-based manager 1 Go to Policy > Policy and select Create New. 2 Enter the following information:
Source interface Source address Destination interface Destination address Action NAT Port3 Internal_net Port1 all ACCEPT Enable
3 Select Enable identity-based Policy and then select Add. In the New Authentication Rule window, enter the following information, and then select OK:
User Group Service Internet_users ANY
1140
Schedule UTM
4 Select OK. To create a security policy for local user authentication - CLI config firewall policy edit 0 set srcintf port3 set dstintf port1 set srcaddr internal_net set dstaddr all set action accept set identity-based enable set nat enable config identity-based-policy edit 1 set schedule always set groups Internet_users set service ANY end end
1141
To configure LDAP group settings - CLI config user group edit "ldap_grp" set member "ldap" config match edit 1 set server-name "ldap" set group-name "TRUE" next end next end Once these settings are in place, users should be able to authenticate. To ensure your settings are correct, here is the sample output from a diag debug command that shows the authentication process. When the "Allow Dial-in" attribute is set to "TRUE" the following will likely be in the output: get_member_of_groups-Get the memberOf groups. get_member_of_groups- attr='msNPAllowDialin', found 1 values get_member_of_groups-val[0]='TRUE' fnbamd_ldap_get_result-Auth accepted fnbamd_ldap_get_result-Going to DONE state res=0 fnbamd_auth_poll_ldap-Result for ldap svr 192.168.201.3 is SUCCESS fnbamd_auth_poll_ldap-Passed group matching If the attribute is not set but it is expected, the following will likely be in the output: get_member_of_groups-Get the memberOf groups. get_member_of_groups- attr='msNPAllowDialin', found 1 values get_member_of_groups-val[0]='FALSE' fnbamd_ldap_get_result-Auth accepted fnbamd_ldap_get_result-Going to DONE state res=0 fnbamd_auth_poll_ldap-Result for ldap svr 192.168.201.3 is SUCCESS fnbamd_auth_poll_ldap-Failed group matching
Note: The only difference between these two outputs is the last line which is either passed or failed based on if the member-attribute is set to the expected value or not.
1142
General configuration Configuring RADIUS Configuring FortiGate regular and dynamic profile security policies Testing
Assumptions
VDOMs are not enabled The admin super_admin administrator account will be used for all FortiGate unit configuration. Any other devices on the network do not affect the topology of this example, and therefore are not included. Anywhere settings are not described, they are assumed to be default values. third-party RADIUS server is installed on a server box. BGP is used for any dynamic routing. Authentication event logging under Log&Report has been configured.
Topology
Example.com has an office with 20 users on the internal network. These users need access to the Internet to do their jobs. The office network is protected by a FortiGate-60C unit with access to the Internet through the wan1 interface, the user network on the internal interface, and all the servers are on the DMZ interface. This includes an Ubuntu Linux server running FreeRADIUS. For this example only two users will be configured Pat Lee with an account name plee, or plee@example.com, and Kelly Green with an account name kgreen, or kgreen@example.com.
Figure 123: Dynamic Profile topology
Company Servers 10.11.101.0/24
ace erf int .100 Z 1 DM 1.10 .1 10 Int 10 ernal .11 in .10 ter 2.1 fac 00 e
ate
Main_network 10.11.102.0/24
General configuration
1 Configuring RADIUS with users, user group, and FortiGate information. 2 Configuring FortiGate interfaces 3 Configuring dynamic profile RADIUS server on FortiGate 4 Configuring FortiGate regular and dynamic profile security policies
FortiOS Handbook v3: User Authentication 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1143
Configuring RADIUS
Configuring RADIUS includes configuring the RADIUS server such as FreeRADIUS, a radius client on users computers, and configuring users in the system. For this example the two users will be Pat Lee, and Kelly Green. They belong to a group called exampledotcom_employees. When it is all configured, the RADIUS daemon needs to started. The users have a RADIUS client installed on their PCs that allows them to authenticate through the RADIUS server. FreeRADIUS can be found on the freeradius.org website. For any problems installing FreeRADIUS, see the FreeRADIUS documentation.
To configure FortiGate interfaces - web-based manager 1 Go to System > Network > Interface. 2 Select wan1 to edit. 3 Enter the following information and select OK.
Alias Addressing Mode IP/Netmask Comments Internet Manual 172.20.120.141/255.255.255.0 Internet
4 Select dmz to edit. 5 Enter the following information and select OK.
Alias Addressing Mode IP/Netmask Comments Servers Manual 10.11.101.100/255.255.255.0 Servers
6 Select internal to edit. 7 Enter the following information and select OK.
1144
To configure DHCP servers - web-based manager 1 Go to System > Network > DHCP Server. 2 Select Create New. 3 Enter the following information and select OK.
Interface Name Mode Enable Type IP Network mask Default Gateway DNS Service dmz Server Select Regular 10.11.101.110 - 10.11.101.250 255.255.255.0 10.11.101.100 Use System DNS Setting
4 Select Create New. 5 Enter the following information and select OK.
Interface Name Mode Enable Type IP Network mask Default Gateway DNS Service internal Server Select Regular 10.11.102.110 - 10.11.102.250 255.255.255.0 10.11.102.100 Use System DNS Setting
1145
To configure the dynamic profile RADIUS server 1 Go to User > Remote > RADIUS, and Create New. 2 Enter the following information, and select OK.
Name Type Endpoint Attribute Profile Attribute Endpoint Blocking Attribute Send RADIUS Response Profile Key Log All Events dynamic_profile_server Dynamic Start Vendor-Specific Vendor-Specific Vendor-Specific enable
internal -> wan1 dynamic profile internal -> wan1 regular dmz -> wan1 internal -> dmz any -> any regular regular deny
Note: The dynamic profile policy should be at the top of the list. The only exception to this is if you have a policy to deny access to a list of banned users. In this case, it should go at the top so the dynamic profile does not mistakenly match a banned user or IP address.
This section includes: Schedules, address groups, and services groups Configuring regular security policies Configuring dynamic profile security policy
1146
Schedules
Only one schedule needs to be configured business_hours. This is a fairly standard Monday to Friday 8am to 5pm schedule, or whatever days and hours covers standard work hours at the company.
Address groups
The following address groups need to be configured before the security policies.
Address group Name internal_network company_servers Interface internal dmz Address range included 10.11.102.110 to 10.11.102.250 10.11.101.110 to 10.11.101.250
Service groups
The following service groups need to be configured before the security policies. Note that the services listed are suggestions and may include more or less as required.
Service group Name Interface Description of services to be included Any network protocols required for normal network operation such as DNS, NTP, BGP. All the protocols required by the company servers such as BGP, HTTP, HTTPS, FTP, IMAP, POP3, SMTP, IKE, SQL, MYSQL, NTP, TRACEROUTE, SOCKs, and SNMP. Any protocols required by users HTTP, HTTP, FTP,
dynamic_profile_services
internal
The following security policy configurations are basic and only include logging, and default AV and IPS.
1147
To configure regular security policies - web-based manager 1 Go to Policy > Policy, and select Create New. 2 Enter the following information, and select OK.
Source Interface/Zone Source Address Destination Interface/Zone Schedule Service Action Log Allowed Traffic Enable NAT UTM Enable Antivirus Enable IPS Enable VoIP Comments Internal internal_network wan1
Destination Address all always essential_network_services ACCEPT enable enable enable enable Default enable Default enable Default Essential network services
3 Select Create New, enter the following information, and select OK.
Source Interface/Zone Source Address Destination Interface/Zone Schedule Service Action Log Allowed Traffic Enable NAT UTM Enable Antivirus Enable IPS Comments dmz company_servers wan1
Destination Address all always essential_server_services ACCEPT enable enable enable enable Default enable Default Company servers accessing the Internet
1148
4 Select Create New, enter the following information, and select OK.
Source Interface/Zone Source Address Destination Interface/Zone Schedule Service Action Log Allowed Traffic Enable NAT UTM Enable Antivirus Enable IPS Comments Internal internal_network dmz
Destination Address company_servers always all ACCEPT enable enable enable enable Default enable Default Access company servers
1149
To configure dynamic profile security policy 1 Go to Policy > Policy, and select Create New. 2 Enter the following information, and select OK.
Source Interface/Zone Source Address Destination Interface/Zone Schedule Service Action Log Allowed Traffic Enable NAT Enable Dynamic Profile Profile Group Dynamic Profile Users Only UTM Enable Antivirus Enable IPS Enable Web Filter Enable Email Filter Comments Internal internal_network wan1
Destination Address all business_hours all ACCEPT enable enable Enable exampledotcom_employees enable enable enable Default enable Default enable Default enable Default Access company servers
Testing
Once configured, a user only needs to logon to their PC using their RADIUS account. After that when they attempt to access an Internet website, the FortiGate unit will use their session information to get their RADIUS information. Once the user is verified, they are allowed access to the website. To test the configuration perform the following steps. 1 Have user plee logon to their PC, and try to access an Internet website. 2 The FortiGate unit will contact the RADUS server for user plees information. 3 Once confirmed, plee will have access to the website. Each step should generate log entries that enable you to verify each step was successful. If a step is unsuccessful, confirm your configuration is correct and see Troubleshooting dynamic profiles on page 1130.
1150
Troubleshooting
2 3
wa n1 Fo rtiG dm z R IU AD Ss
er er v
ate
int ern
1
al
10
internal_network 10.11.102.0/24
Troubleshooting
In the web-based manager, a good tool for troubleshooting is the packet counter column on the security policy page (Policy > Policy). This column displays the number of packets that have passed through this security policy. Its value when you are troubleshooting is that when you are testing your configuration (end to end connectivity, user authentication, policy use) watching the packet count for an increase confirms any other methods you may be using for troubleshooting. It provides the key of which policy is allowing the traffic, useful information if you expect a user to require authentication and it never happens. For more information about authentication security policies, see Authentication in security policies on page 1026. This section addresses how to get more information from the CLI about users and user authentication attempts to help troubleshoot failed authentication attempts. diag firewall iprope authuser Shows the IP of where your computer is connected from. This is useful to confirm authorization and VPN settings. diag firewall iprope resetauth Clear all authorized users from the current list. Useful to force users to re-authenticate after system or group changes. However, this command may easily result in many users having to re-authenticate, so use carefully. diag firewall auth list List all the authorized users on this system. diag debug disable diag application auth 1 diag debug enable See the stream of authentication system messages displayed enter the following commands. Ideally use a terminal program that logs output so you can save the system messages to analyze later.
1151
Troubleshooting
For more information on troubleshooting specific features, go to that section of this document. Most sections have troubleshooting information at the end of the section. In addition to that information, see the Troubleshooting Handbook chapter for general troubleshooting information.
1152
1153
IPv6 IPsec VPNs describes FortiGate unit VPN capabilities for networks based on IPv6 addressing. This includes IPv4-over-IPv6 and IPv6-over-IPv4 tunnelling configurations. IPv6 IPsec VPNs are available in FortiOS 3.0 MR5 and later. L2TP and IPsec (Microsoft VPN) configurations explains how to support Microsoft Windows native VPN clients. GRE over IPsec (Cisco VPN) configurations explains how to interoperate with Cisco VPNs that use Generic Routing Encapsulation (GRE) protocol with IPsec. Protecting OSPF with IPsec provides an example of protecting OSPF links with IPsec. Auto Key phase 1 parameters provides detailed step-by-step procedures for configuring a FortiGate unit to accept a connection from a remote peer or dialup client. The basic phase 1 parameters identify the remote peer or clients and support authentication through preshared keys or digital certificates. You can increase VPN connection security further using methods such as extended authentication (XAuth). Phase 2 parameters provides detailed step-by-step procedures for configuring an IPsec VPN tunnel. During phase 2, the specific IPsec security associations needed to implement security services are selected and a tunnel is established. Defining VPN security policies explains how to specify the source and destination IP addresses of traffic transmitted through an IPsec VPN tunnel, and how to define a security encryption policy. Security policies control all IP traffic passing between a source address and a destination address. Hardware offloading and acceleration explains how to make use of FortiASIC network processor IPsec accelerated processing capabilities. Monitoring and troubleshooting VPNs provides VPN monitoring and testing procedures
1154
IP packets
In network terminology, data is sent in an IP packet. Packets have a fixed size, typically 1500 bytes. Larger amounts of data are broken up and sent as multiple packets. An IP packet contains data, a source address, and a destination address. Conceptually, source and destination addresses can be compared to street addresses for letter mail as shown in Figure 125. When mailed, the letter is delivered to a street address (destination address).
1155
VPN tunnels
Destination address
$
Letter
HOME
OFFICE
The return address (source address) is printed on the envelope both to aid in return communications and in case there are delivery problems. The source address is the computer that sent the data. The destination address is the computer that will receive the data. Computers use source and destination addresses to determine where a packet came from, where it is going, and for security checks to ensure the data was sent from a real address and is not a hacking attempt. Figure 126 shows a network version of the street-address analogy.
Figure 126: Network version of the street address analogy
Source Address
IP addresses can be static or dynamic. A static IP address is fixed, like the street address of a home or business. Your Internet Service Provider (ISP) might provide a dynamic address instead, where you are assigned an IP address only when you connect to the network. The address can be different each time you connect. Whether your IP address is static or dynamic determines the types of VPN configurations that you can support. Packets exchanged over an insecure network can be intercepted by a malicious person. A VPN encrypts data to secure it, and prevent this snooping. Encryption transforms the data so that it appears random and meaningless to anyone who does not have the correct key to decrypt it. See Encryption on page 1160. VPNs also address the issue of authentication - only authorized users can connect to your private network. See Authentication on page 1160. There are several types of VPN. This guide discusses only Internet Protocol Security (IPsec) VPN technology.
VPN tunnels
The data path between a users computer and a private network through a VPN is referred to as a tunnel. Like a physical tunnel, the data path is accessible only at the ends. In the telecommuting scenario, the tunnel runs between the FortiClient application on the users PC and the FortiGate unit on the office private network.
1156
VPN gateways
Encapsulation makes this possible. IPsec packets pass from one end of the tunnel to the other and contain data packets that are exchanged between the local user and the remote private network. Encryption of the data packets ensures that any third-party who intercepts the IPsec packets can not access the data. This idea is shown conceptually in Figure 127.
Figure 127: Encoded data going through a VPN tunnel
3 2
3
3 2 1 3 2 1
1 2
Encryption
Decryption
ource
VPN Tunnel
Destination
You can create a VPN tunnel between: a PC equipped with the FortiClient application and a FortiGate unit two FortiGate units third-party VPN software and a FortiGate unit
Third-party VPN software is not covered in this document. Refer to the Fortinet Knowledge Base for articles on this topic.
VPN gateways
In networking, a gateway is a router that connects the local network to other networks. The default gateway setting in your computers TCP/IP properties specifies the gateway for your local network. A VPN gateway functions as one end of a VPN tunnel. It receives incoming IPsec packets, decrypts the encapsulated data packets and passes the data packets to the local network. Also, it encrypts data packets destined for the other end of the VPN tunnel, encapsulates them, and sends the IPsec packets to the other VPN gateway. The VPN gateway is a FortiGate unit because the private network behind it is protected, ensuring the security of the unencrypted VPN data. The gateway can also be FortiClient software running on a PC since the unencrypted data is secure on the PC. The IP address of a VPN gateway is usually the IP address of the network interface that connects to the Internet. Optionally, you can define a secondary IP address for the interface and use that address as the local VPN gateway address. The benefit of doing this is that your existing setup is not affected by the VPN settings. The following diagram shows a VPN connection between two private networks with FortiGate units acting as the VPN gateways. This configuration is commonly referred to as Gateway-to-Gateway IPsec VPN.
1157
VPN gateways
IP a.1.2.3
4.5.6 6 IP b.4.5.6
VPN tunnel
Although the IPsec traffic may actually pass through many Internet routers, you can visualize the VPN tunnel as a simple secure connection between the two FortiGate units. Users on the two private networks do not need to be aware of the VPN tunnel. The applications on their computers generate packets with the appropriate source and destination addresses, as they normally do. The FortiGate units manage all the details of encrypting, encapsulating and sending the packets to the remote VPN gateway. The data is encapsulated in IPsec packets only in the VPN tunnel between the two VPN gateways. Between the users computer and the gateway, the data is on the secure private network and it is in regular IP packets. For example User1 on the Site A network, at IP address 10.10.1.7, sends packets with destination IP address 192.168.10.8, the address of User2 on the Site B network. The Site A FortiGate unit is configured to send packets with destinations on the 192.168.10.0 network through the VPN, encrypted and encapsulated. Similarly, the Site B FortiGate unit is configured to send packets with destinations on the 10.10.1.0 network through the VPN tunnel to the Site A VPN gateway. In the site-to-site, or gateway-to-gateway VPN shown in Figure 128, the FortiGate units have static (fixed) IP addresses and either unit can initiate communication. You can also create a VPN tunnel between an individual PC running the FortiClient application and a FortiGate unit, as shown below. This is commonly referred to as Clientto-Gateway IPsec VPN.
1158
F ice Off
te u iGa t r o
nit
a.1.2.3 b.4.5.6
Fo rtiC lien t
PC
VPN tunnel
On the PC, the FortiClient application acts as the local VPN gateway. Packets destined for the office network are encrypted, encapsulated into IPsec packets, and sent through the VPN tunnel to the FortiGate unit. Packets for other destinations are routed to the Internet as usual. IPsec packets arriving through the tunnel are decrypted to recover the original IP packets.
The site-to-site VPN shown in Figure 128 is a peer-to-peer relationship. Either FortiGate unit VPN gateway can establish the tunnel and initiate communications. The FortiClientto-FortiGate VPN shown in Figure 129 is a client-server relationship. The FortiGate unit establishes a tunnel when the FortiClient PC requests one.
Note: A FortiGate unit cannot be a VPN server if it has a dynamically-assigned IP address. VPN clients need to be configured with a static IP address for the server.
A FortiGate unit acts as a server only when the remote VPN gateway has a dynamic IP address or is a client-only device or application, such as the FortiClient application. As a VPN server, a FortiGate unit can also offer automatic configuration for FortiClient PCs. The user needs to know only the IP address of the FortiGate VPN server and a valid user name/password. The FortiClient application downloads the VPN configuration settings from the FortiGate VPN server. For information about configuring a FortiGate unit as a VPN server, see the FortiClient Administration Guide.
1159
Encryption
Encryption
Encryption mathematically transforms data to appear as meaningless random numbers. The original data is called plaintext and the encrypted data is called ciphertext. The opposite process, called decryption, performs the inverse operation to recover the original plaintext from the ciphertext. The process by which the plaintext is transformed to ciphertext and back again is called an algorithm. All algorithms use a small piece of information, known as a key, in the arithmetic process of converted plaintext to ciphertext, or vice-versa. IPsec uses symmetrical algorithms, in which the same key is used to both encrypt and decrypt the data. The security of an encryption algorithm is determined by the length of the key that it uses. FortiGate IPsec VPNs offer the following encryption algorithms, in descending order of security:
AES256 AES192 AES128 3DES DES A 128-bit block algorithm that uses a 256-bit key. A 128-bit block algorithm that uses a 192-bit key. A 128-bit block algorithm that uses a 128-bit key. Triple-DES, in which plain text is DES-encrypted three times by three keys. Digital Encryption Standard, a 64-bit block algorithm that uses a 56-bit key Note: The default encryption algorithms provided on FortiGate units make recovery of encrypted data almost impossible without the proper encryption keys.
There is a human factor in the security of encryption. The key must be kept secret, known only to the sender and receiver of the messages. Also, the key must not be something that unauthorized parties might easily guess, such as the senders name, birthday or simple sequence such as 123456.
Authentication
In addition to protecting data through encryption, a VPN must ensure that only authorized users can access the private network. You must use either a preshared key on both VPN gateways or RSA X.509 security certificates. The examples in this guide use only preshared key authentication. Refer to the Fortinet Knowledge Base for articles on RSA X.509 security certificates.
Preshared keys
A preshared key contains at least 6 randomly chosen alphanumeric characters. Users of the VPN must obtain the preshared key from the person who manages the VPN server and add the preshared key to their VPN client configuration. Although it looks like a password, the preshared key, also known as a shared secret, is never sent by either gateway. The preshared key is used in the calculations at each end that generate the encryption keys. As soon as the VPN peers attempt to exchange encrypted data, preshared keys that do not match will cause the process to fail.
Additional authentication
To increase security, you can require additional means of authentication from users: an identifier, called a peer ID or a local ID
1160
A Local ID is an alphanumeric value assigned in the Phase 1 configuration. The Local ID of a peer is called a Peer ID.
Phase 1
In Phase 1, the two VPN gateways exchange information about the encryption algorithms that they support and then establish a temporary secure connection to exchange authentication information. When you configure your FortiGate unit or FortiClient application, you must specify the following settings for Phase 1:
Remote Gateway the remote VPN gateways address. FortiGate units also have the option of operating only as a server by selecting the Dialup User option. this must be the same at both ends. It is used to encrypt phase 1 authentication information. the network interface that connects to the other VPN gateway. This applies on a FortiGate unit only.
All other Phase 1 settings have default values. These settings mainly configure the types of encryption to be used. The default settings on FortiGate units and in the FortiClient application are compatible. The examples in this guide use these defaults. For more detailed information about Phase 1 settings, see the Auto Key phase 1 parameters on page 1321.
Phase 2
Similar to the Phase 1 process, the two VPN gateways exchange information about the encryption algorithms that they support for Phase 2. You may choose different encryption for Phase 1 and Phase 2. If both gateways have at least one encryption algorithm in common, a VPN tunnel can be established. Keep in mind that more algorithms each phase does not share with the other gateway, the longer negotiations will take. In extreme cases this may cause timeouts during negotiations. To configure default Phase 2 settings on a FortiGate unit, you need only select the name of the corresponding Phase 1 configuration. In the FortiClient application, no action is required to enable default Phase 2 settings. For more detailed information about Phase 2 settings, see Phase 2 parameters on page 1337.
1161
Security Association
Security Association
The establishment of a Security Association (SA) is the successful outcome of Phase 1 negotiations. Each peer maintains a database of information about VPN connections. The information in each SA can include cryptographic algorithms and keys, keylife, and the current packet sequence number. This information is kept synchronized as the VPN operates. Each SA has a Security Parameter Index (SPI) that is provided to the remote peer at the time the SA is established. Subsequent IPsec packets from the peer always reference the relevant SPI. It is possible for peers to have multiple VPNs active simultaneously, and correspondingly multiple SPIs.
1162
When the first packet of data that meets all of the conditions of the security policy arrives at the FortiGate unit, a VPN tunnel may be initiated and the encryption or decryption of data is performed automatically afterward. For more information, see Defining VPN security policies on page 1343.
Route-based VPNs
For a route-based VPN, you create two security policies between the virtual IPsec interface and the interface that connects to the private network. In one policy the virtual interface is the source. In the other policy the virtual interface is the destination. The Action for both policies is Accept. This creates bidirectional policies that ensure traffic will flow in both directions over the VPN.
1163
Policy-based VPNs
For a policy-based VPN, one security policy enables communication in both directions. You must select IPSEC as the Action and then select the VPN tunnel you defined in the phase 1 settings. You can then enable inbound and outbound traffic as needed within that policy, or create multiple policies of this type to handle different types of traffic differently. For example HTTPS traffic may not require the same level of scanning as FTP traffic.
Once you have this information, you can select a VPN topology that meets the requirements of your situation.
Network topologies
The topology of your network will determine how remote peers and clients connect to the VPN and how VPN traffic is routed. You can read about various network topologies and find the high-level procedures needed to configure IPsec VPNs in one of these sections
Table 74: VPN network topologies and brief descriptions Topology Description Standard VPN between two FortiGate units. See Gateway-to-gateway configurations on page 1167. One central FortiGate unit has multiple VPNs to other remote FortiGate units. See Hub-and-spoke configurations on page 1183. One end of the VPN tunnel has a changing IP address and the other end must go to a dynamic DNS server for the current IP address before establishing a tunnel. See Dynamic DNS configuration on page 1197.
Typically remote FortiClient dialup-clients use dynamic IP addresses FortiClient dialupclient configurations through NAT devices. The FortiGate unit acts as a dialup server allowing dialup VPN connections from multiple sources. See FortiClient dialup-client configurations on page 1211. Similar to FortiClient dialup-client configurations but with more gatewayFortiGate dialupclient configurations to-gateway settings such as unique user authentication for multiple users on a single VPN tunnel. See FortiGate dialup-client configurations on page 1229.
Secure web browsing performed by dialup VPN clients, and/or hosts behind a remote VPN peer. See Internet-browsing
configuration on page 1241.
Options for supporting redundant and partially redundant IPsec VPNs, using route-based approaches. See Redundant VPN
configurations on page 1245.
1164
Table 74: VPN network topologies and brief descriptions Topology Description In Transparent mode, the FortiGate acts as a bridge with all incoming traffic being broadcast back out on all other interfaces. Routing and NAT must be performed on external routers. See Transparent mode VPNs on page 1269.
Transparent mode VPNs Manual-key configurations L2TP and IPsec (Microsoft VPN) configurations
Manually define cryptographic keys to establish an IPsec VPN, either policy-based or route-based. See Manual-key configurations on page 1277. Configure VPN for Microsoft Windows dialup clients using the built in L2TP software. Users do not have to install any See L2TP and IPsec (Microsoft VPN) configurations on page 1291.
These sections contain high-level configuration guidelines with cross-references to detailed configuration procedures. If you need more detail to complete a step, select the cross-reference in the step to drill-down to more detail. Return to the original procedure to complete the procedure. For a general overview of how to configure a VPN, see General preparation steps below.
Yes
No Yes Requires only a simple security policy with ACCEPT action A separate policy is required for connections in each direction
GRE-over-IPsec supported No Requires a security policy with IPSEC action that specifies the VPN tunnel One policy controls connections in both directions
1165
1166
Gateway-to-gateway configurations
This section explains how to set up a basic gateway-to-gateway (site-to-site) IPsec VPN. The following topics are included in this section: Configuration overview General configuration steps Configuring the two VPN peers How to work with overlapping subnets Testing
Configuration overview
In a gateway-to-gateway configuration, two FortiGate units create a VPN tunnel between two separate private networks. All traffic between the two networks is encrypted and protected by FortiGate security policies.
Figure 130: Example gateway-to-gateway configuration
_1 ate rtiG o F
n1 wa .0.2 0 2 72.
Fo rtiG
ate _2
rtm R H de
10
Fin
en
.1 .31 01. 0/2
In some cases, computers on the private network behind one VPN peer may (by coincidence) have IP addresses that are already used by computers on the network behind the other VPN peer. In this type of situation (ambiguous routing), conflicts may occur in one or both of the FortiGate routing tables and traffic destined for the remote network through the tunnel may not be sent. To resolve issues related to ambiguous routing, see How to work with overlapping subnets on page 1174. In other cases, computers on the private network behind one VPN peer may obtain IP addresses from a local DHCP server. However, unless the local and remote networks use different private network address spaces, unintended ambiguous routing and/or IPaddress overlap issues may arise. For a discussion of the related issues, see FortiGate dialup-client configurations on page 1229. You can set up a fully meshed or partially meshed configuration (see Figure 131 and Figure 132).
pa
t
4
1167
Configuration overview
Gateway-to-gateway configurations
2 te_ iGa t r Fo
Fo rtiG ate _3
_1 ate G i t r Fo
Fo
rtiG ate _
5 te_ iGa t r Fo
In a fully meshed network, all VPN peers are connected to each other, with one hop between peers. This topology is the most fault-tolerant: if one peer goes down, the rest of the network is not affected. This topology is difficult to scale because it requires connections between all peers. In addition, unnecessary communication can occur between peers. We recommend a hub-and-spoke configuration instead (see Hub-andspoke configurations on page 1183).
Figure 132: Partially meshed configuration
_2 ate G i t r Fo
Fo rtiG ate _3
_1 ate G i rt Fo
Fo
rtiG ate _4
_5 ate G i t or
A partially meshed network is similar to a fully meshed network, but instead of having tunnels between all peers, tunnels are only configured between peers that communicate with each other regularly.
1168
Gateway-to-gateway configurations
The key must contain at least 6 printable characters and should only be known by network administrators. For optimum protection against currently known attacks, the key should consist of a minimum of 16 randomly chosen alphanumeric characters.
1169
Gateway-to-gateway configurations
To create phase 1 to establish a secure connection with the remote peer At the local FortiGate unit, define the phase 1 configuration needed to establish a secure connection with the remote peer. 1 Go to VPN > IPsec > Auto Key (IKE). 2 Select Create Phase 1. 3 Enter the following information, and select OK.
Name Enter peer_1. A name to identify the VPN tunnel. This name appears in phase 2 configurations, security policies and the VPN monitor. Select Static IP Address. Enter 172.20.0.2 when configuring FortiGate_1. Enter 172.18.0.2 when configuring FortiGate_2. The IP address of the remote peer public interface. Local Interface Select wan1. The FortiGate units public interface. Note: This interface cannot be a loopback interface. Enable IPsec Interface Mode Select Advanced to see this setting. Enable IPsec Interface Mode to have the FortiGate unit create a virtual IPsec interface for a route-based VPN. Disable this option to create a policy-based VPN. For more information, see Choosing policy-based or route-based VPNs on page 1165. Note: After you select OK to create the phase 1 configuration, you cannot change this setting.
To configure phase 2 settings The basic phase 2 settings associate IPsec phase 2 parameters with the phase 1 configuration and specify the remote end point of the VPN tunnel. Before you define the phase 2 parameters, you need to reserve a name for the tunnel. See Phase 2 parameters on page 1337. 1 Go to VPN > IPsec > Auto Key (IKE). 2 Select Create Phase 2. 3 Enter the following information, and select OK.
Name Phase 1 Enter peer_1_p2. A name to identify this phase 2 configuration. Select peer_1. The name of the phase 1 configuration.
1170
Gateway-to-gateway configurations
The IP source address corresponds to the private network behind the local FortiGate unit. The IP destination address refers to the private network behind the remote VPN peer.
When you are creating security policies, choose one of either route-based or policy-based methods and follow it for both VPN peers. DO NOT configure both route-based and policybased policies on the same FortiGate unit for the same VPN tunnel. The configuration of FortiGate_2 is similar to that of FortiGate_1. You must: Define the phase 1 parameters that FortiGate_2 needs to authenticate FortiGate_1 and establish a secure connection. Define the phase 2 parameters that FortiGate_2 needs to create a VPN tunnel with FortiGate_1. Create the security policy and define the scope of permitted services between the IP source and destination addresses.
When creating security policies it is good practice to include a comment describing what the policy does. When creating security policies you need to be or Creating firewall addresses Creating policy-based VPN security policy Creating firewall addresses Creating route-based VPN security policies Configuring a default route for VPN interface
Subnet/IP Range
To specify the address of the network behind FortiGate_2 1 Go to Firewall Objects > Address > Address. 2 Select Create New, enter the following information, and select OK:
Address Name Subnet/IP Range Enter HR_network. Enter the IP address of the private network behind FortiGate_2 (for example, 10.31.101.0/24).
1171
Gateway-to-gateway configurations
4 Configure any additional features such as UTM or traffic shaping you may want. (optional). 5 Select Create New to create another policy for the other direction. 6 Enter the following information, and select OK.
Source Interface/Zone Source Address Name Select peer_1. The VPN Tunnel (IPsec Interface) you configured in Step . Select HR_network when configuring FortiGate_1. Select Finance_Network when configuring FortiGate_2. The address name defined for the private network behind the remote peer. Select internal The interface that connects to the private network behind this FortiGate unit. Select Finance_Network when configuring FortiGate_1. Select HR_network when configuring FortiGate_2. The address name defined for the private network behind this FortiGate unit. Select ACCEPT. Disable. Allow remote VPN network traffic to Internal.
Destination Interface/Zone
7 Configure any additional features such as UTM or traffic shaping you may want. (optional).
1172
Gateway-to-gateway configurations
Comment
Note: Place VPN policies in the policy list above any other policies having similar source and destination addresses.
1173
Gateway-to-gateway configurations
.1 rt 2 .30 Po 2.16 17
17
t2 or .1 P .20 16 2.
_1 ate rtiG o F
Fo rtiG ate _2
rt 1 Po
P t1 or
)
Configure an outgoing security policy with ordinary source NAT on both FortiGates. Configure an incoming security policy with the VIP as the destination on both FortiGates. Configure a route to the remote private network over the IPsec interface on both FortiGates.
1174
Gateway-to-gateway configurations
To configure VIP mapping on both FortiGates 1 Go to Firewall Objects > Virtual IP > Virtual IP. 2 Select Create New, enter the following information, and select OK:
Name External Interface Type External IP Address/Range Enter a name, for example, my_vip. Select FGT1_to_FGT2. The IPsec interface. Static NAT For the external IP address field enter: 10.21.101.1 when configuring FortiGate_1, or 10.31.101.1 when configuring FortiGate_2. For the Mapped IP Address enter 10.11.101.1. For the Range enter 10.11.101.254. Disable
To configure the outbound security policy on both FortiGates Repeat this procedure on both FortiGate_1 and FortiGate_2. 1 Go to Policy > Policy. 2 Select Create New. 3 Enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Select Port 1. Select all. Select FGT1_to_FGT2. The IPsec interface. As required. As required. ACCEPT Enable
To configure the inbound security policy on both FortiGates Repeat this procedure on both FortiGate_1 and FortiGate_2. 1 Go to Policy > Policy. 2 Select Create New, enter the following information, and then select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Schedule Service Action NAT FortiOS Handbook v3: IPsec VPNs 01-431-99686-20110629 http://docs.fortinet.com/ Feedback Select FGT1_to_FGT2. Select all. Select Port 1. As required. As required. ACCEPT Disable
1175
Gateway-to-gateway configurations
To configure the static route for both FortiGates Repeat this procedure on both FortiGate_1 and FortiGate_2. 1 Go to Router > Static > Static Route. 2 Select Create New, enter the following information, and then select OK:
Destination IP / Mask Device Gateway Distance Enter 10.31.101.0/24 when configuring FortiGate_1 Enter 10.21.101.0/24 when configuring FortiGate_2 Select FGT1_to_FGT2. Leave as default: 0.0.0.0. Leave at default. If you have advanced routing on your network, you may have to change this value.
Note: If you do not add a static route for the VPN tunnel, no traffic will be sent or received.
I
Configure an outgoing IPsec security policy with outbound NAT to map 10.11.101.0/24 source addresses: to the 10.21.101.0/24 network on FortiGate_1 to the 10.31.101.0/24 network on FortiGate_2
1176
Gateway-to-gateway configurations
To configure IPsec Phase 2 - CLI config vpn ipsec phase2 edit "FGT1_FGT2_p2" set keepalive enable set pfs enable set phase1name FGT1_to_FGT2 set proposal 3des-sha1 3des-md5 set replay enable set use-natip disable end In this example, your phase 1 definition is named FGT1_to_FGT2. use-natip is set to disable, so you can specify the source selector using the src-addr-type, srcstart-ip / src-end-ip or src-subnet keywords. This example leaves these keywords at their default values, which specify the subnet 0.0.0.0/0. The pfs keyword ensures that perfect forward secrecy (PFS) is used. This ensures that each Phase 2 key created is unrelated to any other keys in use. To define the local private network firewall address 1 Go to Firewall Objects > Address > Address. 2 Select Create New and enter the following information:
Address Name Type Subnet / IP Range Interface Enter vpn-local. A meaningful name for the local private network Subnet / IP Range 10.11.101.0 255.255.255.0 Any
To define the remote private network firewall address 1 Go to Firewall Objects > Address > Address. 2 Select Create New. 3 Enter the following information, and select OK:
Address Name Type Subnet / IP Range Interface Enter vpn-remote. A meaningful name for the remote private network. Subnet / IP Range 10.31.101.0 255.255.255.0 on FortiGate_1 10.21.101.0 255.255.255.0 on FortiGate_2 Any
To configure the IPsec security policy In the CLI on FortiGate_1, enter the commands: config firewall policy edit 1 set srcintf "port1" set dstintf "port2" set srcaddr "vpn-local" set dstaddr "vpn-remote"
FortiOS Handbook v3: IPsec VPNs 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1177
Testing
Gateway-to-gateway configurations
action ipsec schedule "always" service "ANY" inbound enable outbound enable vpntunnel "FGT1_to_FGT2" natoutbound enable natip 10.31.101.0 255.255.255.0
Optionally, you can set everything except natip in the web-based manager and then use the CLI to set natip. Enter the same commands on FortiGate_2, but natip should be 10.21.101.0 255.255.255.0.
Testing
The best testing is to look at the packets both as the VPN tunnel is negotiated, and when the tunnel is up. To determine what the other end of the VPN tunnel is proposing 1 Start a terminal program such as puTTY and set it to log all output. When necessary refer to the logs to locate information when output is verbose. 2 Logon to the FortiGate unit using a super_admin account. 3 Enter the following CLI commands. 4 Display all the possible IKE error types and the number of times they have occurred: diag vpn ike errors 5 Check for existing debug sessions: diag debug info If a debug session is running, to halt it enter: diag debug disable 6 Confirm your proposal settings: diag vpn ike config list 7 If your proposal settings do not match what you expect, make a change to it and save it to force an update in memory. If that fixes the problem, stop here. 8 List the current vpn filter: diag vpn ike filter 9 If all fields are set to any, there are no filters set and all VPN ike packets will be displayed in the debug output. If your system has only a few VPNs, skip setting the filter. If your system has many VPN connections this will result in very verbose output and make it very difficult to locate the correct connection attempt. 10 Set the VPN filter to display only information from the destination IP address for example 10.10.10.10: diag vpn ike log-filter dst-addr4 10.10.10.10 To add more filter options, enter them one per line as above. Other filter options are displayed in Table 76.
1178
Gateway-to-gateway configurations
Testing
Table 76: Filter options for diag vpn ike filter clear dst-addr6 dst-port interface list name negate src-addr4 src-addr6 src-port vd erase the current filter the IPv6 destination address range to filter by the destination port range to filter by interface that IKE connection is negotiated over display the current filter the phase1 name to filter by negate the specified filter parameter the IPv4 source address range to filter by the IPv6 source address range to filter by the source port range to filter by index of virtual domain. 0 matches all
11 Start debugging: diag debug app ike 255 diag debug enable 12 Have the remote end attempt a VPN connection.
Note: If the remote end attempts the connection they become the initiator. This situation makes it easier to debug VPN tunnels because then you have the remote information and all of your local information. by initiate the connection, you will not see the other ends information.
13 If possible go to the web-based manager on your FortiGate unit, go to the VPN monitor and try to bring the tunnel up. 14 Stop the debug output: diag debug disable 15 Go back through the output to determine what proposal information the initiator is using, and how it is different from your VPN P1 proposal settings. Things to look for in the debug output of attempted VPN connections are shown in Table 77.
1179
Testing
Gateway-to-gateway configurations
Table 77: Important terms to look for in VPN debug output initiator responder local ID error no SA proposal chosen R U THERE and R U THERE ack negotiation result SA_life_soft and SA_life_hard R U THERE tunnel up Starts the VPN attempt, in the above procedure that is the remote end Answers the initiators request In aggressive mode, this is not encrypted There was no proposal match there was no encryptionauthentication pair in common, usually occurs after a long list of proposal attempts dead peer detection (dpd), also known as dead gateway detection after three failed attempts to contact the remote end it will be declared dead, no farther attempts will be made to contact it lists the proposal settings that were agreed on negotiating a new key, and the key life If you see this, it means Phase 1 was successful the negotiation was successful, the VPN tunnel is operational
To determine what the other end of the VPN tunnel is proposing 16 Start a terminal program such as puTTY and set it to log all output. When necessary refer to the logs to locate information when output is verbose. 17 Logon to the FortiGate unit using a super_admin account. 18 Enter the following CLI commands. 19 Display all the possible IKE error types and the number of times they have occurred: diag vpn ike errors 20 Check for existing debug sessions: diag debug info If a debug session is running, to halt it enter: diag debug disable 21 Confirm your proposal settings: diag vpn ike config list 22 If your proposal settings do not match what you expect, make a change to it and save it to force an update in memory. If that fixes the problem, stop here. 23 List the current vpn filter: diag vpn ike filter 24 If all fields are set to any, there are no filters set and all VPN ike packets will be displayed in the debug output. If your system has only a few VPNs, skip setting the filter. If your system has many VPN connections this will result in very verbose output and make it very difficult to locate the correct connection attempt. 25 Set the VPN filter to display only information from the destination IP address for example 10.10.10.10: diag vpn ike log-filter dst-addr4 10.10.10.10 To add more filter options, enter them one per line as above. Other filter options are displayed in Table 76. 26 Start debugging:
IPsec VPNs for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1180
Gateway-to-gateway configurations
Testing
diag debug app ike 255 diag debug enable 27 Have the remote end attempt a VPN connection.
Note: If the remote end attempts the connection they become the initiator. This situation makes it easier to debug VPN tunnels because then you have the remote information and all of your local information. by initiate the connection, you will not see the other ends information.
28 If possible go to the web-based manager on your FortiGate unit, go to the VPN monitor and try to bring the tunnel up. 29 Stop the debug output: diag debug disable 30 Go back through the output to determine what proposal information the initiator is using, and how it is different from your VPN P1 proposal settings. Things to look for in the debug output of attempted VPN connections are shown in Table 77.
Table 78: Important terms to look for in VPN debug output initiator responder local ID error no SA proposal chosen R U THERE and R U THERE ack negotiation result SA_life_soft and SA_life_hard R U THERE tunnel up Starts the VPN attempt, in the above procedure that is the remote end Answers the initiators request In aggressive mode, this is not encrypted There was no proposal match there was no encryptionauthentication pair in common, usually occurs after a long list of proposal attempts dead peer detection (dpd), also known as dead gateway detection after three failed attempts to contact the remote end it will be declared dead, no farther attempts will be made to contact it lists the proposal settings that were agreed on negotiating a new key, and the key life If you see this, it means Phase 1 was successful the negotiation was successful, the VPN tunnel is operational
1181
Testing
Gateway-to-gateway configurations
1182
Hub-and-spoke configurations
This section describes how to set up hub-and-spoke IPsec VPNs. The following topics are included in this section: Configuration overview Configure the hub Configure the spokes Dynamic spokes configuration example
Configuration overview
In a hub-and-spoke configuration, VPN connections radiate from a central FortiGate unit (the hub) to a number of remote peers (the spokes). Traffic can pass between private networks behind the hub and private networks behind the remote peers. Traffic can also pass between remote peer private networks through the hub.
Figure 134: Example hub-and-spoke configuration
Site_1
Site_2
Sp ok e_ 1
Sp
oke
_2
The actual implementation varies in complexity depending on whether the spokes are statically or dynamically addressed the addressing scheme of the protected subnets how peers are authenticated
This guide discusses the issues involved in configuring a hub-and-spoke VPN and provides some basic configuration examples.
FortiOS Handbook v3: IPsec VPNs 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1183
Configuration overview
Hub-and-spoke configurations
spoke 1 protected subnet: 10.1.1.0/24 spoke 2 protected subnet: 10.1.2.0/24 spoke x protected subnet: 10.1.x.0/24
All spokes use the large subnet address, 10.1.0.0/16 for example, as the IPsec destination selector the destination of the security policy from the private subnet to the VPN (required for policy-based VPN, optional for route-based VPN) the destination of the static route to the VPN (route-based)
1184
Hub-and-spoke configurations
Each spoke uses the address of its own protected subnet as the IPsec source selector and as the source address in its VPN security policy. The remote gateway is the public IP address of the hub FortiGate unit.
Authentication
Authentication is by a common preshared key or by certificates. For simplicity, the examples in this chapter assume that all spokes use the same preshared key.
You configure communication between spokes differently for a policy-based VPN than for a route-based VPN. For a policy-based VPN, you configure a VPN concentrator. For a route-based VPN, you must either define security policies or group the IPsec interfaces into a zone
1185
Hub-and-spoke configurations
Enter a name to identify the VPN in phase 2 configurations, security policies and the VPN monitor. The remote gateway is the other end of the VPN tunnel. There are three options: Static IP Address Enter the spokes public IP Address. You will need to create a phase 1 configuration for each spoke. Either the hub or the spoke can establish the VPN connection. Dialup User No additional information is needed. The hub accepts connections from peers with appropriate encryption and authentication settings. Only one phase 1 configuration is needed for multiple dialup spokes. Only the spoke can establish the VPN tunnel. Dynamic DNS If the spoke subscribes to a dynamic DNS service, enter the spokes Dynamic DNS domain name. Either the hub or the spoke can establish the VPN connection. For more information, see Dynamic DNS configuration on page 1197. Select the FortiGate interface that connects to the remote gateway. This is usually the FortiGate units public interface. Note: This interface cannot be a loopback interface. You must select Advanced to see this setting. If IPsec Interface Mode is enabled, the FortiGate unit creates a virtual IPsec interface for a routebased VPN. Disable this option if you want to create a policy-based VPN. For more information, see Choosing policy-based or route-based VPNs on page 1165. After you select OK to create the phase 1 configuration, you cannot change this setting.
Local Interface
2 Define the phase 2 parameters needed to create a VPN tunnel with each spoke. See Phase 2 parameters on page 1337. Enter these settings in particular:
Name Phase 1 Enter a name to identify this spoke phase 2 configuration. Select the name of the phase 1 configuration that you defined for this spoke.
Destination Interface/Zone Select the hubs interface to the internal (private) network. Destination Address Name Select the source address that you defined in Step 1. Action NAT Select ACCEPT. Enable.
1186
Hub-and-spoke configurations
Select the address name you defined in Step 2 for the private network behind the spoke FortiGate units. Select the VPN Tunnel (IPsec Interface) you configured in Step 1.
Destination Interface/Zone Select the source address that you defined in Step 1. Destination Address Name Select the hubs interface to the internal (private) network. Action NAT Select ACCEPT. Enable.
Policy-based VPN security policy Define an IPsec security policy to permit communications between the hub and the spoke. Enter these settings in particular:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action VPN Tunnel Select the hubs interface to the internal (private) network. Select the source address that you defined in Step 1. Select the hubs public network interface. Select the address name you defined in Step 2 for the private network behind the spoke FortiGate unit. IPSEC Select the name of the phase 1 configuration that you created for the spoke in Step 1. Select Allow inbound to enable traffic from the remote network to initiate the tunnel. Select Allow outbound to enable traffic from the local network to initiate the tunnel.
5 In the policy list, arrange the policies in the following order: IPsec policies that control traffic between the hub and the spokes first the default security policy last
4 Repeat Step 3 until all of the tunnels associated with the spokes are included in the concentrator. 5 Select OK.
1187
Hub-and-spoke configurations
Destination Interface/Zone Select the zone you created for your VPN. Destination Address Name Select All. Action NAT UTM Select ACCEPT. Enable. If you want to apply UTM features to this traffic, select the appropriate profiles.
2 Select OK.
1188
Hub-and-spoke configurations
3 Select OK.
2 Create the phase 2 tunnel definition. See Phase 2 parameters on page 1337. Enter these settings in particular:
Phase 1 Select the set of phase 1 parameters that you defined for the hub. You can select the name of the hub from the Static IP Address part of the list.
1189
Hub-and-spoke configurations
3 Define the security policy to enable communication with the hub. Route-based VPN security policy Define two security policies to permit communications to and from the hub. Enter these settings in particular:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action NAT Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action NAT Select the virtual IPsec interface you created. Select the hub address you defined in Step 1. Select the spokes interface to the internal (private) network. Select the spoke addresses you defined in Step 2. Select ACCEPT Enable Select the spokes interface to the internal (private) network. Select the spoke address you defined in Step 1. Select the virtual IPsec interface you created. Select the hub destination addresses you defined in Step 2. Select ACCEPT Enable
Policy-based VPN security policy Define an IPsec security policy to permit communications with the hub. See Defining VPN security policies on page 1344. Enter these settings in particular:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action VPN Tunnel Select the spokes interface to the internal (private) network. Select the spoke address you defined in Step 1. Select the spokes interface to the external (public) network. Select the hub address you defined in Step 2. Select IPSEC Select the name of the phase 1 configuration you defined. Select Allow inbound to enable traffic from the remote network to initiate the tunnel. Select Allow outbound to enable traffic from the local network to initiate the tunnel.
1190
Hub-and-spoke configurations
2 Define the security policy to enable communication between this spoke and the spokes in the address group you created. Policy-based VPN security policy Define an IPsec security policy to permit communications with the other spokes. See Defining VPN security policies on page 1344. Enter these settings in particular: Route-based VPN security policy Define two security policies to permit communications to and from the other spokes. Enter these settings in particular:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action NAT Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action NAT Select the virtual IPsec interface you created. Select the spoke address group you defined in Step 1. Select the spokes interface to the internal (private) network. Select this spokes address name. Select ACCEPT Enable Select the spokes interface to the internal (private) network. Select this spokes address name. Select the virtual IPsec interface you created. Select the spoke address group you defined in Step 1. Select ACCEPT Enable
3 Place this policy or policies in the policy list above any other policies having similar source and destination addresses.
1191
Hub-and-spoke configurations
Sp ok e_ 1
Sp
_2 oke
rtiG Fo b) u (H
ate
_1 172.16.10.1
HR network 10.1.0.0/24
In the example configuration, the protected networks 10.1.0.0/24, 10.1.1.0/24 and 10.1.2.0/24 are all part of the larger subnet 10.1.0.0/16. The steps for setting up the example hub-and-spoke configuration create a VPN among Site 1, Site 2, and the HR Network. The spokes are dialup. Their addresses are not part of the configuration on the hub, so only one spoke definition is required no matter the number of spokes. For simplicity, only two spokes are shown.
1192
Hub-and-spoke configurations
Name Remote Gateway Local Interface Mode Authentication Method Pre-shared Key Peer Options
Type a name (for example, toSpokes). Dialup user External Main Preshared Key Enter the preshared key. Accept any peer ID
The basic phase 2 settings associate IPsec phase 2 parameters with the phase 1 configuration and specify the remote end points of the VPN tunnels. To define the phase 2 parameters 1 Go to VPN > IPSEC > Auto Key. 2 Create a phase 2 tunnel definition for the spokes. Select Create Phase 2, enter the following information, and select OK:
Name Phase 1 Enter a name for the phase 2 definition (for example, toSpokes_ph2). Select the Phase 1 configuration that you defined previously (for example, toSpokes).
To define the IP address of the HR network behind FortiGate_1 1 Go to Firewall Objects > Address > Address. 2 Select Create New, enter the following information, and select OK:
Address Name Subnet/IP Range Enter an address name (for example, HR_Network). Enter the IP address of the HR network behind FortiGate_1 (for example, 10.1.0.0/24).
To specify the IP address the aggregate protected subnet 1 Go to Firewall Objects > Address > Address. 2 Select Create New, enter the following information, and select OK:
Address Name Subnet/IP Range Enter an address name (for example, Spoke_net). Enter the IP address of the aggregate protected network, 10.1.0.0/16
To define the security policy for traffic from the hub to the spokes 1 Go to Policy > Policy.
1193
Hub-and-spoke configurations
2 Select Create New, enter the following information, and select OK:
Source Interface/Zone Address Name Destination Interface/Zone Address Name Schedule Service Action Select the interface to the HR network, port 1. HR_Network Select the virtual IPsec interface that connects to the spokes, toSpokes Spoke_net As required. As required. ACCEPT
3 Place the policy in the policy list above any other policies having similar source and destination addresses.
2 Select OK.
1194
Hub-and-spoke configurations
To define the Phase 2 parameters 1 Go to VPN > IPSEC > Auto Key. 2 Select Create Phase 2, enter the following information, and select OK:
Name Phase 1 Advanced Source Enter a name for the tunnel, for example, toHub_ph2. Select the name of the phase 1 configuration that you defined previously, for example, toHub. Select to show the following Quick Mode Selector settings. Enter the address of the protected network at this spoke. For spoke_1, this is 10.1.1.0/24. For spoke_2, this is 10.1.2.0/24. Enter the aggregate protected subnet address, 10.1.0.0/16.
Destination
1195
Hub-and-spoke configurations
To define the IP address of the network behind the spoke 1 Go to Firewall Objects > Address > Address. 2 Select Create New, enter the following information, and select OK:
Address Name Subnet/IP Range Enter an address name, for example LocalNet. Enter the IP address of the private network behind the spoke. For spoke_1, this is 10.1.1.0/24. For spoke_2, this is 10.1.2.0/24.
To specify the IP address of the aggregate protected network 1 Go to Firewall Objects > Address > Address. 2 Select Create New, enter the following information, and select OK:
Address Name Subnet/IP Range Enter an address nam, for example, Spoke_net. Enter the IP address of the aggregate protected network, 10.1.0.0/16.
To define the security policy 1 Go to Policy > Policy. 2 Select Create New, enter the following information, and select OK:
Source Interface/Zone Address Name Destination Interface/Zone Address Name Schedule Service Action Select the virtual IPsec interface, toHub. Select the aggregate protected network address Spoke_net Select the interface to the internal (private) network, port1. Select the address for this spokes protected network LocalNet As required. As required. ACCEPT
3 Select Create New, enter the following information, and select OK:
Source Interface/Zone Address Name Address Name Schedule Service Action Select the interface to the internal private network, port1. Select the address for this spokes protected network, LocalNet Select the aggregate protected network address, Spoke_net As required. As required. ACCEPT
4 Place these policies in the policy list above any other policies having similar source and destination addresses.
1196
Routing
When an interface has some form of changing IP address (DDNS, PPPoE, or DHCP assigned address), routing needs special attention. The standard static route cannot handle the changing IP address. The solution is to use the dynamic-gateway command in the CLI. Say for example you already have four static routes, and you have a PPPoE connection over the wan2 interface and you want to use that as your default route. The route is configured on the dynamic address VPN peer trying to access the static address FortiGate unit.
FortiOS Handbook v3: IPsec VPNs 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1197
To configure dynamic gateway routing - CLI config router static edit 5 set dst 0.0.0.0 0.0.0.0 set dynamic-dateway enable set device wan2 next end For more information on DDNS, see the FortiOS System Administration handbook chapter.
Remote Gateway
When configuring the Phase 1 entry for a VPN tunnel, the Remote Gateway determines the addressing method the remote end of the tunnel uses as one of Static IP Address, Dialup User, or Dynamic DNS. There are different fields for each option. When you select the Dynamic DNS VPN type there is a related field called Dynamic DNS. The Dynamic DNS field is asking for the FQDN of the remote end of the tunnel. It uses this information to look up the IP address of the remote end of the tunnel through the DDNS server associated with that domain name.
1198
To accept a specific Peer ID 1 Go to VPN IPsec > Auto Key (IKE). 2 Select Create New Phase 1. 3 Select Aggressive mode. 4 For Peer Options, select Accept this peer ID. This option becomes visible only when Aggressive mode is selected. 5 Enter the string the other end of the tunnel used for its Local ID. 6 Configure the rest of the Phase 1 entry as required. 7 Select OK.
1199
S DN
ser 1
bra nc h_ 1
bra
nch
_2
10.
10.
92.
10.
172
.16
1 20.
exa mp le.c om
0/2
DN mic a n Dy erver s
When a remote peer (such as the branch_1 FortiGate unit in Figure 137) initiates a connection to example.com, the local DNS server looks up and returns the IP address that matches the domain name example.com. The remote peer uses the retrieved IP address to establish a VPN connection with the branch_2 FortiGate unit.
Assumptions
You have administrator access to both FortiGate units. Both FortiGate units have interfaces named wan1 and internal. (If not, you can use the alias feature to assign these labels as nicknames to other interfaces to follow this example.) Both FortiGate units have the most recent firmware installed, have been configured for their networks, and are currently passing normal network traffic. The branch_2 FortiGate unit has its wan1 interface defined as a dynamic DNS interface with the domain name of example.com. A basic gateway-to-gateway configuration is in place (see Gateway-to-gateway configurations on page 1167) except one of the FortiGate units has a static domain name and a dynamic IP address instead of a static IP address. The FortiGate unit with the domain name is subscribed to one of the supported dynamic DNS services. Contact one of the services to set up an account. For more information and instructions about how to configure the FortiGate unit to push its dynamic IP address to a dynamic DNS server, see the System Administration handbook chapter.
1200
To support these functions, the following general configuration steps must be performed: Configure the branch_2 FortiGate unit with the dynamic IP address. This unit uses a Local ID string instead of an IP address to identify itself to the remote peer. See Configure the dynamically-addressed VPN peer on page 1201. Configuring branch_2 VPN tunnel settings Configuring branch_2 security policies
Configure the fixed-address VPN peer. To initiate a VPN tunnel with the dynamicallyaddressed peer, this unit must first retrieve the IP address for the domain from the dynamic DNS service. See Configure the fixed-address VPN peer on page 1206. Configuring branch_1 VPN tunnel settings Configuring branch_1 security policies
S DN
ser
bra nc h_ 1
bra
nch
_2
10.
10.
19
10.
172
.16
.1 .20
exa m IP = ple.c om ?
0/2
DN mic a n Dy erver s
Configuring the dynamically-addressed VPN peer includes: Configuring branch_2 VPN tunnel settings Configuring branch_2 security policies
1201
Name
Enter branch_2, a name to identify the VPN tunnel. This name appears in phase 2 configurations, security policies, and the VPN monitor. Select Static IP Address. The remote peer this FortiGate is connecting to has a static IP public address. Note: If the remote interface is PPPoE do not select Retrieve default gateway from server.
Remote Gateway
Enter 172.16.20.1 The IP address of the public interface to the remote peer. Select Aggressive. Enable for a route-based VPN and when configuring policies, go to Creating branch_2 route-based security policies on page 1203. Disable for a policy-based VPN and when configuring policies, go to Creating branch_2 policy-based security policies on page 1205. If enabled, default settings are used. Enter example.com A character string used by the branch_2 FortiGate unit to identify itself to the remote peer. This value must be identical to the value in the Accept this peer ID field of the phase 1 remote gateway configuration on the branch_1 remote peer. See Configuring branch_1 VPN tunnel settings on page 1206.
Local ID
4 Select Create Phase 2. Define the phase 2 parameters needed to create a VPN tunnel with the remote peer. For details on phase 2, see Phase 2 parameters on page 1337. 5 Enter the following information and select OK.
Name Phase 1 Enter branch_2_phase2. A name to identify this phase 2 configuration. Select branch_2. The name of the phase 1 configuration that you defined earlier.
1202
To define branch_2 address ranges 1 Go to Firewall Objects > Address > Address. 2 Select Create New. 3 Enter the following information, and select OK.
Address Name Type Subnet / IP Range Interface Enter branch_2_internal. Enter a meaningful name. Subnet/IP Range. 10.10.10.0/24 Include the netmask or specify a specific range. internal The interface that will be handling the traffic from the internal network.
Define an address name for the IP address and netmask of the private network behind the remote peer. 4 Select Create New. 5 Enter the following information, and select OK.
Address Name Enter branch_1_internal. A meaningful name for the private network at the remote end of the VPN tunnel. Subnet/IP Range. 192.168.1.0/24 Include the netmask. Optionally you can specify a range. any The interface that will be handling the remote VPN traffic on this FortiGate unit. If you are unsure, or multiple interfaces may be handling this traffic use any.
1203
Select branch_2. The VPN Tunnel (IPsec Interface). Select branch_1_internal The address name the private network behind the remote peer. Select ACCEPT. Accept VPN traffic on this interface pair in this direction. Disable. route-based: Initiate a branch_2 to branch_1 VPN tunnel
4 Optionally configure any other security policy settings you require such as UTM or traffic shaping for this policy. Define a policy to permit the branch_1 remote VPN peer to initiate VPN sessions. 5 Enter the following information, and select OK.
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action NAT Comment Select branch_2. The VPN Tunnel (IPsec Interface). Select branch_1_internal. The address name for the private network behind the remote peer. Select internal. The interface connecting the private network behind this FortiGate unit. Select branch_2_internal. The address name for the private network behind this FortiGate unit. Select ACCEPT. Disable. route-based: Initiate a branch_1 to branch_2 internal VPN tunnel.
6 Optionally configure any other security policy settings you require such as UTM or traffic shaping for this policy. 7 Place these policies in the policy list above any other policies having similar source and destination addresses. This will ensure VPN traffic is matched against the VPN policies before any other policies. To create routing entry for VPN interface - CLI config router static edit 5 set dst 0.0.0.0 0.0.0.0 set dynamic-dateway enable set device wan1 next end
Note: This routing entry must be added in the CLI because the dynamic-gateway option is not available in the web-based manager.
1204
Destination Interface/Zone Destination Address Name Action VPN Tunnel Allow Inbound Allow Outbound
4 Optionally configure any other security policy settings you require such as UTM or traffic shaping for this policy. 5 Place these policies in the policy list above any other policies having similar source and destination addresses. This will ensure VPN traffic is matched against the VPN policies before any other policies.
1205
s NS
erv
er 8. .16 1 4 .0/2
bra nc h_ 1
_2 nch bra
10.
10.
192
10.
172
20 16.
.1
exa m IP = ple.c om ?
0/2
N ic D am r n y e D erv s
Configuring the fixed-address VPN peer includes: Configuring branch_1 VPN tunnel settings Configuring branch_1 security policies
Remote Gateway
1206
Peer Options
Select Accept this peer ID, and enter example.com. This option only appears when the mode is set to Aggressive. The identifier of the FortiGate unit with the dynamic address. Enable for a route-based VPN and when configuring policies, go to Creating branch_1 route-based security policies on page 1208. Disable for a policy-based VPN and when configuring policies, go to Creating branch_1 policy-based security policies on page 1209. If Interface mode is enabled, default settings are used.
4 Define the phase 2 parameters needed to create a VPN tunnel with the remote peer. See Phase 2 parameters on page 1337. Enter these settings in particular:
Name Phase 1 Enter branch_1_p2. A name to identify this phase 2 configuration. Select branch_1. The name of the phase 1 configuration that you defined for the remote peer. You can select the name of the remote gateway from the Dynamic DNS part of the list.
4 Define an address name for the IP address and netmask of the private network behind the remote peer. 5 Select Create New. 6 Enter the following information, and select OK.
Address Name Enter branch_1_internal. A meaningful name for the private network behind the branch_1 peer. Subnet/IP Range.
Type
1207
192.168.1.0/24 Include the netmask or specify a specific range. any The interface on this FortiGate unit that will be handling with this traffic. If you are unsure, or multiple interfaces may be handling this traffic use any.
To permit the remote client to initiate communication, you need to define a security policy for communication in that direction. 4 Select Create New. 5 Enter the following information, and select OK.
Source Interface/Zone Source Address Name Select branch_1 The VPN Tunnel (IPsec Interface) you configured earlier. Select branch_2_internal. The address name that you defined for the private network behind the branch_2 remote peer. Select internal. The interface that connects to the private network behind this FortiGate unit. Select branch_1_internal. The address name that you defined for the private network behind this FortiGate unit. Select ACCEPT. Disable branch_2 -> Internal
Destination Interface/Zone
1208
Testing
4 Place this security policy in the policy list above any other policies having similar source and destination addresses.
Testing
Once both ends are configured, you can test the VPN tunnel. To test the VPN initiated by branch_2 1 On branch_2, go to VPN > Monitor > IPsec Monitor. All IPsec VPN tunnels will be listed on this page, no matter if they are connected or disconnected. 2 Select the tunnel listed for branch_2, and select the status column for that entry. The status should say Bring Up and remote port, incoming and outgoing data should all be zero. This indicates an inactive tunnel. When you select Bring Up, the FortiGate will try to set up a VPN session over this tunnel. If it is successful, Bring Up will change to Active, and the arrow icon will change to a green up arrow icon. 3 If this does not create a VPN tunnel with increasing values for incoming and outgoing data, you need to start troubleshooting: To test the VPN initiated by branch_1 1 On branch_1, go to VPN > Monitor > IPsec Monitor.
1209
Testing
2 Select the tunnel listed for branch_1, and select the status column. The difference between branch_2 and branch_1 at this point is that the tunnel entry for branch-1 will not have a remote gateway IP address. It will be resolved when the VPN tunnel is started. 3 If this does not create a VPN tunnel with increasing values for incoming and outgoing data, you need to start troubleshooting. Some troubleshooting ideas include: If there was no entry for the tunnel on the monitor page, check the Auto Key (IKE) page to verify the phase 1 and phase 2 entries exist. Check the security policy or policies, and ensure there is an outgoing policy as a minimum. Check that you entered a local ID in the phase 1 configuration, and that branch_1 has the same local ID. Ensure the local DNS server has an up-to-date DNS entry for exmaple.com.
For more information on VPN troubleshooting and testing, see VPN troubleshooting tips on page 1361.
1210
The following topics are included in this section: Configuration overview FortiClient-to-FortiGate VPN configuration steps Configure the FortiGate unit Configure the FortiClient Endpoint Security application Adding XAuth authentication FortiClient dialup-client configuration example
Configuration overview
Dialup users typically obtain dynamic IP addresses from an ISP through Dynamic Host Configuration Protocol (DHCP) or Point-to-Point Protocol over Ethernet (PPPoE). Then, the FortiClient Endpoint Security application initiates a connection to a FortiGate dialup server. By default the FortiClient dialup client has the same IP address as the host PC on which it runs. If the host connects directly to the Internet, this is a public IP address. If the host is behind a NAT device, such as a router, the IP address is a private IP address. The NAT device must be NAT traversal (NAT-T) compatible to pass encrypted packets (see NAT traversal on page 1333). The FortiClient application also can be configured to use a virtual IP address (VIP). For the duration of the connection, the FortiClient application and the FortiGate unit both use the VIP address as the IP address of the FortiClient dialup client. For a faster and easier method of configuring a FortiGate - to - FortiClient VPN, see One button FortiGate - to - FortiClient VPN on page 1213.
1211
Configuration overview
The FortiClient application sends its encrypted packets to the VPN remote gateway, which is usually the public interface of the FortiGate unit. It also uses this interface to download VPN settings from the FortiGate unit. See Automatic configuration of FortiClient dialup clients on page 1212.
Figure 140: Example FortiClient dialup-client configuration
1 te_ iGa t r o
Dialup_1
Site_1
Dialup_3
Dialup_2
Peer identification
The FortiClient application can establish an IPsec tunnel with a FortiGate unit configured to act as a dialup server. When the FortiGate unit acts as a dialup server, it does not identify the client using the phase 1 remote gateway address. The IPsec tunnel is established if authentication is successful and the IPsec security policy associated with the tunnel permits access. There are several different ways to authenticate dialup clients and restrict access to private networks based on client credentials. For more information, see Authenticating remote peers and clients on page 1325.
1212
Configuration overview
1213
Configuration overview
The FortiClient application must not have the same IP address as any host on the private network behind the FortiGate unit or any other connected FortiClient application. You can ensure this by reserving a range of IP addresses on the private network for FortiClient users. Or, you can assign FortiClient VIPs from an uncommonly used subnet such as 10.254.254.0/24 or 192.168.254.0/24. You can reserve a VIP address for a particular client according to its device MAC address and type of connection. The DHCP server then always assigns the reserved VIP address to the client. For more information about this feature, see the dhcp reserved-address section in the system chapter of the FortiGate CLI Reference.
Note: On the host computer, you can find out the VIP address that the FortiClient Endpoint Security application is using. For example, On Windows, type ipconfig /all at the Windows Command Prompt. On Linux or Mac OS X, type ifconfig in a terminal window. The output will also show the IP address that has been assigned to the host Network Interface Card (NIC).
It is best to assign VIPs using DHCP over IPsec. The FortiGate dialup server can act as a DHCP server or relay requests to an external DHCP server. You can also configure VIPs manually on FortiClient applications, but it is more difficult to ensure that all clients use unique addresses.
Note: If you assign a VIP on the private network behind the FortiGate unit and enable DHCP-IPsec (a phase 2 advanced option), the FortiGate unit acts as a proxy on the local private network for the FortiClient dialup client. Whenever a host on the network behind the dialup server issues an ARP request for the device MAC address of the FortiClient host, the FortiGate unit answers the ARP request on behalf of the FortiClient host and forwards the associated traffic to the FortiClient host through the tunnel. For more information, see DHCP-IPsec on page 1339. Note: FortiGate units fully support RFC 3456. The FortiGate DHCP over IPsec feature can be enabled to allocate VIP addresses to FortiClient dialup clients using a FortiGate DHCP server.
Figure 141 shows an example of a FortiClient-to-FortiGate VPN where the FortiClient application is assigned a VIP on an uncommonly used subnet. The diagram also shows that while the destination for the information in the encrypted packets is the private network behind the FortiGate unit, the destination of the IPsec packets themselves is the public interface of the FortiGate unit that acts as the end of the VPN tunnel.
1214
Configuration overview
172.20.120.141
1 2 3
Fo
rtiG
10.11.101.2
ate
_1
1215
If the FortiGate interface to the private network is not the default gateway, the private network behind the FortiGate unit must be configured to route IP traffic destined for dialup clients back (through an appropriate gateway) to the FortiGate interface to the private network. As an alternative, you can configure the IPsec security policy on the FortiGate unit to perform inbound NAT on IP packets. Inbound NAT translates the source addresses of inbound decrypted packets into the IP address of the FortiGate interface to the local private network.
1 At the local FortiGate unit, define the phase 1 configuration needed to establish a secure connection with the FortiClient peer. See Auto Key phase 1 parameters on page 1321. Enter these settings in particular:
1216
Name Remote Gateway Local Interface Mode Authentication Method Pre-shared Key Peer option Enable IPsec Interface Mode
Enter a name to identify the VPN tunnel. This name appears in phase 2 configurations, security policies and the VPN monitor. Select Dialup User. Select the interface through which clients connect to the FortiGate unit. Select Main (ID Protection). Select Pre-shared Key. Enter the pre-shared key. This must be the same preshared key provided to the FortiClient users. Select Accept any peer ID. You must select Advanced to see this setting. If IPsec Interface Mode is enabled, the FortiGate unit creates a virtual IPsec interface for a route-based VPN.
2 Define the phase 2 parameters needed to create a VPN tunnel with the FortiClient peer. See Phase 2 parameters on page 1337. Enter these settings in particular:
Name Phase 1 Advanced DHCP-IPsec Enter a name to identify this phase 2 configuration. Select the name of the phase 1 configuration that you defined. Select to configure the following optional setting. Select if you provide virtual IP addresses to clients using DHCP.
3 Define names for the addresses or address ranges of the private networks that the VPN links. These addresses are used in the security policies that permit communication between the networks. For more information, see Defining policy addresses on page 1343. Enter these settings in particular: Define an address name for the individual address or the subnet address that the dialup users access through the VPN. If FortiClient users are assigned VIP addresses, define an address name for the subnet to which these VIPs belong. 4 Define security policies to permit communication between the private networks through the VPN tunnel. Route-based and policy-based VPNs require different security policies. For detailed information about creating security policies, see Defining VPN security policies on page 1344.
Note: If the security policy, which grants the VPN Connection is limited to certain services, DHCP must be included, otherwise the client wont be able to retrieve a lease from the FortiGates (IPSec) DHCP server, because the DHCP Request (coming out of the tunnel) will be blocked.
1217
Route-based VPN security policies Define an ACCEPT security policy to permit communications between the source and destination addresses. Enter these settings in particular:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action NAT Select the VPN Tunnel (IPsec Interface) you configured in Step 1. Select All. Select the interface that connects to the private network behind this FortiGate unit. Select All. Select ACCEPT. Disable.
If you want to allow hosts on the private network to initiate communications with the FortiClient users after the tunnel is established, you need to define a security policy for communication in that direction. Enter these settings in particular:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action NAT Select the interface that connects to the private network behind this FortiGate unit. Select All. Select the VPN Tunnel (IPsec Interface) you configured in Step 1. Select All. Select ACCEPT. Disable.
Policy-based VPN security policy Define an IPsec security policy to permit communications between the source and destination addresses. Enter these settings in particular:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Select the interface that connects to the private network behind this FortiGate unit. Select the address name that you defined in Step 3 for the private network behind this FortiGate unit. Select the FortiGate units public interface. If FortiClient users are assigned VIPs, select the address name that you defined in Step 3 for the VIP subnet. Otherwise, select All. Select IPSEC. Select the name of the phase 1 configuration that you created in Step 1. Select Allow inbound to enable traffic from the remote network to initiate the tunnel. Select Allow outbound if you want to allow hosts on the private network to initiate communications with the FortiClient users after the tunnel is established.
5 Place VPN policies in the policy list above any other policies having similar source and destination addresses.
1218
You must do the following to configure the FortiGate unit to work as a VPN policy server for FortiClient automatic configuration: 1 Create user accounts for FortiClient users. 2 Create a user group for FortiClient users and the user accounts that you created in step 1. 3 Connect to the FortiGate unit CLI and configure VPN policy distribution as follows: config vpn ipsec forticlient edit <policy_name> set phase2name <tunnel_name> set usergroupname <group_name> set status enable end <tunnel_name> must be the Name you specified in the step 2 of Configure the FortiGate unit on page 1216. <group_name> must be the name of the user group your created for FortiClient users.
To configure DHCP relay on the FortiGate unit 1 Go to System > DHCP Server > Service and select Create New. 2 In Interface Name, select the interface that connects to the Internet (for example, external or wan1). 3 In Mode, select Relay. 4 In Type select IPsec. 5 In the DHCP Server IP field, type the IP address of the DHCP server. 6 Select OK. 7 If a router is installed between the FortiGate unit and the DHCP server, define a static route to the DHCP server. To configure a DHCP server on the FortiGate unit 1 Go to System > DHCP Server > Service and select Create New. 2 In Interface Name, select the interface that connects to the Internet (for example, external or wan1). 3 In Mode, select Server. 4 Select Enable.
1219
IP Assignment Mode
Exclude Ranges
1220
To add a VPN with automatic configuration on the FortiClient PC 1 Go to VPN > Connections. 2 Select Advanced and then select Add. 3 In the New Connection dialog box, enter a connection name. 4 For Configuration, select Automatic. 5 For Policy Server, enter the IP address or FQDN of the FortiGate gateway. 6 Select OK.
4 Follow the remaining steps only if you want to configure a VIP. Otherwise, select OK. 5 Select Advanced. 6 Enable Acquire a virtual IP address and then select the adjacent Config button. 7 Enter the following information and select OK.
1221
Select one of these options: Obtain virtual IP address from the FortiGate unit using DHCP over IPsec. Assign the virtual IP address manually using the settings in the Manual VIP section. These settings are available only if you select Manually Set in the Options section. Enter the IP address that the FortiClient dialup client uses. This address must not conflict with any IP address at either end of the VPN tunnel. Enter the subnet for the private network. Optionally, enter the addresses of the DNS and WINS servers that the FortiClient user can access through the VPN.
8 Select OK twice to close the dialog boxes. 9 Repeat this procedure for each FortiClient dialup client.
To configure the FortiClient Endpoint Security application In the FortiClient Endpoint Security application, make the following changes to the VPN configuration to enable XAuth authentication to the FortiGate unit. 1 Go to VPN > Connections, select the VPN connection you want to modify. 2 Select Advanced > Edit > Advanced. 3 Select the eXtended Authentication check box and then select the Config button to the right of it. 4 In the Extended Authentication (XAuth) dialog box, select one of the 2 following choices: To always prompt for username and password, select Prompt to login. This is the default. To never prompt for username and password, clear the Prompt to login check box and fill in the User Name and Password fields. The FortiClient Endpoint Security application will use these values and automatically responds to the XAuth challenge. 5 Select OK to close all dialog boxes.
1222
Dialup_1
LAN 10.11.101.0/24
1 te_ iGa t r Fo
Po rt
Po 17 rt 1 2.2 0.1 2
41
In the example configuration: VIP addresses that are not commonly used (in this case, 10.254.254.0/24) are assigned to the FortiClient dialup clients using a DHCP server. The dialup clients are have access to the LAN behind FortiGate_1. The other network devices are assigned IP addresses as shown in Figure 142.
Configuring FortiGate_1
When a FortiGate unit receives a connection request from a dialup client, it uses IPsec phase 1 parameters to establish a secure connection and authenticate the client. Then, if the security policy permits the connection, the FortiGate unit establishes the tunnel using IPsec phase 2 parameters and applies the IPsec security policy. Key management, authentication, and security services are negotiated dynamically through the IKE protocol. To support these functions, the following general configuration steps must be performed at the FortiGate unit: Define the phase 1 parameters that the FortiGate unit needs to authenticate the dialup clients and establish a secure connection. See To define the phase 1 parameters on page 1224. Define the phase 2 parameters that the FortiGate unit needs to create a VPN tunnel and enable all dialup clients having VIP addresses on the 10.254.254.0/24 network to connect using the same tunnel definition. See To define the phase 2 parameters on page 1224. Create security policy to control the permitted services and permitted direction of traffic between the IP source address and the dialup clients. See To define the firewall addresses on page 1224.
1223
Configure the FortiGate unit to service DHCP requests from dialup clients. See To configure a DHCP server on the FortiGate unit on page 1226.
To define the phase 1 parameters 1 Go to VPN > IPSEC > Auto Key. 2 Select Create Phase 1, enter the following information, and select OK:
Name Remote Gateway Local Interface Mode Authentication Method Pre-shared Key Peer Options Advanced Enable IPsec Interface Mode todialups Dialup User Port 1 Main Preshared Key hardtoguess Accept any peer ID Select Enable for route-based VPN. Disable for policy-based VPN.
To define the phase 2 parameters 1 Go to VPN > IPSEC > Auto Key and select Create Phase 2. 2 Select Advanced, enter the following information, and select OK:
Name Phase 1 Advanced td_2 todialups DHCP-IPsec
To define the firewall addresses 1 Go to Firewall Objects > Address > Address. 2 Select Create New, enter the following information, and select OK:
Address Name Subnet/IP Range Interface internal_net 10.11.101.0/24 Port 2
3 Select Create New, enter the following information, and select OK:
Address Name Subnet/IP Range Interface dialups 10.254.254.[1-10] Route-based VPN: todialups Policy-based VPN: Any
The security policies for route-based and policy-based VPNs are described in separate sections below. To define security policies - route-based VPN 1 Go to Policy > Policy. 2 Select Create New, enter the following information, and select OK:
1224
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action NAT
3 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action NAT Port 2 internal_net todialups dialups As required. As required. ACCEPT Disable
4 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action NAT Port 2 internal_net todialups all As required. DHCP ACCEPT Disable
5 Place these policies in the policy list above any other policies having similar source and destination addresses.
Note: The policy in step 4 is required for DHCP to function properly. You can omit this policy if you change the Destination Address Name to all in the step before.
1225
To define the security policy - policy-based VPN 1 Go to Policy > Policy. 2 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action VPN Tunnel Allow Inbound Allow Outbound Port 2 internal_net Port 1 dialups As required. As required. IPSEC todialups. Enable Enable if you want to allow hosts on the private network behind the FortiGate unit to initiate communications with the FortiClient users after the tunnel is established. Disable Disable
3 Place the policy in the policy list above any other policies having similar source and destination addresses. To configure a DHCP server on the FortiGate unit 1 Go to System > DHCP Server > Service and select Create New. 2 Enter the following information and select OK:
Interface Name Mode Type IP Range Network Mask Default Gateway Route-based VPN: select virtual IPsec interface. For example, todialups. Policy-based VPN: select the public interface. For example, Port 1. Server IPSEC. 10.254.254.1 - 10.254.254.10 255.255.255.0 172.20.120.2
1226
4 Select Advanced. 5 In the Advanced Settings dialog box, select Acquire virtual IP address and then select Config. 6 Verify that the Dynamic Host Configuration Protocol (DHCP) over IPsec option is selected, and then select OK. 7 Select OK twice to close the dialog boxes. 8 Exit FortiClient and repeat this procedure at all other remote hosts.
1227
1228
Configuration overview
A dialup client can be a FortiGate unitthe FortiGate dialup client typically obtains a dynamic IP address from an ISP through the Dynamic Host Configuration Protocol (DHCP) or Point-to-Point Protocol over Ethernet (PPPoE) before initiating a connection to a FortiGate dialup server.
Figure 143: Example FortiGate dialup-client configuration
_1 ate G i t or
FG
_D
ialu
Site_1
Site_2
In a dialup-client configuration, the FortiGate dialup server does not rely on a phase 1 remote gateway address to establish an IPsec VPN connection with dialup clients. As long as authentication is successful and the IPsec security policy associated with the tunnel permits access, the tunnel is established. Several different ways to authenticate dialup clients and restrict access to private networks based on client credentials are available. To authenticate FortiGate dialup clients and help to distinguish them from FortiClient dialup clients when multiple clients will be connecting to the VPN through the same tunnel, we recommend that you assign a unique identifier (local ID or peer ID) to each FortiGate dialup client. For more information, see Authenticating remote peers and clients on page 1325.
1229
Configuration overview
Note: Whenever you add a unique identifier (local ID) to a FortiGate dialup client for identification purposes, you must select Aggressive mode on the FortiGate dialup server and also specify the identifier as a peer ID on the FortiGate dialup server. For more information, see Enabling VPN access with user accounts and pre-shared keys on page 1329.
Users behind the FortiGate dialup server cannot initiate the tunnel because the FortiGate dialup client does not have a static IP address. After the tunnel is initiated by users behind the FortiGate dialup client, traffic from the private network behind the FortiGate dialup server can be sent to the private network behind the FortiGate dialup client. Encrypted packets from the FortiGate dialup client are addressed to the public interface of the dialup server. Encrypted packets from the dialup server are addressed either to the public IP address of the FortiGate dialup client (if the dialup client connects to the Internet directly), or if the FortiGate dialup client is behind a NAT device, encrypted packets from the dialup server are addressed to the public IP address of the NAT device.
Note: If a router with NAT capabilities is in front of the FortiGate dialup client, the router must be NAT-T compatible for encrypted traffic to pass through the NAT device. For more information, see NAT traversal on page 1333.
When the FortiGate dialup server decrypts a packet from the FortiGate dialup client, the source address in the IP header may be one of the following values, depending on the configuration of the network at the far end of the tunnel: If the FortiGate dialup client connects to the Internet directly, the source address will be the private IP address of a host or server on the network behind the FortiGate dialup client. If the FortiGate dialup client is behind a NAT device, the source address will be the public IP address of the NAT device.
In some cases, computers on the private network behind the FortiGate dialup client may (by co-incidence) have IP addresses that are already used by computers on the network behind the FortiGate dialup server. In this type of situation (ambiguous routing), conflicts may occur in one or both of the FortiGate routing tables and traffic destined for the remote network through the tunnel may not be sent. In many cases, computers on the private network behind the FortiGate dialup client will most likely obtain IP addresses from a local DHCP server behind the FortiGate dialup client. However, unless the local and remote networks use different private network address spaces, unintended ambiguous routing and IP-address overlap issues may arise. To avoid these issues, you can configure FortiGate DHCP relay on the dialup client instead of using a DHCP server on the network behind the dialup client. The FortiGate dialup client can be configured to relay DHCP requests from the local private network to a DHCP server that resides on the network behind the FortiGate dialup server (see Figure 144 on page 1231). You configure the FortiGate dialup client to pass traffic from the local private network to the remote network by enabling FortiGate DHCP relay on the FortiGate dialup client interface that is connected to the local private network. Afterward, when a computer on the network behind the dialup client broadcasts a DHCP request, the dialup client relays the message through the tunnel to the remote DHCP server. The remote DHCP server responds with a private IP address for the computer. To avoid ambiguous routing and network overlap issues, the IP addresses assigned to computers behind the dialup client cannot match the network address space used by the private network behind the FortiGate dialup server.
1230
Configuration overview
1 te_ iGa t r Fo
FG
_D
ialu
Site_1
DHCP discovery message initiates tunnel
Site_2
CP DH er v r se
When the DHCP server resides on the private network behind the FortiGate dialup server, the IP destination address specified in the IPsec security policy on the FortiGate dialup client must refer to that network.
Note: You must add a static route to the DHCP server FortiGate unit if it is not directly connected to the private network behind the FortiGate dialup serverits IP address does not match the IP address of the private network. Also, the destination address in the IPsec security policy on the FortiGate dialup client must refer to the DHCP server address. The DHCP server must be configured to assign a range of IP addresses different from the DHCP server's local network, and also different from the private network addresses behind the FortiGate dialup server. See Routing on page 1197.
1231
Configuring dialup client capability for FortiGate dialup clients involves the following general configuration steps: Determine which IP addresses to assign to the private network behind the FortiGate dialup client, and add the IP addresses to the DHCP server behind the FortiGate dialup client. Refer to the software suppliers documentation to configure the DHCP server. Configure the FortiGate dialup server. See Configure the server to accept FortiGate dialup-client connections on page 1232. Configure the FortiGate dialup client. See Configure the FortiGate dialup client on page 1234.
Enable IPsec Interface You must select Advanced to see this setting. If IPsec Interface Mode is enabled, the FortiGate unit creates a virtual IPsec interface for a Mode route-based VPN. Disable this option if you want to create a policybased VPN. After you select OK to create the phase 1 configuration, you cannot change this setting.
2 Define the phase 2 parameters needed to create a VPN tunnel with the FortiGate dialup client. See Phase 2 parameters on page 1337. Enter these settings in particular:
1232
Name Phase 1
Enter a name to identify this phase 2 configuration. Select the name of the phase 1 configuration that you defined.
3 Define names for the addresses or address ranges of the private networks that the VPN links. See Defining policy addresses on page 1343. Enter these settings in particular: Define an address name for the server, host, or network behind the FortiGate dialup server. Define an address name for the private network behind the FortiGate dialup client. 4 Define the security policies to permit communications between the private networks through the VPN tunnel. Route-based and policy-based VPNs require different security policies. For detailed information about creating security policies, see Defining VPN security policies on page 1344. Route-based VPN security policy Define an ACCEPT security policy to permit communications between hosts on the private network behind the FortiGate dialup client and the private network behind this FortiGate dialup server. Because communication cannot be initiated in the opposite direction, there is only one policy. Enter these settings in particular:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action NAT Select the VPN tunnel (IPsec interface) created in Step 1. Select All. Select the interface that connects to the private network behind this FortiGate unit. Select All. Select ACCEPT. Disable
Policy-based VPN security policy Define an IPsec security policy. Enter these settings in particular:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action VPN Tunnel Select the interface that connects to the private network behind this FortiGate unit. Select the address name that you defined in Step 3 for the private network behind this FortiGate unit. Select the FortiGate units public interface. Select the address name that you defined in Step 3. Select IPSEC. Select the name of the phase 1 configuration that you created in Step 1. Select Allow inbound to enable traffic from the remote network to initiate the tunnel. Clear Allow outbound to prevent traffic from the local network from initiating the tunnel after the tunnel has been established.
5 Place the policy in the policy list above any other policies having similar source and destination addresses.
FortiOS Handbook v3: IPsec VPNs 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1233
6 If configuring a route-based policy, configure a default route for VPN traffic on this interface.
Enable IPsec If IPsec Interface Mode is enabled, the FortiGate unit creates a Interface Mode virtual IPsec interface for a route-based VPN. Disable this option if you want to create a policy-based VPN. After you select OK to create the phase 1 configuration, you cannot change this setting.
2 Define the phase 2 parameters needed to create a VPN tunnel with the dialup server. See Phase 2 parameters on page 1337. Enter these settings in particular:
Name Phase 1 Enter a name to identify this phase 2 configuration. Select the set of phase 1 parameters that you defined in step 1.
3 Define names for the addresses or address ranges of the private networks that the VPN links. See Defining policy addresses on page 1343. Enter these settings in particular: Define an address name for the server, host, or network behind the FortiGate dialup server. Define an address name for the private network behind the FortiGate dialup client. 4 Define security policies to permit communication between the private networks through the VPN tunnel. Route-based and policy-based VPNs require different security policies. For detailed information about creating security policies, see Defining VPN security policies on page 1344.
1234
Route-based VPN security policy Define an ACCEPT security policy to permit communications between hosts on the private network behind this FortiGate dialup client and the private network behind the FortiGate dialup server. Because communication cannot be initiated in the opposite direction, there is only one policy. Enter these settings in particular:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action NAT Select the interface that connects to the private network behind this FortiGate unit. Select All. Select the VPN tunnel (IPsec interface) created in Step 1. Select All. Select ACCEPT. Disable
Policy-based VPN security policy Define an IPsec security policy to permit communications between the source and destination addresses. Enter these settings in particular:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action VPN Tunnel Select the interface that connects to the private network behind this FortiGate unit. Select the address name that you defined in Step 3 for the private network behind this FortiGate unit. Select the FortiGate units public interface. Select the address name that you defined in Step 3 for the private network behind the dialup server. Select IPSEC. Select the name of the phase 1 configuration that you created in Step 1. Clear Allow inbound to prevent traffic from the remote network from initiating the tunnel after the tunnel has been established. Select Allow outbound to enable traffic from the local network to initiate the tunnel.
5 Place the policy in the policy list above any other policies having similar source and destination addresses.
1235
1236
This chapter describes how to configure a FortiGate unit as either an IKE Mode Config server or client.
1237
mode-cfg-ip-version {4|6} Select whether an IKE Configuration Method client receives an IPv4 or IPv6 IP address. The default is 4. This setting should match the ip-version setting. ip-version <4 | 6> This is a regular IPsec VPN field. By default, IPsec VPNs use IPv4 addressing. You can set ip-version to 6 to create a VPN with IPv6 addressing.
After you have enabled the basic configuration, you can configure: IP address assignment for clients DNS and WINS server assignment
1238
IP address assignment
Usually you will want to assign IP addresses to clients. The simplest method is to assign addresses from a specific range, similar to a DHCP server. If your clients are authenticated by a RADIUS server, you can obtain the users IP address assignment from the Framed-IP-Address attribute. The user must be authenticated using XAuth. To assign IP addresses from an address range If your VPN uses IPv4 addresses, config vpn ipsec phase1-interface edit vpn1 set mode-cfg-ipversion 4 set assign-ip enable set assign-ip-type ip set assign-ip-from range set ipv4-start-ip <range_start> set ipv4-end-ip <range_end> set ipv4-netmask <netmask> end If your VPN uses IPv6 addresses, config vpn ipsec phase1-interface edit vpn1 set mode-cfg-ipversion 6 set assign-ip enable set assign-ip-type ip set assign-ip-from range set ipv6-start-ip <range_start> set ipv6-end-ip <range_end> end To assign IP addresses from a RADIUS server The users must be authenticated by a RADIUS server and assigned to the FortiGate user group <grpname>. Since the IP address will not be static, type is set to dynamic, and mode-cfg is enabled. This is IKE Configuration Method so that compatible clients can configure themselves with settings that the FortiGate unit provides. config vpn ipsec phase1-interface edit vpn1 set type dynamic set mode-cfg enable set assign-ip enable set assign-ip-from usrgrp set xauthtype auto set authusrgrp <grpname> end
1239
The ipv4-split-include variable specifies a firewall address that represents the networks to which the clients will have access. This destination IP address information is sent to the clients. Only the CLI fields required for IKE Mode Config are shown here. For detailed information about these variables, see the FortiGate CLI Reference. config vpn ipsec phase1-interface edit vpn1 set ip-version 4 set type dynamic set interface port1 set proposal 3des-sha1 aes128-sha1 set mode-cfg enable set mode-cfg-ipversion 4 set assign-ip enable set assign-ip-type ip set assign-ip-from range set ipv4-start-ip 10.11.101.160 set ipv4-end-ip 10.11.101.180 set ipv4-netmask 255.255.255.0 set dns-server1 10.11.101.199 set dns-server2 66.11.168.195 set wins-server1 10.11.101.191 set domain example set ipv4-split-include OfficeLAN end
1240
Internet-browsing configuration
This section explains how to support secure web browsing performed by dialup VPN clients, and/or hosts behind a remote VPN peer. Remote users can access the private network behind the local FortiGate unit and browse the Internet securely. All traffic generated remotely is subject to the security policy that controls traffic on the private network behind the local FortiGate unit. The following topics are included in this section: Configuration overview Creating an Internet browsing security policy Routing all remote traffic through the VPN tunnel
Configuration overview
A VPN provides secure access to a private network behind the FortiGate unit. You can also enable VPN clients to access the Internet securely. The FortiGate unit inspects and processes all traffic between the VPN clients and hosts on the Internet according to the Internet browsing policy. This is accomplished even though the same FortiGate interface is used for both encrypted VPN client traffic and unencrypted Internet traffic. In Figure 145, FortiGate_1 enables secure Internet browsing for FortiClient Endpoint Security users such as Dialup_1 and users on the Site_2 network behind FortiGate_2, which could be a VPN peer or a dialup client.
Figure 145: Example Internet-browsing configuration
Dia
lup
_1
FG _D ialu p_ 2 We b
Fo
_1 ate G i t r
Site_1
Users browse internet through the VPN tunnel
Site_2
ser ver
You can adapt any of the following configurations to provide secure Internet browsing: a gateway-to-gateway configuration (see Gateway-to-gateway configurations on page 1167) a FortiClient dialup-client configuration (see FortiClient dialup-client configurations on page 1211)
1241
Internet-browsing configuration
The procedures in this section assume that one of these configurations is in place, and that it is operating properly. To create an internet-browsing configuration based on an existing gateway-to-gateway configuration, you must edit the gateway-to-gateway configuration as follows: On the FortiGate unit that will provide Internet access, create an Internet browsing security policy. See Creating an Internet browsing security policy, below. Configure the remote peer or client to route all traffic through the VPN tunnel. You can do this on a FortiGate unit or on a FortiClient Endpoint Security application. See Routing all remote traffic through the VPN tunnel on page 1243.
To create an Internet browsing policy - route-based VPN 1 Go to Policy > Policy. 2 Select Create New, enter the following information and then select OK:
Source Interface Source Address Name Destination Interface Destination Address Name The IPsec VPN interface. All The interface that connects to the Internet. The virtual IPsec interface is configured on this physical interface. All IPsec VPNs for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1242
Internet-browsing configuration
As required. As required. ACCEPT Enable Select the UTM features that you want to apply to Internet access.
The VPN clients must be configured to route all Internet traffic through the VPN tunnel.
These procedures assume that your VPN connection to the protected private network is working and that you have configured the FortiGate VPN server for Internet browsing as described in Creating an Internet browsing security policy on page 1242.
All packets are routed through the VPN tunnel, not just packets destined for the protected private network.
FortiOS Handbook v3: IPsec VPNs 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1243
Internet-browsing configuration
1244
Configuration overview
A FortiGate unit with two interfaces connected to the Internet can be configured to support redundant VPNs to the same remote peer. If the primary connection fails, the FortiGate unit can establish a VPN using the other connection.
Note: Redundant tunnels do not support Tunnel Mode or Manual Keys. You must use Interface Mode.
A fully-redundant configuration requires redundant connections to the Internet on both peers. Figure 146 on page 1246 shows an example of this. This is useful to create a reliable connection between two FortiGate units with static IP addresses. When only one peer has redundant connections, the configuration is partially-redundant. For an example of this, see Partially-redundant route-based VPN example on page 1260. This is useful to provide reliable service from a FortiGate unit with static IP addresses that accepts connections from dialup IPsec VPN clients. In a fully-redundant VPN configuration with two interfaces on each peer, four distinct paths are possible for VPN traffic from end to end. Each interface on a peer can communicate with both interfaces on the other peer. This ensures that a VPN will be available as long as each peer has one working connection to the Internet. You configure a VPN and an entry in the routing table for each of the four paths. All of these VPNs are ready to carry data. You set different routing distances for each route and only the shortest distance route is used. If this route fails, the route with the next shortest distance is used. The redundant configurations described in this chapter use route-based VPNs, otherwise known as virtual IPsec interfaces. This means that the FortiGate unit must operate in NAT/Route mode. You must use auto-keying. A VPN that is created using manual keys (see Manual-key configurations on page 1277) cannot be included in a redundant-tunnel configuration.
1245
Configuration overview
The configuration described here assumes that your redundant VPNs are essentially equal in cost and capability. When the original VPN returns to service, traffic continues to use the replacement VPN until the replacement VPN fails. If your redundant VPN uses more expensive facilities, you want to use it only as a backup while the main VPN is down. For information on how to do this, see Creating a backup IPsec interface on page 1267.
Figure 146: Example redundant-tunnel configuration
_1 ate G i t r Fo
Fo rtiG
ate _2
Site_1
Site_2
Note: A VPN that is created using manual keys (see Manual-key configurations on page 1277) cannot be included in a redundant-tunnel configuration.
The procedures in this section assume that two separate interfaces to the Internet are available on each VPN peer.
1246
Path 2
Remote Gateway IP Address Local Interface Enable IPsec Interface Mode Dead Peer Detection Other settings as required by VPN. Select Static IP Address. Type the IP address of the secondary interface of the remote peer. Select the primary public interface of this peer. Enable Enable
Path 3
Remote Gateway IP Address Local Interface Enable IPsec Interface Mode Dead Peer Detection Other settings as required by VPN. Select Static IP Address. Type the IP address of the primary interface of the remote peer. Select the secondary public interface of this peer. Enable Enable
1247
Path 4
Remote Gateway IP Address Local Interface Enable IPsec Interface Mode Dead Peer Detection Other settings as required by VPN. Select Static IP Address. Type the IP address of the secondary interface of the remote peer. Select the secondary public interface of this peer. Enable Enable
For more information, see Auto Key phase 1 parameters on page 1321. 3 Create a phase 2 definition for each path. See Phase 2 parameters on page 1337. Enter these settings in particular:
Phase 1 Select the phase 1 configuration (virtual IPsec interface) that you defined for this path. You can select the name from the Static IP Address part of the list.
4 Create a route for each path to the other peer. If there are two ports on each peer, there are four possible paths between the peer devices.
Destination IP/Mask Device Distance The IP address and netmask of the private network behind the remote peer. One of the virtual IPsec interfaces on the local peer. For each path, enter a different value to prioritize the paths.
5 Define the security policy for the local primary interface. See Defining VPN security policies on page 1344. You need to create two policies for each path to enable communication in both directions. Enter these settings in particular:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Select the local interface to the internal (private) network All Select one of the virtual IPsec interfaces you created in Step 2. All Always Any ACCEPT
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action
Select one of the virtual IPsec interfaces you created in Step 2. All Select the local interface to the internal (private) network. All Always Any ACCEPT
6 Place the policy in the policy list above any other policies having similar source and destination addresses. 7 Repeat this procedure at the remote FortiGate unit.
1248
N2 2 WA 6.30. .1 172
FortiGate_1 e_1
192 .10 .2 .
F FortiGate_2
HR network 10.31.101.0/24
For each path, VPN configuration, security policies and routing are defined. By specifying a different routing distance for each path, the paths are prioritized. A VPN tunnel is established on each path, but only the highest priority one is used. If the highest priority path goes down, the traffic is automatically routed over the next highest priority path. You could use dynamic routing, but to keep this example simple, static routing is used.
Configuring FortiGate_1
You must configure the interfaces involved in the VPN define the phase 1 configuration for each of the four possible paths, creating a virtual IPsec interface for each one define the phase 2 configuration for each of the four possible paths configure routes for the four IPsec interfaces, assigning the appropriate priorities configure incoming and outgoing security policies between the internal interface and each of the virtual IPsec interfaces
1249
To configure the network interfaces 1 Go to System > Network > Interface. 2 Select the Edit icon for the Internal interface, enter the following information and then select OK:
Addressing mode IP/Netmask Manual 10.21.101.0/255.255.255.0
3 Select the Edit icon for the WAN1 interface, enter the following information and then select OK:
Addressing mode IP/Netmask Manual 192.168.10.2/255.255.255.0
4 Select the Edit icon for the WAN2 interface, enter the following information and then select OK:
Addressing mode IP/Netmask Manual 172.16.20.2/255.255.255.0
To configure the IPsec interfaces (phase 1 configurations) 1 Go to VPN > IPSEC > Auto Key. 2 Select Create Phase 1, enter the following information, and select OK:
Name Remote Gateway IP Address Local Interface Mode Authentication Method Pre-shared Key Peer Options Advanced Enable IPsec Interface Mode Dead Peer Detection Select Select Site_1_A Static IP Address 192.168.20.2 WAN1 Main Preshared Key Enter the preshared key. Accept any peer ID
1250
3 Select Create Phase 1, enter the following information, and select OK:
Name Remote Gateway IP Address Local Interface Mode Authentication Method Pre-shared Key Peer Options Advanced Enable IPsec Interface Mode Dead Peer Detection Select Select Site_1_B Static IP Address 172.16.30.2 WAN1 Main Preshared Key Enter the preshared key. Accept any peer ID
4 Select Create Phase 1, enter the following information, and select OK:
Name Remote Gateway IP Address Local Interface Mode Authentication Method Pre-shared Key Peer Options Advanced Enable IPsec Interface Mode Dead Peer Detection Select Select Site_1_C Static IP Address 192.168.20.2 WAN2 Main Preshared Key Enter the preshared key. Accept any peer ID
5 Select Create Phase 1, enter the following information, and select OK:
Name Remote Gateway IP Address Local Interface Mode Authentication Method Pre-shared Key Peer Options Advanced Enable IPsec Interface Mode Dead Peer Detection Select Select Site_1_D Static IP Address 172.16.30.2 WAN2 Main Preshared Key Enter the preshared key. Accept any peer ID
1251
To define the phase 2 configurations for the four VPNs 1 Go to VPN > IPSEC > Auto Key. 2 Select Create Phase 2, enter the following information and select OK:
Name Phase 1 Route_A. Site_1_A
3 Select Create Phase 2, enter the following information and select OK:
Name Phase 1 Route_B. Site_1_B
4 Select Create Phase 2, enter the following information and select OK:
Name Phase 1 Route_C. Site_1_C
5 Select Create Phase 2, enter the following information and select OK:
Name Phase 1 Route_D. Site_1_D
To configure routes 1 Go to Router > Static > Static Route. 2 Select Create New, enter the following default gateway information and then select OK:
Destination IP/Mask Device Gateway Distance 0.0.0.0/0.0.0.0 WAN1 192.168.10.1 10
3 Select Create New, enter the following information and then select OK:
Destination IP/Mask Device Distance 10.31.101.0/255.255.255.0 Site_1_A 1
4 Select Create New, enter the following information and then select OK:
Destination IP/Mask Device Distance 10.31.101.0/255.255.255.0 Site_1_B 2
1252
5 Select Create New, enter the following information and then select OK:
Destination IP/Mask Device Distance 10.31.101.0/255.255.255.0 Site_1_C 3
6 Select Create New, enter the following information and then select OK:
Destination IP/Mask Device Distance 10.31.101.0/255.255.255.0 Site_1_D 4
To configure security policies 1 Go to Policy > Policy. 2 Select Create New, enter the following information, and then select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Internal All Site_1_A All Always Any ACCEPT
3 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Site_1_A All Internal All Always Any ACCEPT
4 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Internal All Site_1_B All Always Any ACCEPT
1253
5 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Site_1_B All Internal All Always Any ACCEPT
6 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Internal All Site_1_C All Always Any ACCEPT
7 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Site_1_C All Internal All Always Any ACCEPT
8 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Internal All Site_1_D All Always Any ACCEPT
1254
9 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Site_1_D All Internal All Always Any ACCEPT
Configuring FortiGate_2
The configuration for FortiGate_2 is very similar that of FortiGate_1. You must configure the interfaces involved in the VPN define the phase 1 configuration for each of the four possible paths, creating a virtual IPsec interface for each one define the phase 2 configuration for each of the four possible paths configure routes for the four IPsec interfaces, assigning the appropriate priorities configure incoming and outgoing security policies between the internal interface and each of the virtual IPsec interfaces
To configure the network interfaces 1 Go to System > Network > Interface. 2 Select the Internal interface and then select Edit. Enter the following information and then select OK:
Addressing mode IP/Netmask Manual 10.31.101.0/255.255.255.0
3 Select the WAN1 interface and then select Edit. Enter the following information and then select OK:
Addressing mode IP/Netmask Manual 192.168.20.2/255.255.255.0
4 Select the WAN2 interface and then select Edit. Enter the following information and then select OK:
Addressing mode IP/Netmask Manual 172.16.30.2/255.255.255.0
1255
To configure the IPsec interfaces (phase 1 configurations) 1 Go to VPN > IPSEC > Auto Key. 2 Select Create Phase 1, enter the following information, and select OK:
Name Remote Gateway IP Address Local Interface Mode Authentication Method Pre-shared Key Peer Options Advanced Enable IPsec Interface Mode Dead Peer Detection Select Select Site_2_A Static IP Address 192.168.10.2 WAN1 Main Preshared Key Enter the preshared key. Accept any peer ID
3 Select Create Phase 1, enter the following information, and select OK:
Name Remote Gateway IP Address Local Interface Mode Authentication Method Pre-shared Key Peer Options Advanced Enable IPsec Interface Mode Dead Peer Detection Select Select Site_2_B Static IP Address 172.16.20.2 WAN1 Main Preshared Key Enter the preshared key. Accept any peer ID
4 Select Create Phase 1, enter the following information, and select OK:
Name Remote Gateway IP Address Local Interface Mode Authentication Method Pre-shared Key Peer Options Advanced Enable IPsec Interface Mode Dead Peer Detection Select Select Site_2_C Static IP Address 192.168.10.2 WAN2 Main Preshared Key Enter the preshared key. Accept any peer ID
1256
5 Select Create Phase 1, enter the following information, and select OK:
Name Remote Gateway IP Address Local Interface Mode Authentication Method Pre-shared Key Peer Options Advanced Enable IPsec Interface Mode Dead Peer Detection Select Select Site_2_D Static IP Address 172.16.20.2 WAN1 Main Preshared Key Enter the preshared key. Accept any peer ID
To define the phase 2 configurations for the four VPNs 1 Go to VPN > IPSEC > Auto Key. 2 Select Create Phase 2, enter the following information and select OK:
Name Phase 1 Route_A. Site_2_A
3 Select Create Phase 2, enter the following information and select OK:
Name Phase 1 Route_B. Site_2_B
4 Select Create Phase 2, enter the following information and select OK:
Name Phase 1 Route_C. Site_2_C
5 Select Create Phase 2, enter the following information and select OK:
Name Phase 1 Route_D. Site_2_D
To configure routes 1 Go to Router > Static > Static Route. 2 Select Create New, enter the following default gateway information and then select OK:
Destination IP/Mask Device Gateway Distance 0.0.0.0/0.0.0.0 WAN1 192.168.10.1 10
1257
3 Select Create New, enter the following information and then select OK:
Destination IP/Mask Device Distance 10.21.101.0/255.255.255.0 Site_2_A 1
4 Select Create New, enter the following information and then select OK:
Destination IP/Mask Device Distance 10.21.101.0/255.255.255.0 Site_2_B 2
5 Select Create New, enter the following information and then select OK:
Destination IP/Mask Device Distance 10.21.101.0/255.255.255.0 Site_2_C 3
6 Select Create New, enter the following information and then select OK:
Destination IP/Mask Device Distance 10.21.101.0/255.255.255.0 Site_2_D 4
To configure security policies 1 Go to Policy > Policy. 2 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Internal All Site_2_A All Always Any ACCEPT
1258
3 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Site_2_A All Internal All Always Any ACCEPT
4 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Internal All Site_2_B All Always Any ACCEPT
5 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Site_2_B All Internal All Always Any ACCEPT
6 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Internal All Site_2_C All Always Any ACCEPT
1259
7 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Site_2_C All Internal All Always Any ACCEPT
8 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Internal All Site_2_D All Always Any ACCEPT
9 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Site_2_D All Internal All Always Any ACCEPT
1260
Both FortiGate units operate in NAT/Route mode. Two separate interfaces to the Internet (192.168.10.2 and 172.16.20.2) are available on FortiGate_1. Each interface has a static public IP address. FortiGate_2 has a single connection to the Internet and obtains a dynamic public IP address (for example, 172.16.30.1) when it connects to the Internet. FortiGate_2 forwards IP packets from the SOHO network (10.31.101.0/24) to the corporate network (10.21.101.0/24) behind FortiGate_1 through a partially redundant IPsec VPN. Encrypted packets from FortiGate_2 are addressed to the public interface of FortiGate_1. Encrypted packets from FortiGate_1 are addressed to the public IP address of FortiGate_2.
There are two possible paths for communication between the two units. In this example, these paths, listed in descending priority, are: FortiGate_1 WAN 1 to FortiGate_2 WAN 1 FortiGate_1 WAN 2 to FortiGate_2 WAN 1
For each path, VPN configuration, security policies and routing are defined. By specifying a different routing distance for each path, the paths are prioritized. A VPN tunnel is established on each path, but only the highest priority one is used. If the highest priority path goes down, the traffic is automatically routed over the next highest priority path. You could use dynamic routing, but to keep this example simple, static routing is used.
Figure 148: Example partially redundant route-based configuration
_1 FortiGate_1
.10
.1
Configuring FortiGate_1
You must configure the interfaces involved in the VPN define the phase 1 configuration for each of the two possible paths, creating a virtual IPsec interface for each one define the phase 2 configuration for each of the two possible paths configure incoming and outgoing security policies between the internal interface and each of the virtual IPsec interfaces
1261
To configure the network interfaces 1 Go to System > Network > Interface. 2 Select the Internal interface and then select Edit. Enter the following information and then select OK:
Addressing mode IP/Netmask Manual 10.21.101.2/255.255.255.0
3 Select the WAN1 interface and then select Edit. Enter the following information and then select OK:
Addressing mode IP/Netmask Manual 192.168.10.2/255.255.255.0
4 Select the WAN2 interface and then select Edit. Enter the following information and then select OK:
Addressing mode IP/Netmask Manual 172.16.20.2/255.255.255.0
To configure the IPsec interfaces (phase 1 configurations) 1 Go to VPN > IPSEC > Auto Key. 2 Select Create Phase 1, enter the following information, and select OK:
Name Remote Gateway Local Interface Mode Authentication Method Pre-shared Key Peer Options Advanced Enable IPsec Interface Mode Dead Peer Detection Select Select Site_1_A Dialup User WAN1 Main Preshared Key Enter the preshared key. Accept any peer ID
1262
3 Select Create Phase 1, enter the following information, and select OK:
Name Remote Gateway Local Interface Mode Authentication Method Pre-shared Key Peer Options Advanced Enable IPsec Interface Mode Dead Peer Detection Select Select Site_1_B Dialup User WAN2 Main Preshared Key Enter the preshared key. Accept any peer ID
To define the phase 2 configurations for the two VPNs 1 Go to VPN > IPSEC > Auto Key. 2 Select Create Phase 2, enter the following information and select OK:
Name Phase 1 Route_A. Site_1_A
3 Select Create Phase 2, enter the following information and select OK:
Name Phase 1 Route_B. Site_1_B
To configure routes 1 Go to Router > Static > Static Route. 2 Select Create New, enter the following default gateway information and then select OK:
Destination IP/Mask Device Gateway Distance 0.0.0.0/0.0.0.0 WAN1 192.168.10.1 10
1263
To configure security policies 1 Go to Policy > Policy. 2 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Internal All Site_1_A All Always Any ACCEPT
3 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Internal All Site_1_B All Always Any ACCEPT
Configuring FortiGate_2
The configuration for FortiGate_2 is similar to that of FortiGate_1. You must configure the interface involved in the VPN define the phase 1 configuration for the primary and redundant paths, creating a virtual IPsec interface for each one define the phase 2 configurations for the primary and redundant paths, defining the internal network as the source address so that FortiGate_1 can automatically configure routing configure the routes for the two IPsec interfaces, assigning the appropriate priorities configure security policies between the internal interface and each of the virtual IPsec interfaces
To configure the network interfaces 1 Go to System > Network > Interface. 2 Select the Internal interface and then select Edit. Enter the following information and then select OK:
Addressing mode IP/Netmask Manual 10.31.101.2/255.255.255.0
1264
3 Select the WAN1 interface and then select Edit. Enter the following information and then select OK:
Addressing mode DHCP
To configure the two IPsec interfaces (phase 1 configurations) 1 Go to VPN > IPSEC > Auto Key. 2 Select Create Phase 1, enter the following information, and select OK:
Name Remote Gateway IP Address Local Interface Mode Authentication Method Pre-shared Key Peer Options Advanced Enable IPsec Interface Mode Dead Peer Detection Select Select Site_2_A Static IP Address 192.168.10.2 WAN1 Main Preshared Key Enter the preshared key. Accept any peer ID
3 Select Create Phase 1, enter the following information, and select OK:
Name Remote Gateway IP Address Local Interface Mode Authentication Method Pre-shared Key Peer Options Advanced Enable IPsec Interface Mode Dead Peer Detection Select Select Site_2_B Static IP Address 172.16.20.2 WAN1 Main Preshared Key Enter the preshared key. Accept any peer ID
To define the phase 2 configurations for the two VPNs 1 Go to VPN > IPSEC > Auto Key. 2 Select Create Phase 2, enter the following information and select OK:
Name Phase 1 Advanced Source Address 10.31.101.0/24 Route_A. Site_2_A
1265
3 Select Create Phase 2, enter the following information and select OK:
Name Phase 1 Advanced Source Address 10.31.101.0/24 Route_B. Site_2_B
To configure routes 1 Go to Router > Static > Static Route. 2 Select Create New, enter the following information and then select OK:
Destination IP/Mask Device Distance 10.21.101.0/255.255.255.0 Site_2_A 1
3 Select Create New, enter the following information and then select OK:
Destination IP/Mask Device Distance 10.21.101.0/255.255.255.0 Site_2_B 2
To configure security policies 1 Go to Policy > Policy. 2 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Internal All Site_2_A All Always Any ACCEPT
3 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action Internal All Site_2_B All Always Any ACCEPT
1266
1267
1268
Configuration overview
In Transparent operation mode, all interfaces of the FortiGate unit except the management interface (which by default is assigned IP address 10.10.10.1/255.255.255.0) are invisible at the network layer. Typically, when a FortiGate unit runs in Transparent mode, different network segments are connected to the FortiGate interfaces. Figure 149 shows the management station on the same subnet. The management station can connect to the FortiGate unit directly through the web-based manager.
Figure 149: Management station on internal network
r dge
out
er
10
.10
.10
.1
Site_1 10.10.10.0/24
An edge router typically provides a public connection to the Internet and one interface of the FortiGate unit is connected to the router. If the FortiGate unit is managed from an external address (see Figure 150 on page 1270), the router must translate (NAT) a routable address to direct management traffic to the FortiGate management interface.
1269
Configuration overview
17
2.1
6.1
0.1
00
Fo
Site_1 10.10.10.0/24
In a transparent VPN configuration, two FortiGate units create a VPN tunnel between two separate private networks transparently. All traffic between the two networks is encrypted and protected by FortiGate security policies. Both FortiGate units may be running in Transparent mode, or one could be running in Transparent mode and the other running in NAT/Route mode. If the remote peer is running in NAT/Route mode, it must have a static public IP address.
Note: VPNs between two FortiGate units running in Transparent mode do not support inbound/outbound NAT (supported through CLI commands) within the tunnel. In addition, a FortiGate unit running in Transparent mode cannot be used in a hub-and-spoke configuration.
Encrypted packets from the remote VPN peer are addressed to the management interface of the local FortiGate unit. If the local FortiGate unit can reach the VPN peer locally, a static route to the VPN peer must be added to the routing table on the local FortiGate unit. If the VPN peer connects through the Internet, encrypted packets from the local FortiGate unit must be routed to the edge router instead. For information about how to add a static route to the FortiGate routing table, see the Router Static chapter of the FortiGate Administration Guide. In the example configuration shown in Figure 150, Network Address Translation (NAT) is enabled on the router. When an encrypted packet from the remote VPN peer arrives at the router through the Internet, the router performs inbound NAT and forwards the packet to the FortiGate unit. Refer to the software suppliers documentation to configure the router. If you want to configure a VPN between two FortiGate units running in Transparent mode, each unit must have an independent connection to a router that acts as a gateway to the Internet, and both units must be on separate networks that have a different address space. When the two networks linked by the VPN tunnel have different address spaces (see Figure 151 on page 1271), at least one router must separate the two FortiGate units, unless the packets can be redirected using ICMP (see Figure 152 on page 1271).
1270
Configuration overview
Figure 151: Link between two FortiGate units running in Transparent mode
Ro F te iGa t r o _1
ute
r
Fo rtiG
ate
_2
Network_1
Network_2
In Figure 152, interface C behind the router is the default gateway for both FortiGate units. Packets that cannot be delivered on Network_1 are routed to interface C by default. Similarly, packets that cannot be delivered on Network_2 are routed to interface C. In this case, the router must be configured to redirect packets destined for Network_1 to interface A and redirect packets destined for Network_2 to interface B.
Figure 152: ICMP redirecting packets to two FortiGate units running in Transparent mode
Ro ICM P
ute
Fo
at rtiG
e_1
ICM
Network_3
Fo
rtiG
ate
_2
Network_1
Network_2
1271
Configuration overview
If there are additional routers behind the FortiGate unit (see Figure 153 on page 1272) and the destination IP address of an inbound packet is on a network behind one of those routers, the FortiGate routing table must include routes to those networks. For example, in Figure 153, the FortiGate unit must be configured with static routes to interfaces A and B in order to forward packets to Network_1 and Network_2 respectively.
Figure 153: Destinations on remote networks behind internal routers
_1 ate G i t or
ut Ro
er_
Network_3
Ro
ute
r_2
Network_1
Network_2
A FortiGate unit operating in Transparent mode requires the following basic configuration to operate as a node on the IP network: The unit must have sufficient routing information to reach the management station. For any traffic to reach external destinations, a default static route to an edge router that forwards packets to the Internet must be present in the FortiGate routing table. When all of the destinations are located on the external network, the FortiGate unit may route packets using a single default static route. If the network topology is more complex, one or more static routes in addition to the default static route may be required in the FortiGate routing table.
1272
The remote VPN peer may operate in NAT/Route mode or Transparent mode. 2 At the local FortiGate unit, define the phase 1 parameters needed to establish a secure connection with the remote peer. See Auto Key phase 1 parameters on page 1321. Select Advanced and enter these settings in particular:
Remote Gateway IP Address Select Static IP Address. Type the IP address of the public interface to the remote peer. If the remote peer is a FortiGate unit running in Transparent mode, type the IP address of the remote management interface. Select Nat-traversal, and type a value into the Keepalive Frequency field. These settings protect the headers of encrypted packets from being altered by external NAT devices and ensure that NAT address mappings do not change while the VPN tunnel is open. For more information, see NAT traversal on page 1333 and NAT keepalive frequency on page 1334.
Advanced
3 Define the phase 2 parameters needed to create a VPN tunnel with the remote peer. See Phase 2 parameters on page 1337. Enter these settings in particular:
Phase 1 Select the set of phase 1 parameters that you defined for the remote peer. The name of the remote peer can be selected from the Static IP Address list.
1273
4 Define the source and destination addresses of the IP packets that are to be transported through the VPN tunnel. See Defining policy addresses on page 1343. Enter these settings in particular: For the originating address (source address), enter the IP address and netmask of the private network behind the local peer network. for the management interface, for example, 10.10.10.0/24. This address needs to be a range to allow traffic from your network through the tunnel. Optionally select any for this address. For the remote address (destination address), enter the IP address and netmask of the private network behind the remote peer (for example, 192.168.10.0/24). If the remote peer is a FortiGate unit running in Transparent mode, enter the IP address of the remote management interface instead. 5 Define an IPsec security policy to permit communications between the source and destination addresses. See Defining VPN security policies on page 1344. Enter these settings in particular:
Source Interface/Zone Source Address Name Destination Interface/Zone Select the local interface to the internal (private) network. Select the source address that you defined in Step 4. Select the interface to the edge router. When you configure the IPsec security policy on a remote peer that operates in NAT/Route mode, you select the public interface to the external (public) network instead. Select the destination address that you defined in Step 4. IPSEC Select the name of the phase 2 tunnel configuration that you created in Step 3. Select Allow inbound to enable traffic from the remote network to initiate the tunnel. Select Allow outbound to enable traffic from the local network to initiate the tunnel.
6 Place the policy in the policy list above any other policies having similar source and destination addresses. 7 Define another IPsec security policy to permit communications between the source and destination addresses in the opposite direction. This security policy and the previous one form a bi-directional policy pair. See Defining VPN security policies on page 1344. Enter these settings in particular:
Source Interface/Zone Select the interface to the edge router. When you configure the IPsec security policy on a remote peer that operates in NAT/Route mode, you select the public interface to the external (public) network instead. Select the destination address that you defined in Step 4. Select the local interface to the internal (private) network. Select the source address that you defined in Step 4. IPSEC Select the name of the phase 2 tunnel configuration that you created in Step 3. Select Allow inbound to enable traffic from the remote network to initiate the tunnel. Select Allow outbound to enable traffic from the local network to initiate the tunnel.
Source Address Name Destination Interface/Zone Destination Address Name Action VPN Tunnel
1274
8 Repeat this procedure at the remote FortiGate unit to create bidirectional security policies. Use the local interface and address information local to the remote FortiGate unit. For more information on Transparent operation mode, see FortiGate Fundamentals handbook chapter.
1275
1276
Manual-key configurations
This section explains how to manually define cryptographic keys to establish an IPsec VPN, either policy-based or route-based. The following topics are included in this section: Configuration overview Specify the manual keys for creating a tunnel
Configuration overview
You can manually define cryptographic keys for the FortiGate unit to establish an IPsec VPN. You define manual keys where prior knowledge of the encryption and/or authentication key is required (that is, one of the VPN peers requires a specific IPsec encryption and/or authentication key). In this case, you do not specify IPsec phase 1 and phase 2 parameters; you define manual keys on the VPN > IPSEC > Manual Key tab instead. If one VPN peer uses specific authentication and encryption keys to establish a tunnel, both VPN peers must be configured to use the same encryption and authentication algorithms and keys.
Note: It may not be safe or practical to define manual keys because network administrators must be trusted to keep the keys confidential, and propagating changes to remote VPN peers in a secure manner may be difficult.
It is essential that both VPN peers be configured with matching encryption and authentication algorithms, matching authentication and encryption keys, and complementary Security Parameter Index (SPI) settings. You can define either the encryption or the authentication as NULL (disabled), but not both. Each SPI identifies a Security Association (SA). The value is placed in ESP datagrams to link the datagrams to the SA. When an ESP datagram is received, the recipient refers to the SPI to determine which SA applies to the datagram. An SPI must be specified manually for each SA. Because an SA applies to communication in one direction only, you must specify two SPIs per configuration (a local SPI and a remote SPI) to cover bidirectional communications between two VPN peers.
Caution: If you are not familiar with the security policies, SAs, selectors, and SA databases for your particular installation, do not attempt the following procedure without qualified assistance.
1277
Manual-key configurations
Remote SPI
Encryption Algorithm
Encryption Key
Authentication Algorithm
Authentication Key
3 Select OK.
1278
Compared with IPv4 IPsec VPN functionality, there are some limitations: Except for IPv6 over IPv4, remote gateways with Dynamic DNS are not supported. This is because FortiOS 3.0 does not support IPv6 DNS. You cannot use RSA certificates in which the common name (cn) is a domain name that resolves to an IPv6 address. This is because FortiOS 3.0 does not support IPv6 DNS. DHCP over IPsec is not supported, because FortiOS 3.0 does not support IPv6 DHCP. Selectors cannot be firewall address names. Only IP address, address range and subnet are supported. Redundant IPv6 tunnels are not supported.
Certificates
On a VPN with IPv6 phase 1 configuration, you can authenticate using VPN certificates in which the common name (cn) is an IPv6 address. The cn-type keyword of the user peer command has an option, ipv6, to support this.
1279
Phase 1 configuration
In the web-based manager, you define the Phase 1 as IPv6 in the Advanced settings. Enable the IPv6 Version check box. You can then enter an IPv6 address for the remote gateway. In the CLI, you define an IPsec phase 1 configuration as IPv6 by setting ip-version to 6. Its default value is 4. Then, the local-gw and remote-gw keywords are hidden and the corresponding local-gw6 and remote-gw6 keywords are available. The values for local-gw6 and remote-gw6 must be IPv6 addresses. For example: config vpn ipsec phase1-interface edit tunnel6 set ip-version 6 set remote-gw6 0:123:4567::1234 set interface port3 set proposal 3des-md5 end
Phase 2 configuration
To create an IPv6 IPsec phase 2 configuration in the web-based manager, you need to define IPv6 selectors in the Advanced settings. Change the default 0.0.0.0/0 address for Source address and Destination address to the IPv6 value ::/0. If needed, enter specific IPv6 addresses, address ranges or subnet addresses in these fields. In the CLI, set src-addr-type and dst-addr-type to ip6, range6 or subnet6 to specify IPv6 selectors. By default, zero selectors are entered, ::/0 for the subnet6 address type, for example. The simplest IPv6 phase 2 configuration looks like this: config vpn ipsec phase2-interface edit tunnel6_p2 set phase1name tunnel6 set proposal 3des-md5 set src-addr-type subnet6 set dst-addr-type subnet6 end
Security policies
To complete the VPN configuration, you need a security policy in each direction to permit traffic between the protected networks port and the IPsec interface. You need IPv6 policies unless the VPN is IPv4 over IPv6.
Routing
Appropriate routing is needed for both the IPsec packets and the encapsulated traffic within them. You need a route, which could be the default route, to the remote VPN gateway via the appropriate interface. You also need a route to the remote protected network via the IPsec interface.
1280
To create a static route in the web-based manager, go to Router > Static. Select the dropdown arrow on the Create New button and select IPv6 Route. Enter the information and select OK. In the CLI, use the router static6 command. For example, where the remote network is fec0:0000:0000:0004::/64 and the IPsec interface is toB: config router static6 edit 1 set device port2 set dst 0::/0 next edit 2 set device toB set dst fec0:0000:0000:0004::/64 next end If the VPN is IPV4 over IPv6, the route to the remote protected network is an IPv4 route. If the VPN is IPv6 over IPv4, the route to the remote VPN gateway is an IPv4 route.
fec
0:0
00
1:2
09
:0f
ff:f
0 1:2
9:0
e8 ff:f
3:2
5c
Po
rt 3
A ate rtiG o F
Po rt 3
fec
0:0
0:0
00
0:0
00
00
0:0
0::
00
/64
4::
/64
1281
1282
set action accept set service ANY set schedule always end
Configure FortiGate B
The configuration of FortiGate B is very similar to that of FortiGate A. A virtual IPsec interface toA is configured on port2 and its remote gateway is the public IP address of FortiGate A. Security policies enable traffic to pass between the private network and the IPsec interface. Routing ensures traffic for the private network behind FortiGate A goes through the VPN and that all IPv6 packets are routed to the public network. config system interface edit port2 config ipv6 set ip6-address fec0::0003:209:0fff:fe83:25c7/64 end next edit port3 config ipv6 set ip6-address fec0::0004:209:0fff:fe83:2569/64 end end config vpn ipsec phase1-interface edit toA set ip-version 6 set interface port2 set remote-gw6 fec0:0000:0000:0001:209:0fff:fe83:25f2 set dpd enable set psksecret maryhadalittlelamb set proposal 3des-md5 3des-sha1 end config vpn ipsec phase2-interface edit toA2 set phase1name toA set proposal 3des-md5 3des-sha1 set pfs enable set replay enable set src-addr-type subnet6 set dst-addr-type subnet6
FortiOS Handbook v3: IPsec VPNs 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1283
end config firewall policy6 edit 1 set srcintf port3 set dstintf toA set srcaddr all6 set dstaddr all6 set action accept set service ANY set schedule always next edit 2 set srcintf toA set dstintf port3 set srcaddr all6 set dstaddr all6 set action accept set service ANY set schedule always end config router static6 edit 1 set device port2 set dst 0::/0 next edit 2 set device toA set dst fec0:0000:0000:0000::/64 end
fec
0:0
00
1:2
09
:0f
ff:f
9 :20
:0f
ff:
3 fe8
:25
c7
Po
rt 3
te A iGa t r Fo
Po rt
19
2.1
19 68 .2. 0/2 4
2.1
68
.3.
0/2
1284
1285
set action accept set service ANY set schedule always end
Configure FortiGate B
The configuration of FortiGate B is very similar to that of FortiGate A. A virtual IPsec interface toA is configured on port2 and its remote gateway is the public IP address of FortiGate A. The IPsec phase 2 configuration has IPv4 selectors. IPv4 security policies enable traffic to pass between the private network and the IPsec interface. An IPv4 static route ensures traffic for the private network behind FortiGate A goes through the VPN and an IPv6 static route ensures that all IPv6 packets are routed to the public network. config system interface edit port2 config ipv6 set ip6-address fec0::0003:fe83:25c7/64 end next edit port3 set 192.168.3.1/24 end config vpn ipsec phase1-interface edit toA set ip-version 6 set interface port2 set remote-gw6 fec0:0000:0000:0001:209:0fff:fe83:25f2 set dpd enable set psksecret maryhadalittlelamb set proposal 3des-md5 3des-sha1 end config vpn ipsec phase2-interface edit toA2 set phase1name toA set proposal 3des-md5 3des-sha1 set pfs enable set replay enable end
IPsec VPNs for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1286
config firewall policy edit 1 set srcintf port3 set dstintf toA set srcaddr all set dstaddr all set action accept set service ANY set schedule always next edit 2 set srcintf toA set dstintf port3 set srcaddr all set dstaddr all set action accept set service ANY set schedule always end config router static6 edit 1 set device port2 set dst 0::/0 next edit 2 set device toA set dst 192.168.2.0/24 end
10
Po
rt 3
A ate rtiG o F
Po rt 3
fec
0:0
0:0
00
0:0
00
00
0:0
0::
00
/64
4::
/64
1287
1288
dstintf port3 srcaddr all6 dstaddr all6 action accept service ANY schedule always
Configure FortiGate B
The configuration of FortiGate B is very similar to that of FortiGate A. A virtual IPsec interface toA is configured on port2 and its remote gateway is the IPv4 public IP address of FortiGate A. The IPsec phase 2 configuration has IPv6 selectors. IPv6 security policies enable traffic to pass between the private network and the IPsec interface. An IPv6 static route ensures traffic for the private network behind FortiGate A goes through the VPN and an IPv4 static route ensures that all IPv4 packets are routed to the public network. config system interface edit port2 set 10.0.1.1/24 next edit port3 config ipv6 set ip6-address fec0::0004:209:0fff:fe83:2569/64 end config vpn ipsec phase1-interface edit toA set interface port2 set remote-gw 10.0.0.1 set dpd enable set psksecret maryhadalittlelamb set proposal 3des-md5 3des-sha1 end config vpn ipsec phase2-interface edit toA2 set phase1name toA set proposal 3des-md5 3des-sha1
FortiOS Handbook v3: IPsec VPNs 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1289
set pfs enable set replay enable set src-addr-type subnet6 set dst-addr-type subnet6 end config firewall policy6 edit 1 set srcintf port3 set dstintf toA set srcaddr all6 set dstaddr all6 set action accept set service ANY set schedule always next edit 2 set srcintf toA set dstintf port3 set srcaddr all6 set dstaddr all6 set action accept set service ANY set schedule always end config router static6 edit 1 set device toA set dst fec0:0000:0000:0000::/64 end config router static edit 1 set device port2 set gateway 10.0.1.254 end
1290
Overview
The topology of a VPN for Microsoft Windows dialup clients is very similar to that for FortiClient Endpoint Security clients.
Figure 157: Example FortiGate VPN configuration with Microsoft clients
o em
te C
lien
17
2.2
Re
mo
te C
t lien
_1 ate rtiG Fo
For users, the difference is only that instead of installing and using the FortiClient application, they configure a network connection using the software built into their operating system. Starting in FortiOS 4.0 MR2, you can configure a FortiGate unit to work with unmodified Microsoft VPN client software.
er 0 r v 17 S e 1. P 10 FT 1. er .1 rv 0 10 Se .18 b a 01 m .1 Sa .11 10
1291
1292
To create a user group - web-based manager 1 Go to User > User Group > User Group, select Create New, and enter the following information:
Name Type Available Users/Groups Members Type or edit the user group name (for example, L2TP_group). Select Firewall. The list of Local users, RADIUS servers, LDAP servers, TACACS+ servers, or PKI users that can be added to the user group. To add a member to this list, select the name and then select the right arrow button. The list of Local users, RADIUS servers, LDAP servers, TACACS+ servers, or PKI users that belong to the user group. To remove a member, select the name and then select the left arrow button.
2 Select OK. To create a user group - CLI To create the user group L2TP_group and add members User_1, User_2, and User_3, you would enter: config user group edit L2TP_group set group-type firewall set member User_1 User_2 User_3 end
Configuring L2TP
You can configure L2TP settings only in the CLI. As well as enabling L2TP, you set the range of IP address values that are assigned to L2TP clients and specify the user group that can access the VPN. For example, to allow access to users in the L2TP_group and assign them addresses in the range 192.168.0.50 to 192.168.0.59, you would enter config vpn l2tp set sip 192.168.0.50 set eip 192.168.0.59 set status enable set usrgrp "L2TP_group" end One of the security policies for the L2TP over IPsec VPN uses the client address range, so you need also need to create a firewall address for that range. For example, config firewall address edit L2TPclients set type iprange set end-ip 192.168.6.88 set start-ip 192.168.6.85 end Alternatively, you could define this range in the web-based manager.
1293
Configuring IPsec
The Microsoft VPN client uses IPsec for encryption. The configuration needed on the FortiGate unit is substantially the same as for any other IPsec VPN except that transport mode is used instead of tunnel mode the encryption and authentication proposals must be compatible with the Microsoft client
L2TP over IPsec is supported on the FortiGate unit using policy-based, not route-based configurations. Configuring phase 1 - web-based manager 1 Go to VPN > IPsec > Auto Key (IKE) and select Create Phase 1. 2 Enter the following information and then select OK.
Name Remote Gateway Local Interface Mode Authentication Method Pre-shared Key Advanced Enable IPsec Interface Mode P1 Proposal DH Group NAT Traversal Dead Peer Detection Enter a name for this VPN, dialup_p1 for example. Dialup User Select the network interface that connects to the Internet. For example, port1. Main (ID protection) Preshared Key Enter the preshared key. This key must also be entered in the Microsoft VPN client. Select Advanced to enter the following information. This must not be selected. Enter the following Encryption/Authentication pairs: AES256-MD5, 3DES-SHA1, AES192-SHA1 2 Enable Enable
Configuring phase 1 - CLI To create a phase 1 configuration called dialup_p1 on a FortiGate unit that has port1 connected to the Internet, you would enter: config vpn ipsec phase1 edit dialup_p1 set type dynamic set interface port1 set mode main set psksecret ******** set proposal aes256-md5 3des-sha1 aes192-sha1 set dhgrp 2 set nattraversal enable set dpd enable end
1294
Configuring phase 2 - web-based manager 1 Go to VPN > IPsec > Auto Key (IKE) and select Create Phase 2. 2 Enter the following information and then select OK.
Name Phase 1 Advanced P2 Proposal Enable replay detection Enable perfect forward secrecy (PFS) Keylife Enter a name for this phase 2 configuration. Select the name of the phase 1 configuration. Select Advanced to enter the following information. Enter the following Encryption/Authentication pairs: AES256-MD5, 3DES-SHA1, AES192-SHA1 Enable Disable 3600 seconds
3 Make this a transport-mode VPN. You must use the CLI to do this. If your phase 2 name is dialup_p2, you would enter: config vpn ipsec phase2 edit dialup_p2 set encapsulation transport-mode end Configuring phase 2 - CLI To configure a phase 2 to work with your phase_1 configuration, you would enter: config vpn ipsec phase2 edit dialup_p2 set phase1name dialup_p1 set proposal aes256-md5 3des-sha1 aes192-sha1 set replay enable set pfs disable set keylifeseconds 3600 set encapsulation transport-mode end
1295
Configuring the IPSEC security policy - web-based manager 1 Go to Policy > Policy and select Create New. 2 Enter the following information and then select OK:
Source Interface/Zone Source Address Destination Interface/Zone Action VPN Tunnel Allow inbound Allow outbound UTM Select the interface that connects to the private network behind this FortiGate unit. all Select the FortiGate units public interface.
Destination Address all IPSEC Select the name of the phase 1 configuration that you created. For example, dialup_p1. See Configuring IPsec on page 1294. Enable Enable Optional settings for UTM features.
Configuring the IPSEC security policy - CLI If your VPN tunnel (phase 1) is called dialup_p1, your protected network is on port2, and your public interface is port1, you would enter: config firewall policy edit 0 set srcintf port2 set dstintf port1 set srcaddr all set dstaddr all set action ipsec set schedule always set service ANY set inbound enable set outbound enable set vpntunnel dialup_p1 end Configuring the ACCEPT security policy - web-based manager 1 Go to Policy > Policy and select Create New. 2 Enter the following information and then select OK:
Source Interface/Zone Source Address Destination Interface/Zone Action UTM Select the FortiGate units public interface. Select the firewall address that you defined for the L2TP clients. Select the interface that connects to the private network behind this FortiGate unit. ACCEPT Optionally, select UTM feature profiles.
1296
Configuring the ACCEPT security policy - CLI If your public interface is port1, your protected network is on port2, and L2TPclients is the address range that L2TP clients use, you would enter: config firewall policy
edit 0 set srcintf port1 set dstintf port2 set srcaddr L2TPclients set dstaddr all set action accept set schedule always set service ANY end
1297
The instructions in this section are based on Windows XP SP3. Other versions of Windows may vary slightly. To configure the network connection 1 Open Network Connections. This is available through the Control Panel. 2 Double-click New Connection Wizard. 3 Select Next. 4 Select Connect to the network at my workplace and then select Next. 5 Select Virtual Private Network connection and then select Next. 6 In the Company Name field, enter a name for the connection and then select Next. 7 Select Do not dial the initial connection and then select Next. 8 Enter the public IP address or FQDN of the FortiGate unit and then select Next. 9 Optionally, select Add a shortcut to this connection to my desktop. 10 Select Finish. The Connect dialog opens on the desktop. 11 Select Properties and then select the Security tab. 12 Select IPSec Settings. 13 Select Use pre-shared key for authentication, enter the preshared key that you configured for your VPN, and select OK. 14 Select OK. To check that the IPSEC service is running 1 Open Administrative Tools. This is available through the Control Panel. 2 Double-click Services. 3 Look for IPSEC Services. The Startup Type should be Automatic and Status should be Started. If needed, double-click IPSEC Services to change the settings. To check that IPsec has not been disabled 1 Select Start > Run. 2 Enter regedit and select OK. 3 Find the Registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasMan\Parameters 4 If there is a ProhibitIPSec value, it must be set to 0.
1298
Troubleshooting
Troubleshooting
This section describes some checks and tools you can use to resolve issues with L2TPover-IPsec VPNs. This section includes: Quick checks Mac OS X and L2TP Setting up logging Understanding the log messages Using the FortiGate unit debug commands
Quick checks
Here is a list of common L2TP over IPsec VPN problems and the likely solutions.
Problem IPsec tunnel does not come up. What to check Check the logs to determine whether the failure is in Phase 1 or Phase 2. Check the settings, including encapsulation setting, which must be transport-mode. Check the user password. Confirm that the user is a member of the user group assigned to L2TP. On the Windows PC, check that the IPsec service is running and has not been disabled. See Configuring the Windows PC on page 1298. Did you create an ACCEPT security policy from the public network to the protected network for the L2TP clients? See Configuring security policies on page 1295.
Setting up logging
To configure FortiGate logging for L2TP over IPsec 1 Go to Log&Report > Log Config > Event Log. 2 Select the Enable check box. 3 Select the L2TP/PPTP/PPPoE service event and IPsec negotiation event check boxes. 4 Select Apply. To configure FortiGate logging level 1 Go to Log&Report > Log Config > Log Setting. 2 Select the Local Logging & Archiving check box. 3 Select the Memory check box. 4 Set Minimum log level to Information.
1299
Troubleshooting
5 Optionally, enable and configure disk logging. 6 Select Apply. To view FortiGate logs 1 Go to Log&Report > Log Access > Event. 2 Select the Memory log type. 3 After each attempt to start the L2TP over IPsec VPN, select Refresh to view any logged events.
Note: This table lists messages in top down chronological order. In the web-based manager log viewer, you need to read the messages from the bottom up. The newest message appears at the top of that list.
In Table 79, messages 1 through 4 show the IKE phase 1 negotiation stages that result in the creation of the Security Association (SA) shown in message 6. Phase 2 negotiation in messages 5, 9, 10 produce the tunnel-up condition reported in message 8. With IPsec communication established, the L2TP connection is established (message 11), the pppd daemon starts (message 12), the user is authenticated (message 13), and the L2TP tunnel is now ready to use.
1300
Troubleshooting
diagnose debug application ike -1 diagnose debug application l2tp -1 diagnose debug enable
3 Attempt to use the VPN and note the debug output in the SSH or Telnet session. 4 Enter the following command to reset debug settings to default:
diagnose debug reset
To use the packet sniffer 1 Start an SSH or Telnet session to your FortiGate unit. 2 Enter the following CLI command
diagnose sniffer packet any icmp 4
3 Attempt to use the VPN and note the debug output. 4 Enter Ctrl-C to end sniffer operation.
Typical L2TP over IPsec session startup log entries - raw format
2010-01-11 16:39:58 log_id=0101037127 type=event subtype=ipsec pri=notice vd="root" msg="progress IPsec phase 1" action="negotiate" rem_ip=172.20.120.151 loc_ip=172.20.120.141 rem_port=500 loc_port=500 out_intf="port1" cookies="5f6da1c0e4bbf680/d6a1009eb1dde780" user="N/A" group="N/A" xauth_user="N/A" xauth_group="N/A" vpn_tunnel="dialup_p1" status=success init=remote mode=main dir=outbound stage=1 role=responder result=OK 2010-01-11 16:39:58 log_id=0101037127 type=event subtype=ipsec pri=notice vd="root" msg="progress IPsec phase 1" action="negotiate" rem_ip=172.20.120.151 loc_ip=172.20.120.141 rem_port=500 loc_port=500 out_intf="port1" cookies="5f6da1c0e4bbf680/d6a1009eb1dde780" user="N/A" group="N/A" xauth_user="N/A" xauth_group="N/A" vpn_tunnel="dialup_p1" status=success init=remote mode=main dir=outbound stage=2 role=responder result=OK 2010-01-11 16:39:58 log_id=0101037127 type=event subtype=ipsec pri=notice vd="root" msg="progress IPsec phase 1" action="negotiate" rem_ip=172.20.120.151 loc_ip=172.20.120.141 rem_port=500 loc_port=500 out_intf="port1" cookies="5f6da1c0e4bbf680/d6a1009eb1dde780" user="N/A" group="N/A" xauth_user="N/A" xauth_group="N/A" vpn_tunnel="dialup_p1" status=success init=remote mode=main dir=inbound stage=3 role=responder result=DONE 2010-01-11 16:39:58 log_id=0101037127 type=event subtype=ipsec pri=notice vd="root" msg="progress IPsec phase 1" action="negotiate" rem_ip=172.20.120.151 loc_ip=172.20.120.141 rem_port=500 loc_port=500 out_intf="port1" cookies="5f6da1c0e4bbf680/d6a1009eb1dde780" user="N/A" group="N/A" xauth_user="N/A" xauth_group="N/A" vpn_tunnel="dialup_p1_0" status=success init=remote mode=main dir=outbound stage=3 role=responder result=DONE 2010-01-11 16:39:58 log_id=0101037129 type=event subtype=ipsec pri=notice vd="root" msg="progress IPsec phase 2" action="negotiate" rem_ip=172.20.120.151 loc_ip=172.20.120.141 rem_port=500 loc_port=500 out_intf="port1" cookies="5f6da1c0e4bbf680/d6a1009eb1dde780" user="N/A" group="N/A" xauth_user="N/A" xauth_group="N/A" vpn_tunnel="dialup_p1_0" status=success init=remote mode=quick dir=outbound stage=1 role=responder result=OK
1301
Troubleshooting
2010-01-11 16:39:58 log_id=0101037133 type=event subtype=ipsec pri=notice vd="root" msg="install IPsec SA" action="install_sa" rem_ip=172.20.120.151 loc_ip=172.20.120.141 rem_port=500 loc_port=500 out_intf="port1" cookies="5f6da1c0e4bbf680/d6a1009eb1dde780" user="N/A" group="N/A" xauth_user="N/A" xauth_group="N/A" vpn_tunnel="dialup_p1_0" role=responder in_spi=61100fe2 out_spi=bd70fca1 2010-01-11 16:39:58 log_id=0101037139 type=event subtype=ipsec pri=notice vd="root" msg="IPsec phase 2 status change" action="phase2-up" rem_ip=172.20.120.151 loc_ip=172.20.120.141 rem_port=500 loc_port=500 out_intf="port1" cookies="5f6da1c0e4bbf680/d6a1009eb1dde780" user="N/A" group="N/A" xauth_user="N/A" xauth_group="N/A" vpn_tunnel="dialup_p1_0" phase2_name=dialup_p2 2010-01-11 16:39:58 log_id=0101037138 type=event subtype=ipsec pri=notice vd="root" msg="IPsec connection status change" action="tunnel-up" rem_ip=172.20.120.151 loc_ip=172.20.120.141 rem_port=500 loc_port=500 out_intf="port1" cookies="5f6da1c0e4bbf680/d6a1009eb1dde780" user="N/A" group="N/A" xauth_user="N/A" xauth_group="N/A" vpn_tunnel="dialup_p1_0" tunnel_ip=172.20.120.151 tunnel_id=1552003005 tunnel_type=ipsec duration=0 sent=0 rcvd=0 next_stat=0 tunnel=dialup_p1_0 2010-01-11 16:39:58 log_id=0101037129 type=event subtype=ipsec pri=notice vd="root" msg="progress IPsec phase 2" action="negotiate" rem_ip=172.20.120.151 loc_ip=172.20.120.141 rem_port=500 loc_port=500 out_intf="port1" cookies="5f6da1c0e4bbf680/d6a1009eb1dde780" user="N/A" group="N/A" xauth_user="N/A" xauth_group="N/A" vpn_tunnel="dialup_p1_0" status=success init=remote mode=quick dir=inbound stage=2 role=responder result=DONE 2010-01-11 16:39:58 log_id=0101037122 type=event subtype=ipsec pri=notice vd="root" msg="negotiate IPsec phase 2" action="negotiate" rem_ip=172.20.120.151 loc_ip=172.20.120.141 rem_port=500 loc_port=500 out_intf="port1" cookies="5f6da1c0e4bbf680/d6a1009eb1dde780" user="N/A" group="N/A" xauth_user="N/A" xauth_group="N/A" vpn_tunnel="dialup_p1_0" status=success role=responder esp_transform=ESP_3DES esp_auth=HMAC_SHA1 2010-01-11 16:39:58 log_id=0103031008 type=event subtype=ppp vd=root pri=information action=connect status=success msg="Client 172.20.120.151 control connection started (id 805), assigned ip 192.168.6.85" 2010-01-11 16:39:58 log_id=0103029013 type=event subtype=ppp vd=root pri=notice pppd is started 2010-01-11 16:39:58 log_id=0103029002 type=event subtype=ppp vd=root pri=notice user="user1" local=172.20.120.141 remote=172.20.120.151 assigned=192.168.6.85 action=auth_success msg="User 'user1' using l2tp with authentication protocol MSCHAP_V2, succeeded" 2010-01-11 16:39:58 log_id=0103031101 type=event subtype=ppp vd=root pri=information action=tunnel-up tunnel_id=1645784497 tunnel_type=l2tp remote_ip=172.20.120.151 tunnel_ip=192.168.6.85 user="user1" group="L2TPusers" msg="L2TP tunnel established"
1302
Overview
Cisco products that include VPN support often use Generic Routing Encapsulation (GRE) protocol tunnel over IPsec encryption. This chapter describes how to configure a FortiGate unit to work with this type of Cisco VPN. Cisco VPNs can use either transport mode or tunnel mode IPsec. Before FortiOS 4.0 MR2, the FortiGate unit was compatible only with tunnel mode IPsec.
Figure 158: Example FortiGate to Cisco GRE-over-IPsec VPN
te iGa ort
rt 1 20 Po .20.1 2 17
.14
1 8 .16 13 .5.1
Cis
co
rou
192
ter
1303
1304
To configure the IPsec VPN - web-based manager 1 Define the phase 1 configuration needed to establish a secure connection with the remote Cisco device. Enter these settings in particular:
Name Enter a name to identify the VPN tunnel, tocisco for example. This is the name of the virtual IPsec interface. It appears in phase 2 configurations, security policies and the VPN monitor. Select Static IP Address. Enter the IP address of the Cisco device public interface. For example, 192.168.5.113 Select the FortiGate units public interface. For example, 172.20.120.141 Select Main (ID Protection). Preshared Key Enter the preshared key. It must match the preshared key on the Cisco device. Select the Advanced button to see the following settings. Enable. 3DES-MD5 At least one proposal must match the settings on the Cisco unit.
Remote Gateway IP Address Local Interface Mode Authentication Method Pre-shared Key Advanced Enable IPsec Interface Mode P1 Proposal
For more information about these settings, see Auto Key phase 1 parameters on page 1321. 2 Define the phase 2 parameters needed to create a VPN tunnel with the remote peer. For compatibility with the Cisco router, Quick Mode Selectors must be entered, which includes specifying protocol 47, the GRE protocol. Enter these settings in particular:
Name Phase 1 Advanced P2 Proposal Quick Mode Selector Source Address Source Port Destination Address Destination Port Protocol Enter the GRE local tunnel end IP address. For example 172.20.120.141 0 Enter the GRE remote tunnel end IP address. For example 192.168.5.113 0 47 Enter a name to identify this phase 2 configuration. Select the name of the phase 1 configuration that you defined in Step 1. Select Advanced to view the following fields. 3DES-MD5 At least one proposal must match the settings on the Cisco unit.
For more information about these settings, see Phase 2 parameters on page 1337.
1305
3 If the Cisco device is configured to use transport mode IPsec, you need to use transport mode on the FortiGate VPN. You can configure this only in the CLI. In your phase 2 configuration, set encapsulation to transport-mode (default is tunnel-mode) as follows: config vpn phase2-interface edit to_cisco_p2 set encapsulation transport-mode end To configure the IPsec VPN - CLI config vpn ipsec phase1-interface edit tocisco set interface port1 set proposal 3des-sha1 aes128-sha1 set remote-gw 192.168.5.113 set psksecret xxxxxxxxxxxxxxxx end config vpn ipsec phase2-interface edit tocisco_p2 set phase1name "tocisco" set proposal 3des-md5 set encapsulation tunnel-mode // if tunnel mode set encapsulation transport-mode // if transport mode set protocol 47 set src-addr-type ip set dst-start-ip 192.168.5.113 set src-start-ip 172.20.120.141 end
1306
To configure security policies - web-based manager 1 Define an ACCEPT security policy to permit communications between the protected network and the GRE tunnel:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action NAT Select the interface that connects to the private network behind this FortiGate unit. All Select the GRE tunnel virtual interface you configured. All ACCEPT Disable.
2 To permit the remote client to initiate communication, you need to define a security policy for communication in that direction:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action NAT Select the GRE tunnel virtual interface you configured. All Select the interface that connects to the private network behind this FortiGate unit. All ACCEPT. Disable.
1307
3 Define a pair of ACCEPT security policies to permit traffic to flow between the GRE virtual interface and the IPsec virtual interface:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action NAT Select the GRE virtual interface. See Configuring the GRE tunnel on page 1306. All Select the virtual IPsec interface you created. See Configuring the IPsec VPN on page 1304. All ACCEPT. Disable.
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Action NAT
Select the virtual IPsec interface you created. See Configuring the IPsec VPN on page 1304. All Select the GRE virtual interface. See Configuring the GRE tunnel on page 1306. All Select ACCEPT. Disable.
To configure security policies - CLI config firewall policy edit 1 set srcintf port2 set dstintf gre1 set srcaddr all set dstaddr all set action accept set schedule always set service ANY next edit 2 set srcintf gre1 set dstintf port2 set srcaddr all set dstaddr all set action accept set schedule always set service ANY next edit 3 set srcintf "gre1" set dstintf "tocisco" set srcaddr "all" set dstaddr "all" set action accept set schedule "always" set service "ANY" next // LAN to GRE tunnel
1308
edit 4 set srcintf "tocisco" set dstintf "gre1" set srcaddr "all" set dstaddr "all" set action accept set schedule "always" set service "ANY" end
Configuring routing
Traffic destined for the network behind the Cisco router must be routed to the GRE tunnel. To do this, create a static route as follows:
Destination IP/Mask Enter the IP address and netmask for the network behind the Cisco router. For example 10.21.101.0 255.255.255.0 Device Distance Select the GRE virtual interface. Leave setting at default value.
In the CLI, using the example values, you would enter config router static edit 0 set device gre1 set dst 10.21.101.0 255.255.255.0 end
1309
Troubleshooting
Troubleshooting
This section describes some checks and tools you can use to resolve issues with the GRE-over-IPsec VPN.
Quick checks
Here is a list of common problems and what to verify.
Problem No communication with remote network. What to check Use the execute ping command to ping the Cisco device public interface. Use the FortiGate VPN Monitor page to see whether the IPsec tunnel is up or can be brought up. Check the logs to determine whether the failure is in Phase 1 or Phase 2. Check that the encryption and authentication settings match those on the Cisco device. Check the encapsulation setting: tunnel-mode or transport-mode. Both devices must use the same mode. Check the security policies. See Configuring security policies on page 1307. Check routing. See Configuring routing on page 1309.
Setting up logging
To configure FortiGate logging for IPsec 1 Go to Log&Report > Log Config > Event Log. 2 Select the Enable check box. 3 Select the IPsec negotiation event check box. 4 Select Apply. To configure FortiGate logging level 1 Go to Log&Report > Log Config > Log Setting. 2 Select the Local Logging & Archiving check box. 3 Select the Memory check box. 4 Set Minimum log level to Information. 5 Optionally, enable and configure disk logging. 6 Select Apply. To view FortiGate logs 1 Go to Log & Report > Log Access > Event. 2 Select the Memory log type. 3 Select Refresh to view any logged events.
1310
Troubleshooting
Table 80: Typical sequence of log messages for IPsec VPN connection startup ID 1 2 3 4 5 6 7 8 37127 37127 37127 37127 37129 37133 37139 37138 Sub Type ipsec ipsec ipsec ipsec ipsec ipsec ipsec ipsec Action negotiate negotiate negotiate negotiate negotiate install_sa phase2-up tunnel-up Message progress IPsec phase 1 progress IPsec phase 1 progress IPsec phase 1 progress IPsec phase 1 progress IPsec phase 2 install IPsec SA IPsec phase 2 status change IPsec connection status change
Note: This table lists messages in top down chronological order. In the web-based manager log viewer, you need to read the messages from the bottom up. The newest message appears at the top of that list.
2 Attempt to use the VPN and note the debug output. 3 Enter the following command to reset debug settings to default:
diagnose debug reset
1311
Troubleshooting
1312
Overview
This chapter shows an example of OSPF routing conducted over an IPsec tunnel between two FortiGate units. The network shown in Figure 159 is a single OSPF area. FortiGate_1 is an Area border router that advertises a static route to 10.22.10.0/24 in OSPF. FortiGate_2 advertises its local LAN as an OSPF internal route.
Figure 159: OSPF over an IPsec VPN tunnel
10
.1 .22
0.0
/24 41
19 2.1 P 68 ort .0. 2 13 1 Fo rtiG ate _2 Po rt
ort
iGa
1 te_
.1 rt 2 20 Po .20.1 172
Port3 10.1.1.1
1 ort
10.1.2.1
10.1.2.2
The section OSPF over IPsec configuration describes the configuration with only one IPsec VPN tunnel, tunnel_wan1. Then, the section Creating a redundant configuration on page 1319 describes how you can add a second tunnel to provide a redundant backup path. This is shown in Figure 159 as VPN tunnel tunnel_wan2. Only the parts of the configuration concerned with creating the IPsec tunnel and integrating it into the OSPF network are described. It is assumed that security policies are already in place to allow traffic to flow between the interfaces on each FortiGate unit.
1313
This section describes the configuration with only one VPN, tunnel_wan1. The other VPN is added in the section Creating a redundant configuration on page 1319.
To assign the tunnel end IP addresses 1 Go to System > Network > Interface and select the Edit icon for the virtual IPsec interface that you just created on Port 2. 2 In the IP and Remote IP fields, enter the following tunnel end addresses:
FortiGate_1 IP Remote_IP 10.1.1.1 10.1.1.2 FortiGate_2 10.1.1.2 10.1.1.1
These addresses are from a network that is not used for anything else.
1314
To configure Phase 2 1 Define the phase 2 parameters needed to create a VPN tunnel with the remote peer. For more information, see Phase 2 parameters on page 1337. Enter these settings in particular:
Name Phase 1 Enter a name to identify this phase 2 configuration, twan1_p2, for example. Select the name of the phase 1 configuration that you defined in Step 1, tunnel_wan1 for example.
Configuring OSPF
This section does not attempt to explain OSPF router configuration. It focusses on the integration of the IPsec tunnel into the OSPF network. This is accomplished by assigning the tunnel as an OSPF interface, creating an OSPF route to the other FortiGate unit. This configuration uses loopback interfaces to ease OSPF troubleshooting. The OSPF router ID is set to the loopback interface address.The loopback interface ensures the router is always up. Even though technically the router ID doesnt have to match a valid IP address on the FortiGate unit, having an IP that matches the router ID makes troubleshooting a lot easier. The two FortiGate units have slightly different configurations. FortiGate_1 is an AS border router that advertises its static default route. FortiGate_2 advertises its local LAN as an OSPF internal route. Setting the router ID for each FortiGate unit to the lowest possible value is useful if you want the FortiGate units to be the designated router (DR) for their respective ASes. This is the router that broadcasts the updates for the AS. Leaving the IP address on the OSPF interface at 0.0.0.0 indicates that all potential routes will be advertised, and it will not be limited to any specific subnet. For example if this IP address was 10.1.0.0, then only routes that match that subnet will be advertised through this interface in OSPF.
1315
To create the loopback interface A loopback interface can be configured in the CLI only. For example, if the interface will have an IP address of 10.0.0.1, you would enter: config system interface edit lback1 set vdom root set ip 10.0.0.1 255.255.255.255 set type loopback end The loopback addresses and corresponding router IDs on the two FortiGate units must be different. For example, set the FortiGate 1 loopback to 10.0.0.1 and the FortiGate 2 loopback to 10.0.0.2. To configure OSPF area, networks, and interfaces - web-based manager 1 On FortiGate_1, go to Router > Dynamic > OSPF and enter the following information to define the router, area, and interface information.
Router ID Advanced Options Redistribute Areas Area Type Interfaces Name Interface IP Enter a name for the OSPF interface, ospf_wan1 for example. Select the virtual IPsec interface, tunnel_wan1. 0.0.0.0 Select the Connected and Static check boxes. Use their default metric values. Select Create New, enter the Area and Type and then select OK. 0.0.0.0 Regular Enter 10.0.0.1. Select Apply before entering the remaining information.
6 Select Apply.
1316
To configure OSPF area and interfaces - CLI Your loopback interface is 10.0.0.1, your tunnel ends are on the 10.1.1.0/24 network, and your virtual IPsec interface is named tunnel_wan1. Enter the following CLI commands: config router ospf set router-id 10.0.0.1 config area edit 0.0.0.0 end config network edit 4 set prefix 10.1.1.0 255.255.255.0 next edit 2 set prefix 10.0.0.1 255.255.255.255 end config ospf-interface edit ospf_wan1 set cost 10 set interface tunnel_wan1 set network-type point-to-point end config redistribute connected set status enable end config redistribute static set status enable end end
1317
To configure OSPF area and interfaces - web-based manager 1 On FortiGate_2, go to Router > Dynamic > OSPF. 2 For Router ID, enter 10.0.0.2.
Router ID Areas Area Type Interfaces Name Interface IP Enter a name for the OSPF interface, ospf_wan1 for example. Select the virtual IPsec interface, tunnel_wan1 0.0.0.0 10.0.0.2 Select Create New, enter the Area and Type and then select OK. 0.0.0.0 Regular
3 For Networks, select Create New. 4 Enter the following information for the loopback interface:
IP/Netmask Area 10.0.0.2/255.255.255.255 0.0.0.0
5 For Networks, select Create New. 6 Enter the following information for the tunnel interface:
IP/Netmask Area
10.1.1.0/255.255.255.0
0.0.0.0
7 For Networks, select Create New. 8 Enter the following information for the local LAN interface:
IP/Netmask Area
10.31.101.0/255.255.255.0
0.0.0.0
9 Select Apply. To configure OSPF area and interfaces - CLI If for example, your loopback interface is 10.0.0.2, your tunnel ends are on the 10.1.1.0/24 network, your local LAN is 10.31.101.0/24, and your virtual IPsec interface is named tunnel_wan1, you would enter: config router ospf set router-id 10.0.0.2 config area edit 0.0.0.0 end config network edit 1 set prefix 10.1.1.0 255.255.255.0 next
IPsec VPNs for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1318
edit 2 set prefix 10.31.101.0 255.255.255.0 next edit 2 set prefix 10.0.0.2 255.255.255.255 end config ospf-interface edit ospf_wan1 set interface tunnel_wan1 set network-type point-to-point end end
1319
If the new tunnel is called tunnel_wan2, you would enter the following on both FortiGate units: config router ospf config ospf-interface edit ospf_wan2 set cost 200 set interface tunnel_wan2 set network-type point-to-point end end
1320
The following topics are included in this section: Overview Defining the tunnel ends Choosing main mode or aggressive mode Authenticating the FortiGate unit Authenticating remote peers and clients Defining IKE negotiation parameters Using XAuth authentication
Overview
IPsec phase 1 settings define: the ends of the IPsec tunnel, remote and local whether the various phase 1 parameters are exchanged in multiple rounds with encrypted authentication information (main mode) or in a single message with authentication information that is not encrypted (aggressive mode) whether a preshared key or digital certificates will be used to authenticate the FortiGate unit to the VPN peer or dialup client whether the VPN peer or dialup client is required to authenticate to the FortiGate unit. A remote peer or dialup client can authenticate by peer ID or, if the FortiGate unit authenticates by certificate, it can authenticate by peer certificate. the IKE negotiation proposals for encryption and authentication optional XAuth authentication, which requires the remote user to enter a user name and password. A FortiGate VPN server can act as an XAuth server to authenticate dialup users. A FortiGate unit that is a dialup client can also be configured as an XAuth client to authenticate itself to the VPN server.
1321
The phase 1 configuration mainly defines the ends of the IPsec tunnel. The remote end is the remote gateway with which the FortiGate unit exchanges IPsec packets. The local end is FortiGate interface that sends and receives IPsec packets. The remote gateway can be: a static IP address a domain name with a dynamic IP address a dialup client
A statically addressed remote gateway is the simplest to configure. You specify the IP address. Unless restricted in the security policy, either the remote peer or a peer on the network behind the FortiGate unit can bring up the tunnel. If the remote peer has a domain name and subscribes to a dynamic DNS service, you need to specify only the domain name. The FortiGate unit performs a DNS query to determine the appropriate IP address. Unless restricted in the security policy, either the remote peer or a peer on the network behind the FortiGate unit can bring up the tunnel. If the remote peer is a dialup client, only the dialup client can bring up the tunnel. The IP address of the client is not known until it connects to the FortiGate unit. This configuration is a typical way to provide a VPN for client PCs running VPN client software such as the FortiClient Endpoint Security application. The local end of the VPN tunnel, the Local Interface, is the FortiGate interface that sends and receives the IPsec packets. This is usually the public interface of the FortiGate unit that is connected to the Internet. Packets from this interface pass to the private network through a security policy.
Note: Local Interface for a Phase 1 should not be configured to point to a loopback interface. By design, the IPSec tunnel will not be established.
By default, the local VPN gateway is the IP address of the selected Local Interface. If you are configuring an interface mode VPN, you can optionally specify a secondary IP address of the Local Interface as the local gateway.
Although Main mode is more secure, you must select Aggressive mode if there is more than one dialup phase 1 configuration for the interface IP address, and the remote VPN peer or client is authenticated using an identifier (local ID). Descriptions of the peer options in this guide indicate whether Main or Aggressive mode is required.
1322
IKEv2, defined in RFC 4306, simplifies the negotiation process that creates the security association (SA). If you select IKEv2: There is no choice in Phase 1 of Aggressive or Main mode. FortiOS does not support Peer Options or Local ID. Extended Authentication (XAUTH) is not available. You can select only one DH Group.
Local Interface
Authentication Method
1323
Certificate Name
Select the name of the server certificate that the FortiGate unit will use to authenticate itself to the remote peer or dialup client during phase 1 negotiations. To obtain and load the required server certificate, see the FortiGate Certificate Management User Guide. Peer options define the authentication requirements for remote peers or dialup clients, not for the FortiGate unit itself. For more information, see Authenticating remote peers and clients on page 1325. You can retain the default settings unless changes are needed to meet your specific requirements. See Defining IKE negotiation parameters on page 1330.
Peer Options
Advanced
4 If you are configuring authentication parameters for a dialup user group, optionally define extended authentication (XAuth) parameters. See Using the FortiGate unit as an XAuth server on page 1335. 5 Select OK.
1324
Peer options
Advanced
4 If you are configuring authentication parameters for a dialup user group, optionally define extended authentication (XAuth) parameters. See Using the FortiGate unit as an XAuth server on page 1335. 5 Select OK.
1325
You can permit access only for remote peers or clients that have certain peer identifier (local ID) value configured. This is available with both certificate and preshared key authentication. See Enabling VPN access by peer identifier on page 1328. You can permit access to remote peers or dialup clients who each have a unique preshared key. Each peer or client must have a user account on the FortiGate unit. See Enabling VPN access with user accounts and pre-shared keys on page 1329. You can permit access to remote peers or dialup clients who each have a unique peer ID and a unique preshared key. Each peer or client must have a user account on the FortiGate unit. See Enabling VPN access with user accounts and pre-shared keys on page 1329.
For authentication of users of the remote peer or dialup client device, see Using XAuth authentication on page 1334.
1326
The value that you specify to identify the entry (for example, CA_FG1000) is displayed in the Accept this peer certificate only list in the IPsec phase 1 configuration when you return to the web-based manager. For more information about these CLI commands, see the user chapter of the FortiGate CLI Reference. A group of certificate holders can be created based on existing user accounts for dialup clients. To create the user accounts for dialup clients, see the User chapter of the FortiGate Administration Guide. To create the certificate group afterward, use the config user peergrp CLI command. See the user chapter of the FortiGate CLI Reference. To view server certificate information and obtain the local DN 1 Go to System > Certificates > Local Certificates.
2 Note the CN value in the Subject field (for example, CN = 172.16.10.125, CN = info@fortinet.com, or CN = www.example.com). To view CA root certificate information and obtain the CA certificate name 1 Go to System > Certificates > CA Certificates.
1327
1328
3 Select Advanced > Edit > Advanced. 4 Under Policy, select Config. 5 In the Local ID field, type the identifier that will be shared by all dialup clients. This value must match the Accept this peer ID value that you specified previously in the phase 1 gateway configuration on the FortiGate unit. 6 Select OK to close all dialog boxes. 7 Configure all dialup clients the same way using the same preshared key and local ID.
1329
To configure FortiClient dialup clients - pre-shared key and peer ID 1 Start the FortiClient Endpoint Security application. 2 Go to VPN > Connections, select the existing configuration. 3 Select Advanced > Edit. 4 In the Preshared Key field, type the FortiGate password that belongs to the dialup client (for example, 1234546). The user account password will be used as the preshared key. 5 Select Advanced. 6 Under Policy, select Config. 7 In the Local ID field, type the FortiGate user name that you assigned previously to the dialup client (for example, FortiC1ient1). 8 Select OK to close all dialog boxes. Configure all FortiClient dialup clients this way using unique preshared keys and local IDs. Follow this procedure to add a unique pre-shared key to an existing FortiClient configuration. To configure FortiClient dialup clients - preshared key only 1 Start the FortiClient Endpoint Security application. 2 Go to VPN > Connections, select the existing configuration 3 Select Advanced > Edit. 4 In the Preshared Key field, type the user name, followed by a + sign, followed by the password that you specified previously in the user account settings on the FortiGate unit (for example, FC2+1FG6LK) 5 Select OK to close all dialog boxes. Configure all the FortiClient dialup clients this way using their unique peer ID and preshared key values.
1330
Phase 1 negotiations (in main mode or aggressive mode) begin as soon as a remote VPN peer or client attempts to establish a connection with the FortiGate unit. Initially, the remote peer or dialup client sends the FortiGate unit a list of potential cryptographic parameters along with a session ID. The FortiGate unit compares those parameters to its own list of advanced phase 1 parameters and responds with its choice of matching parameters to use for authenticating and encrypting packets. The two peers handle the exchange of encryption keys between them, and authenticate the exchange through a preshared key or a digital signature.
When you use a preshared key (shared secret) to set up two-party authentication, the remote VPN peer or client and the FortiGate unit must both be configured with the same preshared key. Each party uses a session key derived from the Diffie-Hellman exchange to create an authentication key, which is used to sign a known combination of inputs using an authentication algorithm (such as HMAC-MD5, HMAC-SHA-1, or HMAC-SHA-256). Hash-based Message Authentication Code (HMAC) is a method for calculating an authentication code using a hash function plus a secret key, and is defined in RFC 2104. Each party signs a different combination of inputs and the other party verifies that the same result can be computed.
Note: SHA-256, SHA-384 and SHA-512 are not accelerated by some FortiASIC processors (including FortiASIC network processors and security processors). As a result, using SHA-256, SHA-384 and SHA-512 may reduce the performance of the FortiGate unit more significantly than SHA-1 which is accelerated by all FortiASIC processors.
When you use preshared keys to authenticate VPN peers or clients, you must distribute matching information to all VPN peers and/or clients whenever the preshared key changes. As an alternative, the remote peer or dialup client and FortiGate unit can exchange digital signatures to validate each others identity with respect to their public keys. In this case, the required digital certificates must be installed on the remote peer and on the FortiGate unit. By exchanging certificate DNs, the signed server certificate on one peer is validated by the presence of the root certificate installed on the other peer.
1331
The following procedure assumes that you already have a phase 1 definition that describes how remote VPN peers and clients will be authenticated when they attempt to connect to a local FortiGate unit. For information about the Local ID and XAuth options, see Enabling VPN access with user accounts and pre-shared keys on page 1329 and Using the FortiGate unit as an XAuth server on page 1335. Follow this procedure to add IKE negotiation parameters to the existing definition.
1332
DH Group
Select one or more Diffie-Hellman groups from DH group 1, 2, and 5. When using aggressive mode, DH groups cannot be negotiated. If both VPN peers (or a VPN server and its client) have static IP addresses and use aggressive mode, select a single DH group. The setting on the FortiGate unit must be identical to the setting on the remote peer or dialup client. When the remote VPN peer or client has a dynamic IP address and uses aggressive mode, select up to three DH groups on the FortiGate unit and one DH group on the remote peer or dialup client. The setting on the remote peer or dialup client must be identical to one of the selections on the FortiGate unit. If the VPN peer or client employs main mode, you can select multiple DH groups. At least one of the settings on the remote peer or dialup client must be identical to the selections on the FortiGate unit. Type the amount of time (in seconds) that will be allowed to pass before the IKE encryption key expires. When the key expires, a new key is generated without interrupting service. The keylife can be from 120 to 172800 seconds. Enable this option if a NAT device exists between the local FortiGate unit and the VPN peer or client. The local FortiGate unit and the VPN peer or client must have the same NAT traversal setting (both selected or both cleared). When in doubt, enable NAT-traversal. See NAT traversal on page 1333. If you enabled NAT traversal, enter a keepalive frequency setting. The value represents an interval from 0 to 900 seconds where the connection will be maintained with no activity. For additional security this value should be as low as possible. See NAT keepalive frequency on page 1334. Enable this option to reestablish VPN tunnels on idle connections and clean up dead IKE peers if required. This feature minimizes the traffic required to check if a VPN peer is available or unavailable (dead). See Dead peer detection on page 1334.
Keylife
Nat-traversal
Keepalive Frequency
4 Select OK.
NAT traversal
Network Address Translation (NAT) is a way to convert private IP addresses to publicly routable Internet addresses and vise versa. When an IP packet passes through a NAT device, the source or destination address in the IP header is modified. FortiGate units support NAT version 1 (encapsulate on port 500 with non-IKE marker), version 3 (encapsulate on port 4500 with non-ESP marker), and compatible versions. NAT cannot be performed on IPsec packets in ESP tunnel mode because the packets do not contain a port number. As a result, the packets cannot be demultiplexed. To work around this, the FortiGate unit provides a way to protect IPsec packet headers from NAT modifications. When the Nat-traversal option is enabled, outbound encrypted packets are wrapped inside a UDP IP header that contains a port number. This extra encapsulation allows NAT devices to change the port number without modifying the IPsec packet directly. To provide the extra layer of encapsulation on IPsec packets, the Nat-traversal option must be enabled whenever a NAT device exists between two FortiGate VPN peers or a FortiGate unit and a dialup client such as FortiClient. On the receiving end, the FortiGate unit or FortiClient removes the extra layer of encapsulation before decrypting the packet.
1333
1334
To authenticate a dialup user group using XAuth settings Before you begin, create user accounts and user groups to identify the dialup clients that need to access the network behind the FortiGate dialup server. If password protection will be provided through an external RADIUS or LDAP server, you must configure the FortiGate dialup server to forward authentication requests to the authentication server. For information about these topics, see the User chapter of the FortiGate Administration Guide. 1 At the FortiGate dialup server, go to VPN > IPSEC > Auto Key (IKE). 2 In the list, select the Edit icon of a phase 1 configuration to edit its parameters for a particular remote gateway. 3 Select Advanced. 4 Under XAuth, select Enable as Server. 5 The Server Type setting determines the type of encryption method to use between the XAuth client, the FortiGate unit and the authentication server. Select one of the following options: PAPPassword Authentication Protocol. CHAP Challenge-Handshake Authentication Protocol. AUTOUse PAP between the XAuth client and the FortiGate unit, and CHAP between the FortiGate unit and the authentication server. 6 From the User Group list, select the user group that needs to access the private network behind the FortiGate unit. The group must be added to the FortiGate configuration before it can be selected here. 7 Select OK.
1335
1336
Phase 2 parameters
This section describes the phase 2 parameters that are required to establish communication through a VPN. The following topics are included in this section: Basic phase 2 settings Advanced phase 2 settings Configure the phase 2 parameters
The information and procedures in this section do not apply to VPN peers that perform negotiations using manual keys. Refer to Manual-key configurations on page 1277 instead.
1337
Phase 2 parameters
P2 Proposal
In phase 2, the FortiGate unit and the VPN peer or client exchange keys again to establish a secure communication channel between them. The P2 Proposal parameters select the encryption and authentication algorithms needed to generate keys for protecting the implementation details of Security Associations (SAs). The keys are generated automatically using a Diffie-Hellman algorithm.
Replay detection
IPsec tunnels can be vulnerable to replay attacks. Replay detection enables the FortiGate unit to check all IPsec packets to see if they have been received before. If any encrypted packets arrive out of order, the FortiGate unit discards them.
Keylife
The Keylife setting sets a limit on the length of time that a phase 2 key can be used. Alternatively, you can set a limit on the number of kilobytes (KB) of processed data, or both. If you select both, the key expires when either the time has passed or the number of KB have been processed. When the phase 2 key expires, a new key is generated without interrupting service.
Auto-negotiate
By default, the phase 2 security association (SA) is not negotiated until a peer attempts to send data. The triggering packet and some subsequent packets are dropped until the SA is established. Applications normally resend this data, so there is no loss, but there might be a noticeable delay in response to the user.
1338
Phase 2 parameters
Automatically establishing the SA can also be important on a dialup peer. This ensures that the VPN tunnel is available for peers at the server end to initiate traffic to the dialup peer. Otherwise, the VPN tunnel does not exist until the dialup peer initiates traffic. When enabled, auto-negotiate initiates the phase 2 SA negotiation automatically, repeating every five seconds until the SA is established. The auto-negotiate feature is available only through the Command Line Interface (CLI). Use the following commands to enable it. config vpn ipsec phase2 edit <phase2_name> set auto-negotiate enable end If the tunnel ever goes down, the auto-negotiate feature will try to re-establish it. However, the Autokey Keep Alive feature is a better way to keep your VPN up.
DHCP-IPsec
Select this option if the FortiGate unit assigns VIP addresses to FortiClient dialup clients through a DHCP server or relay. This option is available only if the Remote Gateway in the phase 1 configuration is set to Dialup User and it works only on policy-based VPNs. The DHCP-IPsec option causes the FortiGate dialup server to act as a proxy for FortiClient dialup clients that have VIP addresses on the subnet of the private network behind the FortiGate unit. In this case, the FortiGate dialup server acts as a proxy on the local private network for the FortiClient dialup client. When a host on the network behind the dialup server issues an ARP request that corresponds to the device MAC address of the FortiClient host, the FortiGate unit answers the ARP request on behalf of the FortiClient host and forwards the associated traffic to the FortiClient host through the tunnel.
1339
Phase 2 parameters
The quick mode selectors allow IKE negotiations only for peers that match the specified configuration. This does not control traffic on the VPN. Access to IPsec VPN tunnels is controlled through security policies.
1340
Phase 2 parameters
Encryption
Authentication
Enable perfect Enable or disable PFS. Perfect forward secrecy (PFS) improves security by forward secrecy forcing a new Diffie-Hellman exchange whenever keylife expires. (PFS) DH Group Select one Diffie-Hellman group (1, 2, 5, or 14). The remote peer or dialup client must be configured to use the same group.
1341
Phase 2 parameters
Keylife
Select the method for determining when the phase 2 key expires: Seconds, KBytes, or Both. If you select Both, the key expires when either the time has passed or the number of KB have been processed. The range is from 120 to 172800 seconds, or from 5120 to 2147483648 KB. Enable the option if you want the tunnel to remain active when no data is being processed. Select Enable if the FortiGate unit acts as a dialup server and FortiGate DHCP server or relay will be used to assign VIP addresses to FortiClient dialup clients. The DHCP server or relay parameters must be configured separately. If the FortiGate unit acts as a dialup server and the FortiClient dialup client VIP addresses match the network behind the dialup server, select Enable to cause the FortiGate unit to act as a proxy for the dialup clients. This is available only for phase 2 configurations associated with a dialup phase 1 configuration. It works only on policy-based VPNs. Optionally specify the source and destination IP addresses to be used as selectors for IKE negotiations. If the FortiGate unit is a dialup server, the default value 0.0.0.0/0 should be kept unless you need to circumvent problems caused by ambiguous IP addresses between one or more of the private networks making up the VPN. You can specify a single host IP address, an IP address range, or a network address. You may optionally specify source and destination port numbers and/or a protocol number. If you are editing an existing phase 2 configuration, the Source address and Destination address fields are unavailable if the tunnel has been configured to use firewall addresses as selectors. This option exists only in the CLI. See the dst-addr-type, dst-name, src-addr-type and src-name keywords for the vpn ipsec phase2 command in the FortiGate CLI Reference. If the FortiGate unit is a dialup server, type the source IP address that corresponds to the local sender(s) or network behind the local VPN peer (for example, 172.16.5.0/24 or 172.16.5.0/255.255.255.0 for a subnet, or 172.16.5.1/32 or 172.16.5.1/255.255.255.255 for a server or host, or 192.168.10.[80-100] or 192.168.10.80-192.168.10.100 for an address range). A value of 0.0.0.0/0 means all IP addresses behind the local VPN peer. If the FortiGate unit is a dialup client, source address must refer to the private network behind the FortiGate dialup client.
Source address
Source port Type the port number that the local VPN peer uses to transport traffic related to the specified service (protocol number). The range is 0 to 65535. To specify all ports, type 0. Destination address Type the destination IP address that corresponds to the recipient(s) or network behind the remote VPN peer (for example, 192.168.20.0/24 for a subnet, or 172.16.5.1/32 for a server or host, or 192.168.10.[80100] for an address range). A value of 0.0.0.0/0 means all IP addresses behind the remote VPN peer. Type the port number that the remote VPN peer uses to transport traffic related to the specified service (protocol number). The range is 0 to 65535. To specify all ports, type 0. Type the IP protocol number of the service. The range is 1 to 255. To specify all services, type 0.
6 Select OK.
1342
To define a security IP address 1 Go to Firewall Objects> Address > Address and select Create New. 2 In the Address Name field, type a descriptive name that represents the network, server(s), or host(s). 3 In Type, select Subnet / IP Range.
1343
4 In the Subnet/IP Range field, type the corresponding IP address and subnet mask. For a subnet you could use the format 172.16.5.0/24 or its equivalent 172.16.5.0/255.255.255.0. For a server or host it would likely be 172.16.5.1/32. Alternately you can use an IP address range such as 192.168.10.[80-100] or 192.168.10.80-192.168.10.100. 5 Select OK.
There are examples of security policies for both policy-based and route-based VPNs throughout this guide. See Route-based or policy-based VPN on page 1199.
Note: If the security policy, which grants the VPN Connection is limited to certain services, DHCP must be included, otherwise the client wont be able to retrieve a lease from the FortiGates (IPSec) DHCP server, because the DHCP Request (coming out of the tunnel) will be blocked.
1344
When used in conjunction with the natip CLI attribute (see the config firewall chapter of the FortiGate CLI Reference), outbound NAT enables you to change the source addresses of IP packets before they go into the tunnel. This feature is often used to resolve ambiguous routing when two or more of the private networks making up a VPN have the same or overlapping IP addresses. For examples of how to use these two features together, see the FortiGate Outbound NAT for IPsec VIP Technical Note and the FortiGate IPsec VPN Subnet-address Translation Technical Note. When inbound NAT is enabled, inbound encrypted packets are intercepted and decrypted, and the source IP addresses of the decrypted packets are translated into the IP address of the FortiGate interface to the local private network before they are routed to the private network. If the computers on the local private network can communicate only with devices on the local private network (that is, the FortiGate interface to the private network is not the default gateway) and the remote client (or remote private network) does not have an IP address in the same network address space as the local private network, enable inbound NAT.
When a remote server or client attempts to connect to the private network behind a FortiGate gateway, the security policy intercepts the connection attempt and starts the VPN tunnel. The FortiGate unit uses the remote gateway specified in its phase 1 tunnel configuration to reply to the remote peer. When the remote peer receives a reply, it checks its own security policy, including the tunnel configuration, to determine which communications are permitted. As long as one or more services are allowed through the VPN tunnel, the two peers begin to negotiate the tunnel. To follow this negotiation in the web-based manager, go to VPN > Monitor > IPsec Monitor. There you will find a list of the VPN tunnels, their status, and the data flow both incoming and outgoing.
1345
Specify the phase 1 authentication parameters. See Auto Key phase 1 parameters on page 1321. Specify the phase 2 parameters. See Phase 2 parameters on page 1337.
To define an IPsec security policy 1 Go to Policy > Policy and select Create New. 2 Include appropriate entries as follows:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Schedule Service Action VPN Tunnel Allow Inbound Allow Outbound Inbound NAT Select the local interface to the internal (private) network. Select the name that corresponds to the local network, server(s), or host(s) from which IP packets may originate. Select the local interface to the external (public) network. Select the name that corresponds to the remote network, server(s), or host(s) to which IP packets may be delivered. Keep the default setting (always) unless changes are needed to meet specific requirements. Keep the default setting (ANY) unless changes are needed to meet your specific requirements. Select IPSEC. Select the name of the phase 1 tunnel configuration to which this policy will apply. Select if traffic from the remote network will be allowed to initiate the tunnel. Select if traffic from the local network will be allowed to initiate the tunnel. Select if you want to translate the source IP addresses of inbound decrypted packets into the IP address of the FortiGate interface to the local private network. Select in combination with a natip CLI value to translate the source addresses of outbound cleartext packets into the IP address that you specify. Do not select Outbound NAT unless you specify a natip value through the CLI. When a natip value is specified, the source addresses of outbound IP packets are replaced before the packets are sent through the tunnel. For more information, see the firewall chapter of the FortiGate CLI Reference.
Outbound NAT
3 You may enable UTM features, and/or event logging, or select advanced settings to authenticate a user group, or shape traffic. For more information, see the security Policy chapter of the FortiGate Administration Guide. 4 Select OK. 5 Place the policy in the policy list above any other policies having similar source and destination addresses.
1346
To ensure a secure connection, the FortiGate unit must evaluate IPSEC policies before ACCEPT and DENY security policies. Because the FortiGate unit reads policies starting at the top of the list, you must move all IPsec policies to the top of the list. When you define multiple IPsec policies for the same tunnel, you must reorder the IPsec policies that apply to the tunnel so that specific constraints can be evaluated before general constraints.
Note: Adding multiple IPsec policies for the same VPN tunnel can cause conflicts if the policies specify similar source and destination addresses but have different settings for the same service. When policies overlap in this manner, the system may apply the wrong IPsec policy or the tunnel may fail.
For example, if you create two equivalent IPsec policies for two different tunnels, it does not matter which one comes first in the list of IPsec policiesthe system will select the correct policy based on the specified source and destination addresses. If you create two different IPsec policies for the same tunnel (that is, the two policies treat traffic differently depending on the nature of the connection request), you might have to reorder the IPsec policies to ensure that the system selects the correct IPsec policy. Reordering is especially important when the source and destination addresses in both policies are similar (for example, if one policy specifies a subset of the IP addresses in another policy). In this case, place the IPsec policy having the most specific constraints at the top of the list so that it can be evaluated first.
2 To permit the remote client to initiate communication, you need to define a security policy for communication in that direction. Enter these settings in particular:
Source Interface/Zone Source Address Name Destination Interface/Zone Destination Address Name Select the IPsec Interface you configured. Select the address name that you defined for the private network behind the remote peer. Select the interface that connects to the private network behind this FortiGate unit. Select the address name that you defined for the private network behind this FortiGate unit.
1347
Action NAT
1348
Overview
Fortinets NP2 network processors contain features to improve IPsec tunnel performance. For example, network processors can encrypt and decrypt packets, offloading cryptographic work from the FortiGate units main processing resources. On FortiGate units with the appropriate hardware, you can configure offloading of both IPsec sessions and HMAC checking.
1349
Overview
In Phase II configuration: encryption algorithm must be DES, 3DES, AES-128, AES-192, AES-256, or null (for NP1 processor, only 3DES is supported) authentication must be MD5, SHA1, or null (for NP1 processor, only MD5 is supported) if replay detection is enabled, encryption and decryption options must be enabled in the CLI (see IPsec encryption offloading, below)
If the IPsec session meets the above requirements, the FortiGate unit sends the IPsec security association (SA) and configured processing actions to the network processors.
If packet offloading requirements are not met, an individual packet will use the FortiGate unit main processing resources, regardless of whether other packets in the session are offloaded to the specialized network processors.
1350
4 -FB
For tiG
ate _2
AS
cte
Pro te dn et w ork
cte
dn
et w ork
When both FortiGates are have the VPN tunnel configured, test to ensure it is working properly. To configure FortiGate_1 1 Go to VPN > IPsec > Auto Key (IKE) and select Create Phase 1. 2 Configure Phase 1 settings (name FGT_1_IPsec), plus Select Advanced. Select the Enable IPsec Interface Mode check box. In Local Gateway IP, select Specify and enter the VPN IP address 3.3.3.1, which is the IP address of FortiGate_1s FortiGate-ASM-FB4 module on port 2. 3 Select OK. 4 Select Create Phase 2 and configure Phase 2 settings, including Select the Enable replay detection check box. set enc-offload-antireplay to enable using the config system npu CLI command.
FortiOS Handbook v3: IPsec VPNs 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1351
5 Go to Policy > Policy. 6 Configure two policies (one for each direction) to apply the Phase 1 IPsec configuration you configured in step 2 to traffic leaving from or arriving on FortiGate-ASM-FB4 module port 1. 7 Go to Router > Static > Static Route. 8 Configure a static route to route traffic destined for FortiGate_2s protected network to the virtual IPsec interface, FGT_1_IPsec. To add the static route from the CLI: config router static edit 2 set device "FGT_1_IPsec" set dst 2.2.2.0 255.255.255.0 end To configure FortiGate_2 1 Go to VPN > IPsec > Auto Key (IKE) and select Create Phase 1. 2 Configure Phase 1 settings (name FGT_2_IPsec), plus Select Advanced. Select the Enable IPsec Interface Mode check box. In Local Gateway IP, select Specify and enter the VPN IP address 3.3.3.2, which is the IP address of FortiGate_2s FortiGate-ASM-FB4 module on port 2. 3 Select OK. 4 Select Create Phase 2 and configure Phase 2 settings, including Select the Enable replay detection check box. set enc-offload-antireplay to enable using the config system npu CLI command. 5 Go to Policy > Policy. 6 Configure two policies (one for each direction) to apply the Phase 1 IPsec configuration you configured in step 2 to traffic leaving from or arriving on FortiGate-ASM-FB4 module port 1. 7 Go to Router > Static > Static Route. 8 Configure a static route to route traffic destined for FortiGate_1s protected network to the virtual IPsec interface, FGT_2_IPsec. To add the static route from the CLI: config router static edit 2 set device "FGT_2_IPsec" set dst 1.1.1.0 255.255.255.0 end To test the VPN 1 Activate the IPsec tunnel by sending traffic between the two protected networks. 2 To verify tunnel activation, go to VPN > IPSEC > Monitor.
1352
1353
8 Configure a static route to route traffic destined for FortiGate_1s protected network to FortiGate_2s VPN gateway, 3.3.3.2, through the FortiGate-ASM-FB4 modules port 2 (device). To add the static route from the CLI: config router static edit 0 set device "AMC-SW1/2" set dst 1.1.1.0 255.255.255.0 set gateway 3.3.3.2 end To test the VPN 1 Activate the IPsec tunnel by sending traffic between the two protected networks. 2 To verify tunnel activation, go to VPN > IPSEC > Monitor.
1354
The list of dialup tunnels displays the following statistics: The Name column displays the name of the tunnel.
1355
The meaning of the value in the Remote gateway column changes, depending on the configuration of the network at the far end: When a FortiClient dialup client establishes a tunnel, the Remote gateway column displays either the public IP address and UDP port of the remote host device (on which the FortiClient Endpoint Security application is installed), or if a NAT device exists in front of the remote host, the Remote gateway column displays the public IP address and UDP port of the remote host. When a FortiGate dialup client establishes a tunnel, the Remote gateway column displays the public IP address and UDP port of the FortiGate dialup client.
The Username column displays the peer ID, certificate name, or XAuth user name of the dialup client (if a peer ID, certificate name, or XAuth user name was assigned to the dialup client for authentication purposes). The Timeout column displays the time before the next key exchange. The time is calculated by subtracting the time elapsed since the last key exchange from the keylife. The Proxy ID Source column displays the IP addresses of the hosts, servers, or private networks behind the FortiGate unit. A network range may be displayed if the source address in the security encryption policy was expressed as a range of IP addresses. The meaning of the value in the Proxy ID Destination column changes, depending on the configuration of the network at the far end: When a FortiClient dialup client establishes a tunnel: If VIP addresses are not used and the remote host connects to the Internet directly, the Proxy ID Destination field displays the public IP address of the Network Interface Card (NIC) in the remote host. If VIP addresses are not used and the remote host is behind a NAT device, the Proxy ID Destination field displays the private IP address of the NIC in the remote host. If VIP addresses were configured (manually or through FortiGate DHCP relay), the Proxy ID Destination field displays either the VIP address belonging to a FortiClient dialup client, or a subnet address from which VIP addresses were assigned. When a FortiGate dialup client establishes a tunnel, the Proxy ID Destination field displays the IP address of the remote private network.
1356
Dialup connection
A dialup VPN connection has additional steps. To confirm that a VPN between a local network and a dialup client has been configured correctly, at the dialup client, issue a ping command to test the connection to the local network. The VPN tunnel initializes when the dialup client attempts to connect. If the ping or traceroute fail, it indicates a connection problem between the two ends of the tunnel. This may or may not indicate problems with the VPN tunnel, or dialup client. As with the LAN connection, confirm the VPN tunnel is established by checking VPN > Monitor. If the connection has problems, see Troubleshooting.
1357
Testing phase 1 and 2 connections is a bit more difficult than testing the working VPN. This is because they require diagnose CLI commands. These commands are typically used by Fortinet customer support to discover more information about your FortiGate unit and its current configuration. Before you start troubleshooting you need to: configure FortiGate units on both ends for interface VPN record the information in your VPN phase 1 and phase 2 configurations - for our example here the remote IP address is 10.101.101.101.101 and the names of the phases are Phase1 and Phase2 install a telnet or SSH client such as putty that allows logging of output ensure that the admin interface supports your chosen connection protocol so you can connect to your FortiGate unit admin interface. For this example, default values were used unless stated otherwise.
To get diagnose information for the VPN connection - CLI 1 Log into the CLI as admin with the output being logged to a file. 2 Stop any diag debug sessions that are currently running with the CLI command diag debug disable 3 Clear any existing log-filters by running diag debug log-filter clear 4 Set the log-filter to the IP address of the remote computer (10.11.101.10). This filters out all VPN connections except ones to the IP address we are concerned with. The command is diag debug log-filter dst-addr4 10.11.101.10. 5 Set up the commands to output the VPN handshaking. The commands are: diag debug app ike 255 diag debug enable 6 Have the remote FortiGate initiate the VPN connection in the web-based manager by going to VPN > Monitor and selecting Bring up. This makes the remote FortiGate the initiator and the local FortiGate becomes the responder. Establishing the connection in this manner means the local FortiGate will have its configuration information as well as the information the remote computer sends. Having both sets of information locally makes it easier to troubleshoot your VPN connection. 7 Watch the screen for output, and after roughly 15 seconds enter the following CLI command to stop the output. diag debug disable
1358
8 If needed, save the log file of this output to a file on your local computer. Saving the output to a file can make it easier to search for a particular phrase, or save the output for future comparison with different output. To troubleshoot a phase1 VPN connection Using the output from To get diagnose information for the VPN connection - CLI on page 1358, search for the word proposal in the output. It may occur once indicating a successful connection, or it will occur two or more times for an unsuccessful connection there will be one proposal listed for each end of the tunnel and each possible combination in their settings. For example if 10.11.101.10 selected both DH Group 1 and 5, that would be at least 2 proposals set. A successful negotiation proposal will look similar to XXX insert output sample here XXX Note the phrases initiator: main mode is sending 1st message... and which show you the handshake between the ends of the tunnel is in progress. Initiator shows the remote unit is sending the first message.
Note: In the proposal you will see the Diffie-Hellman Group (DH Group) listed as OAKLEY and vn=<a number>. This is normal.
To troubleshoot a phase2 VPN connection Using the output from To get diagnose information for the VPN connection - CLI on page 1358, search for
3 If the options are concealed, select the blue arrow beside each option to reveal and configure associated settings. 4 If logs will be written to system memory, from the Log Level list, select Information. For more information, see the Log&Report chapter of the FortiGate Administration Guide. 5 Select Apply.
1359
To filter VPN events 1 Go to Log&Report > Log Config > Event Log. 2 Verify that the IPsec negotiation event option is selected. 3 Select Apply. To view event logs 1 Go to Log&Report > Log Access > Event. 2 If the option is available from the Type list, select the log file from disk or memory. Entries similar to the following indicate that a tunnel has been established. The following log messages concern a VPN tunnel called vpn_test on port2 interface in the root VDOM. Pay attention to the status and msg values. 2005-03-31 15:38:29 log_id=0101023004 type=event subtype=ipsec pri=notice vd=root loc_ip=172.16.62.10 loc_port=500 rem_ip=172.16.62.11 rem_port=500 out_if=port2 vpn_tunnel=vpn_test cookies=151c3a5c6dd93c54/0000000000000000 action=negotiate init=local mode=main stage=1 dir=outbound status=success msg="Initiator: sent 172.16.62.11 main mode message #1 (OK)" 2005-03-31 15:38:29 log_id=0101023004 type=event subtype=ipsec pri=notice vd=root loc_ip=172.16.62.10 loc_port=500 rem_ip=172.16.62.11 rem_port=500 out_if=port2 vpn_tunnel=vpn_test cookies=151c3a5c6dd93c54/5ed26a81fb7a2d0c action=negotiate init=local mode=main stage=2 dir=outbound status=success msg="Initiator: sent 172.16.62.11 main mode message #2 (OK)" 2005-03-31 15:38:29 log_id=0101023004 type=event subtype=ipsec pri=notice vd=root loc_ip=172.16.62.10 loc_port=500 rem_ip=172.16.62.11 rem_port=500 out_if=port2 vpn_tunnel=vpn_test cookies=151c3a5c6dd93c54/5ed26a81fb7a2d0c action=negotiate init=local mode=main stage=3 dir=outbound status=success msg="Initiator: sent 172.16.62.11 main mode message #3 (OK)" 2005-03-31 15:38:29 log_id=0101023004 type=event subtype=ipsec pri=notice vd=root loc_ip=172.16.62.10 loc_port=500 rem_ip=172.16.62.11 rem_port=500 out_if=port2 vpn_tunnel=vpn_test cookies=151c3a5c6dd93c54/5ed26a81fb7a2d0c action=negotiate init=local mode=main stage=3 dir=inbound status=success msg="Initiator: parsed 172.16.62.11 main mode message #3 (DONE)" 2005-03-31 15:38:29 log_id=0101023004 type=event subtype=ipsec pri=notice vd=root loc_ip=172.16.62.10 loc_port=500 rem_ip=172.16.62.11 rem_port=500 out_if=port2 vpn_tunnel=vpn_test cookies=151c3a5c6dd93c54/5ed26a81fb7a2d0c action=negotiate init=local mode=quick stage=1 dir=outbound status=success msg="Initiator: sent 172.16.62.11 quick mode message #1 (OK)"
1360
2005-03-31 15:38:29 log_id=0101023006 type=event subtype=ipsec pri=notice vd=root loc_ip=172.16.62.10 loc_port=500 rem_ip=172.16.62.11 rem_port=500 out_if=port2 vpn_tunnel=vpn_test cookies=151c3a5c6dd93c54/5ed26a81fb7a2d0c action=install_sa in_spi=66867f2b out_spi=e22de275 msg="Initiator: tunnel 172.16.62.10/172.16.62.11 install ipsec sa" 2005-03-31 15:38:29 log_id=0101023004 type=event subtype=ipsec pri=notice vd=root loc_ip=172.16.62.10 loc_port=500 rem_ip=172.16.62.11 rem_port=500 out_if=port2 vpn_tunnel=vpn_test cookies=151c3a5c6dd93c54/5ed26a81fb7a2d0c action=negotiate init=local mode=quick stage=2 dir=outbound status=success msg="Initiator: sent 172.16.62.11 quick mode message #2 (DONE)" 2005-03-31 15:38:29 log_id=0101023002 type=event subtype=ipsec pri=notice vd=root loc_ip=172.16.62.10 loc_port=500 rem_ip=172.16.62.11 rem_port=500 out_if=port2 vpn_tunnel=vpn_test cookies=151c3a5c6dd93c54/5ed26a81fb7a2d0c action=negotiate status=success msg="Initiator: tunnel 172.16.62.11, transform=ESP_3DES, HMAC_SHA1" Entries similar to the following indicate that phase 1 negotiations broke down because the preshared keys belonging to the VPN peers were not identical. A tunnel was not established. Pay attention to the status and msg values. 2005-03-31 16:06:39 log_id=0101023003 type=event subtype=ipsec pri=error vd=root loc_ip=192.168.70.2 loc_port=500 rem_ip=192.168.80.2 rem_port=500 out_if=port2 vpn_tunnel=vpn_test2 cookies=3896343ae575f210/0a7ba199149e31e9 action=negotiate status=negotiate_error msg="Negotiate SA Error: probable pre-shared secret mismatch" For more information about how to interpret error log messages, see the FortiGate Log Message Reference.
1361
Ensure you are not using a loopback for the local VPN interface
The Local Interface field in Phase 1 VPN configuration should not be configured to point to a loopback interface. By design, the IPSec tunnel will not be established.
1362
Table 81: VPN trouble-shooting tips Configuration problem Mode settings do not match. Peer ID or certificate name of the remote peer or dialup client is not recognized by FortiGate VPN server. Correction Select complementary mode settings. See Choosing main mode or aggressive mode on page 1322. Check Phase 1 configuration. Depending on the Remote Gateway and Authentication Method settings, you have a choice of options to authenticate FortiGate dialup clients or VPN peers by ID or certificate name (see Authenticating remote peers and clients on page 1325). If you are configuring authentication parameters for FortiClient dialup clients, refer to the Authenticating FortiClient Dialup Clients Technical Note. Reenter the preshared key. See Authenticating remote peers and clients on page 1325. Make sure that both VPN peers have at least one set of proposals in common for each phase. See Defining IKE negotiation parameters on page 1330 and Configure the phase 2 parameters on page 1341. Select or clear both options as required. See NAT traversal on page 1333 and NAT keepalive frequency on page 1334. Enter complementary SPI settings. See Manual-key configurations on page 1277.
Preshared keys do not match. Phase 1 or phase 2 key exchange proposals are mismatched. NAT traversal settings are mismatched. SPI settings for manual key tunnels are mismatched.
1363
1364
1365
1366
What is a VPN?
Virtual Private Network (VPN) technology allows clients to connect to remote networks in a secure way. A VPN is a secure logical network created from physically separate networks. VPNs use encryption and other security methods to ensure that only authorized users can access the network. VPNs also ensure that the data transmitted between computers cannot be intercepted by unauthorized users. When data is encoded and transmitted over the Internet, the data is said to be sent through a VPN tunnel. A VPN tunnel is a non-application oriented tunnel that allows the users and networks to exchange a wide range of traffic regardless of application or protocol.
1367
What is SSL?
The advantages of a VPN over an actual physical private network are two-fold. Rather than utilizing expensive leased lines or other infrastructure, you use the relatively inexpensive, high-bandwidth Internet. Perhaps more important though is the universal availability of the Internet - in most areas, access to the Internet is readily obtainable without any special arrangements or long wait times.
What is SSL?
SSL (Secure Sockets Layer) as HTTPS is supported by most web browsers for exchanging sensitive information securely between a web server and a client. SSL establishes an encrypted link, ensuring that all data passed between the web server and the browser remains private and secure. SSL protection is initiated automatically when a user (client) connects to a web server that is SSL-enabled. Once the successful connection is established, the browser encrypts all the information before it leaves the computer. When the information reaches its destination, it is decrypted using a secret (private) key. Any data sent back is first encrypted, and is decrypted when it reaches the client.
Goals of SSL
SSL has four main goals: 1 Confidentiality of communications 2 Integrity of data 3 Authentication of server 4 Authentication of client (non-repudiation) Good security for a VPN requires confirming the identity of all communicating parties. You can ensure identity using password authentication (shared secrets) or digital certificates. A shared secret is a passphrase or password that is the same on both ends of a tunnel. The data is encrypted using a session key, which is derived from the shared secret. The gateways can encrypt and decrypt the data correctly only if they share the same secret. Digital certificates use public key-based cryptography to provide identification and authentication of end gateways. Cryptography, the art of protecting information by transforming it into an unreadable format, is an integral part of VPN technology. The basic building blocks of cryptographic configurations are cryptographic primitives. Cryptographic primitives are low-level cryptographic algorithms or routines that are used to configure computer security systems, such as SSL, SSH, and TLS. Each primitive is designed to do one very specific task, such as encryption of data or a digital signature on a set of data. There are four cryptographic primitives that are specific to VPNs: 1 Symmetric ciphers (confidentiality) Symmetric encryption uses a very fast block-level algorithm to encrypt and decrypt data, and is the primary primitive used to
SSL VPN for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1368
What is SSL?
protect data confidentiality. Both sides of the tunnel will use the same encrypt/decrypt key, which is the primary weakness of symmetric ciphers. A key is usually a large number that is fed to a cryptographic algorithm to encrypt plaintext data into ciphertext or to decrypt ciphertext data into plaintext. 2 Asymmetric ciphers (authenticity and non-repudiation) To guarantee the identities of both parties in a transaction, SSL VPN uses asymmetric encryption. This involves the creation of a key pair for each party. The keys are related mathematically - data encrypted with one key can be decrypted only with the other key in the pair, and vice versa. One key is labeled the public key and can be freely distributed. The other key is the private key and it must be kept secret. The SSL VPN authenticates each party by checking that it has something that no other party should have - its private key. If the SSL VPN can decrypt a message from a party using that partys public key, the message must have been encrypted with that partys private key. As the private key is known only to the sending party, the senders identity is proven. This proof of identity also makes it impossible for the sending party to later repudiate (deny sending) the message. 3 Message digests (integrity) VPNs send sensitive data over the public Internet. To make sure that what is sent is the same as what is received, and vice versa, SSL VPN uses message digests. A message digest is an irreversible mathematical function that takes a message of any size and encodes it as a fixed length block of cipher text. The fixed length cipher is called the digest. It is essentially a cryptographic summary of the message. Every message has only one digest and no two messages should ever create the same digest if only a single letter of our message is changed, the entire message digest will be different. 4 Digital signatures (authenticity and non-repudiation) A digital signature or digital signature scheme is a type of asymmetric cryptography. For messages sent through an insecure channel, a correctly implemented digital signature gives the receiver reason to believe the message was sent by the claimed sender. The signer cannot claim they did not sign a message, while also claiming their private key remains secret. In some cases, a non-repudiation scheme offers a time stamp for the digital signature, so that even if the private key is exposed, the signature is still valid. In addition to identifying the user, authentication also defines the resources a user can access. A user must present specified credentials before being allowed access to certain locations on the network. Authentication can either take place through a firewall or through an external authentication server such as Remote Authentication Dial-In User Service (RADIUS). An authentication server is a trusted third party that provides authentication services to other systems on a network.
SSL certificates
SSL certificates are a mechanism by which a web server can prove to users that the public key that it offers them for use with the SSL is in fact the public key of the organization with which the user intends to communicate. A trusted third-party signs the certificate thereby assuring users that the public key contained within the certificate belongs to the organization whose name appears in the certificate. Upon receiving a certificate from Your Company, a user can know for sure that the key within the certificate is Your Companys key and it is safe to use to encrypt any communications related to establishment of a session key. The web server transmits their public key to users at the beginning of an SSL session using an SSL certificate.
1369
Encryption level is determined by the length of the encryption key. The longer the key, the stronger the encryption level, and the greater the security provided. Within a VPN, after the end points on a tunnel agree upon an encryption scheme, the tunnel initiator encrypts the packet and encapsulates it in an IP packet. The tunnel terminator recovers the packet, removes the IP information, and then decrypts the packet.
Authentication differences
IPsec is a well-established technology with robust features that support many legacy products such as smart cards and biometrics. SSL supports a web single sign-on to a web portal front-end, from which a number of different enterprise applications may be accessed. The Fortinet implementation enables you to assign a specific port for the web portal and to customize the login page if desired.
Connectivity considerations
IPsec supports multiple connections to the same VPN tunnela number of remote VPN devices effectively become part of the same network.
1370
General topology
SSL forms a connection between two end points such as a remote client and an enterprise network. Transactions involving three (or more) parties are not supported because traffic passes between client and server applications only.
Access control
IPsec VPNs provide secure network access only. Access to the network resources on a corporate IPsec VPN can be enabled for specific IPsec peers and/or clients. The amount of security that can be applied to users is limited. SSL VPNs provide secure access to certain applications. Web-only mode provides remote users with access to server applications from any thin client computer equipped with a web browser. Tunnel-mode provides remote users with the ability to connect to the internal network from laptop computers as well as airport kiosks, Internet cafes, and hotels. Access to SSL VPN applications is controlled through user groups.
General topology
In the most common SSL VPN Internet scenario, the remote client connects to the Internet through an ISP that offers connections with dynamically assigned IP addresses. The clients packets are routed to the public interface of the FortiGate unit. For example, Figure 165 shows a FortiGate gateway that can be reached by a mobile user.
1371
Re
C ote
lien
Fo 41
rtiG
ate
_1
10 rt 3 1. Po 1.20 1 . 10
Se
2 4 t_ /2 ne 1.0 ub 0 S 1.2 .1 10
rve
rs
At the FortiGate unit, you configure a user group for SSL VPN authentication and define security policies for each network resource that users are permitted to access. You can easily expand the resources available to your users by adding or changing security policies. If you want to provide different resource access to different users, you can create multiple user groups. The general infrastructure requirements are quite simple: The FortiGate unit must be operating in NAT/Route mode and have a static public IP address. The ISP assigns IP addresses to remote clients before they connect to the FortiGate unit.
S P T 0 T 12 /H 1. P 0 T 1 r T 1. H .1 ve 0 er 6 10 S .1 1 S 0 N .1 r D 11 . ve 70 10 er 1 S 1. P 0 T .1 er F 1 v .1 er 80 S .1 10 1 ba 10 . am 1 S .1 10
1372
You can enable a cache cleaner to remove any sensitive data that would otherwise remain on the remote computer after the session ends. For example, all cache entries, browser history, cookies, encrypted information related to user authentication, and any temporary data generated during the session are removed from the remote computer. If the clients browser cannot install and run the cache cleaner, the user is not allowed to access the SSL-VPN portal.
Web-only mode
Web-only mode provides remote users with a fast and efficient way to access server applications from any thin client computer equipped with a web browser. Web-only mode offers true clientless network access using any web browser that has built-in SSL encryption and the Sun Java runtime environment. Support for SSL VPN web-only mode is built into the FortiOS operating system. The feature comprises of an SSL daemon running on the FortiGate unit, and a web portal, which provides users with access to network services and resources including HTTP/HTTPS, telnet, FTP, SMB/CIFS, VNC, RDP and SSH. In web-only mode, the FortiGate unit acts as a secure HTTP/HTTPS gateway and authenticates remote users as members of a user group. After successful authentication, the FortiGate unit redirects the web browser to the web portal home page and the user can access the server applications behind the FortiGate unit. When the FortiGate unit provides services in web-only mode, a secure connection between the remote client and the FortiGate unit is established through the SSL VPN security in the FortiGate unit and the SSL security in the web browser. After the connection has been established, the FortiGate unit provides access to selected services and network resources through a web portal. FortiGate SSL VPN web portals have a 1- or 2-column page layout with selectable color schemes. Portal functionality is provided through small applets called widgets. Widget windows can be moved or minimized. The controls within each widget depend on its function. There are predefined web portals and the administrator can create additional portals. Configuring the FortiGate unit involves enabling the SSL VPN feature and selecting the appropriate web portal configuration in the user group settings. These configuration settings determine which server applications can be accessed. SSL encryption is used to ensure traffic confidentiality. For information about client operating system and browser requirements, see the Release Notes for your FortiGate firmware. For information on configuring a web portal see Customizing the web portal login page on page 1383.
Tunnel mode
Tunnel mode offers remote users the freedom to connect to the internal network using the traditional means of web-based access from laptop computers, as well as from airport kiosks, hotel business centers, and Internet cafs. If the applications on the client computers used by your user community vary greatly, you can deploy a dedicated SSL VPN client to any remote client through its web browser. The SSL VPN client encrypts all traffic from the remote client computer and sends it to the FortiGate unit through an SSL VPN tunnel over the HTTPS link between the web browser and the FortiGate unit. Also available is split tunneling, which ensures that only the traffic for the private network is sent to the SSL VPN gateway. Internet traffic is sent through the usual unencrypted route. This conserves bandwidth and alleviates bottlenecks.
1373
In tunnel mode, remote clients connect to the FortiGate unit and the web portal login page using Microsoft Internet Explorer, Mozilla Foundation/Firefox, Mac OS, or Linux. The FortiGate unit acts as a secure HTTP/HTTPS gateway and authenticates remote users as members of a user group. After successful authentication, the FortiGate unit redirects the web browser to the web portal home page dictated by the user group settings. If the user does not have the SSL VPN client installed, they will be prompted to download the SSL VPN client (an ActiveX or Java plugin) and install it using controls provided through the web portal. SSL VPN tunnel mode can also be initiated from a standalone application on Windows, Mac OS, and Linux. When the user initiates a VPN connection with the FortiGate unit through the SSL VPN client, the FortiGate unit establishes a tunnel with the client and assigns the client a virtual IP address from a range of reserved addresses. The client uses the assigned IP address as its source address for the duration of the connection. After the tunnel has been established, the user can access the network behind the FortiGate unit.
Note: If the tunnel mode and session information widgets are the only widgets configured, the user will automatically be logged into the SSL-VPN tunnel.
Configuring the FortiGate unit to establish a tunnel with remote clients involves enabling the feature through SSL VPN configuration settings and selecting the appropriate web portal configuration for tunnel-mode access in the user group settings. The security policy and protection profiles on the FortiGate unit ensure that inbound traffic is screened and processed securely.
Note: The user account used to install the SSL VPN client on the remote computer must have administrator privileges.
Note: If you are using Windows Vista, you must disable UAC (User Account Control) before installing the SSL VPN tunnel client. This UAC setting must be disabled before the SSL VPN tunnel client is installed. IE7 in Windows Vista runs in Protected Mode by default. To install SSL VPN client ActiveX, you need to launch IE7 by using 'Run as administrator' (right-click the IE7 icon and select 'Run as administrator').
For information about client operating system requirements, see the Release Notes for your FortiGate firmware. For information on configuring tunnel mode, see Configuring tunnel mode settings on page 1388.
1374
On the user end, the user logs into the FortiGate SSL VPN portal, and selects a port forward bookmark configured for a specific application. The bookmark defines the server address and port as well as which port to listen to on the users computer.
Note: The user must configure the application on the PC to point to the local proxy instead of the application server. For information on this configuration change, see the application documentation. This mode only supports client/server applications that are using a static TCP port. It will not support client/server applications using dynamic ports or traffic over UDP.
For information on configuring a port forward tunnel, see Configure a port forward tunnel on page 1390.
Application support
With Citrix application servers, the server downloads an ICA configuration file to the users PC. The client application uses this information to connect to the Citrix server. The FortiGate unit will read this file and append a SOCKS entry to set the SOCKS proxy to localhost. The Citrix client will then be able to connect to the SSL VPN port forward module to provide the connection. When configuring the port forwarding module, an selection is available for Citrix servers. For Windows Remote Desktop Connections, when selecting the RDP option, the tunnel will launch the RDP client and connect to the local loopback address after the port forward module has been initiated.
1375
1376
For information on changing the password, configuring the interfaces of the FortiGate unit, and assigning basic operating parameters, including a default gateway, the System Administration chapter of The Handbook. See also to the chapter, Examples on page 1429, for example SSL VPN configurations. This section describes how to configure the FortiGate unit as an SSL VPN server. The following topics are included in this section: General configuration steps Configuring SSL VPN settings Configuring SSL VPN web portals Configuring user accounts and user groups for SSL VPN Configuring security policies SSL VPN logs Monitoring active SSL VPN sessions Troubleshooting
1377
1378
As part of the SSL VPN configuration, you can also make the modifications described in the following sections: Adding WINS and DNS services for clients on page 1380. Setting the idle timeout setting on page 1381. Setting the client authentication timeout on page 1381. Specifying the cipher suite for SSL negotiations on page 1381. The cipher suite determines the level of data security, but it must be compatible with the capabilities of the clients browsers. Enabling strong authentication through X.509 security certificates on page 1382. Changing the port number for web portal connections on page 1383. By default, SSL VPN connections use port 10443. Customizing the web portal login page on page 1383.
Most of these settings are on the VPN > SSL > Config page in the web-based manager and config vpn ssl settings in the CLI. You can configure multiple settings at the same time.
To set tunnel-mode client IP address range - web-based manager 1 Go to Firewall Objects > Address > Address and select Create New. 2 Enter an Address Name, for example, SSL_VPN_tunnel_range.
1379
3 In the Subnet/IP Range field, enter the starting and ending IP addresses that you want to assign to SSL VPN clients, for example 10.254.254.[80-100]. 4 In Interface, select Any. 5 Select OK. 6 Go to VPN > SSL > Config. 7 In IP Pools, select Edit.
Note: When you select Edit, a popup window will open. If your browser blocks popup windows, you will have to unblock it to continue with the following steps.
8 In the Available list, select the address you created for the SSL VPN tunnel range and then select the down arrow button to move it to the Selected list. Select OK. 9 Select Apply. To set tunnel-mode client IP address range - CLI If your SSL VPN tunnel range is for example 10.254.254.80 - 10.254.254.100, you could enter config firewall address edit SSL_tunnel_users set type iprange set end-ip 10.254.254.100 set start-ip 10.254.254.80 end end config vpn ssl settings set tunnel-ip-pools SSL_tunnel_users end
1380
set dns-server2 <address_ipv4> set wins-server1 <address_ipv4> set wins-server2 <address_ipv4> end
For example, to change the authentication timeout to 18 000 seconds, enter the following commands: config vpn ssl settings set auth-timeout 18000 end
1381
If the web browser on the remote client is capable of matching a high level of SSL encryption. This option enables cipher suites that use more than 128 bits to encrypt data. Low - RC4(64 bits), DES and higher If you are not sure which level of SSL encryption the remote client web browser supports. The web browser must at least support a 64-bit cipher length. 3 Select Apply. To set the encryption algorithm - CLI config vpn ssl settings set algorithm {default | high | low} end
1382
2 From the Server Certificate list, select the certificate that the FortiGate unit uses to identify itself to SSL VPN clients. 3 Select Apply. To enable FortiGate unit authentication by certificate - CLI For example, to use the example_cert certificate config vpn ssl settings set servercert example_cert end
To change the SSL VPN port - web-based manager 1 If Current VDOM appears at the bottom left of the screen, select Global from the list of VDOMs. 2 Go to VPN > SSL > Config. 3 Type an unused port number in SSLVPN Login Port, and select Apply.
Note: Do not select port number 443 for user access to the web portal login page. Port number 443 is reserved to support administrative connections to the FortiGate unit through the web-based manager.
To change the SSL VPN port - CLI This is a global setting. For example, to set the SSL VPN port to 10443, enter: config global config system global set sslvpn-sport 10443 end
1383
2 Go to System > Config > Replacement Messages. 3 Expand the SSL VPN row and select the Edit icon for the SSL VPN login message.
Caution: Before you begin, copy the default web portal login page text to a separate text file for safe-keeping. Afterward, if needed you can restore the text to the original version.
4 Edit the HTML text, subject to the following restrictions: The login page must be an HTML page containing a form with ACTION="%%SSL_ACT%%" and METHOD="%%SSL_METHOD%%" The form must contain the %%SSL_LOGIN%% tag to provide the login form. The form must contain the %%SSL_HIDDEN%% tag. 5 Select OK. To configure the SSL VPN login page - CLI Do one of the following: If VDOMs are enabled and you want to modify the global login page, enter: config global config system replacemsg sslvpn sslvpn-login If you want to modify the login page for a VDOM, enter: config vdom edit <vdom_name> config system replacemsg-group edit default config sslvpn edit sslvpn-login
To change the login page content, enter the modified page content as a string. In this example, the page title is changed to Secure Portal login and headings are added above the login dialog which say example.com Secure Portal: set buffer "<html><head><title>Secure Portal login</title> <meta http-equiv="Pragma" content="no-cache"><meta httpequiv="cache-control" content="no-cache"> <meta httpequiv="cache-control" content="must-revalidate"><link href="/sslvpn/css/login.css" rel="stylesheet" type="text/css"><script type="text/javascript">if (top && top.location != window.location) top.location = top.location;if (window.opener && window.opener.top) { window.opener.top.location = window.opener.top.location; self.close(); }</script></head><body class="main"> <center><table width="100%" height="100%" align="center" class="container" valign="middle" cellpadding="0" cellspacing="0"><tr valign=top><td align=center> <h1>example.com</h1><h3>Secure Portal</h3></td></tr><tr valign=top><td><form action="%%SSL_ACT%%" method="%%SSL_METHOD%%" name="f"><table class="list" cellpadding=10 cellspacing=0 align=center width=400 height=180>%%SSL_LOGIN%%</table>%%SSL_HIDDEN%%</td></tr></ table></form></center></body><script>document.forms[0].use rname.focus();</script></html>" end
1384
Your console application determines how the text wraps. It is easier to edit the code in a separate text editor and then paste the finished code into the set buffer command. Be sure to enclose the entire string in quotation (") marks.
You can modify a default portal or a portal that you have already defined. Select the Edit icon next to the web portal in the Portal list. The SSL VPN web portal you select will open. To configure basic web portal settings - web-based manager 1 Go to VPN > SSL > Portal and select Edit. 2 Select Settings. 3 Enter the following information:
1385
Enter a name to identify this web portal. Select the applications that users can access through this web portal. Enter the text that will appear at the top of the web portal window to a maximum of 31 characters. Select the color scheme for this web portal. Select either the single-column or two-column layout. The web portal can display a second HTML page in a popup window when the web portal home page is displayed. Enter the URL.
4 Optionally, you can select the Virtual Desktop tab to configure the Virtual Desktop feature. See Configuring virtual desktop on page 1397. Or, you can leave this configuration for later. 5 Optionally, you can select the Security Control tab to configure cache cleaning and client check. Or, you can leave this configuration for later. For information on these features, see Configuring cache cleaning on page 1396 and Host checking on page 1394. 6 Select OK then Apply. To configure basic web portal settings - CLI To use the orange theme with a two-column layout and allow users all types of access with the full-access portal, you could enter: config vpn ssl web portal edit full-access set allow-access ftp ping rdp smb ssh telnet vnc web set heading "Welcome to the example.com web portal" set theme orange set page-layout double-column end In the config vpn ssl web portal command, you can also configure client check, client OS check, cache cleaning, and virtual desktop. Or, you can leave this configuration for later. These features are described later in this chapter.
1386
Edit Remove
To configure the web portal page - web-based manager On the web portal page itself, you, as administrator, can make several adjustments to the appearance of the portal: Arrange widgets on the page by dragging them by their title bar. Add a widget by choosing a widget from the Add Widget list. Remove a widget by selecting the Remove icon in the widget title bar. Configure a widget by selecting the Edit icon in the widget title bar. For configuration information about each widget type, see the following sections: Configuring tunnel mode settings on page 1388 The Session Information widget on page 1391 The Connection Tool widget on page 1393
To modify the color scheme and other basic settings, select the Settings button. You can also configure several advanced features. For more information, see The Connection Tool widget on page 1393 Configuring cache cleaning on page 1396 Configuring virtual desktop on page 1397 Configuring client OS Check on page 1398 (CLI only)
When you have finished configuring the web portal page, select Apply to save the modifications.
1387
To configure the web portal page - CLI You can also define a portal layout using CLI commands. Unlike configuring with the webbased manager, a new portal created in the CLI has by default no heading and no widgets. Also, the widgets do not have default names. You must specify all of this information. For example, to create the portal layout shown in Figure 166 on page 1387, you would enter: config vpn ssl web portal set heading "Welcome to SSL VPN Service" set page-layout double-column set theme blue edit myportal config widget edit 0 set type info set name "Session Information" set column one next edit 0 set type bookmark set name "Bookmarks" set column one next edit 0 set type tunnel set name "Tunnel Mode" set column two next edit 0 set type tool set name "Connection Tool" set column two end
Note: When you use edit 0, as in this example, the CLI automatically assigns an unused index value when you exit the edit shell by typing end.
Optionally, you can enable a split tunneling configuration so that the VPN carries only the traffic for the networks behind the FortiGate unit. The users other traffic follows its normal route.
1388
To configure tunnel mode settings - web-based manager 1 Go to VPN > SSL > Portal and select Create New. 2 If the Tunnel Mode widget is missing, add it by selecting Tunnel Mode from the Add Widget list in the top right corner of the window. 3 Select the Edit icon in the Tunnel Mode widget title bar.
Figure 167: Tunnel Mode widget - edit mode
IP Pools
Split Tunneling
The remaining items in the widget are controls that are available to the user during an SSL VPN session. 5 Select OK in the Tunnel Mode widget. 6 Select Apply.
1389
To configure tunnel mode settings - CLI To enable tunnel mode operation for portal2 portal users and assign them addresses from the SSLVPN_TUNNEL_ADDR2 range, you would enter: config vpn ssl web portal edit portal2 config widget edit 0 set type tunnel set tunnel-status enable set ip-mode range set ip-pools SSLVPN_TUNNEL_ADDR2 end end The preceding example applies to a web portal that does not already have a tunnel mode widget. To modify the settings on an existing tunnel mode widget, you need to determine the widgets number. Enter: config vpn ssl web portal edit portal1 config widget show In the output, you will see, for example, edit 3 set name "Tunnel Mode" set type tunnel ... You can now enter edit 3 and modify the tunnel mode widgets settings. To force all traffic through the tunnel - CLI If you disable split tunneling, all of the users traffic to other networks passes through the SSL VPN tunnel. But, this does not apply to traffic between the user and the users local network. For enhanced security, some administrators prefer to force all of the users traffic, including traffic with the local network, to pass through the SSL VPN tunnel. To do this, enable exclusive-routing in the tunnel widget settings. For example: config vpn ssl web portal edit portal2 config widget edit 0 set type tunnel set tunnel-status enable set ip-mode range set ip-pools SSLVPN_TUNNEL_ADDR2 set split-tunneling disable set set exclusive-routing enable end end
1390
To configure a port forward tunnel - web-based manager 1 Go to VPN > SSL > Portal and select an existing web portal configuration. 2 Select to add a bookmark. 3 Enter the Name of the application. 4 Select the Type of PortForward. 5 Enter the Location of the server. 6 Entre the Remote Port of the server and the Listening Port on the users PC. 7 Select OK. To configure a port forward tunnel - CLI ... config bookmarks edit <bookmark_name> set apptype portforward set host <hostname_or_IP> set remote-port <server_port> set listening-port <client_port> next end
1391
Widget configuration
Bookmarks list
4 Optionally, you can change the Name of the Bookmarks widget. 5 Select the Applications check boxes for the types of bookmarks that you want to support. 6 To add a bookmark, select Add. 7 Enter or edit the following information:
Name Type Enter a name for the bookmark. Select the type of application to which the bookmark links. For example, select HTTP/HTTPS for a web site. Only the application types that you configured for this widget are in the list. You can select Edit in the widget title bar to enable additional application types. Enter the destination of the bookmark. Optionally, enter a descriptive tooltip for the bookmark. A Single Sign-On (SSO) bookmark automatically enters the login credentials for the bookmark destination. Select one of: Disabled This is not an SSO bookmark. Automatic Use the users SSL VPN credentials for login. Static Use the login credentials defined below. Enter a required login page field name, User Name for example. Enter the value to enter in the field identified by Field Name. If you are an administrator configuring a bookmark for users: Enter %usrname% to represent the users SSL VPN user name. Enter %passwd% to represent the users SSL VPN password. Enter another Field Name / Value pair, for the password for example. A new set of Field Name / Value fields is added. Fill them in.
Single Sign-On settings available when SSO is Static Field Name Value
Add
8 Select OK. 9 Select Apply at the top of the web portal page to save the changes that you made. To configure the Bookmarks widget and add/edit bookmarks - CLI To allow only FTP and web connections on the web-access portal and to configure a bookmark to example.com, you would enter: config vpn ssl web portal edit web-access config widget edit 1 set type bookmark set allow-apps ftp web
1392
config bookmarks edit "example" set apptype web set description "example bookmark" set url "http://example.com" end end end To delete bookmarks - CLI To delete the bookmark added above, you would enter: config vpn ssl web portal edit web-access config widget edit 1 config bookmarks delete example end end end
Widget configuration
4 Optionally, enter a new Name for the widget. 5 Select the types of Applications that the Connection Tool is enabled to access. 6 Select OK.
1393
To configure the Connection Tool widget - CLI To change, for example, the full-access portal Connection Tool widget to allow all application types except Telnet, you would enter: config vpn ssl web portal edit full-access config widget edit 3 set allow-apps ftp rdp smb ssh vnc web end end end
Host checking
Host checking enables you to increase the security of your network, by verifying the SSL VPN client has a specific antivirus, firewall or other software installed on their computers. Only clients that meet the requirements are permitted to log on. When the client attempts to log in to the VPN network, FortiOS uses the host check information to verify a specific application and/or version is installed on the client computer. If not, the user cannot log into the portal.
Note: Host integrity checking is only possible with client computers running Microsoft Windows platforms.
To configure host checking - web-based manager 1 Go to VPN > SSL > Portal. 2 Select the web portal and then select Edit. 3 Select the Settings button. 4 Select the Security Control tab and enter the following information:
Host Check AV FW AV-FW Custom None Interval Policy Select the type of host check to perform. Check for a running antivirus application recognized by the Windows Security Center. Check for a running firewall application recognized by the Windows Security Center. Check for both an antivirus application and a firewall application recognized by the Windows Security Center. Check for security applications that you choose from the VPN > SSL > Host Check page. See the Policy field. Select to disable host checking. Select how often to recheck the host. Range is every 120 seconds to 259 200 seconds. Enter 0 to not recheck the host during the session. This field is available if Host Check is Custom. It lists the acceptable security applications for clients. Select Edit to choose the acceptable security applications. Use the arrow buttons to move applications between the Available and Selected lists. Clients will be checked for the applications in the Selected list. Select OK. The Available list contains the applications from VPN > SSL > Host Check page. You can add or remove applications from the Host Check list. See Configuring the custom host check list on page 1395.
5 Select OK.
1394
To configure host checking - CLI To configure the full-access portal to check for AV and firewall software on client Windows computers, you would enter the following: config vpn ssl web portal edit full-access set host-check av-fw end To configure the full-access portal to perform a custom host check for FortiClient Host Security AV and firewall software, you would enter the following: config vpn ssl web portal edit full-access set host-check custom set host-check-policy FortiClient-AV FortiClient-FW end
To add an entry to the Host Check list - web-based manager 1 Go to VPN > SSL > Host Check. 2 Select Create New and enter the following information:
Name Type GUID Enter a name of the application. The name does not need to match the actual application name. Select the type of security application. Can be AV for antivirus or FW for firewall. Enter the Globally Unique IDentifier (GUID) for the host check application, if known. Windows uses GUIDs to identify applications in the Windows Registry. The GUID can be found in the Windows registry in the HKEY_CLASSES_ROOT section. The version of the security application. To get the exact versioning, in Windows right-click on the .EXE file of the application and select Properties. Select the Version tab. If you do not know the GUID, add alternative checks for the application. The security software is considered found only if all checks succeed. Select how to check for the application: File Look for a file. This could be the applications executable file or any other file that would confirm the presence of the application. In File/Path, enter the full path to the file. Where applicable, you can use environment variables enclosed in percent (%) marks. For example, %ProgramFiles%\Fortinet\FortiClient\FortiClient.exe Process Look for the application as a running process. In Process, enter the applications executable file name. Registry Search for a Windows Registry entry. In Registry, enter a registry item, for example HKLM\SOFTWARE\Fortinet\FortiClient\Misc
Version
1395
Windows OS check
Action
Select one of Require If the item is found, the client meets the check item condition. Deny If the item is found, the client is considered to not meet the check item condition. Use this option if it is necessary to prevent use of a particular security product. If Type is File or Process, enter one or more known MD5 signatures for the application executable file.You can use a third-party utility to calculate MD5 signatures or hashes for any file. You can enter multiple signatures to match multiple versions of the application.
MD5 Signatures
3 Select OK.
Windows OS check
The Windows patch check enables you to define the minimum Windows version and patch level allowed when connecting to the SSL VPN portal. When the user attempts to connect to the web portal, FortiOS performs a query on the version of Windows the user has installed. If it does not match the minimum requirement, the connection is denied. The Windows patch check is configured in the CLI. The following example shows how you would add an OS check to the g1portal web portal. This OS check accepts all Windows XP users and Windows 2000 users running patch level 3. To specify the acceptable patch level, you set the latest-patch-level and the tolerance. The lowest acceptable patch level is latest-patch-level minus tolerance. In this case, latest-patch-level is 3 and tolerance is 1, so 2 is the lowest acceptable patch level. config vpn ssl web portal edit g1portal set os-check enable config os-check-list windows-2000 set action check-up-to-date set latest-patch-level 3 set tolerance 1 end config os-check-list windows-xp set action allow end end
To enable cache cleaning - web-based manager 1 Go to VPN > SSL > Portal, select the web portal and then select Edit. 2 Select the Settings button. 3 Select the Security Control tab.
1396
Windows OS check
4 Select Clean Cache. 5 Select OK then Apply. To enable cache cleaning - CLI To enable cache cleaning on the full-access portal, you would enter: config vpn ssl web portal edit full-access set cache-cleaner enable end Cache cleaning requires a browser plug-in. If the user does not have the plug-in, it is automatically downloaded to the client computer.
1397
Windows OS check
1398
The OS Check has no effect on clients running other operating systems. To configure OS Check - CLI OS Check is configurable only in the CLI. config vpn ssl web portal edit <portal_name> set os-check enable config os-check-list {windows-2000 | windows-xp | windows-vista | windows-7} set action {allow | check-up-to-date | deny} set latest-patch-level {disable | 0 - 255} set tolerance {tolerance_num} end end
1399
To create a user account - CLI If you want to create a user account, for example User_1 with the password 1_user, you would enter: config user local edit User_1 set passwd "1_User" set status enable set type password end
If no policy matches, the connection is dropped. You should order the security policy list top to bottom from most specific to most general. Only the first matching security policy is applied to a connection, and you want the best match to occur first.
1400
You will need at least one SSL VPN security policy. This is an identity-based policy that authenticates users and enables them to access the SSL VPN web portal. The SSL VPN user groups named in the policy determine who can authenticate and which web portal they will use. From the web portal, users can access protected resources or download the SSL VPN tunnel client application. This section contains the procedures needed to configure security policies for web-only mode operation and tunnel-mode operation. These procedures assume that you have already completed the procedures outlined in Configuring user accounts and user groups for SSL VPN on page 1399. If you will provide tunnel mode access, you will need a second security policy an ACCEPT tunnel mode policy to permit traffic to flow between the SSL VPN tunnel and the protected networks.
1401
the level of SSL encryption to use and the authentication method. which SSL VPN user groups can use the security policy. the times (schedule) and types of services that users can access. the UTM features and logging that are applied to the connection.
1402
To create an SSL-VPN security policy - web-based manager 1 Go to Policy > Policy > Policy and select Create New. 2 Enter the following information:
Source Interface/Zone Source Address Destination Interface/Zone Select the name of the FortiGate network interface to that connects to the Internet. Select all. Select the FortiGate network interface that connects to the protected network.
Destination Address Select the firewall address you created that represents the networks and servers to which the SSL VPN clients will connect. If you want to associate multiple firewall addresses or address groups with the Destination Interface/Zone, from Destination Address, select Multiple. In the dialog box, move the firewall addresses or address groups from the Available Addresses section to the Members section, then select OK. Action Select SSL-VPN. This option is available only if there is at least one user group with SSL VPN access enabled.
SSL Client Certificate Allow access only to holders of a (shared) group certificate. The holders of the group certificate must be members of an SSL VPN user group, Restrictive and the name of that user group must be present in the Allowed field. See Enabling strong authentication through X.509 security certificates on page 1382. Cipher Strength Select the bit level of SSL encryption. The web browser on the remote client must be capable of matching the level that you select: Any, High >= 164, or Medium >= 128. A security policy for an SSL VPN is automatically an identity-based policy. Add a user group to the policy. The Edit Authentication Rule window opens on top of the security policy. Enter the following information and then select OK. You can select Add again to add more groups. Select user groups in the left list and use the right arrow button to move them to the right list. Select service in the left list and use the right arrow button to move them to the right list. Select the ANY service to allow the user group access to all services.
3 Select OK. Your identity-based policies are listed in the security policy table. The FortiGate unit searches the table from the top down to find a policy to match the clients user group. Using the move icon in each row, you can change the order of the policies in the table to ensure the best policy will be matched first. You can also use the icons to edit or delete policies. To create an SSL VPN security policy - CLI To create the security policy by entering the following CLI commands. config firewall policy edit 0 set srcintf port1 set dstintf port2 set srcaddr all set dstaddr OfficeLAN set action ssl-vpn set nat enable config identity-based-policy edit 0
FortiOS Handbook v3: SSL VPN 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1403
set groups SSL-VPN set schedule always set service ANY end end
To configure the tunnel mode security policy - CLI config firewall policy edit <id> set srcintf ssl.root set dstintf <dst_interface_name> set srcaddr <tunnel_ip_address> set dstaddr <protected_network_address_name> set schedule always set service ANY set nat enable end This policy enables the SSL VPN client to initiate communication with hosts on the protected network. If you want to enable hosts on the protected network to initiate communication with the SSL VPN client, you should create another Accept policy like the preceding one but with the source and destination settings reversed. You must also add a static route for tunnel mode operation.
SSL VPN for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1404
To configure the Internet browsing security policy - CLI To enable browsing the Internet through port1, you would enter: config firewall policy edit 0 set srcintf ssl.root set dstintf port1 set srcaddr SSL_tunne_users set dstaddr all
FortiOS Handbook v3: SSL VPN 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1405
set schedule always set service ANY set nat enable end
To configure interconnection with a route-based IPsec VPN - CLI If, for example, you want to enable SSL VPN users to connect to the private network (address name OfficeAnet) through the toOfficeA IPsec VPN, you would enter: config firewall policy edit 0 set srcintf ssl.root set dstintf toOfficeA set srcaddr SSL_tunnel_users set dstaddr OfficeAnet set action accept set nat enable set schedule always set service ANY
end
To configure interconnection with a policy-based IPsec VPN - web-based manager 1 Go to Firewall > Policy > Policy and select Create New. 2 Enter the following information and select OK.
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Select the virtual SSL VPN interface, ssl.root, for example. Select the firewall address you created that represents the IP address range assigned to SSL VPN clients. Select the FortiGate network interface that connects to the Internet. Select the address of the IPsec VPN remote protected subnet.
1406
Select IPSEC. Select the Phase 1 configuration name of your IPsec VPN. Enable Enable Enable
To configure interconnection with a policy-based IPsec VPN - CLI If, for example, you want to enable SSL VPN users to connect to the private network (address name OfficeAnet) through the OfficeA IPsec VPN, you would enter: config firewall policy edit 0 set srcintf ssl.root set dstintf port1 set srcaddr SSL_tunnel_users set dstaddr OfficeAnet set action ipsec set schedule always set service ANY set inbound enable set outbound enable set natinbound enable set vpntunnel toOfficeA end In this example, port1 is connected to the Internet.
3 If the options are concealed, select the expand arrow beside each option to reveal and configure associated settings. 4 If logs will be written to system memory, from the Log Level list, select Information. For more information, see the Logging and Reporting chapter of The Handbook. 5 Select Apply. To enable logging - CLI config log {fortianalyzer | memory | syslog} setting set status enable end
FortiOS Handbook v3: SSL VPN 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1407
For some log locations, there are additional options available. To enable logging of SSL VPN events - web-based manager 1 Go to Log&Report > Log Config > Event Log. 2 Select Enable, and then select one or more of the following options: SSL VPN user authentication event SSL VPN administration event SSL VPN session event 3 Select Apply. To enable logging of SSL VPN events - CLI config log {fortianalyzer | memory | syslog} filter set event enable set sslvpn-log-adm enable set sslvpn-log-auth enable set sslvpn-log-session enable end To enable logging of SSL VPN traffic - web-based manager 1 Go to Firewall > Policy > Policy. 2 Select your SSL VPN policy and then select Edit. 3 For each identity-based policy, select its Edit icon, select Log Allowed Traffic, then select OK. 4 Select OK. 5 Select the Edit icon for your tunnel-mode policy. 6 Select Log Allowed Traffic and then select OK. To enable logging of SSL VPN traffic - CLI Your SSL VPN security policy is number 2 with a single identity-based policy, and your tunnel-mode policy is number 5, you would enable traffic logging by entering: config firewall policy edit 2 config identity-based-policy edit 1 set logtraffic enable end edit 5 set logtraffic enable end To view SSL VPN logs - web-based manager 1 Go to Log&Report > Log Access and select the Memory or Disk tab. 2 From the Log Type list select Event Log or Traffic Log, as needed. In event log entries look for the sub-types sslvpn-session and sslvpn-user. In the traffic logs, look for the sub-type allowed. For web-mode traffic, the source is the host IP address. For tunnel-mode traffic, the source is the address assigned to the host from the SSL VPN address pool.
1408
To view SSL VPN logs - CLI execute log filter category {event | traffic} execute log filter device {fortianalyzer | memory | syslog} execute log display The console displays the first 10 log messages. To view more messages, run the command again. You can do this until you have seen all of the selected log messages. To restart viewing the list from the beginning, use the command execute log filter start-line 1 For information about how to interpret log messages, see the FortiGate Log Message Reference.
1409
Troubleshooting
Troubleshooting
Here is a list of common SSL VPN problems and the likely solutions.
No response from SSL VPN URL Check that SSL VPN is enabled. Check SSL VPN port assignment (default 10443). Check SSL VPN security policy. Check URL: https://<FortiGate_IP>:<SSLVPN_port>/remote/login Check that there is a static route to direct packets destined for the tunnel users to the SSL VPN interface. See Configuring routing for tunnel mode on page 1405. This issue occurs when there are multiple interfaces connected to the Internet, for example, a dual WAN configuration. Upgrade the FortiGate unit firmware to at least v3.0 MR4 or higher, then use the following CLI
Error: The web page cannot be found. Tunnel connects, but there is no communication. Tunnel-mode connection shuts down after a few seconds
command:
config vpn ssl settings set route-source-interface enable end Error: Destination address of Split Tunneling policy is invalid. When trying to connect using FortiClient SSL VPN (standalone) the following error message Unable to logon to the server. Your user name or password may not be configured properly for this connection. (-12) is returned. When trying to login to the web portal, login and password are entered and login page will be sent back. The SSL VPN security policy uses the ALL address as its destination. Specify the address of the protected network instead. Cookies must be enabled for SSL VPN to function in Web portal or with the FortiClient SSL client. Access to the web portal or tunnel will fail if Internet Explorer has the privacy Internet Options set to High. If set to High, Internet Explorer will: Block cookies that do not have a compact privacy policy. Block cookies that use personally identifiable information without your explicit consent.
1410
1411
Four widgets provide the web portals features: Session Information displays the elapsed time since login and the volume of HTTP and HTTPS traffic, both inbound and outbound. Bookmarks provides links to network resources. You can use the administrator-defined bookmarks and you can add your own bookmarks. See Using the Bookmarks widget on page 1413. Connection Tool enables you to connect to network resources without using or creating a bookmark. Tunnel Mode connects and disconnects the tunnel mode SSL connection to the FortiGate unit. While the tunnel is active, the widget displays the amount of data that is sent and received. For more information, see Tunnel-mode features on page 1421. Tunnel mode requires a downloadable client application. If your computer is running Microsoft Windows, the Tunnel Mode widget provides a download link if you need to install the client on your computer. If you are using Macintosh or Linux, you can obtain and install an appropriate client application from the Fortinet Support site. For more information, see Downloading the SSL VPN tunnel mode client on page 1424. Depending on the web portal configuration and user group settings, some widgets might not be present. For example, the predefined web-access portal contains only the Session Information and Bookmarks widgets. While using the web portal, you can select the Help button to get information to assist you in using the portal features. This information displays in a separate browser window. When you have finished using the web portal, select the Logout button in the top right corner of the portal window.
Note: After making any changes to the web portal configuration, be sure to select Apply.
1412
Some server applications may prompt you for a user name and password. You must have a user account created by the server administrator so that you can log in.
Note: Windows file sharing through SMB/CIFS is supported through shared directories.
The FortiGate unit forwards client requests to servers on the Internet or internal network. To use the web-portal applications, you add the URL, IP address, or name of the server application to the My Bookmarks list. For more information, see Adding bookmarks.
Note: If you want to access a web server or telnet server without first adding a bookmark to the My Bookmarks list, use the Connection Tool instead. For more information, see Using the Connection Tool on page 1415.
1413
Adding bookmarks
You can add frequently used connections as bookmarks. Afterward, select any hyperlink from the Bookmarks list to initiate a session. To add a bookmark 1 In the Bookmarks widget, select Add. 2 Enter the following information:
Name Type Location Enter the name to display in the Bookmarks list. Select the abbreviated name of the server application or network service from the drop-down list. Enter the IP address or FQDN of the server application or network service. For RDP connections, you can append some parameters to control screen size and keyboard layout. See To start an RDP session on page 1418. Optionally enter a short description. The description displays when you pause the mouse pointer over the hyperlink. Single Sign On (SSO) is available for HTTP/HTTPS bookmarks only. Disabled This is not an SSO bookmark. Automatic Use your SSL VPN credentials or an alternate set. See the SSO Credentials field. Static Supply credentials and other required information (such as an account number) to a web site that uses an HTML form for authentication. You provide a list of the form field names and the values to enter into them. This method does not work for sites that use HTTP authentication, in which the browser opens a pop-up dialog box requesting credentials. SSL VPN Login Use your SSL VPN login credentials. Alternative Enter Username and Password below. Alternative username. Available if SSO Credentials is Alternative. Alternative password. Available if SSO Credentials is Alternative. Enter the field name, as it appears in the HTML form. Enter the field value. To use the values from SSO Credentials, enter %passwd% for password or %username% for username. Add another Field Name / Value pair.
Description SSO
Add
1414
Except for ping, these services require that you have an account on the server to which you connect.
Note: When you use the Connection Tool, the FortiGate unit may offer you its self-signed security certificate. Select Yes to proceed. A second message may be displayed to inform you of a host name mismatch. This message is displayed because the FortiGate unit is attempting to redirect your web browser connection. Select Yes to proceed.
To connect to a web server 1 In Type, select HTTP/HTTPS. 2 In the Host field, type the URL of the web server. For example: http://www.mywebexample.com or https://172.20.120.101 3 Select Go. 4 To end the session, close the browser window. To ping a host or server behind the FortiGate unit 1 In Type, select Ping. 2 In the Host field, enter the IP address of the host or server that you want to reach. For example: 10.11.101.22 3 Select Go. A message stating whether the IP address can be reached or not is displayed. To start a telnet session 1 In Type, select Telnet. 2 In the Host field, type the IP address of the telnet host. For example: 10.11.101.12
1415
4 Select Connect. 5 A telnet session starts and you are prompted to log in to the remote host. After you log in, you may enter any series of valid telnet commands at the system prompt. 6 To end the session, select Disconnect (or type exit) and then close the TELNET connection window. To start an FTP session 1 In Type, select FTP. 2 In the Host field, type the IP address of the FTP server. For example: 10.11.101.12 3 Select Go. A login window opens. 4 Enter your user name and password and then select Login. You must have a user account on the remote host to log in.
Figure 170: An FTP session
New Directory Up
Logout Upload
Delete Rename
1416
5 Manipulate the files in any of the following ways: To download a file, select the file link in the Name column. To access a subdirectory (Type is Folder), select the link in the Name column. To create a subdirectory in the current directory, select New directory. To delete a file or subdirectory from the current directory, select its Delete icon. To rename a file in the current directory, select its Rename icon. To upload a file to the current directory from your client computer, select Upload. When the current directory is a subdirectory, you can select Up to access the parent directory. 6 To end the FTP session, select Logout. To start an SMB/CIFS session 1 In Type, select SMB/CIFS. 2 In the Host field, type the IP address of the SMB or CIFS server. For example: 10.11.101.12 3 Select Go. A login window opens. 4 Enter your user name and password and then select Login. You must have a user account on the remote host to log in. New Directory Logout Up Upload
Delete Rename 5 Manipulate the files in any of the following ways: To download a file, select the file link in the Name column. To access a subdirectory (Type is Folder), select the file link in the Name column. To create a subdirectory in the current directory, select New Directory. To delete a file or subdirectory from the current directory, select its Delete icon. To rename a file, select its Rename icon. To upload a file from your client computer to the current directory, select Upload. When the current directory is a subdirectory, you can select Up to access the parent directory. 6 To end the SMB/CIFS session, select Logout and then close the SMB/CIFS window.
1417
To start an SSH session 1 In Type, select SSH. 2 In the Host field, type the IP address of the SSH host. For example: 10.11.101.12 3 Select Go. A login window opens. 4 Select Connect. A SSH session starts and you are prompted to log in to the remote host. You must have a user account to log in. After you log in, you may enter any series of valid commands at the system prompt.
5 To end the session, select Disconnect (or type exit) and then close the SSH connection window. To start an RDP session 1 In Type, select RDP. 2 In the Host field, type the IP address of the RDP host. For example: 10.11.101.12 3 Optionally, you can specify additional options for RDP by adding them to the Host field following the host address. See RDP options on page 1419 for information about the available options. For example, to use a French language keyboard layout you would add the -m parameter: 10.11.101.12 -m fr 4 Select Go. A login window opens.
1418
The screen configuration dialog does not appear if you specified the screen resolution with the host address. 6 When you are prompted to log in to the remote host, type your user name and password. You must have a user account on the remote host to log in.
7 Select Login. If you need to send Ctrl-Alt-Delete in your session, use Ctrl-Alt-End. 8 To end the RDP session, Log out of Windows or select Cancel from the Logon window.
RDP options
When you specify the RDP server address, you can also specify other options for your remote desktop session.
Screen resolution -f Make RDP fullscreen. Use this command to make the RDP window full screen or a specific the -g <width>x<height> window size. <width> and <height> are in pixels Example: -g 800x600 Authentication -u <user name> -p <password> Use these options to send your authentication credentials with the -d <domain> connection request, instead of entering them after the connection is established.
1419
Locale/Keyboard Use this option if the remote computer might not use the same keyboard layout as your computer. Select the locale code that matches your computer.
-m <locale> The supported values of <locale> are: ar da de de-ch en-gb en-uk en-us es fi fr fr-be fr-ca fr-ch hr hu Arabic Danish German Swiss German British English UK English US English Spanish Finnish French Belgian French Canadian French Swiss French Croatian Hungarian it ja lt lv mk no pl pt pt-br ru sl sv tk tr Italian Japanese Lithuanian Latvian Macedonian Norwegian Polish Portuguese Brazilian Portuguese Russian Slovenian Sudanese Turkmen Turkish
To start a VNC session 1 In Type, select VNC. 2 In the Host field, type the IP address of the VNC host. For example: 10.11.101.12 3 Select Go. A login window opens. 4 Type your user name and password when prompted to log in to the remote host. You must have a user account on the remote host to log in.
5 Select OK. If you need to send Ctrl-Alt-Delete in your session, press F8, then select Send Ctrl-Alt-Delete from the pop-up menu. 6 To end the VNC session, close the VNC window.
1420
Tunnel-mode features
Tunnel-mode features
For Windows users, the web portal Tunnel Mode widget provides controls for your tunnel mode connection and also provides status and statistics about its operation. You can also control and monitor tunnel mode operation from the standalone client application. For more information, see Using the tunnel mode client on page 1425.
Figure 171: Fortinet SSL VPN tunnel mode widget
Initiate a session and establish an SSL VPN tunnel with the FortiGate unit. End the session and close the tunnel to the FortiGate unit. Refresh the status and statistics immediately. The state of the SSL VPN tunnel: Up an SSL VPN tunnel with the FortiGate unit has been established. Down a tunnel connection has not been initiated. The number of bytes of data transmitted from the client to the FortiGate unit since the tunnel was established. The number of bytes of data received by the client from the FortiGate unit since the tunnel was established.
1421
Using FortiClient
Using FortiClient
Remote users can use FortiClient Endpoint Security to initiate an SSL VPN tunnel to connect to the internal network. FortiClient uses local port TCP 1024 to initiate an SSL encrypted connection to the FortiGate unit, on port TCP 10443. When connecting using FortiClient SSL, the FortiGate unit authenticates the FortiClient SSL VPN request based on the user group options. the FortiGate unit establishes a tunnel with the client and assigns a virtual IP address to the client PC. Once the tunnel has been established, the user can access the network behind the FortiGate unit. For information on configuring the FortiGate unit for SSL VPN connectivity, see Basic SSL VPN example on page 1429.
1422
Client configurations
There are several configurations of SSL VPN applications available. web mode tunnel mode virtual desktop
Web mode
SSL VPN web mode requires nothing more than a web browser. Microsoft Internet Explorer, Mozilla Firefox, and Apple Safari browsers are supported. For detailed information about supported browsers see the Release Notes for your FortiOS firmware.
Tunnel mode
SSL VPN tunnel mode establishes a connection to the remote protected network that any application can use. This requires a tunnel client application specific to your computer operating system. The tunnel client application installs a network driver that sends and receives data through the SSL VPN tunnel. If your computer runs Microsoft Windows, you can download the tunnel mode client from the web portal Tunnel Mode widget. After you install the client, you can start and stop tunnel operation from the Tunnel Mode widget, or you can open the tunnel mode client as a standalone application. You can find the tunnel mode client on the Start menu at All Programs > FortiClient > FortiClient SSL VPN. If your computer runs Linux or Mac OS X, you can obtain an appropriate tunnel mode client application from the Fortinet Support web site. See the Release Notes for your FortiOS firmware for the specific operating system versions that are supported. On Linux and Mac OS X platforms, tunnel mode operation cannot be initiated from the web portal Tunnel Mode widget. You must use the standalone tunnel client application. When a system configuration must involve more secure disposal of cached data, the SSL VPN Virtual Desktop should be used. (Available on Windows only).
1423
The most recent version of the SSL VPN standalone client applications can be found at: http://support.fortinet.com/ To download the SSL VPN tunnel client 1 Log in to Fortinet Support at http://support.fortinet.com/. 2 In the Download area, select Firmware Images. 3 Select FortiGate. 4 Select v4.00 and then select the latest firmware release. 5 Select SSL VPN Clients. 6 Select the appropriate client. Windows: SslvpnClient.exe or SslvpnClient.msi Linux: forticlientsslvpn_linux_<version>.tar.gz Mac OS X: forticlientsslvpn_macosx_<version>.dmg
Note: The location of the SSL VPN tunnel client on the Support web site is subject to change. If you have difficulty finding the appropriate file, contact Customer Support.
1424
Windows
Double-click the SslvpnClient.exe or SslvpnClient.msi file and follow the on-screen instructions.
Linux
1 Extract the forticlientsslvpn_linux_<version>.tar.gz package file to a folder and run the client program forticlientsslvpn. When you run the install program for the first time, you will have to set up system parameters (root privileges) before you run the program or before other users without administrator privileges can use the application. 2 In the First Run dialog, select OK. After this initial setup is complete, a user with a normal (non-administrator) account can establish an SSL VPN tunnel session.
MAC OS client
1 Double-click on the forticlientsslvpn_macosx_<version>.dmg file. 2 Double-click the forticlientsslvpn.pkg file inside the disk image and follow the instructions. The application installs the program forticlientsslvpn.app in the Applications folder
Windows client
To use the SSL VPN standalone tunnel client (Windows) 1 Go to Start > All Programs > FortiClient > FortiClient SSL VPN. 2 Enter the following information. Use the Connect and Disconnect buttons to control the tunnel connection.
Connection Name If you have pre-configured the connection settings, select the connection from the list and then select Connect. Otherwise, enter the settings in the fields below. To pre-configure connection settings, see To configure tunnel client settings (Windows) on page 1426. Enter the IP address or FQDN of the FortiGate unit that hosts the SSL VPN. Enter your user name. Enter the password associated with your user account. Use this field if the SSL VPN requires a certificate for authentication. Select the required certificate from the drop-down list. The certificate must be installed in the Internet Explorer certificate store.
1425
Connection
Status: Connected or Disconnected Duration: Hours, minutes, seconds since session started Bytes Sent / Bytes Received: amount of data transferred Select to open the Settings dialog. See To configure tunnel client settings (Windows) on page 1426. Start tunnel mode operation. Stop tunnel mode operation. Close the tunnel mode client application.
To configure tunnel client settings (Windows) 1 Go to Start > All Programs > FortiClient > FortiClient SSL VPN. 2 Select Settings.... 3 Select New Connection, or select an existing connection and then select Edit. 4 Enter the Connection Name. 5 Enter the connection information. You can also enter a Description. Select OK. See To use the SSL VPN standalone tunnel client (Windows) on page 1425 for information about the fields. 6 Select Keep connection alive until manually stopped to prevent tunnel connections from closing due to inactivity. 7 Select OK.
Linux client
To use the SSL VPN standalone tunnel client (Linux) 1 Go to the folder where you installed the Linux tunnel client application and double-click on forticlientsslvpn. 2 Enter the following information. Use the Connect and Stop buttons to control the tunnel connection.
Connection If you have pre-configured the connection settings, select the connection from the list and then select Connect. Otherwise, enter the settings in the fields below. To pre-configure connection settings, see To configure tunnel client settings (Windows) on page 1426. Enter the IP address or FQDN of the FortiGate unit that hosts the SSL VPN. In the smaller field, enter the SSL VPN port number (default 10443). Enter your user name. Enter the password associated with your user account. Use this field if the SSL VPN requires a certificate for authentication. Select the certificate file (PKCS#12) from the drop-down list, or select the Browse (...) button and find it. Enter the password required for the certificate file. Select to open the Settings dialog. See To configure tunnel client settings (Linux) on page 1426.
Password Settings...
To configure tunnel client settings (Linux) 1 Go to the folder where you installed the Linux tunnel client application and double-click forticlientsslvpn. 2 Select Settings....
1426
3 Select Keep connection alive until manually stopped to prevent tunnel connections from closing due to inactivity. 4 Select Start connection automatically. The next time the tunnel mode application starts, it will start the last selected connection. 5 If you use a proxy, enter in Proxy the proxy server IP address and port. Enter proxy authentication credentials immediately below in User and Password. 6 Select the + button to define a new connection, or select from the list an existing connection to modify. For a new connection, the Connection window opens. For an existing connection, the current settings appear in the Settings window and you can modify them. 7 Enter the connection information. If you are creating a new connection, select Create when you are finished. See To use the SSL VPN standalone tunnel client (Linux) on page 1426 for information about the fields. 8 Select Done.
MAC OS X client
To use the SSL VPN standalone tunnel client (Mac OS X) 1 Go to the Applications folder and double-click on forticlientsslvpn.app. 2 Enter the following information. Use the Connect and Stop buttons to control the tunnel connection.
Connection If you have pre-configured the connection settings, select the connection from the list and then select Connect. Otherwise, enter the settings in the fields below. To pre-configure connection settings, see To configure tunnel client settings (Mac OS X) on page 1427. Enter the IP address or FQDN of the FortiGate unit that hosts the SSL VPN. In the smaller field, enter the SSL VPN port number (default 10443). Enter your user name. Enter the password associated with your user account. Use this field if the SSL VPN requires a certificate for authentication. Select the certificate file (PKCS#12) from the drop-down list, or select the Browse (...) button and find it. Enter the password required for the certificate file. Select to open the Settings dialog. See To configure tunnel client settings (Mac OS X) on page 1427.
Server
Password Settings...
To configure tunnel client settings (Mac OS X) 1 Go to the Applications folder and double-click on forticlientsslvpn.app. 2 Select Settings.... 3 Select Keep connection alive until manually stopped to prevent tunnel connections from closing due to inactivity. 4 Select Start connection automatically. The next time the tunnel mode application starts, it will start the last selected connection.
FortiOS Handbook v3: SSL VPN 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1427
5 If you use a proxy, enter in Proxy the proxy server IP address and port. Enter proxy authentication credentials immediately below in User and Password. 6 Select the + button to define a new connection, or select from the list an existing connection to modify. 7 Enter the connection information. If you are creating a new connection, select Create when you are finished. See To use the SSL VPN standalone tunnel client (Mac OS X) on page 1427 for information about the fields. 8 Select Done.
1428
Examples
In the most common Internet scenario, the remote client connects to an ISP that offers connections with dynamically assigned IP addresses. The ISP forwards packets from the remote client to the Internet, where they are routed to the public interface of the FortiGate unit. At the FortiGate unit, you configure user groups and security policies to define the server applications and IP address range or network that remote clients will be able to access behind the FortiGate unit. This section contains the following topics: Basic SSL VPN example Multiple user groups with different access permissions example
Re
C ote
lien
F t or iG at e_ 1
S P T 0 T 12 /H 1. P 0 T 1 r T 1. H .1 ve 0 er 6 10 S 1.1 S 0 N .1 D 11 er 0 . rv 7 10 1 e S 1. P 0 r T .1 F 1 ve .1 er 80 S .1 10 1 ba 10 . am 1 S .1 10
1429
Examples
Infrastructure requirements
The FortiGate unit must be operating in NAT mode and have a static public IP address. The ISP assigns IP addresses to remote clients before they connect to the FortiGate unit.
For information about client operating system and browser requirements, see the Release Notes for your FortiGate firmware.
2 Create the web portal. 3 Create user accounts. 4 Create the SSL VPN user group and add the users. In the user group configuration, you specify the web portal to which the users are directed. 5 Create the security policies: The SSL VPN security policy enables web mode access to the protected network. The tunnel-mode policy enables tunnel mode access to the protected network.
6 Create a static route to direct packets destined for tunnel users to the SSL VPN tunnel.
To define destination addresses - CLI config firewall address edit OfficeLAN set type ipmask set subnet 10.11.101.0/24 set associated-interface port2 end
1430
Examples
To define destination addresses - CLI config firewall address edit SSL_tunnel_users set type ipmask set subnet 10.11.254.0/24 end
Enabling SSL VPN and setting the tunnel user IP address range
By default, SSL VPN is not enabled. At the same time as you enable SSL VPN, you can define the IP address range from which SSL VPN tunnel-mode clients are assigned their virtual IP addresses. To enable SSL VPN and set tunnel address range - CLI config vpn ssl settings set sslvpn-enable enable set tunnel-ip-pools SSL_tunnel_users end To set tunnel address range - web-based manager 1 Go to VPN > SSL > Config. 2 In IP Pools, select Edit. 3 In the Available list, select SSL_tunnel_users and then select the down arrow button to move the address to the Selected list. 4 Select OK. 5 Select Apply.
1431
Examples
4 Select OK, then select OK again. To create the web portals - CLI config vpn ssl web portal edit portal1 config widget edit 0 set type tunnel set tunnel-status enable end end
3 From the Available list, select user1 and move it to the Members list by selecting the right arrow button. 4 Select OK. To create the user group - CLI config user group edit group1 set group-type sslvpn set member user1 set sslvpn-portal portal1 end
1432
Examples
To create the SSL VPN security policy - web-based manager 1 Go to Policy > Policy > Policy. 2 Select Create New and enter the following information:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Action User Authentication Method port1 All port2 OfficeLAN SSL-VPN Local
4 Select OK, and then select OK again. To create the SSL VPN security policy - CLI config firewall policy edit 0 set srcintf port1 set dstintf port2 set srcaddr all set dstaddr OfficeLAN set action ssl-vpn config identity-based-policy edit 1 set groups group1 set schedule always set service ANY end end
1433
Examples
To create the tunnel-mode security policy - web-based manager 1 Go to Policy > Policy > Policy. 2 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action NAT sslvpn tunnel interface (ssl.root) SSL_tunnel_users port2 OfficeLAN always ANY ACCEPT Enable
To create the tunnel-mode security policy - CLI config firewall policy edit 0 set srcintf ssl.root set dstintf port2 set srcaddr SSL_tunnel_users set dstaddr OfficeLAN set action accept set schedule always set service ANY set nat enable end
Device
To add a route to SSL VPN tunnel mode clients - CLI config router static edit 0 set device ssl.root set dst 10.11.254.0/24 end
1434
Examples
Us
Us
er2
10 rt 3 1. Po 1.20 1 . 10
0 F
S P T 0 T 2 1 /H 1. P 0 T 1 r T 1. H .1 ve 0 er 16 10 S 1. S 0 N .1 r D 11 . ve 70 10 er 1 S 1. P 0 r T .1 F 11 ve . er 80 S .1 10 1 ba 10 . am 1 S .1 10
In this example configuration, there are two users: user1 can access the servers on Subnet_1 user2 can access the workstation PCs on Subnet_2
You could easily add more users to either user group to provide them access to the user groups assigned web portal.
2 Create two web portals. 3 Create two user accounts, user1 and user2. 4 Create two user groups. For each group, add a user as a member and select a web portal. In this example, user1 will belong to group1, which will be assigned to portal1. 5 Create security policies: two SSL VPN security policies, one to each destination two tunnel-mode policies to allow each group of users to reach its permitted destination network
6 Create the static route to direct packets for the users to the tunnel.
2 4 t_ /2 ne 1.0 ub 0 S 1.2 .1 10
1435
Examples
3 Select Create New, enter the following information, and select OK.
Address Name Type Subnet / IP Range Interface Subnet_2 Subnet / IP Range 10.11.201.0/24 port3
To define destination addresses - CLI config firewall address edit Subnet_1 set type ipmask set subnet 10.11.101.0/24 set associated-interface port2 next edit Subnet_2 set type ipmask set subnet 10.11.201.0/24 set associated-interface port3 end
1436
Examples
3 Select Create New, enter the following information, and select OK.
Address Name Type Subnet / IP Range Interface Tunnel_group2 Subnet / IP Range 10.11.254.[51-100] Any
To define tunnel client addresses - CLI config firewall address edit Tunnel_group1 set type iprange set end-ip 10.11.254.50 set start-ip 10.11.254.1 next edit Tunnel_group2 set type iprange set end-ip 10.11.254.100 set start-ip 10.11.254.51 end
1437
Examples
To create the web portals - CLI config vpn ssl web portal edit portal1 set allow-access ftp ping rdp smb ssh telnet vnc web config widget edit 0 set type tunnel set tunnel-status enable set ip-pools "Tunnel_group1" end next edit portal2 set allow-access ftp ping rdp smb ssh telnet vnc web config widget edit 0 set type tunnel set tunnel-status enable set ip-pools "Tunnel_group2" end end end Later, you can configure these portals with bookmarks and enable connection tool capabilities for the convenience of your users.
3 From the Available list, select user1 and move it to the Members list by selecting the right arrow button. 4 Select OK. 5 Repeat steps 2 through 4 to create group2, assigned to portal2, with user2 as its only member. To create the user groups - CLI config user group edit group1 set group-type sslvpn set member user1 set sslvpn-portal portal1 next
SSL VPN for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1438
Examples
edit group2 set group-type sslvpn set member user2 set sslvpn-portal portal2 end
To create the SSL VPN security policies - web-based manager 1 Go to Policy > Policy > Policy. 2 Select Create New and enter the following information:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Action port1 All port2 Subnet_1 SSL-VPN
4 Select OK, and then select OK again. 5 Select Create New and enter the following information:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Action port1 All port3 Subnet_2 SSL-VPN
1439
Examples
7 Select OK, and then select OK again. To create the SSL VPN security policies - CLI config firewall policy edit 0 set srcintf port1 set dstintf port2 set srcaddr all set dstaddr Subnet_1 set action ssl-vpn set nat enable config identity-based-policy edit 1 set groups group1 set schedule always set service ANY end next edit 0 set srcintf port1 set dstintf port3 set srcaddr all set dstaddr Subnet_2 set action ssl-vpn set nat enable config identity-based-policy edit 1 set groups group2 set schedule always set service ANY end end To create the tunnel-mode security policies - web-based manager 1 Go to Policy > Policy > Policy. 2 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Action NAT sslvpn tunnel interface (ssl.root) Tunnel_group1 port2 Subnet_1 ACCEPT Enable
3 Select Create New, enter the following information, and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address sslvpn tunnel interface (ssl.root) Tunnel_group2 port3 Subnet_2
1440
Examples
Action NAT
ACCEPT Enable
To create the tunnel-mode security policies - CLI config firewall policy edit 0 set srcintf ssl.root set dstintf port2 set srcaddr Tunnel_group1 set dstaddr Subnet_1 set action accept set schedule always set service ANY set nat enable next edit 0 set srcintf ssl.root set dstintf port3 set srcaddr Tunnel_group2 set dstaddr Subnet_2 set action accept set schedule always set service ANY set nat enable end end
Device
To add a route to SSL VPN tunnel mode clients - CLI config router static edit 0 set device ssl.root set dst 10.11.254.0/24 end
1441
Examples
1442
1443
1444
Routing concepts
Many routing concepts apply to static routing. However without first understanding these basic concepts, it is difficult to understand the more complex dynamic routing. This section includes: Routing in VDOMs Default route Routing table Building the routing table Static routing security Multipath routing and determining the best route
Routing in VDOMs
Routing on FortiGate units is configured per-VDOM. This means if VDOMs are enabled, you must enter a VDOM to do any routing configuration. This allows each VDOM to operate independently of each other, with their own default routes and routing configuration. In this guide, the procedures assume your FortiGate unit has VDOMs disabled. This is stated in the assumptions for the examples. If you have VDOMs enabled you will need to perform the following steps in addition to the procedures steps. To route in VDOMs - web-based manager Select the VDOM that you want to view or configure at the bottom of the main menu. To route in VDOMs - CLI Before following any CLI routing procedures with VDOMs enabled, enter the following commands. For this example, it is assumed you will be working in the root VDOM. Change root to the name of your selected VDOM as needed. config vdom edit root Following these commands, you can enter any routing CLI commands as normal.
1445
Routing concepts
Default route
The default route is used if either there are no other routes in the routing table or if none of the other routes apply to a destination. Including the gateway in the default route gives all traffic a next-hop address to use when leaving the local network. The gateway address is normally another router on the edge of the local network. All routers, including FortiGate units, are shipped with default routes in place. This allows customers to set up and become operational more quickly. Beginner administrators can use the default route settings until a more advanced configuration is warranted. FortiGate units come with a default static route with an IPv4 address of 0.0.0.0, an administration distance of 10, and a gateway IPv4 address.
Routing table
When two computers are directly connected, there is no need for routing because each computer knows exactly where to find the other computer. They communicate directly. Networking computers allows many computers to communicate with each other. This requires each computer to have an IP address to identify its location to the other computers. This is much like a mailing address - you will not receive your postal mail at home if you do not have an address for people to send mail to. The routing table on a computer is much like an address book used to mail letters to people in that the routing table maintains a list of how to reach computers. Routing tables may also include information about the quality of service (QoS) of the route, and the interface associated with the route if the device has multiple interfaces. Routing tables are also used in unicast reverse path forwarding (uRPF). In uRPF, the router not only looks up the destination information, but also the source information to ensure that it exists. If there is no source to be found, then that packet is dropped because the router assumes it to be an error or an attack on the network. Looking at routing as delivering letters is more simple than reality. In reality, routers loose power or have bad cabling, network equipment is moved without warning, and other such events happen that prevent static routes from reaching their destinations. When any changes such as these happen along a static route, traffic can no longer reach the destination the route goes down. Dynamic routing can address these changes to ensure traffic still reaches its destination. The process of realizing there is a problem, backtracking and finding a route that is operational is called convergence. If there is fast convergence in a network, users wont even know that re-routing is taking place. The routing table for any device on the network has a limited size. For this reason, routes that arent used are replaced by new routes. This method ensures the routing table is always populated with the most current and most used routesthe routes that have the best chance of being reused. Another method used to maintain the routing tables size is if a route in the table and a new route are to the same destination, one of the routes is selected as the best route to that destination and the other route is discarded. Routing tables are also used in unicast reverse path forwarding (uRPF). In uRPF, the router not only looks up the destination information, but also the source information to ensure that it exists. If there is no source to be found, then that packet is dropped because the router assumes it to be an error or an attack on the network.
1446
Routing concepts
The routing table is used to store routes that are learned. The routing table for any device on the network has a limited size. For this reason, routes that arent used are replaced by new routes. This method ensures the routing table is always populated with the most current and most used routes the routes that have the best chance of being reused. Another method used to maintain the routing tables size is if a route in the table and a new route are to the same destination, one of the routes is selected as the best route to that destination and the other route is discarded. Some actions you can perform on the routing table include: Viewing the routing table in the web-based manager Viewing the routing table in the CLI Searching the routing table
1447
Routing concepts
IP version
Select IPv4 or IPv6 routes. Fields displayed vary depending on which IP version is selected. Displayed only if IPv6 display is enabled on the web-based manager Select one of the following route types to search the routing table and display routes of the selected type only: All all routes recorded in the routing table. Connected all routes associated with direct connections to FortiGate unit interfaces. Static the static routes that have been added to the routing table manually. RIP all routes learned through RIP. For more information see Routing Information Protocol (RIP) on page 1487. BGP all routes learned through BGP. For more information see Border Gateway Protocol (BGP) on page 1523. OSPF all routes learned through OSPF. For more information see Open Shortest Path First (OSPF) on page 1561. IS-IS all routes learned through IS-IS. For more information see Intermediate System To Intermediate System Protocol (IS-IS) on page 1599. HA RIP, OSPF, and BGP routes synchronized between the primary unit and the subordinate units of a high availability (HA) cluster. HA routes are maintained on subordinate units and are visible only if you are viewing the router monitor from a virtual domain that is configured as a subordinate virtual domain in a virtual cluster. Not displayed when IP version IPv6 is selected. For details about HA routing synchronization, see the FortiGate HA User Guide. Enter an IP address and netmask (for example, 172.16.14.0/24) to search the routing table and display routes that match the specified network. Not displayed when IP version IPv6 is selected. Enter an IP address and netmask (for example, 192.168.12.1/32) to search the routing table and display routes that match the specified gateway. Not displayed when IP version IPv6 is selected.
Type
Network
Gateway
Apply Filter Select to search the entries in the routing table based on the specified search criteria and display any matching routes. Not displayed when IP version IPv6 is selected. Type The type values assigned to FortiGate unit routes (Static, Connected, RIP, OSPF, or BGP). Not displayed when IP version IPv6 is selected. If applicable, the subtype classification assigned to OSPF routes. An empty string implies an intra-area route. The destination is in an area to which the FortiGate unit is connected. OSPF inter area the destination is in the OSPF AS, but the FortiGate unit is not connected to that area. External 1 the destination is outside the OSPF AS. This is known as OSPF E1 type. The metric of a redistributed route is calculated by adding the external cost and the OSPF cost together. External 2 the destination is outside the OSPF AS. This is known as OSPF E2 type. In this case, the metric of the redistributed route is equivalent to the external cost only, expressed as an OSPF cost. OSPF NSSA 1 same as External 1, but the route was received through a not-sostubby area (NSSA). OSPF NSSA 2 same as External 2, but the route was received through a not-sostubby area. For more information on OSPF subtypes, see OSPF Background and concepts on page 1561. Not displayed when IP version 6 is selected. The IP addresses and network masks of destination networks that the FortiGate unit can reach. The administrative distance associated with the route. A value of 0 means the route is preferable compared to other routes to the same destination. Modifying this distance for dynamic routes is route distribution.
Subtype
Network Distance
1448
Routing concepts
Metric
The metric associated with the route type. The metric of a route influences how the FortiGate unit dynamically adds it to the routing table. The following are types of metrics and the protocols they are applied to. Hop count routes learned through RIP. Relative cost routes learned through OSPF. Multi-Exit Discriminator (MED) routes learned through BGP. However, several attributes in addition to MED determine the best path to a destination network. For more information on BGP attributes, see BGP attributes on page 1530. The IP addresses of gateways to the destination networks. The interface through which packets are forwarded to the gateway of the destination network. The total accumulated amount of time that a route learned through RIP, OSPF, or BGP has been reachable. Not displayed when IP version IPv6 is selected.
To view the routing table # get router info routing-table all Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default S* S S C B C 0.0.0.0/0 [10/0] via 192.168.183.254, port2 1.0.0.0/8 [10/0] via 192.168.183.254, port2 2.0.0.0/8 [10/0] via 192.168.183.254, port2 10.142.0.0/23 is directly connected, port3 10.160.0.0/23 [20/0] via 10.142.0.74, port3, 2d18h02m 192.168.182.0/23 is directly connected, port2
1449
Routing concepts
proto
1450
Routing concepts
gwy dev
gateway - the IPv4 address of the gateway this route will use
outgoing interface index. This number is associated with the interface for this route, and if VDOMs are enabled the VDOM will be included here as well. If an interface alias is set for this interface it will also be displayed here.
To search the FortiGate unit routing table in the CLI FGT # get router info routing-table details 10.10.10.10 Routing entry for 10.10.10.10/24 Known via "static", distance 10, metric 0, best If there are multiple routes that match your filter, they will all be listed, with the best match at the top of the list as indicated by the word best.
1451
Routing concepts
It is possible that the routing table is faced with several different routes to the same destination the IP addresses of the next-hop router specified in those routes or the FortiGate interfaces associated with those routes may vary. In this situation, the best route is selected from the table. The FortiGate unit selects the best route for a packet by evaluating the information in the routing table. The best route to a destination is typically associated with the shortest distance between the FortiGate unit and the closest gateway, also known as a next-hop router. In some cases, the next best route may be selected if the best route is unavailable. The FortiGate unit installs the best available routes in the units forwarding table, which is a subset of the units routing table. Packets are forwarded according to the information in the forwarding table.
1452
Routing concepts
The above steps show that traffic from your internal network will originate on the 10.11.101.0 subnet and pass on to the 172.20.120.0 network. The FortiGate unit moves the traffic to the proper subnet. In doing that, the traffic appears to originate from the FortiGate unit interface on that subnet it does not appear to originate from where it actually came from. NAT hides the internal network from the external network. This provides security through obscurity. If a hacker tries to directly access your network, they will find the Fortigate unit, but will not know about your internal network. The hacker would have to get past the security-hardened FortiGate unit to gain access to your internal network. NAT will not prevent hacking attempts that piggy back on valid connections between the internal network and the outside world. However other UTM security measures can deal with these attempts. Another security aspect of NAT is that many programs and services have problems with NAT. Consider if someone on the Internet tries to initiate a chat with someone on the internal network. The outsider only can access the FortiGate units external interface unless the security policy allows the traffic through to the internal network. If allowed in, the proper internal user would respond to the chat. However if its not allowed, the request to chat will be refused or time-out. This is accomplished in the security policy by allowing or denying different protocols.
Blackhole Route
A blackhole route is a route that drops all traffic sent to it. It is very much like /dev/null in Linux programming. Blackhole routes are used to dispose of packets instead of responding to suspicious inquiries. This provides added security since the originator will not discover any information from the target network. Blackhole routes can also limit traffic on a subnet. If some subnet addresses are not in use, traffic to those addresses (traffic which may be valid or malicious) can be directed to a blackhole for added security and to reduce traffic on the subnet. The loopback interface, a virtual interface that does not forward traffic, was added to enable easier configuration of blackhole routing. Similar to a normal interface, this loopback interface has fewer parameters to configure, and all traffic sent to it stops there. Since it cannot have hardware connection or link status problems, it is always available, making it useful for other dynamic routing roles. Once configured, you can use a loopback interface in security policies, routing, and other places that refer to interfaces. You configure this feature only from the CLI. For more information, see the system chapter of the FortiGate CLI Reference.
FortiOS Handbook v3: Advanced Routing 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1453
Routing concepts
1454
Routing concepts
Table 82: Default administrative distances for routing protocols and connections Routing protocol Direct physical connection Static EBGP OSPF RIP IBGP Default administrative distance 1 10 20 110 120 200
Another method to determine the best route is to manually change the priority of both routes in question. If the next-hop administrative distances of two routes on the FortiGate unit are equal, it may not be clear which route the packet will take. Manually configuring the priority for each of those routes will make it clear which next-hop will be used in the case of a tie. The priority for a route can only be set from the CLI. Lower priorities are preferred. Priority is a Fortinet value that may or may not be present in other brands of routers. All entries in the routing table are associated with an administrative distance. If the routing table contains several entries that point to the same destination (the entries may have different gateways or interface associations), the FortiGate unit compares the administrative distances of those entries first, selects the entries having the lowest distances, and installs them as routes in the FortiGate unit forwarding table. As a result, the FortiGate unit forwarding table contains only those routes having the lowest distances to every possible destination. While only static routing uses administrative distance as its routing metric, other routing protocols such as RIP can use metrics that are similar to administrative distance.
Route priority
After the FortiGate unit selects static routes for the forwarding table based on their administrative distances, the priority field of those routes determines routing preference. Priority is a Fortinet value that may or may not be present in other brands of routers. You can configure the priority field through the CLI or the web-based manager. Priority values can range from 0 to 4 294 967 295. The route with the lowest value in the priority field is considered the best route. It is also the primary route. To change the priority of a route - web-based manager 1 Go to Router > Static > Static Route. 2 Select the route entry, and select Edit. 3 Enter the Priority value. 4 Select OK. To change the priority of a route - CLI The following command changes the priority to 5 for a route to the address 10.10.10.1 on the port1 interface. config router static edit 1 set device port1 set gateway 10.10.10.10
FortiOS Handbook v3: Advanced Routing 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1455
Routing concepts
set dst 10.10.10.1 set priority 5 end If there are other routes set to priority 10, the route set to priority 5 will be preferred. If there are routes set to priorities less than 5, those other routes will be preferred instead. In summary, because you can use the CLI to specify which sequence numbers or priority field settings to use when defining static routes, you can prioritize routes to the same destination according to their priority field settings. For a static route to be the preferred route, you must create the route using the config router static CLI command and specify a low priority for the route. If two routes have the same administrative distance and the same priority, then they are equal cost multipath (ECMP) routes. Since this means there is more than one route to the same destination, it can be confusing which route or routes to install and use. However, if you have enabled load balancing with ECMP routes, then different sessions will resolve this problem by using different routes to the same address.
Ping
Beyond the basic connectivity information, ping can tell you the amount of packet loss (if any), how long it takes the packet to make the round trip, and the variation in that time from packet to packet. If there is no packet loss detected, your basic network connectivity is OK. If there is some packet loss detected, you should investigate: possible ECMP, split horizon, network loops cabling to ensure no loose connections
If there is total packet loss, you should investigate: hardware - ensure cabling is correct, and all equipment between the two locations is accounted for addresses and routes - ensure all IP addresses and routing information along the route is configured as expected firewalls - ensure all firewalls are set to allow PING to pass through
To ping from a Windows PC 1 Go to a DOS prompt. Typically you go to Start > Run, enter cmd and select OK. 2 Enter ping 10.11.101.100 to ping the default internal interface of the FortiGate unit with four packets.
1456
Routing concepts
To ping from a Linux PC 1 Go to a command line prompt. 2 Enter /bin/etc/ping 10.11.101.101. For more information on ping, see Troubleshooting connectivity on page 665.
Traceroute
Where ping will only tell you if it reached its destination and came back successfully, traceroute will show each step of its journey to its destination and how long each step takes. If ping finds an outage between two points, traceroute can be used to locate exactly where the problem is. To use traceroute on an MS Windows PC 1 Go to a DOS prompt. Typically you go to Start > Run, enter cmd and select OK. 2 Enter tracert fortinet.com to trace the route from the PC to the Fortinet website. To perform a traceroute on a Linux PC 1 Go to a command line prompt. 2 Enter /bin/etc/traceroute fortinet.com. The Linux traceroute output is very similar to the MS Windows traceroute output.
1457
Route priority
After the FortiGate unit selects static routes for the forwarding table based on their administrative distances, the priority field of those routes determines routing preference. Priority is a Fortinet value that may or may not be present in other brands of routers. You can only configure the priority field through the CLI. Priority values can range from 0 to 255. The route with the lowest value in the priority field is considered the best route, and it is also the primary route. For example, use the following command to change the priority of a route to 5 for a route to the address 10.10.10.1 on the port1 interface. config router static edit 1 set device port1 set gateway 10.10.10.10 set dst 10.10.10.1 set priority 5 end If there are other routes at priority 10, this route will be preferred. If there are routes at priority less than 5, those other routes will be preferred instead. In summary, because you can use the CLI to specify which sequence numbers or priority field settings to use when defining static routes, you can prioritize routes to the same destination according to their priority field settings. For a static route to be the preferred route, you must create the route using the config router static CLI command and specify a low priority for the route. If two routes have the same administrative distance and the same priority, then they are equal cost multipath (ECMP) routes. Since this means there is more than one route to the same destination, it can be confusing which route or routes to install and use. However, if you have enabled load balancing with ECMP routes, then different sessions will resolve this problem by using different routes to the same address.
1458
Note: If multiple routes to the same destination have the same priority but different distances, the route with the lowest distance is used. If multiple routes to the same destination have the same distance but different priorities, the route with the lowest priority is used. Distance takes precedence over priority. If multiple routes to the same destination have different distances and different priorities, the route with the lowest distance is always used even if it has the highest priority.
Using ECMP, if more than one ECMP route is available you can configure how the FortiGate unit selects the route to be used for a communication session. If only one ECMP route is available (for example, because an interface cannot process traffic because interface status detection does not receive a reply from the configured server) then all traffic uses this route. Previous versions of FortiOS provided source IP-based load balancing for ECMP routes, but now FortiOS includes three configuration options for ECMP route failover and load balancing:
Source based (also called source IP based) Weighted Load Balance (also called weight-based) The FortiGate unit load balances sessions among ECMP routes based on the source IP address of the sessions to be load balanced. This is the default load balancing method. No configuration changes are required to support source IP load balancing. The FortiGate unit load balances sessions among ECMP routes based on weights added to ECMP routes. More traffic is directed to routes with higher weights. After selecting weight-based you must add weights to static routes.
Spillover (also called The FortiGate unit distributes sessions among ECMP routes based on how busy the FortiGate interfaces added to the routes usage-based) are. After selecting spill-over you add route Spillover Thresholds to interfaces added to ECMP routes. The FortiGate unit sends all ECMP-routed sessions to the lowest numbered interface until the bandwidth being processed by this interface reaches its spillover threshold. The FortiGate unit then spills additional sessions over to the next lowest numbered interface. The Spillover Thresholds range is 0-2097000 KBps.
You can configure only one of these ECMP route failover and load balancing methods in a single VDOM. If your FortiGate unit is configured for multiple VDOM operation, each VDOM can have its own ECMP route failover and load balancing configuration. To configure the ECMP load balancing method from the web-based manager 1 Go to Router > Static > Settings. 2 Set ECMP Load Balance Method to Source IP based, Weighted Load Balance, or Spillover. To configure the ECMP load balancing method from the CLI For example, to set the load balancing method to usage-based, enter the following: config system settings set v4-ecmp-mode usage-based end
1459
To configure gateway failover detection for an interface 1 Go to Router > Static > Settings. 2 Under Dead Gateway Detection, select Create New. 3 Enter the following information:
Interface Ping Server Detect Protocol Ping Select the interface to test. Enter the IP address of the server to test. Select one of the following protocols. Use standard ICMP ping to confirm that the server is responding. Ping confirms that the server can respond to an ICMP ping request.
1460
TCP Echo
Use TCP echo to confirm that the server is responding. Select this option if the server is configured to provide TCP echo services. In some cases a server may be configured to reply to TCP echo requests but not to reply to ICMP pings. TCP echo uses TCP packets on port number 7 to send a text string to the server and expect an echo reply back from the server. The echo reply just echoes back the same text to confirm that the server can respond to TCP requests. FortiGate units do not recognize RST (reset) packets from TCP Echo servers as normal TCP echo replies. If the unit receives an RST response to a TCP echo request, the unit assumes the server is unreachable. Use UDP echo to detect the server. Select this option if the server is configured to provide UDP echo services. In some cases a server may be configured to reply to UDP echo requests but not to reply ICMP pings. UDP echo uses UDP packets on port number 7 to send a text string to the server and expects an echo reply from the server. The echo reply just echoes back the same text to confirm that the server can respond to UDP requests. Enter the interval between pings, in seconds. Enter the number of times the test can fail before the unit assumes that the interface cannot connect to the server.
UDP Echo
Note: For more information about TCP echo and UDP echo, see RFC 862.
4 Select OK. To configure gateway failover detection for an interface - CLI config router gwdetect edit port1 set protocol ping set server 10.10.10.1 set interval 5 set failtime 5 end
1461
2 Set ECMP Load Balance Method to Spillover. 3 Go to Router > Static > Static Route. 4 Add ECMP routes for port3 and port4.
Destination IP/Mask 192.168.20.0/24 Device Gateway Advanced Distance 10 port3 172.20.130.3
5 Go to System > Network > Interface. 6 Edit port3 and port4 and add the following spillover-thresholds:
Interface Spillover Threshold Interface Spillover Threshold port3 100 port4 200
To add Spillover Thresholds to interfaces - CLI config system settings set v4-ecmp-mode usage-based end config router static edit 1 set device port3 set dst 192.168.20.0 255.255.255.0 set gateway 172.20.130.3 next edit 2 set device port4 set dst 192.168.20.0 255.255.255.0 set gateway 172.20.140.4 end config system interface edit port3 set spillover-threshold 100 next edit port4 set spillover-threshold 200 end
1462
For example, consider a FortiGate unit with interfaces port3 and port4 both connected to the Internet through different ISPs. ECMP routing is set to usage-based and route spillover for to 100 KBps for port3 and 200 KBps for port4. Two ECMP default routes are added, one for port3 and one for port4. If the route to port3 is higher in the routing table than the route to port4, the FortiGate unit sends all default route sessions out port3 until port3 is processing 10Mbps of data. When port3 reaches its configured bandwidth limit, the FortiGate unit sends all default route sessions out port4. When the bandwidth usage of port3 falls below 10Mbps, the FortiGate again sends all default route sessions out port3. New sessions to designating IP addresses that are already in the routing cache; however, use the cached routes. This means that even of port3 is exceeding its bandwidth limit, new sessions can continue to be sent out port3 if their destination addresses are already in the routing cache. As a result, new sessions are sent out port4 only if port3 exceeds its bandwidth limit and if the routing cache does not contain a route for the destination IP address of the new session. Also, the switch over to port4 does not occur as soon as port3 exceeds its bandwidth limit. Bandwidth usage has to exceed the limit for a period of time before the switch over takes place. If port3 bandwidth usage drops below the bandwidth limit during this time period, sessions are not switched over to port4. This delay reduces route flapping. FortiGate usage-based ECMP routing is not actually load balancing, since routes are not distributed evenly among FortiGate interfaces. Depending on traffic volumes, most traffic would usually be processed by the first interface with only spillover traffic being processed by other interfaces. If you are configuring usage-based ECMP in most cases you should add spillover thresholds to all of the interfaces with ECMP routes. The default spillover threshold is 0 which means no bandwidth limiting. If any interface has a spillover threshold of 0, no sessions will be routed to interfaces lower in the list unless the interface goes down or is disconnected. An interface can go down if Detect interface status for Gateway Load Balancing does not receive a response from the configured server.
1463
5 Go to System > Network > Interface. 6 Edit each routes interface and set the Weight value. For example, set the weight of port1 to 100 and the weight of port2 to 200.
1464
All three features limit access to the people who should be using your network, and obscure your network information from the outside world and potential hackers.
1465
Policy Routing
Policy Routing
Policy routing allows you to redirect traffic away from a static route. This can be useful if you want to route certain types of network traffic differently. You can use incoming traffics protocol, source address or interface, destination address, or port number to determine where to send the traffic. For example, generally network traffic would go to the router of a subnet, but you might want to direct SMTP or POP3 traffic directly to the mail server on that subnet. If you have configured the FortiGate unit with routing policies and a packet arrives at the FortiGate unit, the FortiGate unit starts at the top of the Policy Route list and attempts to match the packet with a policy. If a match is found and the policy contains enough information to route the packet (a minimum of the IP address of the next-hop router and the FortiGate interface for forwarding packets to it), the FortiGate unit routes the packet using the information in the policy. If no policy route matches the packet, the FortiGate unit routes the packet using the routing table.
Note: Most policy settings are optional, so a matching policy alone might not provide enough information for forwarding the packet. The FortiGate unit may refer to the routing table in an attempt to match the information in the packet header with a route in the routing table. For example, if the outgoing interface is the only item in the policy, the FortiGate unit looks up the IP address of the next-hop router in the routing table. This situation could happen when the interfaces are dynamic (such as DHCP or PPPoE) and you do not want or are unable to specify the IP address of the next-hop router.
Policy route options define which attributes of a incoming packet cause policy routing to occur. If the attributes of a packet match all the specified conditions, the FortiGate unit routes the packet through the specified interface to the specified gateway. Table 83 shows the policy route list belonging to a FortiGate unit that has interfaces named external and internal. The names of the interfaces on your FortiGate unit may be different. To edit an existing policy route, see Adding a policy route on page 1466.
Table 83: Policy Routing list fields Create New # Incoming Outgoing Source Destination Delete icon Edit icon Move To icon Add a policy route. See Adding a policy route on page 1466. The ID numbers of configured route policies. These numbers are sequential unless policies have been moved within the table. The interfaces on which packets subjected to route policies are received. The interfaces through which policy routed packets are routed. The IP source addresses and network masks that cause policy routing to occur. The IP destination addresses and network masks that cause policy routing to occur. Delete a policy route. Edit a policy route. After selecting this icon, enter the destination position in the window that appears, and select OK. For more information, see Moving a policy route on page 1468.
1466
Policy Routing
Table 84 shows the New Routing Policy dialog box belonging to a FortiGate unit that has interfaces named external and internal. The names of the interfaces on your FortiGate unit may be different.
Table 84: New Routing Policy fields Protocol To perform policy routing based on the value in the protocol field of the packet, enter the protocol number to match. The Internet Protocol Number is found in the IP packet header. RFC 5237 describes protocol numbers and you can find a list of the assigned protocol numbers here. The range is from 0 to 255. A value of 0 disables the feature. Tip: Commonly used Protocol settings include 6 to route TCP sessions, 17 for UDP sessions, 1 for ICMP sessions, 47 for GRE sessions, and 92 for multicast sessions. For protocols other than 6 and 17, the port number is ignored. Incoming Interface Select the name of the interface through which incoming packets subjected to the policy are received. Source Address / Mask Destination Address / Mask Destination Ports To perform policy routing based on the IP source address of the packet, type the source address and network mask to match. A value of 0.0.0.0/0.0.0.0 disables the feature. To perform policy routing based on the IP destination address of the packet, type the destination address and network mask to match. A value of 0.0.0.0/0.0.0.0 disables the feature. To perform policy routing based on the port on which the packet is received, type the same port number in the From and To fields. To apply policy routing to a range of ports, type the starting port number in the From field and the ending port number in the To field. A value of 0 disables this feature. The Destination Ports fields are only used for TCP and UDP protocols. The ports are skipped over for all other protocols. Use a two digit hexadecimal bit pattern to match the service, or use a two digit hexadecimal bit mask to mask out. For more information, see Type of Service on page 1467.
Type of Service
Outgoing Interface Select the name of the interface through which packets affected by the policy will be routed. Gateway Address Type the IP address of the next-hop router that the FortiGate unit can access through the specified interface. A value of 0.0.0.0 is not valid.
Type of Service
Type of service (TOS) is an 8-bit field in the IP header that enables you to determine how the IP datagram should be delivered, with such qualities as delay, priority, reliability, and minimum cost.
FortiOS Handbook v3: Advanced Routing 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1467
Policy Routing
Each quality helps gateways determine the best way to route datagrams. A router maintains a ToS value for each route in its routing table. The lowest priority TOS is 0, the highest is 7 - when bits 3, 4, and 5 are all set to 1. The router tries to match the TOS of the datagram to the TOS on one of the possible routes to the destination. If there is no match, the datagram is sent over a zero TOS route. Using increased quality may increase the cost of delivery because better performance may consume limited network resources. For more information, see RFC 791 and RFC 1349.
Table 85: The role of each bit in the IP header TOS 8-bit field bits 0, 1, 2 Precedence Some networks treat high precedence traffic as more important traffic. Precedence should only be used within a network, and can be used differently in each network. Typically you do not care about these bits. When set to 1, this bit indicates low delay is a priority. This is useful for such services as VoIP where delays degrade the quality of the sound. When set to 1, this bit indicates high throughput is a priority. This is useful for services that require lots of bandwidth such as video conferencing. When set to 1, this bit indicates high reliability is a priority. This is useful when a service must always be available such as with DNS servers. When set to 1, this bit indicates low cost is a priority. Generally there is a higher delivery cost associated with enabling bits 3,4, or 5, and bit 6 indicates to use the lowest cost route. Not used at this time.
bit 3
Delay
bit 4
Throughput
bit 5
Reliability
bit 6
Cost
bit 7
For example, if you want to assign low delay, and high reliability, say for a VoIP application where delays are unacceptable, you would use a bit pattern of xxx1x1xx where an x indicates that bit can be any value. Since all bits are not set, this is a good use for the bit mask; if the mask is set to 0x14, it will match any TOS packets that are set to low delay and high reliability.
1468
Gateway Priority
When configuring routing on a FortiGate unit in transparent mode, remember that all interfaces must be connected to the same subnet. That means all traffic will be coming from and leaving on the same subnet. This is important because it limits your static routing options to only the gateways attached to this subnet. For example, if you only have one router connecting your network to the Internet then all static routing on the FortiGate unit will use that gateway. For this reason static routing on FortiGate units in transparent mode may be a bit different, but it is not as complex as routing in NAT/Route mode.
1469
1470
1471
Table 86: Comparing static and dynamic routing Feature Hardware support Static Routing Supported by all routing hardware Dynamic Routing May require special, more expensive routers Can require considerable memory for larger tables Complex Varying amounts of bandwidth used for routing protocol updates Very scalable, better for larger networks Robust - traffic routed around failures automatically Varies from good to execellent
Router Memory Minimal Required Complexity Overhead Scalability Robustness Convergence Simple None Limited to small networks None - if a route fails it has to be fixed manually None
1472
Link-state protocols
Link-state protocols are also known as shortest path first protocols. Where distance vector uses information passed along that may or may not be current and accurate, in link-state protocols each router passes along only information about networks and devices directly connected to it. This results in a more accurate picture of the network topology around your router, allowing it to make better routing decisions. This information is passed
FortiOS Handbook v3: Advanced Routing 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1473
between routers using link-state advertisements (LSAs). To reduce the overhead, LSAs are only sent out when information changes, compared to distance vector sending updates at regular intervals even if no information has changed. The the more accurate network picture in link-state protocols greatly speed up convergence and avoid problems such as routing-loops.
1474
Table 88: Comparing RIP, BGP, and OSPF dynamic routing protocols Protocol Routing algorithm RIP Distance Vector, basic BGP OSPF
Distance Vector, advanced Link-state Network backbone, ties multinational offices together Graceful restart BFD support Only needed on border routers Summarize routes Required full mesh in large networks can cause floods Route flap Load-balance multi-homed networks Not available on low end routers Common in large, complex enterprise networks Fast convergence Robust Little management overhead No hop count limitation Scalable Complex No support for unequal cost multipath routing Route summary can require network changes
Common uses Small non-complex networks Strengths Fast and simple to implement Near universal support Good when no redundant paths Frequent updates can flood network Slow convergence Maximum 15 hops may limit network configuration
Weakness
Authentication Optional authentication using text string or MD5 password. (RIP v1 has no authentication) IPv6 Support Only in RIPng Only in BGP4+ Only in OSPF6
Routing protocols
Routing Information Protocol (RIP) uses classful routing, as well as incorporating various methods to stop incorrect route information from propagating, such as poisoned horizon. However, on larger networks its frequent updates can flood the network and its slow convergence can be a problem. Border Gateway Protocol (BGP) has been the core Internet backbone routing protocol since the mid 1990s, and is the most used interior gateway protocol (IGP). However, some configurations require full mesh connections which flood the network, and there can be route flap and load balancing issues for multihomed networks. Open Shortest Path First (OSPF) is commonly used in large enterprise networks. It is the protocol of choice mainly due to its fast convergence. However, it can be complicated to setup properly. Multicast addressing is used to broadcast from one source to many destinations efficiently. Protocol Independent Multicast (PIM) is the protocol commonly used in enterprises, multimedia content delivery, and stock exchanges. For more information, see Multicast forwarding on page 377 in the System Administration chapter.
Routing algorithm
Each protocol uses a slightly different algorithm for choosing the best route between two addresses on the network. The algorithm is the intelligent part of a dynamic protocol because the algorithm is responsible for deciding which route is best and should be added to the local routing table. RIP and BGP use distance vector algorithms, where OSPF uses link-state or a shortest path first algorithm. Vector algorithms are essentially based on the number of hops between the originator and the destination in a route, possibly weighting hops based on how reliable, fast, and errorfree they are.
1475
The link-state algorithm used by OSPF is called the Dijkstra algorithm. Link-state treats each interface as a link, and records information about the state of the interface. The Dijkstra algorithm creates trees to find the shortest paths to the routes it needs based on the total cost of the parts of the routes in the tree. For more information on the routing algorithm used, see Distance vector versus link-state protocols on page 1473.
Authentication
If an attacker gains access to your network, they can masquerade as a router on your network to either gain information about your network or disrupt network traffic. If you have a high quality firewall configured, it will help your network security and stop many of this type of threat. However, the main method for protecting your routing information is to use authentication in your routing protocol. Using authentication on your FortiGate unit and other routers prevents access by attackers all routers must authenticate with passwords, such as MD5 hash passwords, to ensure they are legitimate routers. When configuring authentication on your network, ensure you configure it the same on all devices on the network. Failure to do so will create errors and outages as those forgotten devices fail to connect to the rest of the network. For example, to configure an MD5 key of 123 on an OSPF interface called ospf_test, enter the following CLI command: config router ospf config ospf-interface edit ospf_test set authentication md5 set md5-key 123 end end
Convergence
Convergence is the ability of a networking protocol to re-route around network outages. Static routing cannot do this. Dynamic routing protocols can all converge, but take various amounts of time to do this. Slow convergence can cause problems such as network loops which degrade network performance. You may also hear robustness and redundancy used to describe networking protocols. In many ways they are the same thing as convergence. Robustness is the ability to keep working even though there are problems, including configuration problems as well as network outages. Redundancy involves having duplicate parts that can continue to function in the event of some malfunction, error, or outage. It is relatively easy to configure dynamic routing protocols to have backup routers and configurations that will continue to function no matter the network problem short of a total network failure.
IPv6 Support
IPv4 addressing is in common use everywhere around the world. IPv6 has much larger addresses and it is used by many large companies and government departments. IPv6 is not as common as IPv4 yet, but more companies are adopting it. If your network uses IPv6, your dynamic routing protocol must support it. None of the dynamic routing protocols originally supported IPv6, but they all have additions, expansions, or new versions that do support IPv6. For more information, see RIP and IPv6 on page 1488, BGP and IPv6 on page 1524, or OSPF and IPv6 on page 1562.
1476
Budget
When making any business decision, the budget must always be considered. Static routing does not involve special hardware, fancy software, or expensive training courses. Dynamic routing can include all of these extra expenses. Any new routing hardware such as routers and switches need to support your chosen protocols. Network management software to help configure and maintain your more complex network, and routing protocol drivers may be necessary as well. If the network administrators are not well versed in dynamic routing, either a training course or some hands on learning time must be budgeted so they can administer the new network with confidence. Together, these factors will use up your budget quickly. Additionally people account for network starting costs in the budgets, but usually leave out the ongoing cost of network maintenance. Any budget must provide for the hours that will be spent on updating the network routing equipment, and fixing any problems. Without that money in the budget, you may end up back at static routing before you know it.
1477
If the resources to accomplish these tasks are not budgeted, they will either not happen or not happen at the required level to continue operation. This will result in both the network administration staff and the network users being very frustrated. A lack of maintenance budget will also result in increasingly heavy reliance on static routing as the network administrators are forced to use quick fixes for problems that come up. This invariably involves going to static routing, and dropping the more complex and time consuming dynamic routing.
1478
1479
For more details on a term as it applies to a dynamic routing protocol, see one of Border Gateway Protocol (BGP) on page 1523, Routing Information Protocol (RIP) on page 1487, or Open Shortest Path First (OSPF) on page 1561.
1480
The benefit of this method is that you can combine many addresses into one, potentially reducing the routing table size immensely. The weakness of this method is if there are holes in the address range you are aggregating you need to decide if its better to break it into multiple ranges, or accept the possibility of failed routes to the missing addresses. To manually aggregate the range of IP addresses from 192.168.1.100 to 192.168.1.103 1 Convert the addresses to binary 192.168.1.100 = 11000000 10101000 00000001 01100100 192.168.1.101 = 11000000 10101000 00000001 01100101 192.168.1.102 = 11000000 10101000 00000001 01100110 192.168.1.103 = 11000000 10101000 00000001 01100111 2 Determine the maximum number of matching bits common to the addresses. There are 30-bits in common, with only the last 2-bits being different. 3 Record the common part of the address. 11000000 10101000 00000001 0110010X = 192.168.1.100 4 For the netmask, assume all the bits in the netmask are 1 except those that are different which are 0. 11111111 11111111 11111111 11111100 = 255.255.255.252 5 Combine the common address bits and the netmask. 192.168.1.100/255.255.255.252 Alternately the IP mask may be written as a single number: 192.168.1.100/2 6 As required, set variables and attributes to declare the routes have been aggregated, and what router did the aggregating.
1481
Note: As of January 2010, AS numbers will be 4-bytes long instead of the older 2-bytes. RFC 4893 introduced 32-bit ASNs, which FortiGate units support.
You should not create an AS for each prefix on your network. Neither should you be forced into an AS just so someone else can make AS-based policy decisions on your traffic. There can be only one AS for any prefix on the Internet. This is to prevent routing issues.
AS numbers from 64512 to 65534 are reserved for private use. Private AS numbers can be used for any internal networks with no outside connections to the Internet such as test networks, classroom labs, or other internal-only networks that do not access the outside world. You can also configure border routers to filter out any private ASNs before routing traffic to the outside world. If you must use private ASNs with public networks, this is the only way to configure them. However, it is risky because many other private networks could be using the same ASNs and conflicts will happen. It would be very much like your local 192.168.0.0 network being made public the resulting problems would be widespread. In 1996, when RFC 1930 was written only 5,100 ASes had been allocated and a little under 600 ASes were actively routed in the global Internet. Since that time many more public ASNs have been assigned, leaving only a small number. For this reason 32-bit ASNs (four-octet ASNs) were defined to provide more public ASNs. RFC 4893 defines 32bit ASNs, and FortiGate units support these larger ASNs as of FortiOS version 4.2
1482
Neighbor routers
Routing involves routers communicating with each other. To do this, routers need to know information about each other. These routers are called neighbor routers, and are configured in each routing protocol. Each neighbor has custom settings since some routers may have functionality others routers lack. Neighbour routers are sometimes called peers. Generally neighbor routers must be configured, and discovered by the rest of the network before they can be integrated to the routing calculations. This is a combination of the network administrator configuring the new router with its neighbor router addresses, and the routing network discovering the new router, such as the hello packets in OSPF. That discovery initiates communication between the new router and the rest of the network.
Route maps
Route maps are a way for the FortiGate unit to evaluate optimum routes for forwarding packets or suppressing the routing of packets to particular destinations. Compared to access lists, route maps support enhanced packet-matching criteria. In addition, route maps can be configured to permit or deny the addition of routes to the FortiGate unit routing table and make changes to routing information dynamically as defined through route-map rules. Route maps can be used for limiting both received route updates, and sent route updates. This can include the redistribution of routes learned from other types of routing. For example if you dont want to advertise local static routes to external networks, you could use a route map to accomplish this. The FortiGate unit compares the rules in a route map to the attributes of a route. The rules are examined in ascending order until one or more of the rules in the route map are found to match one or more of the route attributes. As an administrator, route maps allow you to group a set of addresses together and assign them a meaningful name. Then during your configuration, you can use these route-maps to speed up configuration. The meaningful names ensure fewer mistakes during configuration as well. The default rule in the route map (which the FortiGate unit applies last) denies all routes. For a route map to take effect, it must be called by a FortiGate unit routing process.
1483
The match-* commands allow you to match various parts of a route. The set-* commands allow you to set routing information once a route is matched. For an example of how route maps can be used to create receiving or sending groups in routing, see Redistributing and blocking routes in BGP on page 1553.
Access lists
Use this command to add, edit, or delete access lists. Access lists are filters used by FortiGate unit routing processes. For an access list to take effect, it must be called by a FortiGate unit routing process (for example, a process that supports RIP or OSPF). Use access-list6 for IPv6 routing. Access lists can be used to filter which updates are passed between routers, or which routes are redistributed to different networks and routing protocols. You can create lists of rules that will match all routes for a specific router or group of routers. Each rule in an access list consists of a prefix (IP address and netmask), the action to take for this prefix (permit or deny), and whether to match the prefix exactly or to match the prefix and any more specific prefix.
Note: If you are setting a prefix of 128.0.0.0, use the format 128.0.0.0/1. The default route, 0.0.0.0/0 can not be exactly matched with an access-list. A prefix-list must be used for this purpose.
The FortiGate unit attempts to match a packet against the rules in an access list starting at the top of the list. If it finds a match for the prefix, it takes the action specified for that prefix. If no match is found the default action is deny. The syntax for access lists is:
config router access-list, access-list6 edit <access_list_name> set comments config rule edit <access_list_id> set action set exact-match set prefix set prefix6 set wildcard
For an example of how access lists can be used to create receiving or sending groups in routing, see Redistributing and blocking routes in BGP on page 1553.
1484
BFD neighbors establish if BFD is enabled in OSPF or BFP routers that establish as neighbors. The CLI commands associated with BFD include: config router bgp config neighbor set bfd config router ospf set bfd Per-VDOM configuration: config system settings set bfd set bfd-desired-min-tx set bfd-required-min-rx set bfd-detect-mult set bfd-dont-enforce-src-port Per-interface (override) configuration: config system interface edit <interface_name> set bfd enable set bfd-desired-min-tx set bfd-detect-mult set bfd-required-min-rx For more information about BFD in BGP, see Bi-directional forwarding detection (BFD) on page 1539.
See OSPF and IPv6 on page 1562. As with most advanced routing features on your Fortigate unit, IPv6 settings for dynamic routing protocols are CLI-only. To configure IPv6 for RIP, BGP, or OSPF protocols you must use the CLI commands.
1485
1486
Background
Routing Information Protocol (RIP) is a distance-vector routing protocol intended for small, relatively homogeneous networks. Its widespread use started when an early version of RIP was included with BSD v4.3 Linux as the routed daemon. The routing algorithm used by RIP, the BellmanFord algorithm, first saw widespread use as the initial routing algorithm of the ARPANET. RIP benefits include being well suited to smaller networks, is in widespread use, near universal support on routing hardware, quick to configure, and works well if there are no redundant paths. However, RIP updates are sent out node-by-node so it can be slow to find a path around network outages. RIP also lacks good authentication, can not choose routes based on different quality of service methods, and can create network loops if you are not careful. The FortiGate implementation of RIP supports RIP version 1 (see RFC 1058), RIP version 2 (see RFC 2453), and the IPv6 version RIPng (see RFC 2080).
RIP v1
In 1988 RIP version 1, defined in RFC 1058, was released. The RFC even states that RIP v1 is based on Linux routed due to it being a defacto standard. It uses classful addressing and uses broadcasting to send out updates to router neighbors. There is no subnet information included in the routing updates in classful routing, and it does not support CIDR addressing subnets must all be the same size. Also, route summarization is not possible. RIP v1 has no router authentication method, so it is vulnerable to attacks through packet sniffing, and spoofing.
RIP v2
In 1993, RIP version 2 was developed to deal with the limitations of RIP v1. It was not standardized until 1998. This new version supports classless routing, and subnets of various sizes.
FortiOS Handbook v3: Advanced Routing 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1487
Router authentication was added in RIP v2 it supports MD5. MD5 hashes are an older encryption method, but this is much improved over no security at all. In RIP v2 the hop count remained at 15 to be backwards compatible with RIP v1. RIP v2 uses multicasting to send the entire routing table to router neighbors, thereby reducing the traffic for devices that are not participating in RIP routing. Routing tags were added as well, which allow internal routes or redistributed routes to be identified as such.
RIPng
RIPng, defined in RFC 2080, is an extension of RIP2 designed to support IPv6. However, RIPng varies from RIPv2 in that it is not fully backwards compatible with RIPv1. RIPng does not support RIPv1 update authentication (it relies on IPsec) RIPng does not allow attaching tags to routes as in RIPv2 RIPng requires specific encoding of the next hop for a set of route entries, unlike RIPv2 that encodes the next-hop into each route entry .
1488
For example, you want to set up a tunnel on the port1 interface starting at 2002:C0A8:3201:: on your local network and tunnel it to address 2002:A0A:A01:: where it will need access to an IPv4 network again. Use the following command: config system ipv6-tunnel edit test_tunnel set destination 2002:A0A:A01:: set interface port1 set source 2002:C0A8:3201:: end end The CLI commands associated with RIPng include: config router ripng config router access-list6 config router prefix-list6 config system ipv6-tunnel get router info6 *
The CLI commands associated with garbage, timeout, and update timers include: config router rip set garbage-timer set timeout-timer set update-timer end
1489
Garbage timer
The garbage timer is the amount of time (in seconds) that the FortiGate unit will advertise a route as being unreachable before deleting the route from the routing table. If this timer is shorter, it will keep more up to date routes in the routing table and remove old ones faster. This will result in a smaller routing table which is useful if you have a very large network, or if your network changes frequently.
Update timer
The update timer determines the interval between routing updates. Generally, this value is set to 30 seconds. There is some randomness added to help prevent network traffic congestion, which could result from all routers simultaneously attempting to update their neighbors. The update timer should be at least three times smaller than the timeout timer, otherwise you will experience an error. If you are experiencing significant RIP traffic on your network, you can increase this interval to send fewer updates per minute. However, ensure you increase the interval for all the routers on your network or you will experience time outs that will degrade your network speed.
Timeout timer
The timeout timer is the maximum amount of time (in seconds) that a route is considered reachable while no updates are received for the route. This is the maximum time the FortiGate unit will keep a reachable route in the routing table while no updates for that route are received. If the FortiGate unit receives an update for the route before the timeout period expires, the timer is restarted. The timeout period should be at least three times longer than the depute period, otherwise you will experience an error. If you are experiencing problems with routers not responding in time to updates, increase this timer. However, remember that longer timeout intervals result in longer overall update periods it may be considerable time before the time the FortiGate unit is done waiting for all the timers to expire on unresponsive routes.
1490
This example shows how to configure a key-chain with two keys that are valid sequentially in time. This example creates a key-chain called rip_key that has a password of fortinet. The accepted and send lifetimes are both set to the same values a start time of 9:00am February 23, 2010 and an end time of 9:00am March 17, 2010. A second key is configured with a password of my_fortigate that is valid from March 17, 2010 9:01am to April 1 2010 9:00am. This rip_key keychain is then used on the port1 interface in RIP.
config router key-chain edit "rip_key" config key edit 1 set accept-lifetime 09:00:00 23 02 2010 09:00:00 17 03 2010 set key-string "fortinet" set send-lifetime 09:00:00 23 02 2010 09:00:00 17 03 2010 next edit 2 set accept-lifetime 09:01:00 17 03 2010 09:00:00 1 04 2010 set key-string "my_fortigate" set send-lifetime 09:01:00 17 03 2010 09:00:00 1 04 2010 next end end config router rip config interface edit port1 set auth-keychain rip_key end end
The CLI commands associated with authentication keys include: config router key-chain config router rip config interface edit <interface> set auth-keychain set auth-mode set auth-string end end
Access Lists
Access lists are filters used by FortiGate unit RIP and OSPF routing. An access list provides a list of IP addresses and the action to take for them essentially an access list makes it easy to group addresses that will be treated the same into the same group, independent of their subnets or other matching qualities. You add a rule for each address or subnet that you want to include, specifying the action to take for it. For example if you wanted all traffic from one department to be routed a particular way, even in different buildings, you can add all the addresses to an access list and then handle that list all at once. Each rule in an access list consists of a prefix (IP address and netmask), the action to take for this prefix (permit or deny), and whether to match the prefix exactly or to match the prefix and any more specific prefix.
1491
The FortiGate unit attempts to match a packet against the rules in an access list starting at the top of the list. If it finds a match for the prefix, it takes the action specified for that prefix. If no match is found the default action is deny. Access lists greatly speed up configuration and network management. When there is a problem, you can check each list instead of individual addresses. Also its easier to troubleshoot since if all addresses on one list have problems, it eliminates many possible causes right away. If you are using the RIPng or OSPF+ IPv6 protocols you will need to use access-list6, the IPv6 version of access list. The only difference is that access-list6 uses IPv6 addresses. For example, if you want to create an access list called test_list that only allows an exact match of 10.10.10.10 and 11.11.11.11, enter the command: config access-list edit test_list config rule edit 1 set prefix 10.10.10.10 255.255.255.255 set action allow set exact-match enable next edit 2 set prefix 11.11.11.11 255.255.255.255 set action allow set exact-match enable end end Another example is if you want to deny ranges of addresses in IPv6 that start with the IPv6 equivalents of 10.10.10.10 and 11.11.11.11, enter the command access-list6 as follows: config router access-list6 edit test_list_ip6 config rule edit 1 set prefix6 2002:A0A:A0A:0:0:0:0:0:/48 set action deny next edit 2 set prefix6 2002:B0B:B0B:0:0:0:0:0/48 set action deny end end
1492
To use an access_list, you must call it from a routing protocol such as RIP. The following example uses the access_list from the earlier example called test_list to match routes coming in on the port1 interface. When there is a match, it will add 3 to the hop count metric for those routes to artificially increase . Enter the following command: config router rip config offset-list edit 5 set access-list test_list set direction in set interface port1 set offset 3 set status enable end end If you are setting a prefix of 128.0.0.0, use the format 128.0.0.0/1. The default route, 0.0.0.0/0 can not be exactly matched with an access-list. A prefix-list must be used for this purpose
1493
1494
Step 1. Router1 finds the distance to other routers. It has no route to router4. Router1 table: Distance to route2= 2 hops Distance to router3 = 3 hops
Router2
hop count = 2
Router1
Router4
Step 2. All routers do the same as router1, and send out updates with the table of routes. Note that router1 and router4 do Router2 not update each other, but rely on router2 and router3 to pass along deputes.
hop count = 2
Router1
Router4
Step 3. Each router looks at the updates it receives, and adds any new or shorter routes to its table.
Router3 Router2 hop count = 4
Router1 updated table: Distance to router2 = 2 hops Distance to router3 = 3 hops Distance to router4 = 4 hops Distance to router4 = 5 hops
Router1
Router4
Step 4. The shortest route to router4 is installed, and the other routes to router4 are removed from the table.
Router2 Router3 hop count = 4
Router1 updated table: Distance to router2 = 2 hops Distance to router3 = 3 hops Distance to router4 = 4 hops
Router1
1495
The good part about the Bellman-Ford algorithm in RIP is that the router only uses the information it needs from the update. If there are no newer, better routes than the ones the router already has in its routing table, there is no need to change its routing table. And no change means no additional update, so less traffic. But even when there is update traffic, the RIP packets are very small so it takes many updates to affect overall network bandwidth. For more information about RIP packets, see RIP packet structure on page 1497. The main disadvantage of the BellmanFord algorithm in RIP is that it doesnt take weightings into consideration. While it is possible to assign different weights to routes in RIP, doing so severely limits the effective network size by reducing the hop count limit. Also other dynamic routing protocols can take route qualities, such as reliability or delay, into consideration to provide not only the physically shortest but also the fastest or more reliable routes as you choose. Another disadvantage of the Bellman-Ford algorithm is due to the slow updates passed from one RIP router to the next. This results in a slow response to changes in the network topology, which in turn results in more attempts to use routes that are down which wastes time and network resources.
1496
To create a passive RIP v2 interface on port1 using MD5 authentication- CLI config router rip config interface edit port1 set send-version2-broadcast disable set auth-keychain passiveRIPv2 set auth-mode md5 set receive-version 2 set send-version 2 end end The CLI commands associated with RIPng include: config router rip config interface edit <interface> set send-version2-broadcast disable
RIP version 1
RIP version 1, or RIP IP packets are 24 bytes in length. The empty areas were left for future expansion.
Table 89: RIP IP packets 1-byte command 4-byte IP address 1-byte version 4-byte zero field 2-byte zero field 4-byte zero field 2-byte AFI 4-byte metric 2-byte zero field
The following descriptions summarize the RIP version 1 packet fields. Command Indicates whether the packet is a request or a response. The request asks that a router send all or part of its routing table. The response can be an unsolicited regular routing update or a reply to a request. Responses contain routing table entries. Multiple RIP packets are used to convey information from large routing tables. Version Specifies the RIP version used. This field can signal different potentially incompatible versions. Zero field This field defaults to zero, and is not used by RFC 1058 RIP. Address-family identifier (AFI) Specifies the address family used. RIP is designed to carry routing information for several different protocols. Each entry has an address-family identifier to indicate the type of address being specified. The AFI for IP is 2. IP Address Specifies the IP address for the entry. Metric This is the number of hops or routers traversed along the route on its trip to the destination. The metric is between 1 and 15 for that number of hops. If the route is unreachable the metric is 16.
1497
Troubleshooting RIP
RIP version 2
RIP version 2 has more features that RIP 1 and this is reflected in its packets. RIP 2 packets are similar in format to RIP 1, but carry more information. All but one of the empty zero fields in RIP 1 packets now contain information.
Table 90: RIP 2 packets 1-byte 1-byte command version 2-byte unused 2-byte AFI 2-byte 4-byte IP 4-byte route tag address subnet 4-byte 4-byte next hop metric
The following descriptions summarize the fields RIP 2 adds to the RIP IP header. The other fields have been described above for RIP 1. Unused Has a value set to zero, and is intended for future use Route tag Provides a method for distinguishing between internal routes learned by RIP and external routes learned from other protocols. Subnet mask Contains the subnet mask for the entry. If this field is zero, no subnet mask has been specified for the entry. Next hop Indicates the IP address of the next hop to which packets for the entry should be forwarded.
Troubleshooting RIP
This section is about troubleshooting RIP. For general troubleshooting information, see the Troubleshooting chapter. This section includes: Routing Loops Split horizon and Poison reverse updates Debugging IPv6 on RIPng
Routing Loops
Normally in routing, a path between two addresses is chosen and traffic is routed along that path from one address to the other. When there is a routing loop, that normal path doubles back on itself creating a loop. When there are loops, the network has problems. A routing loop happens when a normally functioning network has an outage, and one or more routers are offline. When packets encounter this, an alternate route is attempted to maneuver around the outage. During this phase it is possible for a route to be attempted that involves going back a hop, and trying a different hop forward. If that hop forward is blocked by the outage as well, a hop back and possibly the original hop forward may be selected. You can see if this continues, how it can consume not only network bandwidth but also many resources on those routers affected. The worst part is this situation will continue until the network administrator changes the router settings, or the downed routers come back online.
1498
Troubleshooting RIP
If you arent running SNMP, dead gateway detection, or you have non-Fortinet routers in your network, you can use networking tools such as ping and traceroute to define the outage on your network and begin to fix it. Ping, traceroute, and other basic troubleshooting tools are covered in on page 1485.
1499
Troubleshooting RIP
3 Select Create New. 4 Enter a name for the community, such as routing loop monitor. 5 Select the IP addresses and interfaces where you will be monitoring the FortiGate. you can add up to 8 different addresses and interfaces. 6 Ensure that ports 161 and 162 (SNMP queries and traps) are allowed through your security policies. 7 Select the events you want to be notified of. For routing loops this should include CPU Overusage, Memory Low, and possibly Log disk space low. If there are problems the log will be filling up quickly, and the FortiGate units resources will be overused. 8 Configure SNMP host (manager) software on your administration computer. This will monitor the SNMP information sent out by the FortiGate unit. Typically you can configure this software to alert you to outages or CPU spikes that may indicate a routing loop.
After this configuration, when this interface on the FortiGate unit cannot connect to the next router, the FortiGate unit will bring down the interface and alert you with an email to the outage.
1500
Troubleshooting RIP
Part of the information displayed from the debugging is the metric (hop count). If the metric is 16, then that destination is unreachable since the maximum hop count is 15. In general, you should see an update announcement, followed by the routing table being sent out, and a received reply in response.
1501
For more information, see Testing the IPv6 RIPng information on page 1520
1502
In this example the routers, networks, interfaces used, and IP addresses are as follows. Note that the Interfaces that connect Router2 and Router3 also connect to the R&D network.
Table 91: Rip example network topology Network Sales Router Router1 Interface & Alias port1 (internal) port2 (router2) port3 (router3) R&D Router2 port1 (internal) port2 (router1) port3 (router4) port4 (ISP) Router3 port1 (internal) port2 (router1) port3 (router4) port4 (ISP) Accounting Router4 port1 (internal) port2 (router2) port3 (router3) Figure 177: Network topology for the simple RIP example IP address 10.11.101.101 10.11.201.101 10.11.202.101 10.12.101.102 10.11.201.102 10.14.201.102 172.20.120.102 10.12.101.103 10.11.201.103 10.14.202.103 172.20.120.103 10.14.101.104 10.14.201.104 10.14.202.104
R&D Network
Sales Network
Assumptions
The following assumptions have been made concerning this example. All FortiGate units have 4.0 MR3 firmware, and are running factory default settings. All CLI and web-based manager navigation assumes the unit is running in NAT/Route operating mode, with VDOMs disabled.
1503
All FortiGate units have interfaces labelled port1 through port4 as required. All firewalls have been configured for each FortiGate unit to allow the required traffic to flow across interfaces. Only FortiGate units are running RIP on the internal networks. Router2 and Router3 are connected through the internal network for R&D. Router2 and Router3 each have their own connection to the Internet, indicated in black in Figure 177.
6 Go to System > Network > Interface. 7 Edit port1 (internal) interface. 8 Set the following information, and select OK.
Alias IP/Netmask internal 10.11.101.101/255.255.255.0
1504
Administrative Access HTTPS SSH PING Description Administrative Status Internal sales network Up
9 Edit port2 (router2) interface. 10 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status router2 10.11.201.101/255.255.255.0 Link to R&D network & internet through Router2 Up
11 Edit port3 (router3) interface. 12 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status router3 10.11.202.101/255.255.255.0 Link to R&D network and internet through Router3 Up
next edit 2 set device port3 set distance 45 set gateway 10.11.202.103
end
end
config system interface edit port1 set alias internal set ip 10.11.101.101/255.255.255.0 set allowaccess https ssh ping set description Internal sales network next edit port2 set alias ISP set allowaccess https ssh ping set ip 10.11.201.101/255.255.255.0 set description Link to R&D network & internet through Router2 next FortiOS Handbook v3: Advanced Routing 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1505
edit port3 set alias router3 set ip 10.11.202.101/255.255.255.0 set allowaccess https ssh ping set description Link to R&D network & internet through Router2 end end
To configure Router2 system information - web-based manager 1 Go to System > Dashboard > Status > System Information. 2 Next to Host Name select Change, and enter Router2. 3 Go to Router > Static > Static Route. 4 Edit the default route and enter the following information:
Destination IP/Mask Device Gateway Distance 0.0.0.0/0.0.0.0 port4 (ISP) 172.20.120.5/255.255.255.0 5
5 Go to System > Network > Interface. 6 Edit port1 (internal) interface. 7 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status internal 10.12.101.102/255.255.255.0 R&D internal network and Router3 Up
8 Edit port2 (router1) interface. 9 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status router1 10.12.201.102/255.255.255.0 Link to Router1 and the Sales network Up
10 Edit port3 (router4) interface. 11 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status router4 10.12.301.102/255.255.255.0 Link to Router4 and the accounting network Up
1506
Administrative Access HTTPS SSH PING Detect Interface Status enable for Gateway Load Balancing Detect Server Detect Protocol 172.20.120.5 Ping
Detect Interface Status enable for Gateway Load Balancing Description Administrative Status Internet through ISP Up
To configure Router2 system information - CLI config system global set hostname Router2 end config router static edit 1 set device "port4" set distance 5 set gateway 172.20.130.5 end end config system interface
edit port1 set alias internal set ip 10.11.101.102/255.255.255.0 set allowaccess https ssh ping set description Internal RnD network and Router3 next edit port2 set alias router1 set allowaccess https ssh ping set ip 10.11.201.102/255.255.255.0 set description Link to Router1 next edit port3 set alias router3 set ip 10.14.202.102/255.255.255.0 set allowaccess https ssh ping set description Link to Router4
next edit port4 set alias ISP set ip 172.20.120.102/255.255.255.0 set allowaccess https ssh ping set description ISP and internet
end end
1507
To configure Router3 system information - web-based manager 1 Go to System > Dashboard > Status > System Information. 2 Next to Host Name select Change, and enter Router3. 3 Go to Router > Static > Static Route. 4 Edit the default route and enter the following information:
Destination IP/Mask Device Gateway Distance 0.0.0.0/0.0.0.0 port4 (ISP) 172.20.120.5/255.255.255.0 5
5 Go to System > Network > Interface. 6 Edit port1 (internal) interface. 7 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status internal 10.12.101.103/255.255.255.0 R&D internal network and Router2 Up
8 Edit port2 (router1) interface. 9 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status router1 10.13.201.103/255.255.255.0 Link to Router1 and Sales network Up
10 Edit port3 (router4) interface. 11 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status router4 10.13.301.103/255.255.255.0 Link to Router4 and accounting network Up
1508
Administrative Access HTTPS SSH PING Detect Interface Status enable for Gateway Load Balancing Detect Server Detect Protocol Description Administrative Status 172.20.120.5 Ping Internet and ISP Up
next edit port4 set alias ISP set ip 172.20.120.103/255.255.255.0 set allowaccess https ssh ping set description ISP and internet
end end
1509
To configure Router4 system information - web-based manager 1 Go to System > Dashboard > Status > System Information. 2 Next to Host Name select Change, and enter Router4. 3 Go to Router > Static > Static Route. 4 Edit the default route and enter the following information:
Destination IP/Mask Device Gateway Distance 0.0.0.0/0.0.0.0 port2 (router2) 172.20.120.5/255.255.255.0 40
6 Go to System > Network > Interface. 7 Edit port 1 (internal) interface. 8 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status internal 10.14.101.104/255.255.255.0 Internal accounting network Up
9 Edit port 2 (router2) interface. 10 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status router2 10.14.201.104/255.255.255.0 Link to R&D network & internet through Router2 Up
11 Edit port 3 (router3) interface. 12 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status router3 10.14.301.104/255.255.255.0 Link to R&D network and internet through Router3 Up
1510
next edit 2 set device port3 set distance 45 set gateway 10.14.202.103
end
end
config system interface edit port1 set alias internal set ip 10.14.101.104/255.255.255.0 set allowaccess https ssh ping set description Internal sales network next edit port2 set alias router2 set allowaccess https ssh ping set ip 10.14.201.104/255.255.255.0 set description Link to R&D network & internet through Router2 next edit port3 set alias router3 set ip 10.14.202.104/255.255.255.0 set allowaccess https ssh ping set description Link to R&D network & internet through Router2 end end
Router1 and Router4 are configured the same. Router2 and Router3 are configured the same. These routers will be grouped accordingly for the following procedures repeat the procedures once for each FortiGate unit.
1511
Configure RIP settings on Router1 and Router4 - web-based manager 1 Go to Router > Dynamic > RIP. 2 Select 2 for RIP Version. 3 In Advanced Options, under Redistribute enable Static. 4 Leave the other Advanced Options at default values. 5 Enter the following networks, and select Add after each: 10.11.0.0/255.255.0.0 10.12.0.0/255.255.0.0 10.14.0.0/255.255.0.0 172.20.120.0/255.255.255.0
6 For interface, select Create New and set the following information.
Interface Send Version Receive Version Authentication Passive Interface port1 (internal) Both Both None disabled
7 For interface, select Create New and set the following information.
Interface Send Version Receive Version Authentication Passive Interface port2 (router2) Both Both None disabled
8 For interface, select Create New and set the following information.
Interface Send Version Receive Version Authentication Passive Interface port3 (router3) Both Both None disabled
Configure RIP settings on Router1 and Router4 - CLI config router rip set version 2 config interface edit "port1" set receive-version 1 2 set send-version 1 2 next edit "port2" set receive-version 1 2 set send-version 1 2 next edit "port3"
Advanced Routing for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1512
set receive-version 1 2 set send-version 1 2 end config network edit 1 set prefix 10.11.0.0 255.255.0.0 next edit 2 set prefix 10.12.0.0 255.255.0.0 next edit 3 set prefix 10.14.0.0 255.255.0.0 next edit 4 set prefix 172.20.120.0 255.255.255.0 end config redistribute "static" set status enable end end Configure RIP settings on Router2 and Router3- web-based manager 1 Go to Router > Dynamic > RIP. 2 Select 2 for RIP Version. 3 In Advanced Options, under Redistribute enable Static. 4 Leave the other Advanced Options at default values. 5 Enter the following networks, and select Add after each: 10.11.0.0/255.255.0.0 10.12.0.0/255.255.0.0 10.14.0.0/255.255.0.0 172.20.120.0/255.255.255.0
6 For interface, select Create New and set the following information.
Interface Send Version Receive Version Authentication Passive Interface port1 (internal) Both Both None disabled
7 For interface, select Create New and set the following information.
Interface Send Version Receive Version Authentication Passive Interface port2 (router1) Both Both None disabled
8 For interface, select Create New and set the following information.
1513
9 For interface, select Create New and set the following information.
Interface Send Version Receive Version Authentication Passive Interface port4 (ISP) Both Both None disabled
Configure RIP settings on Router2 and Router3- web-based manager config router rip set version 2 config interface edit "port1" set receive-version 1 2 set send-version 1 2 next edit "port2" set receive-version 1 2 set send-version 1 2 next edit "port3" set receive-version 1 2 set send-version 1 2 end edit "port4" set receive-version 1 2 set send-version 1 2 end config network edit 1 set prefix 10.11.0.0 255.255.0.0 next edit 2 set prefix 10.12.0.0 255.255.0.0 next edit 3 set prefix 10.14.0.0 255.255.0.0 next edit 4 set prefix 172.20.120.0 255.255.255.0 end config redistribute "static" set status enable end end
Advanced Routing for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1514
1515
Your network has two FortiGate units running the RIPng dynamic routing protocol. Both FortiGate units are connected to the ISP router and the internal network. This configuration provides some redundancy for the R&D internal network enabling it to reach the internet at all times. All internal computers use RIP routing, so no static routing is required. And all internal computers use IPv6 addresses. Where possible in this example, the default values will be used or the most general settings. This is intended to provide an easier configuration that will require less troubleshooting. In this example the routers, networks, interfaces used, and IP addresses are as follows.
Table 92: Rip example network topology Network R&D Router Router1 Router2 Interface & Alias port1 (internal) port2 (ISP) port1 (internal) port2 (ISP) Figure 178: Network topology for the IPV6 RIPng example IPv6 address 2002:A0B:6565:0:0:0:0:0 2002:AC14:7865:0:0:0:0:0 2002:A0B:6566:0:0:0:0:0 2002:AC14:7866:0:0:0:0:0
RIP Router1 r1
RIP Router2 R
Assumptions
The following assumptions have been made concerning this example. All FortiGate units have 4.0 MR3 firmware, and are running factory default settings. All CLI and web-based manager navigation assumes the unit is running in NAT/Route operating mode, with VDOMs disabled. All FortiGate units have interfaces labelled port1 and port2 as required.
1516
All firewalls have been configured for each FortiGate unit to allow the required traffic to flow across interfaces. All network devices are support IPv6 and are running RIPng.
9 Edit port2 (ISP) interface. 10 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status ISP 2002:AC14:7865::/0 ISP and internet Up
1517
To configure system information on Router2 - web-based manager 1 Go to System > Dashboard > Status. 2 For Host name, select Change. 3 Enter Router2. 4 Go to System > Admin > Settings. 5 In Display Options on GUI, enable IPv6, and select Apply. 6 Go to System > Network > Interface. 7 Edit port1 (internal) interface. 8 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status internal 2002:A0B:6566::/0 Internal RnD network Up
9 Edit port2 (ISP) interface. 10 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status ISP 2002:AC14:7866::/0 ISP and internet Up
1518
config interface edit port1 next edit port2 end config neighbor edit 1 set interface port1 set ipv6 2002:a0b:6566::/0 next edit 2 set interface port2 set ipv6 2002:AC14:7805::/0 end
FortiOS Handbook v3: Advanced Routing 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1519
config interface edit port1 next edit port2 end config neighbor edit 1 set interface port1 set ipv6 2002:a0b:6565::/0 next edit 2 set interface port2 set ipv6 2002:AC14:7805::/0 end
1520
FGT# get router info6 neighbor-cache list View the IPv6/MAC address mapping. This also displays the interface index and name associated with the address.
1521
1522
Background
BGP was first used in 1989. The current version, BGP-4, was released in 1995 and is defined in RFC 1771. That RFC has since been replaced by the more recent RFC 4271. The main benefits of BGP-4 are classless inter-domain routing, and aggregate routes. BGP is the only routing protocol to use TCP for a transport protocol. Other routing protocols use UDP. BGP makes routing decisions based on path, network policies and rulesets instead of the hop-count metric as RIP does, or cost-factor metrics as OSPF does. BGP-4+ supports IPv6. It was introduced in RFC 2858 and RFC 2545. BGP-4+ also supports BGP is the routing protocol used on the Internet. It was designed to replace the old Exterior Gateway Protocol (EGP) which had been around since 1982, and was very limited. In doing so, BGP enabled more networks to take part in the Internet backbone to effectively decentralize it and make the Internet more robust, and less dependent on a single ISP or backbone network.
1523
The following topics are included in this section: BGP and IPv6 Roles of routers in BGP networks Network Layer Reachability Information (NLRI) BGP attributes Confederations
1524
Speaker routers
Any router configured for BGP is considered a BGP speaker. This means that a speaker router advertises BGP routes to its peers. Any routers on the network that are not speaker routers, are not treated as BGP routers.
1525
As a minimum, when configuring BGP neighbors you must enter their IP address, and the AS number (remote_as). This is all the information the web-based manager interface allows you to enter for a neighbor. The BGP commands related to neighbors are quite extensive and include: config router bgp config neighbor edit <neighbor_address_ipv4> set activate {enable | disable} set advertisement-interval <seconds_integer> set allowas-in <max_num_AS_integer> set allowas-in-enable {enable | disable} set attribute-unchanged [as-path] [med] [next-hop] set bfd {enable | disable} set capability-default-originate {enable | disable} set capability-dynamic {enable | disable} set capability-graceful-restart {enable | disable} set capability-orf {both | none | recieve | send} set capability-route-refresh {enable | disable} set connect-timer <seconds_integer> set description <text_str> set distribute-list-in <access-list-name_str> set distribute-list-out <access-list-name_str> set dont-capability-negotiate {enable | disable} set ebgp-enforce-multihop {enable | disable} set ebgp-multihop {enable | disable} set ebgp-multihop-ttl <seconds_integer> set filter-list-in <aspath-list-name_str> set filter-list-out <aspath-list-name_str> set holdtime-timer <seconds_integer> set interface <interface-name_str> set keep-alive-timer <seconds_integer> set maximum-prefix <prefix_integer> set maximum-prefix-threshold <percentage_integer> set maximum-prefix-warning-only {enable | disable} set next-hop-self {enable | disable}
Advanced Routing for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1526
set set set set set set set set set set set set set set set set set set set end end end
override-capability {enable | disable} passive {enable | disable} password <string> prefix-list-in <prefix-list-name_str> prefix-list-out <prefix-list-name_str> remote-as <id_integer> remove-private-as {enable | disable} retain-stale-time <seconds_integer> route-map-in <routemap-name_str> route-map-out <routemap-name_str> route-reflector-client {enable | disable} route-server-client {enable | disable} send-community {both | disable | extended | standard} shutdown {enable | disable} soft-reconfiguration {enable | disable} strict-capability-match {enable | disable} unsuppress-map <route-map-name_str> update-source <interface-name_str> weight <weight_integer>
1527
Figure 180: Required sessions within an AS with and without route reflectors
Border Router
Border Router
RR RR Cluster2
Cluster1
The BGP commands related to route reflectors includes: config router bgp config neighbor set route-reflector-client {enable | disable} set route-server-client {enable | disable} end end
Confederations
Confederations were introduced to reduce the number of BGP advertisements on a segment of the network, and reduce the size of the routing tables. Confederations essentially break up an AS into smaller units. Confederations are defined in RFC 3065 and RFC 1965. Within a confederation, all routers communicate with each other in a full mesh arrangement. Communications between confederations is more like inter-AS communications in that many of the attributes are changed as they would be for BGP communications leaving the AS, or eBGP. Confederations are useful when merging ASs. Each AS being merged can easily become a confederation, requiring few changes. Any additional permanent changes can then be implemented over time as required. The figure below shows the group of ASs before merging, and the corresponding confederations afterward as part of the single AS with the addition of a new border router. It should be noted that after merging if the border router becomes a route reflector, then each confederation only needs to communicate with one other router, instead of five others.
1528
AS 1
Confed1 Confed1 (was AS1) (was AS1)
AS AS 1 1
AS 2
Border rder Router Rout ter
Border B d R Router t
AS 3 AS 5 AS 4
Confederations and route reflectors perform similar functions they both sub-divide large ASes for more efficient operation. They differ in that route reflector clusters can include routers that are not members of a cluster, where routers in a confederation must belong to that confederation. Also, confederations place their confederation numbers in the AS_PATH attribute making it easier to trace. It is important to note that while confederations essentially create sub-ASs, all the confederations within an AS appear as a single AS to external ASs. Confederation related BGP commands include: config router bgp set confederation-identifier <peerid_integer> end
1529
BGP attributes
Each route in a BGP network has a set of attributes associated with it. These attributes define the route, and are modified as required along the route. BGP can work well with mostly default settings, but if you are going to change settings you need to understand the roles of each attribute and how they affect those settings. The BGP attributes include:
AS_PATH MULTI_EXIT_DESC (MED) COMMUNITY NEXT_HOP
A list of ASes a route has passed through. See AS_PATH on page 1530. Which router to use to exit an AS with more than one external connection. See MULTI_EXIT_DESC (MED) on page 1531. Used to apply attributes to a group of routes. See COMMUNITY on page 1531. Where the IP packets should be forwarded to, like a gateway in static routing. See NEXT_HOP on page 1532. downstream routers not to de-aggregate the route. See ATOMIC_AGGREGATE on page 1532. Used to determine if the route is from the local AS or not. SeeORIGIN on page 1532.
Used only within an AS to select the best route to a location (like MED)
ORIGIN LOCAL_PREF
Note: Inbound policies on FortiGate units can change the NEXT-HOP,LOCAL-PREF, MED and AS-PATH attributes of an internal BGP (iBGP) route for its local route selection purposes. However, outbound policies on the unit cannot affect these attributes.
AS_PATH
AS_PATH is the BGP attribute that keeps track of each AS a route advertisement has passed through. AS_PATH is used by confederations and by exterior BGP (EBGP) to help prevent routing loops. A router knows there is a loop if it receives an AS_PATH with that routers AS in it. The figure below shows the route between router A and router B. The AS_PATH from A to B would read 701,702,703 for each AS the route passes through. As of the start of 2010, the industry is upgrading from 2-byte to 4-byte AS_PATHs. This upgrade was due to the imminent exhaustion of 2-byte AS_PATH numbers.
Figure 182: AS_PATH of 701,702, 703 between routers A and B
Network AS702
A
Network AS701 Network AS703
3 2
1530
The BGP commands related to AS_PATH include: config router bgp set bestpath-as-path-ignore {enable | disable} end
MULTI_EXIT_DESC (MED)
BGP AS systems can have one or more routers that connect them to other ASes. For ASes with more than one connecting router, the Multi-Exit Discriminator (MED) lists which router is best to use when leaving the AS. The MED is based on attributes such as delay. It is a recommendation only, as some networks may have different priorities. BGP updates advertise the best path to a destination network. When the FortiGate unit receives a BGP update, the FortiGate unit examines the Multi-Exit Discriminator (MED) attribute of potential routes to determine the best path to a destination network before recording the path in the local FortiGate unit routing table. FortiGate units have the option to treat any routes without an MED attribute as the worst possible routing choice. This can be useful because a lack of MED information is a lack of routing information which can be suspicious possibly a hacking attempt or an attack on the network. At best it is an unreliable route to select. The BGP commands related to MED include: config router bgp set always-compare-med {enable | disable} set bestpath-med-confed {enable | disable} set bestpath-med-missing-as-worst {enable | disable} set deterministic-med {enable | disable} config neighbor set attribute-unchanged [as-path] [med] [next-hop] end end
COMMUNITY
A community is a group of routes that have the same routing policies applied to them. This saves time and resources. A community is defined by the COMMUNITY attribute of a BGP route. The FortiGate unit can set the COMMUNITY attribute of a route to assign the route to predefined paths (see RFC 1997). The FortiGate unit can examine the COMMUNITY attribute of learned routes to perform local filtering and/or redistribution. The BGP commands related to COMMUNITY include: config router bgp set send-community {both | disable | extended | standard} end
1531
NEXT_HOP
The NEXT_HOP attribute says what IP address the packets should be forwarded to next. Each time the route is advertised, this value is updated. The NEXT_HOP attribute is much like a gateway in static routing. FortiGate units allow you to to change the advertising of the FortiGate units IP address (instead of the neighbors IP address) in the NEXT_HOP information that is sent to IBGP peers. This is changed with the config neighbor, set next-hop-self command. The BGP commands related to NEXT_HOP include: config router bgp config neighbor set attribute-unchanged [as-path] [med] [next-hop] set next-hop-self {enable | disable} end end
ATOMIC_AGGREGATE
The ATOMIC_AGGREGATE attribute is used when routes have been summarized. It indicates which AS and which router summarize the routes. It also tells downstream routers not to de-aggregate the route. Summarized routes are routes with similar information that have been combined, or aggregated, into one route that is easier to send in updates. When it reaches its destination, the summarized routes are split back up into the individual routes. Your FortiGate unit doesnt specifically set this attribute in the BGP router command, but it is used in the route map command. The commands related to ATOMIC_AGGREGATE include: config router route-map edit <route_map_name> config rule edit <route_map_rule_id> set set-aggregator-as <id_integer> set set-aggregator-ip <address_ipv4> set set-atomic-aggregate {enable | disable} end end end
ORIGIN
The ORIGIN attribute records where the route came from. The options can be IBGP, EBGP, or incomplete. This information is important because internal routes (IBGP) are higher priority than external routes (EBGP). However incomplete ORIGINs are the lowest priority of the three. The commands related to ORIGIN include: config router route-map edit <route_map_name> set comments <string> config rule edit <route_map_rule_id> set match-origin {egp | igp | end end end
incomplete | none}
1532
1533
Calculate: iBGP or eBGP? local route policies LOCAL_PREF Phase 1 - Calculate route preferences on incoming routes.
3 11 2
9 6 5
Phase 2 - Install the best routes into the local routing RIB
Decision phase 1
At this phase, the decision is to calculate how preferred each route and its NRLI are the Adjacent Routing Information Base Incoming (Adj-RIBs-In) compared to the other routes. For internal routes (IBGP), policy information or LOCAL_PREF is used. For external peer learned routes, it is based strictly on policy. These rules set up a list of which routes are most preferred going into Phase 2.
1534
Decision phase 2
Phase 2 involves installing the best route to each destination into the local Routing Information Base (Loc-RIB). Effectively, the Loc-RIB is the master routing table. Each route from Phase 1 has their NEXT_HOP checked to ensure the destination is reachable. If it is reachable, the AS_PATH is checked for loops. After that, routes are installed based on the following decision process: If there is only one route to a location, it is installed. If multiple routes to the same location, use the most preferred route from Level 1. If there is a tie, break the tie based on the following in descending order of importance: shortest AS_PATH, smallest ORIGIN number, smallest MED, EBGP over IBGP, smallest metric or cost for reaching the NEXT_HOP, BGP identifier, and lowest IP address.
Note that the new routes that are installed into the Loc-RIB are in addition to any existing routes in the table. Once Phase 2 is completed the Loc-RIB will consist of the best of both the new and older routes.
Decision phase 3
Phase 3 is route distribution or dissemination. This is the process of deciding which routes the router will advertise. If there is any route aggregation or summarizing, it happens here. Also any route filtering from route maps happens here. Once Phase 3 is complete, an update can be sent out to update the neighbor of new routes.
1535
Troubleshooting BGP
Troubleshooting BGP
There are some features in BGP that are used to deal with problems that may arise. Typically the problems with a BGP network that has been configured, involve routes going offline frequently. This is called route flap and causes problems for the routers using that route. This section includes: Clearing routing table entries Route flap
Route flap
When routers or hardware along a route go offline and back online that is called a route flap. Flapping is the term if these outages continue, especially if they occur frequently. Route flap is a problem in BGP because each time a peer or a route goes down, all the peer routers that are connected to that out-of-service router advertise the change in their routing tables which creates a lot of administration traffic on the network. And the same traffic happens again when that router comes back online. If the problem is something like a faulty network cable that wobbles on and offline every 10 seconds, there could easily be overwhelming amounts of routing updates sent out unnecessarily. Another possible reason for route flap occurs with multiple FortiGate units in HA mode. When an HA cluster fails over to the secondary unit, other routers on the network may see the HA cluster as being offline resulting in route flap. While this doesnt occur often, or more than once at a time, it can still result in an interruption in traffic which is unpleasant for network users. The easy solution for this problem is to increase the timers on the HA cluster, such as TTL timers, so they do not expire during the failover process. Also configuring graceful restart on the HA cluster will help with a smooth failover. The first method of dealing with router flap should be to check your hardware. If a cable is loose or bad, it can easily be replaced and eliminate the problem. If an interface on the router is bad, either dont use that interface or swap in a good router. If the power source is bad on a router either replace the power supply or use a power conditioning backup power supply. These quick and easy fixes can save you from configuring more complex BGP options. However if the route flap is from another source, configuring BGP to deal with the outages will ensure your network users uninterrupted service. Some methods of dealing with route flap in BGP include: Holddown timer Dampening Graceful restart Bi-directional forwarding detection (BFD)
1536
Troubleshooting BGP
Holddown timer
The first line of defence to a flapping route is the hold down timer. This timer reduces how frequently a route going down will cause a routing update to be broadcast. Once activated, the holddown timer wont allow the FortiGate unit to accept any changes to that route for the duration of the timer. If the route flaps five times during the timer period, only the first outage will be recognized by the FortiGate unit for the duration of the other outages there will be no changes because the Fortigate unit is essentially treating this router as down. After the timer expires, if the route is still flapping it will happen all over again. Even if the route isnt flapping if it goes down, comes up, and stays back up the timer still counts down and the route is ignored for the duration of the timer. In this situation the route will be seen as down longer than it really is, but there will be only the one set of route updates. This is not a problem in normal operation because updates are not frequent. Also the potential for a route to be treated as down when it is really up can be viewed as a robustness feature. Typically you do not want most of your traffic being routed over an unreliable route. So if there is route flap going on, it is best to avoid that route if you can. This is enforced by the holddown timer. How to configure the holddown timer There are three different route flapping situations that can occur: the route goes up and down frequently, the route goes down and back up once over a long period of time, or the route goes down and stays down for a long period of time. These can all be handled using the holddown timer. For example, your network has two routes that you want to set the holddown timer for. One is your main route ( to 10.12.101.4) that all your Internet traffic goes through, and it cant be down for long if its down. The second is a low speed connection to a custom network that is used infrequently ( to 10.13.101.4). The holddown timer for the main route should be fairly short, lets say 60 seconds instead of the default 180 seconds. The second route timer can be left at the default or even longer since it is rarely used. In your BGP configuration this looks like: config router bgp config neighbor edit 10.12.101.4 set holddown-timer 60 next edit 10.13.101.4 set holddown-timer 180 next end end
1537
Troubleshooting BGP
Dampening
Dampening is a method used to limit the amount of network problems due to flapping routes. With dampening the flapping still occurs, but the peer routers pay less and less attention to that route as it flaps more often. One flap doesnt start dampening, but the second starts a timer where the router will not use that route it is considered unstable. If the route flaps again before the timer expires, the timer continues to increase. There is a period of time called the reachability half-life after which a route flap will only be suppressed for half the time. This half-life comes into effect when a route has been stable for a while but not long enough to clear all the dampening completely. For the flapping route to be included in the routing table again, the suppression time must expire. If the route flapping was temporary, you can clear the flapping or dampening from the FortiGate units cache by using one of the execute router clear bgp commands: execute router clear bgp dampening {ip_address | ip/netmask} or execute router clear bgp flap-statistics {ip_address | ip/netmask} For example, to remove route flap dampening information for the 10.10.0.0/16 subnet, enter the command: FGT# exec router clear bgp dampening 10.10.0.0/16 The BGP commands related to route dampening are: config router bgp set dampening {enable | disable} set dampening-max-suppress-time <minutes_integer> set dampening-reachability-half-life <minutes_integer> set dampening-reuse <reuse_integer> set dampening-route-map <routemap-name_str> set dampening-suppress <limit_integer> set dampening-unreachability-half-life <minutes_integer>end end
Graceful restart
BGP4 has the capability to gracefully restart. In some situations, route flap is caused by routers that appear to be offline but the hardware portion of the router (control plane) can continue to function normally. One example of this is when some software is restarting or being upgraded, but the hardware can still function normally. Graceful restart is best used for these situations where routing will not be interrupted, but the router is unresponsive to routing update advertisements. Graceful restart does not have to be supported by all routers in a network, but the network will benefit when more routers support it.
Note: FortiGate HA clusters can benefit from graceful restart. When a failover takes place, the HA cluster will advertise it is going offline, and will not appear as a route flap. It will also enable the new HA main unit to come online with an updated and usable routing table if there is a flap the HA cluster routing table will be out of date.
1538
Troubleshooting BGP
Note: You can configure graceful restarting and other advanced settings only through CLI commands. For more information on advanced BGP settings, see the router chapter of the FortiGate CLI Reference.
The BGP commands related to BGP graceful restart are: config router bgp set graceful-restart { disable| enable} set graceful-restart-time <seconds_integer> set graceful-stalepath-time <seconds_integer> config neighbor set capability-graceful-restart {enable | disable} end end execute router restart
1539
Configurable granularity
BFD can run on the entire FortiGate unit, selected interfaces, or on BGP for all configured interfaces. The hierarchy allows each lower level to override the upper levels BFD setting. For example, if BFD was enabled for the FortiGate unit, it could be disabled only for a single interface or for BGP. For information about FortiGate-wide BFD options, see config system settings in the FortiGate CLI Reference. BFD support was added in FortiOS v3.0 MR4, and can only be configured through the CLI. The BGP commands related to BFD are: config router bgp config neighbor edit <neighbor_address_ipv4> set bfd {enable | disable} end end execute router clear bfd session <src_ipv4> <dst_ipv4> <interface>
1540
This section includes the following topics: Network layout and assumptions General configuration steps Configuring the FortiGate unit Configuring other networking devices Testing this configuration
Some companies require reliable internet access at all times as part of their business. Consider a doctor operating remotely who has their Internet connection fail the consequences could easily be life or death. Dual homing is extra expense for the second ISP connection, and more work to configure and maintain the more complex network topology.
1541
Network layout
The network layout for the basic BGP example involves the company network being connected to both ISPs as shown below. In this configuration the FortiGate unit is the BGP border router between the Company AS, ISP1s AS, and ISP2s AS. The components of the layout include: The Company AS (AS number 1) is connected to ISP1 and ISP2 through the FortiGate unit. The Company has one internal network the Head Office network at 10.11.101.0/24. The FortiGate unit internal interface is on the the Company internal network with an IP address of 10.11.101.110. The FortiGate unit external1 interface is connected to ISP1s network with an IP address of 172.21.111.5, an address supplied by the ISP. ISP1 AS has an AS number of 6501, and ISP2 has an AS number of 6502 Both ISPs are connected to the Internet. The ISP1 border router is a neighbor (peer) of the FortiGate unit. It has an address of 172.21.111.4. The ISP2 border router is a neighbor (peer) of the FortiGate unit. It has an address of 172.22.222.4. Apart from graceful restart, and shorter timers (holdtimer, and keepalive) default settings are to be used whenever possible.
1542
ISP BGP Border Routers 172.21.111.4 1 external1 172.20.111.5 5 internal rna nal l 10.11.101.110 172.22.222.4 e external2 172.20.222.5 1
Company AS (ASN 1)
Assumptions
The basic BGP configuration procedure follows these assumptions: ISP1 is the preferred route, and ISP2 is the secondary route all basic configuration can be completed in both GUI and CLI only one AS is used for the Company Bi-directional forwarding detection (BFD) Route maps Access lists changing redistribution defaults make link when example is set up IPv6
1543
1544
6 Edit port 3 (external2) interface. 7 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status external2 172.22.222.5/255.255.255.0 ISP2 External BGP network Up
To configure the FortiGate interfaces - CLI config system interface edit port1 set alias internal set ip 10.11.101.110 255.255.255.0 set allowaccess http https ssh set description Company internal network set status up next edit port2 set alias external1 set ip 172.21.111.5 255.255.255.0 set allowaccess https ssh set description ISP1 External BGP network set status up next edit port3 set alias external2 set ip 172.22.222.5 255.255.255.0 set allowaccess https ssh set description ISP2 External BGP network set status up next end To configure default routes for both ISPs - web-based manager 1 Go to Router > Static > Static Route. 2 Delete any existing routes with a IP/Mask of address of 0.0.0.0/0.0.0.0
1545
0.0.0.0/0.0.0.0
port2
172.21.111.5
10
4 Select OK. 5 Select Create New, and set the following information.
Destination IP/Mask Device Gateway Distance
0.0.0.0/0.0.0.0
port3
172.22.222.5
15
6 Select OK. To configure default routes for both ISPs - CLI config router static edit 1 set device "port2" set distance 10 set gateway 172.21.111.5 next edit 2 set device "port3" set distance 15 set gateway 172.22.222.5 next end
In the interest of keeping things simple, a zone will be used to group the two ISP interfaces together. This will allow using one security policy to apply to both ISPs at the same time. Remember to block intra-zone traffic as this will help prevent one ISP sending traffic to the other ISP through your FortiGate unit using your bandwidth. The zone keeps configuration simple, and in the future if there is a need for separate policies for each ISP, they can be created and the zone can be deleted.
Advanced Routing for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1546
The addresses that will be used are the addresses of the FortiGate unit internal and external ports, and the internal network. More policies or services can be added in the future as applications are added to the network. For more information on security policies, see the firewall chapter of the FortiGate Administration Guide.
Note: When configuring security policies always enable logging to help you track and debug your traffic flow.
To create a firewall services group - web-based manager 1 Go to Firewall Objects > Service > Group, and select Create New. 2 For Group Name, enter Basic_Services. 3 From Available Services, move the following six services over to the Member list BGP, FTP, FTP_GET, FTP_PUT, DNS, HTTP, and HTTPS. 4 Select OK. To create a firewall services group - CLI config firewall service group edit "Basic_Services" set member "BGP" "DNS" "FTP" "FTP_GET" "FTP_PUT" "HTTP" "HTTPS" next end To create a zone for the ISP interfaces - web-based manager 1 Go to System > Network > Interface. 2 Select the caret to the right of Create New and then select Zone. 3 Enter the following information.
Zone Name Block Intra-zone traffic interface members
ISPs
enable
port2 port3
4 Select OK. To create a zone for the ISP interfaces - CLI config system zone edit "ISPs" set interface "dmz1" "dmz2" set intrazone block next end
1547
To add the firewall addresses - web-based manager 1 Go to Firewall Objects > Address > Address. 2 Select Create New, and set the following information.
Address Name Type Subnet / IP Range Interface
Internal_network
Subnet / IP Range
10.11.101.0 255.255.255.0
port1
3 Select OK. To add the firewall addresses - CLI config firewall address edit "Internal_network" set associated-interface "port1" set subnet 10.11.101.0 255.255.255.0 next end To add the HTTP and DNS security policies - web-based manager 1 Go to Policy > Policy > Policy, and select Create New. 2 Set the following information.
Source Interface/Zone Source Address Destination Interface/Zone Schedule Service Action Log Allowed Traffic Enable NAT Comments
Destination Address All always Basic_services ACCEPT enable Enable ISP1 basic services out policy
3 Select OK.
1548
Destination Address Internal_network always Basic_services ACCEPT enable Enable ISP1 basic services in policy
To add the security policies - CLI config firewall policy edit 1 set srcintf "port1" set srcaddr "Internal_network" set dstintf "ISPs" set dstaddr "all" set schedule "always" set service "Basic_services" set action accept set nat enable set profile-status enable set logtraffic enable set comments "ISP1 basic services out policy" next edit 2 set srcintf "ISPs" set srcaddr "all" set dstintf "port1" set dstaddr "Internal_network" set schedule "always" set service "Basic_services" set action accept set nat enable set profile-status enable set logtraffic enable set comments "ISP1 basic services in policy" next end
1549
For this configuration the FortiGate unit will be in a stub area with one route out the ISP BGP router. Until you configure the ISP router as a neighbour, even that route out is not available. So while after this part of the configuration is complete your FortiGate unit will be running BGP, it wont know about any other routers running BGP until the next part of the configuration is complete. To set the BGP router information - web-based mananger 1 Go to Router > Dynamic > BGP. 2 Set the following information, and select OK.
Local AS Router ID 1 10.11.101.110
To set the BGP router information - CLI config router BGP set as 1 set router-id 10.11.101.110 end
To set the networks in the AS (CLI) config router bgp config network edit 1 set prefix 10.11.101.0 255.255.255.0 next end end
1550
These commands will enable or modify the following features on the FortiGate unit, and where possible on neighboring routers as well: bestpath-med-missing-as-worst treats a route without an MED as the worst possible available route due to expected unreliability fast-external-failover immediately reset the session information associated with BGP external peers if the link used to reach them goes down graceful_restart* advertise reboots to neighbors so they do not see the router as offline, wait before declaring them offline, and how long to wait when they reboot before advertising updates. These commands applies to neighbors and are part of the BGP capabilities. This prevents unneeded routing updates. holdtime-timer how long the router will wait for a keepalive message before declaring a router offline. A shorter time will find an offline router faster. keepalive-timer how often the router sends out keepalive messages to neighbor routers to maintain those sessions. log-neighbor-changes log changes to neighbor routers status. This can be useful for troubleshooting from both internal and external networks. connect-timer how long in seconds the FortiGate unit will try to reach this neighbor before declaring it offline. weight used to prefer routes from one neighbor over the other. In this example ISP1 is the primary connection so it is weighted higher than ISP2
To configure additional BGP options - CLI config router bgp set bestpath-med-missing-as-worst enable set fast-external-failover enable set graceful_restart enable set graceful-restart-time 120 set graceful-stalepath-time 180 set graceful-update-delay 180 set holdtime-timer 120 set keepalive-timer 45 set log-neighbor-changes enable config neighbor edit 172.21.111.4 set connect-timer 60 set description ISP1 set holdtime-timer 120 set keepalive-timer 45 set weight 250 next edit 172.22.222.4 set connect-timer 60 set description ISP2 set holdtime-timer 120 set keepalive-timer 45 set weight 100 next end end
1551
1552
The CLI command get router info routing-table details will provide you with every routes routing protocol, destination address, gateway address, interface, weighting, and if the address is directly connected or not. If you want to limit the display to BGP routes only, use the CLI command get router info routing-table bgp. If there are no BGP routes in the routing table, nothing will be displayed. In the CLI command you can replace BGP with static, or other routing protocols to only display those routes. If you want to see the contents of the routing information database (RIB), use the CLI command get router info routing-table database. This will display the incoming routes that may or may not make it into the routing table.
1553
This section includes the following topics: Network layout and assumptions General configuration steps Configuring the FortiGate unit Configuring other networking devices Testing this configuration
Network layout
The network layout for the BGP redistributing routes example involves the company network being connected to two BGP peers as shown below. In this configuration the FortiGate unit is the BGP border router between the Company AS, and the peer routers. The components of the layout include: There is only one BGP AS in this example AS 65001, shared by the FortiGate unit and both peers. The Companys FortiGate unit connects to the Internet through two BGP peers. The Company internal networks on the dmz interface of the FortiGate unit with an IP of 10.11.201.0/24. The FortiGate units interfaces are connected as follows: port1 (dmz) has IP 10.11.201.110 and is the internal user and server network port2 (external1) has IP 172.21.111.4 and is connected to Peer 1s network port3 (external2) has IP 172.22.222.4 and is connected to Peer 2s network
Peer 1 has IP 172.21.111.5, and Peer 2 has IP 172.22.222.5. OSPF Area 1 is configured on the dmz interface of the FortiGate unit, and is the routing protocol used by the internal users and servers.
1554
OSPF Area 1
http email
Assumptions
The the BGP redistributing routes configuration procedure follows these assumptions: the FortiGate unit has been configured following the Install Guide interfaces port1, port2, and port 3 exist on the FortiGate unit we dont know the router manufacturers of Peer 1 and Peer 2 we dont know what other devices are on the BGP AS or OSPF Area all basic configuration can be completed in both GUI and CLI access lists and route maps will only be configured in CLI VDOMs are not enabled on the FortiGate unit
1555
Firewall services will change depending on which routing protocol is being used on that network either BGP or OSPF. Beyond that, all services that are allowed will be allowed in both directions due to the internal servers. The services allowed are web-server services (DNS, HTTP, HTTPS, SSH, NTP, FTP*, SYSLOG, and MYSQL), email services (POP3, IMAP, and SMTP), and general troubleshooting services (PING, TRACEROUTE). Those last two can be removed once the network is up and working properly to increase security. Other services can be added later as needed. To configure the interfaces - GUI 1 Go to System > Network > Interface. 2 Edit port1 (dmz) interface. 3 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status dmz 10.11.201.110/255.255.255.0 OSPF internal networks Up
4 Edit port2 (external1) interface. 5 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status external1 172.21.111.4/255.255.255.0 BGP external Peer 1 Up
6 Edit port3 (external2) interface. 7 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status external2 172.22.222.4/255.255.255.0 BGP external2 Peer2 Up
To configure the FortiGate interfaces (CLI) config system interface edit port1 set alias dmz set ip 10.11.101.110 255.255.255.0 set allowaccess https ssh ping set description OSPF internal networks set status up next edit port2 set alias external1 set ip 172.22.222.5 255.255.255.0 set allowaccess https ssh
Advanced Routing for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1556
set description external1 Peer 1 set status up next edit port3 set alias external2 set ip 172.22.222.5 255.255.255.0 set allowaccess https ssh set description external2 Peer 2 set status up next end
To configure the firewall addresses - GUI 1 Go to Firewall Objects > Address > Address. 2 Select Create New, and set the following information.
Address Name Type Subnet / IP Range Interface
Internal_networks
Subnet / IP Range
10.11.201.0 255.255.255.0
port1
3 Select OK. 4 Select Create New, and enter the following information: 5 Select OK. To configure the firewall addresses - CLI config firewall address edit "BGP_services" To configure firewall service groups - GUI 1 Go to Firewall Objects > Service > Group. 2 Select Create New. 3 Name the group OSPF_Services. 4 Move the following services to the right list: DNS, FTP, FTP_GET, FTP_PUT, HTTP, HTTPS, IMAP, MYSQL, NTP, OSPF, PING, POP3, SMTP, SSH, SYSLOG, and TRACEROUTE. 5 Select OK. 6 Select Create New. 7 Name the group BGP_Services. 8 Move the following services to the right list: BGP, DNS, FTP, FTP_GET, FTP_PUT, HTTP, HTTPS, IMAP, MYSQL, NTP, PING, POP3, SMTP, SSH, SYSLOG, and TRACEROUTE. 9 Select OK.
1557
To configure firewall service groups - CLI config firewall service group edit "BGP_services" set member BGP, "DHCP" "DNS" "FTP" "FTP_GET" "FTP_PUT" "HTTP" "HTTPS" "IMAP" "MYSQL" "NTP" "PING" "POP3" "SMTP" "SSH" "TRACEROUTE" "SYSLOG" next edit "OSPF_services" set member "DHCP" "DNS" "FTP" "FTP_GET" "FTP_PUT" "HTTP" "HTTPS" "IMAP" "MYSQL" "NTP" "PING" "POP3" "SMTP" "SSH" "TRACEROUTE" "SYSLOG" "OSPF" next end
1558
end
0.0.0.0
Regular None
5 For Networks, select Create New. 6 Enter 10.11.201.0/255.255.255.0 for IP/Netmask, and select OK. 7 For Interfaces, select Create New. 8 Enter OSPF_dmz_network for Name. 9 Select port1(dmz) for Interface, and then select OK. To configure OSPF on the FortiGate unit - CLI
config router ospf set router-id 10.11.201.110
config area edit 0.0.0.0 set type regular set authentication none end config network edit 1
FortiOS Handbook v3: Advanced Routing 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1559
set area 0.0.0.0 set prefix 10.11.201.0 255.255.255.0 end config interface edit OSPF_dmz_network set interface port1(dmz) set status enable end config redistribute bgp set status enable set metric 1 end
end
1560
Background
OSPF is a link-state interior routing protocol, that is widely used in large enterprise organizations. It only routes packets within a single autonomous system (AS). This is different from BGP as BGP can communicate between ASes. The main benefit of OSPF is that it detects link failures in the network quickly and within seconds has converged network traffic successfully without any networking loops. Also OSPF has many features to control which routes are propagated and which are not, maintaining smaller routing tables. OSPF can also provide better load-balancing on external links than other interior routing protocols. OSPF version 2 was defined in 1998 in RFC 2328. OSPF was designed to support classless IP addressing, and variable subnet masks. This was a shortcoming of the earlier RIP protocols. Updates to OSPF version 2 are included in OSPF version 3 defined in 2008 in RFC 5340. OSPF3 includes support for IPv6 addressing where previously OSPF2 only supports IPv4 addressing.
1561
Router ID
In OSPF, each router has a unique 32-bit number called its Router ID. Often this 32-bit number is written the same as a 32-bit IPv4 address would be written in dotted decimal notation. However some brands of routers, such as Cisco routers, support a router ID entered as an integer instead of an IP address. It is a good idea to not use IP address in use on the router for the router ID number. The router ID does not have to be a particular IP address on the router. By choosing a different number, it will be harder to get confused which number you are looking at. A good idea can be to use the as much of the area's number as possible. For example if you have 15 routers in area 0.0.0.0 they could be numbered from 0.0.0.1 to 0.0.0.15. If you have an area 1.1.1.1, then routers in that area could start at 1.1.1.10 for example. You can manually set the router ID on your FortiGate unit. To manually set an OSPF router ID of 0.0.1.1 - web-based manager 1 Go to Router > Dynamic > OSPF. 2 For Router ID, enter 0.0.1.1. 3 Select OK. To manually set an OSPF router ID of 0.0.1.1 - CLI config router ospf set router-id 0.0.1.1 end
Adjacency
In an OSPF routing network, when an OSPF router boots up it sends out OSPF Hello packets to find any neighbors, or routers that have access to the same network as the router booting up. Once neighbors are discovered and Hello packets are exchanged, updates are sent, and the Link State databases of both neighbors are synchronized. At this point these neighbors are said to be adjacent. For two OSPF routers to become neighbors, the following conditions must be met. The subnet mask used on both routers must be the same subnet. The subnet number derived using the subnet mask and each router's interface IP address must match. The Hello interval & The Dead interval must match. The routers must have the same OSPF area ID. If they are in different areas, they are not neighbors. If authentication is used, they must pass authentication checks.
If any of these parameters are different between the two routers, the routers do not become OSPF neighbors and cannot be adjacent. If the routers become neighbors, they are adjacent.
1562
Benefits
The OSPF concept of the designated router is a big step above RIP. With all RIP routers doing their own updates all the time, RIP suffers from frequent and sometimes unnecessary updates that can slow down your network. With OSPF, not only do routing changes only happen when a link-state changes instead of any tiny change to the routing table, but the designated router reduces this overhead traffic even more. However, smaller network topologies may only have a couple routers besides the designated router. This may seem excessive, but it maintains the proper OSPF form and it will still reduce the administration traffic but to a lesser extent than on a large network. Also your network topology is ready for when you expand your network.
1563
Area
An OSPF area is a smaller part of the larger OSPF AS. Areas are used to limit the linkstate updates that are sent out. The flooding used for these updates would overwhelm a large network, so it is divided into these smaller areas for manageability. Within an area if there are two or more routers that are viable, there will always be a designated router (DR) and a backup DR (BDR). For more on these router roles, see Designated router (DR) and backup router (BDR) on page 1563. Defining a private OSPF area, involves: assigning a 32-bit number to the area that is unique on your network defining the characteristics of one or more OSPF areas creating associations between the OSPF areas that you defined and the local networks to include in the OSPF area if required, adjusting the settings of OSPF-enabled interfaces.
Note: IPv6 OSPF area numbers use the same 32-bit number notation as IPv4 OSPF.
If you are using the web-based manager to perform these tasks, follow the procedures summarized below.
1564
FortiGate units support the four main types of OSPF area: Backbone area NSSA Stub area Regular area
Backbone area
Every OSPF network has at least one AS, and every OSPF network has a backbone area. The backbone is the main area, or possibly the only area. All other OSPF areas are connected to a backbone area. This means if two areas want to pass routing information back and forth, that routing information will go through the backbone on its way between those areas. For this reason the backbone not only has to connect to all other areas in the network, but also be uninterrupted to be able to pass traffic to all points of the network. The backbone area is referred to as area 0 because it has an IP address of 0.0.0.0.
Stub area
A stub area is an OSPF area that receives no outside routes advertised into it, and all routing in it is based on a default route. This essentially isolates it from outside areas. Stub areas are useful for small networks that are part of a larger organization, especially if the networking equipment cant handle routing large amounts of traffic passing through, or there are other reasons to prevent outside traffic, such as security. For example most organizations dont want their accounting department to be the center of their network with everyones traffic passing through there. It would increase the security risks, slow down their network, and it generally doesnt make sense. A variation on the stub area is the totally stubby area. It is a stub area that does not allow summarized routes.
NSSA
A not-so-stubby-area (NSSA) is a stub area that allows for external routes to be injected into it. While it still does not allow routes from external areas, it is not limited to only using he default route for internal routing.
Regular area
A regular area is what all the other ASes are, all the non-backbone, non-stub, non-NSSA areas. A regular area generally has a connection to the backbone, does receive advertisements of outside routes, and does not have an area number of 0.0.0.0.
Authentication
In the OSPF packet header are two authentication related fields AuType, and Authentication. All OSPF packet traffic is authenticated. Multiple types of authentication are supported in OSPFv2. However in OSPFv3, there is no authentication built-in but it is assumed that IPSec will be used for authentication instead. Packets that fail authentication are discarded.
Null authentication
Null authentication indicates there is no authentication being used. In this case the 16-byte Authentication field is not checked, and can be any value. However checksumming is still used to locate errors. On your FortiGate this is the none option for authentication.
FortiOS Handbook v3: Advanced Routing 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1565
Cryptographic authentication
Cryptographic authentication involves the use of a shared secret key to authenticate all router traffic on a network. The key is never sent over the network in the cleara packet is sent and a condensed and encrypted form of the packet is appended to the end of the packet. A non-repeating sequence number is included in the OSPF packet to protect against replay attacks that could try to use already sent packets to disrupt the network. When a packet is accepted as authentic the authentication sequence number is set to the packet sequence number. If a replay attack is attempted, the packet sent will be out of sequence and ignored. Your FortiGate unit supports all three levels of authentication through the authentication keyword associated with creating an OSPF interface . For example to create an OSPF interface called Accounting on the port1 interface that is a broadcast interface, has a hello interval of 10 seconds, has a dead interval of 40 seconds, uses text authentication (simple password) with a password of ospf_test, enter the command: config router ospf config ospf-interface edit Accounting set interface port1 set network_type broadcast set hello_interval 10 set dead_interval 40 set authentication text set authentication-key ospf_test end end
1566
1567
External routes
OSPF is an internal routing protocol. OSPF external routes are routes with the destination of the connection using a routing protocol other than OSPF. OSPF handles external routes by adjusting the cost of the route to include the cost of the other routing protocol. There are two methods of calculating this cost, used for OSPF E1 and OSPF E2.
Comparing E1 and E2
The best way to understand OSPF E1 and E2 routes is to check routing tables on OSPF routers. If you look at the routes on an OSPF border router, the redistributed routes will have an associated cost that represents only the external route, as there is no OSPF cost to the route due to it already being on the edge of the OSPF domain. However, if you look at that same route on a different OSPF router inside the OSPF routing domain, it will have a higher associated cost - essentially the external cost plus the cost over the OSPF domain to that border router. The border router uses OSPF E2, where the internal OSPF router uses OSPF E2 for the same route.
1568
FGT620B# get router info routing-table all Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default O*E2 O S S 0.0.0.0/0 [110/10] via 10.1.1.3, tunnel_wan2, 00:02:11 10.0.0.1/32 [110/300] via 10.1.1.3, tunnel_wan2, 00:02:11 0.0.0.0/0 [10/0] via 192.168.183.254, port2 1.0.0.0/8 [10/0] via 192.168.183.254, port2
1569
The FortiGate unit dynamically updates its routing table based on the results of the SPF calculation to ensure that an OSPF packet will be routed using the shortest path to its destination. Depending on the network topology, the entries in the FortiGate unit routing table may include: the addresses of networks in the local OSPF area (to which packets are sent directly) routes to OSPF area border routers (to which packets destined for another area are sent) if the network contains OSPF areas and non-OSPF domains, routes to area boundary routers, which reside on the OSPF network backbone and are configured to forward packets to destinations outside the OSPF AS.
OSPF packets
Every OSPF packet starts with a standard 24-byte header, and another 24 bytes of information or more. The header contains all the information necessary to determine whether the packet should be accepted for further processing.
Table 93: OSPF packet 1-byte Version field 4-byte Area ID 1-byte Type field 2-byte Checksum 2-byte Packet length 2-byte Auth Type 3-byte Router ID 8-byte Authentication
The following descriptions summarize the OSPF packet header fields. Version field The OSPF version number. This specification documents version 2 of the protocol.
1570
Type fieldThere are 5 OSPF packet types. From one to five, respectively, they are Hello, Database Description, Link State Request, Link State Update, and Link State Acknowledgment. Packet lengthThe length of the OSPF protocol packet in bytes. This length includes the standard OSPF 24-byte header, so all OSPF packets are at 24-bytes long. Router IDThe Router ID of the packet's source. Area IDA 32-bit number identifying the area that this packet belongs to. All OSPF packets are associated with a single area. Most travel a single hop only. Packets travelling over a virtual link are labelled with the backbone Area ID of 0.0.0.0. ChecksumThe standard IP checksum of the entire contents of the packet, starting with the OSPF packet header but excluding the 64-bit authentication field. This checksum is calculated as the 16-bit one's complement of the one's complement sum of all the 16-bit words in the packet, excepting the authentication field. If the packet's length is not an integral number of 16-bit words, the packet is padded with a byte of zero before checksumming. The checksum is considered to be part of the packet authentication procedure; for some authentication types the checksum calculation is omitted. Auth TypeIdentifies the authentication procedure to be used for the packet. Authentication types include Null authentication (0), Simple password (1), Cryptographic authentication (2), and all others are reserved for future use. AuthenticationA 64-bit field for use by the authentication scheme. When AuType indicates no authentication is being used, the Authentication fields is not checked and can be any value. When AuType is set to 2 (Cryptographic authentication), the 64-bit authentication field is split into the following four fields: Zero field, Key ID field, Authentication data length field, and Cryptographic sequence field. The Key ID field indicates the key and algorithm used to create the message digest appended to the packet. The authentication data length field indicates how many bytes long the message digest is, and the cryptographic sequence number is at non-decreasing number that is set when the packet is received and authenticated to prevent replay attacks. Network MaskThe subnet where this packet is valid. Hello intervalThe period of time between sending out Hello packets. See Hello and dead intervals on page 1566. Options field The OSPF protocol defines several optional capabilities. A router indicates the optional capabilities that it supports in its OSPF Hello packets, Database Description packets and in its LSAs. This enables routers supporting a mix of optional capabilities to coexist in a single Autonomous System. Router priorityThe priority between 0 and 255 that determines which routers become the DR and BDR. See Designated router (DR) and backup router (BDR) on page 1563. Dead router intervalThe period of time when there is no response from a router before it is declared dead. See Hello and dead intervals on page 1566. DR and BDR fieldsThe DR and BDR fields each list the router that fills that role on this network, generally the routers with the highest priorities. See Designated router (DR) and backup router (BDR) on page 1563. Neighbor IDThe ID number of a neighboring router. This ID is used to discover new routers and respond to them.
1571
Troubleshooting OSPF
Troubleshooting OSPF
As with other dynamic routing protocols, OSPF has some issues that may need troubleshooting from time to time. For basic troubleshooting, see the Troubleshooting chapter. The more common issues include: Clearing OSPF routes from the routing table Checking the state of OSPF neighbors Passive interface problems Timer problems Authentication issues DR and BDR election issues
1572
Troubleshooting OSPF
Passive interfaces can cause problems when they arent receiving the routing updates you expect from their neighbors. This will result in the passive OSPF FortiGate unit interface having an incomplete or out of date link-state database, and it will not be able to properly route its traffic. It is possible that the passive interface is causing a hole in the network where no routers are passing updates to each other, however this is a rare situation. If a passive interface is causing problems, there are some easy methods to determine it is the cause. The easiest method is to make it an active interface, and if the issues disappear that was the cause. Another method is to examine the OSPF routing table and related information to see if it is incomplete compared to other neighbor routers. If this is the case. If you cannot make the interface active for some reason, you will have to change your network to fix the hole by adding more routers, or changing the relationship between the passive routers neighbors to provide better coverage.
Timer problems
A timer mismatch is when two routers have different values set for the same timer. For example if one router declares a router dead after 45 seconds and another waits for 4 minutes that difference in time will result in those two routers being out of synch for that period of timeone will still see that offline router as being online. The easiest method to check the timers is to check the configuration on each router. Another method is to sniff some packets, and read the timer values in the packets themselves from different routers. Each packet contains the hello interval, and dead interval periods, so you can compare them easily enough.
Authentication issues
OSPF has a number of authentication methods you can choose from. You may encounter problems with routers not authenticating as you expect. This will likely appear simply as one or more routers that have a blind spot in their routing - they wont acknowledge a router. This can be a problem if that router connects areas to the backbone as it will appear to be offline and unusable. To confirm this is the issue, the easiest method is to turn off authentication on the neighboring routers. With no authentication between any routers, everything should flow normally. Another method to confirm that authentication is the problem is to sniff packets, and look at their contents. The authentication type and password are right in the packets which makes it easy to confirm they are what you expect during real time. Its possible one or more routers is not configured as you expect and may be using the wrong authentication. This method is especially useful if there are a group of routers with these problemsit may only be one router causing the problem that is seen in multiple routers.
1573
Troubleshooting OSPF
Once you have confirmed the problem is authentication related, you can decide how to handle it. You can turn off authentication and take your time to determine how to get your preferred authentication type back online. You can try another type of authentication, text instead of md5 for example, which may have more success and still provide some level of protection. The important part is that once you confirm the problem, you can decide how to fix it properly.
1574
Network layout
There are three FortiGate units acting as OSPF v2 routers on the networkRouter1, Router2, and Router3. Router1 will be the designated router (DR), and Router 2 the BDR. Router3 is the area border router (ASBR) that connects to the external ISP router running BGP. Router2 has a PPPoE DSL connection that can access the Internet. The Head Office network is connected to Router1 and Router2 on the 10.11.101.0 subnet. Router1 and Router3 are connected over the 10.11.103.0 subnet. Router2 and Router3 are connected over the 10.11.102.0 subnet. The following table lists the router, interface, address, and role it is assigned.
1575
Table 94: Routers, interfaces, and IP addresses for basic OSPF example network Router name Router1 (DR) Router2 (BDR) Interface Internal (port1) External (port2) Internal (port1) External (port2) DSL (port3) Router3 (ASBR) Internal1 (port1) Internal2 (port2) External (port3) IP address 10.11.101.1 10.11.102.1 10.11.101.2 10.11.103.2 10.12.101.2 10.11.102.3 10.11.103.3 172.20.120.3 Interface is connected to: Head office network, and Router2 Router3 Head office network, and Router1 Router3 PPPoE DSL access Router1 Router2 ISPs BGP network
ISP BGP router (172.20.120.5) Router3 (ASBR) l external 3 172.20.120.3 Ro R ou Router2 (BDR) DSL Internet Access
R) ) Router1 (DR)
Note that other subnets can be added to the internal interfaces without changing the configuration.
Assumptions
The FortiGate units used in this example have interfaces named port1, port2, and port3. All FortiGate units in this example have factory default configuration with FortiOS 4.0 MR2 firmware installed, and are in NAT/Route operation mode. Basic firewalls are in place to allow unfiltered traffic between all connected interfaces in both directions. This OSPF network is not connected to any other OSPF networks. Both Internet connections are always available. The modem connection is very slow and expensive. Other devices may be on the network, but do not affect this basic configuration. Router3 is responsible for redistributing all routes into and out of the OSPF AS.
1576
Configuring Router1
Router1 has two interfaces connected to the networkinternal (port1) and external (port2). Its host name must be changed to Router1. To configure Router1 interfaces - web-based manager 1 Go to System > Dashboard > Status. 2 Beside the host name, select Change. 3 Enter a hostname of Router1, and select OK. 4 Go to System > Network > Interface, edit port1, set the following information, and then select OK.
Alias IP/Netmask Description Administrative Status internal 10.11.101.1/255.255.255.0 Head office and Router2 Up
5 Edit port2, set the following information, and then select OK.
Alias IP/Netmask Description Administrative Status External 10.11.102.1/255.255.255.0 Router3 Up
1577
Configuring Router2
Router2 configuration is the same as Router1, except Router2 also has the DSL interface to configure. The DSL interface is configured with a username of user1 and a password of ospf_example. The default gateway will be retrieved from the ISP, and the defaults will be used for the rest of the PPPoE settings. To configure Router2 interfaces - web-based manager 1 Go to System > Dashboard > Status. 2 Beside the host name, select Change. 3 Enter a hostname of Router2, and select OK. 4 Go to System > Network > Interface, edit port1, set the following information, and then select OK.
Alias IP/Netmask Description Administrative Status internal 10.11.101.2/255.255.255.0 Head office and Router1 Up
5 Edit port2, set the following information, and then select OK.
Alias IP/Netmask Description Administrative Status External 10.11.103.2/255.255.255.0 Router3 Up
6 Edit DSL (port3), set the following information, and then select OK.
Alias Addressing Mode Username Password Unnumbered IP address Retrieve default gateway from server Description Administrative Status DSL PPPoE user1 ospf_example 10.12.101.2/255.255.255.0 Enable
1578
Configuring Router3
Router3 is similar to Router1 and Router2 configurations. The main difference is the External (port3) interface connected to the ISP BGP network which has no administration access enabled for security reasons. To configure Router3 interfaces - web-based manager 1 Go to System > Status > Dashboard. 2 Next to hostname, select Change. 3 Enter a hostname of Router3, and select OK. 4 Go to System > Network > Interface, edit port1, set the following information, and then select OK.
Alias IP/Netmask Description Administrative Status internal 10.11.102.3/255.255.255.0 Router1 Up
5 Edit port2, set the following information, and then select OK.
Alias IP/Netmask Description Administrative Status Internal2 10.11.103.3/255.255.255.0 Router2 Up
6 Edit port3, set the following information, and then select OK.
Alias IP/Netmask Administrative Access Description Administrative Status ISP BGP Up External 172.20.120.3/255.255.255.0
1579
Each router will configure: router ID area network two or three interfaces depending on the router priority for DR (Router1) and BDR (Router2) redistribute for ASBR (Router3) Configuring OSPF on Router1 Configuring OSPF on Router2 Configuring OSPF on Router3
4 In Networks, select Create New, set the following information, and then select OK.
IP/Netmask Area 10.11.0.0/255.255.0.0 0.0.0.0
5 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication Timers (seconds) Hello Interval Dead Interval 10 40 Router1-Internal-DR port1 (Internal) 0.0.0.0 none
6 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Router1-External port2 (External) 0.0.0.0
1580
none 10 40
7 Using the CLI, enter the following commands to set the priority for the Router1-Internal OSPF interface to maximum, ensuring this interface becomes the DR. config router ospf config ospf_interface edit Router1-Internal-DR set priority 255 end To configure OSPF on Router1 - CLI config router ospf set router-id 10.11.101.1 config area edit 0.0.0.0 next end config network edit 1 set prefix 10.11.0.0/255.255.255.0 next end config ospf-interface edit "Router1-Internal" set interface "port1" set priority 255 next edit "Router1-External" set interface "port2" next end end
1581
4 In Networks, select Create New, set the following information, and then select OK.
IP/Netmask Area 10.11.0.0/255.255.0.0 0.0.0.0
5 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication Timers (seconds) Hello Interval Dead Interval 10 40 Router2-Internal port1 (Internal) 0.0.0.0 none
6 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication Timers (seconds) Hello Interval Dead Interval 10 40 Router2-External port2 (External) 0.0.0.0 none
7 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication Timers (seconds) Hello Interval Dead Interval 20 80 Router2-DSL port3 (DSL) 0.0.0.0 none
8 Using the CLI, enter the following commands to set the priority for the Router2-Internal OSPF interface to ensure this interface will become the BDR. config router ospf config ospf_interface edit Router2-Internal set priority 250 next end 9 Using the CLI, enter the following commands to set the cost of the DSL interface higher than the other routes to reflect its higher monetary cost, and slower speed. config router ospf config ospf_interface edit DSL set cost 50 next end
Advanced Routing for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1582
To configure OSPF on Router2 - CLI config router ospf set router-id 10.11.101.2 config area edit 0.0.0.0 next end config network edit 1 set prefix 10.11.0.0/255.255.0.0 next end config ospf-interface edit "Router2-Internal" set interface "port1" set priority 255 next edit "Router2-External" set interface "port2" next
edit Router2-DSL
end end
5 In Areas, select Create New, set the following information, and then select OK.
FortiOS Handbook v3: Advanced Routing 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1583
6 In Networks, select Create New, set the following information, and then select OK.
IP/Netmask Area 10.11.0.0/255.255.0.0 0.0.0.0
7 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication Timers (seconds) Hello Interval Dead Interval 10 40 Router3-Internal port1 (Internal) 0.0.0.0 none
8 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication Timers (seconds) Hello Interval Dead Interval 10 40 Router3-Internal2 port2 (Internal2) 0.0.0.0 none
9 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication Timers (seconds) Hello Interval Dead Interval 20 80 Router3-ISP-BGP port3 (ISP-BGP) 0.0.0.0 none
10 Using the CLI, enter the following commands to set the priority for the Router2-Internal OSPF interface to ensure this interface will become the BDR. config router ospf config ospf_interface edit Router3-Internal set priority 250 next end 11 Using the CLI, enter the following commands to set the cost of the DSL interface higher than the other routes to reflect its higher monetary cost, and slower speed. config router ospf
Advanced Routing for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1584
To configure OSPF on Router3 - CLI config router ospf set router-id 10.11.102.3 config area edit 0.0.0.0 next end config network edit 1 set prefix 10.11.0.0/255.255.255.0 next edit 2 set prefix 172.20.120.0/255.255.255.0 next end config ospf-interface edit "Router3-Internal" set interface "port1" set priority 255 next edit "Router3-External" set interface "port2" next
edit Router3-ISP-BGP
end end
1585
Network layout
There are four FortiGate units in this network topology acting as OSPF routers. Area 1.1.1.1 is a stub area with one FortiGate unit OSPF router called Router1 (DR). Its only access outside of that area is a default route to the backbone area, which is how it accesses the Internettraffic must go from the stub area, through the backbone, to the third area to reach the Internet. The backbone area in this configuration is called a transit area. Also in area 1.1.1.1 there is a RIP router that will be providing routes to the OSPF area through redistribution. Area 0.0.0.0 is the backbone area, and has two FortiGate unit routers named Router2 (BDR) and Router3 (DR). Area 2.2.2.2 is a regular area that has an Internet connection accessed by both the other two OSPF areas. There is only one FortiGate unit router in this area called Router4 (DR). This area is more secure and requires MD5 authentication by routers. All areas have user networks attached, but they are not important for configuring the network layout for this example.
Advanced Routing for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1586
Internal interfaces are connected to internal user networks only. External1 interfaces are connected to the 10.11.110.0 network, joining Area 1.1.1.1 and Area 0.0.0.0. External2 interfaces are connected to the 10.11.111.0 network, joining Area 0.0.0.0 and Area 2.2.2.2. The ISP interface is called ISP.
Table 95: Routers, areas, interfaces, and IP addresses for advanced OSPF network Router name Router1 (DR) Area number and type 1.1.1.1 - stub area (Accounting) 0.0.0.0 - backbone area ( R&D Network) Interface port1 (internal) port2 (external1) port1 (internal) port2 (external1) port3 (external2) port1 (internal) port2 (external1) port3 (external2) port1 (internal) port2 (external2) port3 (ISP) IP address 10.11.101.1 10.11.110.1 10.11.102.2 10.11.110.2 10.11.111.2 10.11.103.3 10.11.110.3 10.11.111.3 10.11.104.4 10.11.111.4 172.20.120.4
Router2 (BDR)
Router3 (DR)
Router4 (DR)
User Network
Note that other subnets can be added to the internal interfaces without changing the configuration.
1587
Assumptions
The FortiGate units used in this example have interfaces named port1, port2, and port3. All FortiGate units in this example have factory default configuration with FortiOS 4.0 MR2 firmware installed, and are in NAT/Route operation mode. During configuration, if settings are not directly referred to they will be left at default settings. Basic firewalls are in place to allow unfiltered traffic between all connected interfaces in both directions. This OSPF network is not connected to any other OSPF areas outside of this example. The Internet connection is always available. Other devices may be on the network, but do not affect this configuration.
1588
Configuring Router1
Router1 is part of the Accounting network stub area (1.1.1.1). This section configures interfaces and hostname. To configure Router1 interfaces - web-based manager 1 Go to System > Dashboard > Status. 2 Next to hostname, select Change. 3 Enter a hostname of Router1, and select OK. 4 Go to System > Network > Interface, edit port1, set the following information, and then select OK.
Alias IP/Netmask Description Administrative Status internal 10.11.101.1/255.255.255.0 Accounting network Up
5 Edit port2, set the following information, and then select OK.
Alias IP/Netmask Description Administrative Status External1 10.11.110.1/255.255.255.0 Backbone network and internet Up
Configuring Router2
Router2 is part of the R&D network backbone area (0.0.0.0). Router2 and Router3 are in this area. They provide a redundant connection between area 1.1.1.1 and area 2.2.2.2. Router2 has three interfaces configuredone to the internal network, and two to Router3 for redundancy. This section configures interfaces and hostname. To configure Router2 interfaces - web-based manager 1 Go to System > Dashboard > Status. 2 Next to hostname, select Change. 3 Enter a hostname of Router2, and select OK. 4 Go to System > Network > Interface, edit port1 (internal), set the following information, and then select OK.
Alias IP/Netmask Description Administrative Status internal 10.11.102.2/255.255.255.0 Internal RnD network Up
5 Edit port2 (external1), set the following information, and then select OK.
1589
6 Edit port3 (external2), set the following information, and then select OK.
Alias IP/Netmask Description Administrative Status external2 10.11.111.2/255.255.255.0 Router3 second connection Up
Configuring Router3
Router3 is part of the R&D network backbone area (0.0.0.0). Router2 and Router3 are in this area. They provide a redundant connection between area 1.1.1.1 and area 2.2.2.2. This section configures interfaces and hostname. To configure Router3 interfaces - web-based manager 1 Go to System > Dashboard > Status. 2 Next to hostname, select Change. 3 Enter a hostname of Router3, and select OK. 4 Go to System > Network > Interface, edit port1 (internal), set the following information, and then select OK.
Alias IP/Netmask Description Administrative Status internal 10.11.103.3/255.255.255.0 Internal RnD network Up
5 Edit port2 (external1), set the following information, and then select OK.
Alias IP/Netmask Description Administrative Status external1 10.11.110.3/255.255.255.0 Router2 first connection Up
6 Edit port3 (external2), set the following information, and then select OK.
Alias IP/Netmask Description Administrative Status external2 10.11.111.3/255.255.255.0 Router2 second connection Up
1590
Configuring Router4
Router4 is part of the Network Administration regular area (2.2.2.2). This area provides internet access for both area 1.1.1.1 and the backbone area. This section configures interfaces and hostname. To configure Router4 interfaces - web-based manager 1 Go to System > Dashboard > Status. 2 Next to hostname, select Change. 3 Enter a hostname of Router4, and select OK. 1 Go to System > Network > Interface. 2 Edit port1 (internal). 3 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status internal 10.11.101.4/255.255.255.0 Accounting network Up
4 Edit port2 (external2). 5 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status external2 10.11.110.4/255.255.255.0 Backbone and Accounting network Up
6 Edit port3 (ISP). 7 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status ISP 172.20.120.4/255.255.255.0 ISP and internet Up
1591
4 In Networks, select Create New, set the following information, and then select OK.
IP/Netmask Area 10.11.101.0/255.255.255.0 1.1.1.1
5 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication Accounting port1 (internal) 10.11.101.1 None
6 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication Backbone1 port2 (external1) 10.11.110.1 None
To configure OSPF on Router2 - web-based manager 1 Go to Router > Dynamic > OSPF. 2 Enter 10.11.102.2 for the Router ID and then select Apply. 3 In Areas, select Create New, set the following information, and then select OK.
Area Type Authentication 0.0.0.0 Regular None
4 In Networks, select Create New, set the following information, and then select OK.
IP/Netmask Area 10.11.102.2/255.255.255.0 0.0.0.0
5 In Networks, select Create New, set the following information, and then select OK.
IP/Netmask Area 10.11.110.2/255.255.255.0 0.0.0.0
6 In Networks, select Create New, set the following information, and then select OK.
IP/Netmask Area 10.11.111.2/255.255.255.0 0.0.0.0
7 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface RnD network port1 (internal)
1592
IP Authentication
10.11.102.2 None
8 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication Backbone1 port2 (external1) 10.11.110.2 None
9 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication Backbone2 port3 (external2) 10.11.111.2 None
To configure OSPF on Router3 - web-based manager 1 Go to Router > Dynamic > OSPF. 2 Enter 10.11.103.3 for the Router ID and then select Apply. 3 In Areas, select Create New, set the following information, and then select OK.
Area Type Authentication 0.0.0.0 Regular None
4 In Networks, select Create New, set the following information, and then select OK.
IP/Netmask Area 10.11.102.3/255.255.255.0 0.0.0.0
5 In Networks, select Create New, set the following information, and then select OK.
IP/Netmask Area 10.11.110.3/255.255.255.0 0.0.0.0
6 In Networks, select Create New, set the following information, and then select OK.
IP/Netmask Area 10.11.111.3/255.255.255.0 0.0.0.0
7 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication RnD network port1 (internal) 10.11.103.3 None
8 In Interfaces, select Create New, set the following information, and then select OK.
1593
9 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication Backbone2 port3 (external2) 10.11.111.3 None
To configure OSPF on Router4 - web-based manager 1 Go to Router > Dynamic > OSPF. 2 Enter 10.11.104.4 for the Router ID and then select Apply. 3 In Areas, select Create New. 4 Set the following information, and select OK.
Area Type Authentication 2.2.2.2 Regular None
5 In Networks, select Create New, set the following information, and then select OK.
IP/Netmask Area 10.11.104.0/255.255.255.0 0.0.0.0
6 In Networks, select Create New, set the following information, and then select OK.
IP/Netmask Area 10.11.111.0/255.255.255.0 0.0.0.0
7 In Networks, select Create New, set the following information, and then select OK.
IP/Netmask Area 172.20.120.0/255.255.255.0 0.0.0.0
8 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication Network Admin network port1 (internal) 10.11.104.4 None
9 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication Backbone2 port2 (external2) 10.11.111.4 None Advanced Routing for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1594
10 In Interfaces, select Create New, set the following information, and then select OK.
Name Interface IP Authentication ISP port3 (ISP) 172.20.120.4 None
1595
FortiGate 1 Wan2
Network 192.168.182.0/23
FortiGate 1 should learn the route to network 192.168.182.0 and FortiGate 2 should learn the route to network 10.160.0.0. Under normal conditions, they should learn these routes through the WAN1 link. The WAN2 link should be used only as a backup. With the default settings, each FortiGate unit learns these routes from both WAN1 and WAN2. FortiGate 1: FGT1 # get router info ospf neighbor OSPF process 0: Neighbor ID Pri State Dead Time Address Interface 10.2.2.2 1 Full/Backup 00:00:33 10.182.0.187 wan1 10.2.2.2 1 Full/Backup 00:00:31 10.183.0.187 wan2 FGT1 # get router info routing-table ospf O*E2 0.0.0.0/0 [110/10] via 10.183.0.187, wan2, 00:00:01 [110/10] via 10.182.0.187, wan1, 00:00:01 O 192.168.182.0/23 [110/20] via 10.183.0.187, wan2, 00:02:04 [110/20] via 10.182.0.187, wan1, 00:02:04 FortiGate 2: FGT2 # get router info ospf neighbor OSPF process 0: Neighbor ID Pri State Dead Time Address Interface 10.1.1.1 1 Full/DR 00:00:38 10.182.0.57 wan1 10.1.1.1 1 Full/DR 00:00:38 10.183.0.57 wan2 FGT2 # get router info routing-table ospf O 10.160.0.0/23 [110/20] via 10.183.0.57, wan2, 00:00:39 [110/20] via 10.182.0.57, wan1, 00:00:39
Advanced Routing for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1596
1597
LS age: 83 Options: 0x2 (*|-|-|-|-|-|E|-) Flags: 0x2 : ASBR LS Type: router-LSA Link State ID: 10.2.2.2 Advertising Router: 10.2.2.2 LS Seq Number: 8000000e Checksum: 0xfc9b Length: 60 Number of Links: 3 Link connected to: Stub Network (Link ID) Network/subnet number: 192.168.182.0 (Link Data) Network Mask: 255.255.254.0 Number of TOS metrics: 0 TOS 0 Metric: 10 Link connected to: a Transit Network (Link ID) Designated Router address: 10.183.0.187 (Link Data) Router Interface address: 10.183.0.187 Number of TOS metrics: 0 TOS 0 Metric: 200 Link connected to: a Transit Network (Link ID) Designated Router address: 10.182.0.57 (Link Data) Router Interface address: 10.182.0.187 Number of TOS metrics: 0 TOS 0 Metric: 10
1598
Background
Intermediate System To Intermediate System Protocol (IS-IS) allows routing of ISOs OSI protocol stack Connectionless Network Service (CLNS). IS-IS is an Interior Gateway Protocol (IGP). It it not intended to be used between Autonomous Systems (ASes). IS-IS is a link state protocol and uses Dijstras algorithm to find the best path, as does OSPF. IS-IS was developed by Digital Equipment Corporation and later standardized by ISO in 1992 as ISO 19589 (see RFC 1142note this RFC is different from the ISO version). At roughly the same time the Internet Engineering Task Force developed OSPF. After the initial version, IP support was added to IS-IS and this version is called Integrated IS-IS (see RFC 1195). While OSPF is more widely known, IS-IS is a viable alternative to OSPF in enterprise networks and ISP infrastructures.
1599
IS-IS version 1
IS-IS version 1 packets are 24 bytes long. The zero fields were left for future expansion.
Table 96: IS-IS IP packets 1-byte command 4-byte IP address 1-byte version 4-byte zero field 2-byte zero field 4-byte zero field 2-byte AFI 4-byte metric 2-byte zero field
The following descriptions summarize the IS-IS version 1 packet fields. Command Indicates whether the packet is a request or a response. The request asks that a router send all or part of its routing table. The response can be an unsolicited regular routing update or a reply to a request. Responses contain routing table entries. Multiple IS-IS packets are used to convey information from large routing tables. Version Specifies the IS-IS version used. This field can signal different potentially incompatible versions. Zero field This field defaults to zero, and is not used by RFC 1058 IS-IS. Address-family identifier (AFI) Specifies the address family used. IS-IS is designed to carry routing information for several different protocols. Each entry has an address-family identifier to indicate the type of address being specified. The AFI for IP is 2. IP Address Specifies the IP address for the entry. Metric This is the number of hops or routers traversed along the route on its trip to the destination. The metric is between 1 and 15 for that number of hops. If the route is unreachable the metric is 16.
IS-IS version 2
IS-IS version 2 has more features that IS-IS 1 and this is reflected in its packets. IS-IS 2 packets are similar in format to IS-IS 1, but carry more information. Only one zero field remains.
Table 97: IS-IS 2 packets 1-byte 1-byte command version 2-byte unused 2-byte AFI 2-byte 4-byte IP 4-byte route tag address subnet 4-byte 4-byte next hop metric
1600
Troubleshooting IS-IS
The following descriptions summarize the fields IS-IS 2 adds to the IS-IS IP header. The other fields have been described above for IS-IS 1. Unused Has a value set to zero, and is intended for future use Route tag Provides a method for distinguishing between internal routes learned by ISIS and external routes learned from other protocols. Subnet mask Contains the subnet mask for the entry. If this field is zero, no subnet mask has been specified for the entry. Next hop Indicates the IP address of the next hop to which packets for the entry should be forwarded.
Troubleshooting IS-IS
This section is about troubleshooting IS-IS. For general troubleshooting information, see the Troubleshooting chapter. This section includes: Routing Loops Split horizon and Poison reverse updates
Routing Loops
Normally in routing, a path between two addresses is chosen and traffic is routed along that path from one address to the other. When there is a routing loop, that normal path doubles back on itself creating a loop. When there are loops, the network has problems. A routing loop happens when a normally functioning network has an outage, and one or more routers are offline. When packets encounter this, an alternate route is attempted to maneuver around the outage. During this phase it is possible for a route to be attempted that involves going back a hop, and trying a different hop forward. If that hop forward is blocked by the outage as well, a hop back and possibly the original hop forward may be selected. You can see if this continues, how it can consume not only network bandwidth but also many resources on those routers affected. The worst part is this situation will continue until the network administrator changes the router settings, or the downed routers come back online.
1601
Troubleshooting IS-IS
Use dead gateway detection and e-mail alerts Look at the packet flow
If you arent running SNMP, dead gateway detection, or you have non-Fortinet routers in your network, you can use networking tools such as ping and traceroute to define the outage on your network and begin to fix it.
1602
Troubleshooting IS-IS
After this configuration, when this interface on the FortiGate unit cannot connect to the next router, the FortiGate unit will bring down the interface and alert you with an email to the outage.
1603
This situation is called a split horizon because from Bs point of view the horizon stretches out in each direction, but in reality it only is on one side. Poison reverse is the method used to prevent routes from running into split horizon problems. Poison reverse poisons routes away from the destination that use the current router in their route to the destination. This poisoned route is marked as unreachable for routers that cannot use it. In IS-IS this means that route is marked with a distance of 16.
1604
R&D Network
Sales Network
Assumptions
The following assumptions have been made concerning this example. All FortiGate units have 4.0 MR3 firmware, and are running factory default settings. All CLI and web-based manager navigation assumes the unit is running in NAT/Route operating mode, with VDOMs disabled. All FortiGate units have interfaces labelled port1 through port4 as required. All firewalls have been configured for each FortiGate unit to allow the required traffic to flow across interfaces. Only FortiGate units are running IS-IS on the internal networks. Router2 and Router3 are connected through the internal network for R&D. Router2 and Router3 each have their own connection to the Internet, indicated in black in Figure 188.
1605
2 Next to Host Name select Change, and enter Router1. 3 Go to Router > Static > Static Route. 4 Edit the default route and enter the following information:
Destination IP/Mask Device Gateway Distance 0.0.0.0/0.0.0.0 port2 (router2) 172.20.120.5/255.255.255.0 40
6 Go to System > Network > Interface. 7 Edit port1 (internal) interface. 8 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status internal 10.11.101.101/255.255.255.0 Internal sales network Up
9 Edit port2 (router2) interface. 10 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status router2 10.11.201.101/255.255.255.0 Link to R&D network & internet through Router2 Up
11 Edit port3 (router3) interface. 12 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status router3 10.11.202.101/255.255.255.0 Link to R&D network and internet through Router3 Up
To configure Router2 system information - web-based manager 1 Go to System > Dashboard > Status > System Information. 2 Next to Host Name select Change, and enter Router2. 3 Go to Router > Static > Static Route.
1606
5 Go to System > Network > Interface. 6 Edit port1 (internal) interface. 7 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status internal 10.12.101.102/255.255.255.0 R&D internal network and Router3 Up
8 Edit port2 (router1) interface. 9 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status router1 10.12.201.102/255.255.255.0 Link to Router1 and the Sales network Up
10 Edit port3 (router4) interface. 11 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status router4 10.12.301.102/255.255.255.0 Link to Router4 and the accounting network Up
1607
14 Go to Router > Static > Settings, select Create New and enter the following:
Interface Ping Server Detect Protocol port4 172.20.120.5 ICMP Ping
15 Select OK. To configure Router3 system information - web-based manager 1 Go to System > Dashboard > Status > System Information. 2 Next to Host Name select Change, and enter Router3. 3 Go to Router > Static. 4 Edit the default route and enter the following information:
Destination IP/Mask Device Gateway Distance 0.0.0.0/0.0.0.0 port4 (ISP) 172.20.120.5/255.255.255.0 5
5 Go to System > Network > Interface. 6 Edit port1 (internal) interface. 7 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status internal 10.12.101.103/255.255.255.0 R&D internal network and Router2 Up
8 Edit port2 (router1) interface. 9 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status router1 10.13.201.103/255.255.255.0 Link to Router1 and Sales network Up
10 Edit port3 (router4) interface. 11 Set the following information, and select OK.
1608
12 Edit port4 (ISP) interface. 13 Set the following information, and select OK.
Alias IP/Netmask Administrative Status ISP 172.20.120.103/255.255.255.0 Up
14 Go to Router > Static > Settings, select Create New and enter the following:
Interface Ping Server Detect Protocol port4 172.20.120.5 ICMP Ping
15 Select OK. To configure Router4 system information - web-based manager 1 Go to System > Dashboard > Status > System Information. 2 Next to Host Name select Change, and enter Router4. 3 Go to Router > Static. 4 Edit the default route and enter the following information:
Destination IP/Mask Device Gateway Distance 0.0.0.0/0.0.0.0 port2 (router2) 172.20.120.5/255.255.255.0 40
6 Go to System > Network > Interface. 7 Edit port 1 (internal) interface. 8 Set the following information, and select OK.
Alias IP/Netmask internal 10.14.101.104/255.255.255.0
1609
9 Edit port 2 (router2) interface. 10 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status router2 10.14.201.104/255.255.255.0 Link to R&D network & internet through Router2 Up
11 Edit port 3 (router3) interface. 12 Set the following information, and select OK.
Alias IP/Netmask Description Administrative Status router3 10.14.301.104/255.255.255.0 Link to R&D network and internet through Router3 Up
This configuration is available only in the CLI. Router1 and Router4 are configured the same. Router2 and Router3 are configured the same. These routers will be grouped accordingly for the following procedures repeat the procedures once for each FortiGate unit. Configure IS-IS settings on Router1 and Router4 config router isis config isis-interface edit port1 set status enable next edit port2 set status enable next edit port3 set status enable next edit port4 set status enable end config isis-net
FortiOS Handbook v3 Advanced Routing 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1610
edit 1 set net 10.11.0.0 255.255.0.0 next edit 2 set net 10.12.0.0 255.255.0.0 next edit 3 set net 10.14.0.0 255.255.0.0 next edit 4 set net 172.20.120.0 255.255.255.0 end config redistribute static set status enable end Configure IS-IS settings on Router2 and Router3 config router isis config isis-interface edit "port1" set status enable next edit "port2" set status enable next edit "port3" set status enable end edit "port4" set status enable end config isis-net edit 1 set net 10.11.0.0 255.255.0.0 next edit 2 set net 10.12.0.0 255.255.0.0 next edit 3 set net 10.14.0.0 255.255.0.0 next edit 4 set net 172.20.120.0 255.255.255.0 end config redistribute "static" set status enable end
1611
1612
1613
1614
Virtual Domains
Virtual domains (VDOMs) are a method of dividing a FortiGate unit into two or more virtual units that function as multiple independent units. VDOMs can provide separate firewall policies and, in NAT/Route mode, completely separate configurations for routing and VPN services for each connected network or organization. This chapter will cover the basics of VDOMs, how they change your FortiGate unit, and how to work with VDOMs. VDOMs let you split your physical FortiGate unit into multiple virtual units. The resulting benefits range from limiting Transparent mode ports to simplified administration, and reduced space and power requirements. When VDOMs are disabled on any FortiGate unit, there is still one VDOM active: the root VDOM. It is always there in the background. When VDOMs are disabled, the root VDOM is not visible but it is still there. The root VDOM must be there because the FortiGate unit needs a management VDOM for management traffic among other things. It is also why when you enable VDOMs, all your configuration is preserved in the root VDOM-because that is where you originally configured it. This section includes: Before you begin Benefits of Virtual Domains Enabling and accessing Virtual Domains Configuring Virtual Domains
1615
Virtual Domains
Easier administration
VDOMs provide separate security domains that allow separate zones, user authentication, firewall policies, routing, and VPN configurations. VDOMs separate security domains and simplify administration of complex configurationsyou do not have to manage as many settings at one time. For more information, see Global and per-VDOM settings on page 1621. By default, each FortiGate unit has a VDOM named root. This VDOM includes all of the units physical interfaces, modem, VLAN subinterfaces, zones, firewall policies, routing settings, and VPN settings. Also, you can optionally assign an administrator account restricted to one VDOM. If the VDOM is created to serve an organization, this feature enables the organization to manage its own configuration. For more information, see Administrators in Virtual Domains on page 1637. Each physical FortiGate unit requires a FortiGuard license to access security updates. VDOMs do not require any additional FortiGuard licenses, or updating all the security updates for all the VDOMs are performed once per update at the global level. Combined this can be a potentially large money and time saving feature in your network. Management systems such as SNMP, logging, alert email, FDN-based updates, and NTPbased time setting use addresses and routing in the management VDOM to communicate with the network. They can connect only to network resources that communicate with the management VDOM. Using a separate VDOM for management traffic enables easier management of the FortiGate unit global settings, and VDOM administrators can also manage their VDOMs more easily. For more information, see Changing the management virtual domain on page 1641.
Continued security
When a packet enters a VDOM, it is confined to that VDOM and is subject to any firewall policies for connections between VLAN subinterfaces or zones in that VDOM, just like those interfaces on a FortiGate unit without VDOMs enabled.
1616
Virtual Domains
To travel between VDOMs, a packet must first pass through a firewall policy on a physical interface. The packet then arrives at another VDOM on that same FortiGate unit, but on a different interface, where it must pass through another firewall before entering. It doesnt matter if the interface is physical or virtual inter-VDOM packets still require the same security measures as when passing through physical interfaces. VDOMs provide an additional level of security because regular administrator accounts are specific to one VDOM an administrator restricted to one VDOM cannot change information on other VDOMs. Any configuration changes and potential errors will apply only to that VDOM and limit any potential down time. Using this concept, you can farther split settings so that the management domain is only accessible by the super_admin and does not share any settings with the other VDOMs.
1617
Virtual Domains
This section includes: Enabling Virtual Domains Viewing the VDOM list Global and per-VDOM settings Resource settings Virtual Domain Licensing Logging in to VDOMs
VDOMs are enabled To enable VDOM configuration - CLI config system global set vdom-admin enable end
1618
Virtual Domains
When enabling VDOMs, the web-based manager and the CLI are changed as follows: Global and per-VDOM configurations are separated. This is indicated in the Online Help by Global and VDOM icons. See Global and per-VDOM settings on page 1621. Only admin accounts using the super_admin profiles can view or configure global options. See Administrators in Virtual Domains on page 1637. Admin accounts using the super_admin profile can configure all VDOM configurations. All other administrator accounts can configure only the VDOM to which they are assigned. The System > Dashboard > Status view is different for VDOMs. In the Global view, the System menu includes a VDOM sub-menu. For admin accounts using the super_admin profile, a new control called Current VDOM is added at the bottom of the left menu. It indicates which VDOM you are in, and allows you to easily select either another VDOM or Global settings to configure. See Figure 190 on page 1619.
Figure 190: Menu with VDOMs disabled, at the global level, and VDOM level
VDOMs disabled
In the CLI, admin accounts using the super_admin profile must specify either the global or a VDOM-specific shell before entering commands: To change FortiGate unit system settings, from the top level you must first enter config global before entering commands. To change VDOM settings, from the top level you must first enter config vdom
1619
Virtual Domains
edit <vdom_name> before entering your commands for that VDOM. For information on which commands are global and which are per-VDOM, see Global and per-VDOM settings on page 1621.
To view the VDOM list 1 For Current VDOM, select Global. 2 Go to System > VDOM > VDOM.
Figure 191: List of VDOMs
Select All
Active VDOM
Disabled VDOM
Select to add a new VDOM. See Creating a Virtual Domain on page 1634. Select to change an existing selected VDOM. Select to delete the selected VDOM. See Deleting a VDOM on page 1636. Select to switch the management VDOM. Also shows the current management VDOM. You must select an active non-management VDOM before this option becomes available. See Changing the management virtual domain on page 1641.
1620
Virtual Domains
A grey X indicated this VDOM is disabled. See Disabling a Virtual Domain on page 1635. A green check indicates this VDOM is active. See Disabling a Virtual Domain on page 1635. When checked, this checkbox indicates this VDOM has been selected. Nearly all operations such as Edit, Delete, and Switch Management require a VDOM to first be selected. The name of the VDOM. VDOMs are listed in alphabetical order. When the VDOM is active, you can select the VDOM name to enter that VDOM. See Enabling and accessing Virtual Domains on page 1617. Indicates the operation mode as either NAT (for NAT/Route mode) or TP (for Transparent mode). The interfaces associated with this VDOM. Each VDOM also includes an interface that starts with ssl. that is created by default. Indicates if this VDOM is active, or disabled. Comments entered when the VDOM was created are displayed here. The number of references to this VDOM in the configuration.
Name
For more information on CLI commands, see the FortiGate CLI Reference. This section includes: Global settings - web-based manager Per-VDOM settings - web-based manager Global settings - CLI Per-VDOM settings - CLI
1621
Virtual Domains
Table 99: Global configuration settings System Dashboard Status Host name Dashboard Status HA Status Dashboard Status System Time Dashboard Status Firmware version Dashboard Configuration backup and restore VDOM VDOM list VDOM per-VDOM resources VDOM Global Resources Network Interfaces and subinterfaces Network Options DNS Network Options Dead Gateway Detection Config HA Config SNMP Config Replacement Message Config Replacement Message Image Config Firmware Config FortiGuard configuration Config Advanced - Scripts, USB Auto-install, Download Debug Log Admin Administrators Admin Profile Admin Central Management configuration Admin Settings Web Administration Ports, Password policy, Display Settings, timeouts, LCD panel Certificates Log&Report Log Config - Log Setting and Alert E-mail
1622
Virtual Domains
Table 100: VDOM configuration settings (Continued) Monitor DHCP Monitor Monitor Modem Monitor Router Policy Firewall Objects UTM Profiles VPN User WiFi Controller Log&Report All settings All settings All settings All settings All settings All settings All settings Log & Archive Access for Events, UTM, Traffic Log & Archive Access - Vulnerability Scan Log Log Config Log Setting Log Config Alert E-mail Monitor - Logging Monitor
1623
Virtual Domains
config system auto-install config system autoupdate ... config system aux config system bug-report config system central-management config system chassis-loadbalance config system console config system ddns config system dialinsvr config system dns config system dynamic-profile config system fips-cc config system fortiguard conifg system fortiguard-log config system global config system ha config system interface config system npu config system ntp config system password-policy config system replacemsg ... config system replacemsg-image config system resource-limits config system session-helper config system session-sync config system sflow config system snmp ... config system switch-interface conifg system tos-based-priority config system vdom-link config system vdom-property config vpn certificate ... config webfilter fortiguard config wireless-controller global config wireless-controller timers config wireless-controller vap execute backup execute batch execute central-mgmt execute cfg reload execute cfg save execute cli check-template-status execute cli status-msg-only execute date execute disconnect-admin-session execute enter execute factoryreset execute firmware-list execute formatlogdisk execute fortiguard-log execute ha disconnect execute ha manage execute ha synchronize execute log ...
Virtual Domains for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1624
Virtual Domains
execute log-report execute reboot execute restore execute revision execute router execute scsi-dev execute send-fds-statistics execute set-next-reboot execute sfp-mode-sgmii execute shutdown execute tac execute time execute update-ase execute update-av execute update-ips execute update-netscan execute update-now execute upload execute usb-disk execute vpn certificate ... execute wireless-controller ... get firewall vip ... end
Delete these objects, or modify them, to be able to remove the interface. This command syntax shows how you access the commands within a VDOM. Refer to the relevant sections in this Reference for information on these commands. config vdom edit <vdom_name>
FortiOS Handbook v3: Virtual Domains 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1625
Virtual Domains
config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config config conifg config config
antivirus filepattern antivirus profile antivirus quarantine antivirus settings application list application rule-settings dlp endpoint-control app-detect endpoint-control profile endpoint-control settings firewall ... (except ssl) ftp-proxy icap imp2p ips DoS ips custom ips rule-settings ips sensor ips settings log custom-field log eventfilter log fortianalyzer log gui log memory log syslogd log trafficfilter netscan router spamfilter ... (except fortishield and options) system 3g-modem system admin system arp-table system carrier-endpoint-translation system dhcp ... system dhcp6 ... system dns-database system dns-server system gre-tunnel system interface system ipv6-tunnel system modem system monitors system object-tag system proxy-arp system replacemsg-group system session-ttl system settings system sit-tunnel system wccp system zone user ... voip vpn ... wanopt
Virtual Domains for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1626
Virtual Domains
config web-proxy config webfilter (except fortiguard) config wireless-controller (except global and timers) execute backup execute clear system arp table execute cli check-template-status execute cli status-msg-only execute dhcp lease-clear execute dhcp lease-list execute enter execute fortitoken ... execute fsso refresh execute interface dhcpclient-renew execute interface pppoe-reconnect execute log ... execute log-report ... execute modem dial execute modem hangup execute modem trigger execute mrouter clear execute netscan ... execute ping, ping6 execute ping-options, ping6-options execute restore execute revision execute router clear bgp execute router clear ospf process execute router restart execute sfp-mode-sgmii execute ssh execute tac execute telnet execute traceroute execute tracert6 execute upload execute usb-disk execute vpn ipsec tunnel execute vpn sslvpn ... execute wireless-controller reset-wtp next edit <another_vdom> config ... execute ... end end For more information, see Global and per-VDOM settings on page 1621.
Resource settings
Your FortiGate unit has a limited amount of hardware resources such as memory, disk storage, CPU operations. When Virtual Domains are disabled, this limit is not a major concern because all sessions, users, and other processes share all the resources equally.
1627
Virtual Domains
When using Virtual Domains, hardware resources can be divided differently between Virtual Domains as they are needed. Also minimum levels of resources can be set so that no Virtual Domain will suffer a complete lack of resources. For example if one VDOM has only a web server and logging server connected, and a second VDOM has an internal network of 20 users these two VDOMs will require different levels of resources. The first VDOM will require many sessions but no user accounts. This compares to the second VDOM where user accounts and management resources are required, but fewer sessions. Using the global and per-VDOM resource settings, you can customize the resources allocated to each VDOM to ensure the proper level of service is maintained on each VDOM. This section includes: Global Resources Per-VDOM resource settings
Global Resources
Global Resources apply to the whole FortiGate unit. They represent all of the hardware capabilities of your unit. By default the values are set to their maximum values. These values vary by your model due to each model having differing hardware capabilities. It can be useful to change the maximum values for some resources to ensure there is enough memory available for other resources that may be more important to your configuration. To use the earlier example, if your FortiGate unit is protecting a number of web servers and other publicly accessible servers you would want to maximize the available sessions and proxies while minimizing other settings that are unused such as user settings, VPNs, and dial-up tunnels. Global Resources are only configurable at the global level, and only the admin account has access to these settings. Note that global resources, such as the log disk quote resource, will only be visible if your FortiGate unit hardware supports those resources, such as having a hard disk to support thee log disk resource. For additional information on the meaning of each resource, see the appropriate section of the FortiGate Administration Guide. To view global resource settings - web-based manager 1 For Current VDOM, select Global. 2 Select System > VDOM > Global Resources. To view global resource settings - CLI config global config system resource-limits get
1628
Virtual Domains
Edit
Select to edit the Configured Maximum value for a single selected Resource. If multiple Resources are selected, Edit is not available.
Reset to default value Select to return one or more selected Resources to factory default settings. Checkbox Resource Select a Resource for editing or resetting to default values. The name of the available global resources.
Configured Maximum The currently configured maximum for this resource. This value can be changed by selecting the Resource and editing it. Default Maximum The factory configured maximum value for this resource. You cannot set the Configured Maximum higher than the Default Maximum. The amount of this resource that is currently being used. This value is useful for determining when and if you may need to adjust Configured Maximum values for some resources on your FortiGate unit.
Current Usage
When viewing the global resource limits in the CLI, the output appears similar to: FGT1000A (global) # config system resource-limits FGT1000A (resource-limits) # get session ipsec-phase1 ipsec-phase2 dialup-tunnel firewall-policy firewall-address firewall-addrgrp custom-service service-group onetime-schedule recurring-schedule user
FortiOS Handbook v3: Virtual Domains 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
: : : : : : : : : : : :
1629
Virtual Domains
: 0 : 0 : 2000
Note: For explicit proxies when configuring limits on the number of concurrent users, you need to allow for the number of users based on their authentication method. Otherwise you may run out of user resources prematurely. Each session-based authenticated user is counted as a single user using their authentication membership ( RADIUS, LDAP, FSAE, local database etc.) to match users in other sessions. So one authenticated user in multiple sessions is still one user. For all other situations, the source IP address is used to determine a user. All sessions from a single source address are assumed to be from the same user.
1630
Virtual Domains
When viewing the per-VDOM resource limits in the CLI, the output appears similar to the following. Note that the first two lines are not part of the resource limits. In the CLI, the first number is the maximum value, and the second number is the guaranteed minimum. FGT1KA3607500810 (vdom-property) # edit root FGT1KA3607500810 (root) # get name description session ipsec-phase1 ipsec-phase2 dialup-tunnel firewall-policy firewall-address firewall-addrgrp custom-service service-group onetime-schedule recurring-schedule user user-group sslvpn webproxy : : : : : : : : : : : : : : : : : root property limits for vdom root 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1631
Virtual Domains
Configuring 250 or more VDOMs will result in reduced system performance. SeeFortiGate unit running very slowly on page 1715.
Note: Your FortiGate unit has limited resources that are divided among all configured VDOMs. These resources include system memory and CPU. You cannot run Unified Threat Management (UTM) features when running 250 or more VDOMs. UTM features include proxies, web filtering, and antivirusyour FortiGate unit can provide only basic firewall functionality.
Note: It is important to backup your configuration before upgrading the VDOM license on your FortiGate unit or units, especially with FortiGate units in HA mode.
To obtain a VDOM license key 1 Log in with a super_admin account. 2 Go to System > Dashboard > Status. 3 Record your FortiGate unit serial number as shown in System Information on page 1618. 4 Under License Information > Virtual Domain, select Purchase More.
Note: If you do not see the Purchase More option on the System Dashboard, your FortiGate model does not support more than 10 VDOMs. Figure 195: VDOM License Information
5 You will be taken to the Fortinet customer support web site where you can log in and purchase a license key for 25, 50, 100, 250, or 500 VDOMs. 6 When you receive your license key, go to the Dashboard and select Upload License under License Information, Virtual Domains. 7 In the Input License Key field, enter the 32-character license key you received from Fortinet customer support. 8 Select Apply.
Virtual Domains for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1632
Virtual Domains
To verify the new VDOM license, in global configuration go to System > Dashboard. Under License Information, Virtual Domains the maximum number of VDOMs allowed is shown.
Note: VDOMs created on a registered FortiGate unit are recognized as real devices by any connected FortiAnalyzer unit. The FortiAnalyzer unit includes VDOMs in its total number of registered devices. For example, if three FortiGate units are registered on the FortiAnalyzer unit and they contain a total of four VDOMs, the total number of registered FortiGate units on the FortiAnalyzer unit is seven. For more information, see the FortiAnalyzer Administration Guide.
Logging in to VDOMs
Only super_admin administrator accounts can access all global settings on the FortiGate unit and all of the VDOMs as well. Other administrator accounts can access and configure only their single VDOM and they must connect to an interface that is part of that VDOM. For example, administratorB is the admin for vdomB. If he tries to log into vdomA, or an interface that is part of vdomA he will not be able to log on. For more information on administrators in VDOMs, see Administrators in Virtual Domains on page 1637. Management services communicate using the management VDOM, which is the root VDOM by default. For more information, see Changing the management virtual domain on page 1641.
Note: Management traffic requires an interface that has access to the Internet. If there is no interface assigned to the VDOM containing the management traffic, services including updates will not function. For more information, see Changing the management virtual domain on page 1641.
To access a VDOM with a super_admin account - web-based manager 1 Log in with a super_admin account. 2 Select System > VDOM > VDOM. From here you can select a specific VDOM to configure. For more information, see List of VDOMs on page 1620. 3 Select Enter for the active VDOM or management VDOM you want to change. The system network page for that VDOM opens. The bottom of the left menu displays the currently selected VDOM name, unless only the root domain exists. 4 When you have finished configuring the VDOM, you can select << Global to return to global configuration for the FortiGate unit log out. To access a VDOM with a super_admin account - CLI With the super_admin, logging into the CLI involves also logging into the specific VDOM. If you need a reminder, use edit ? to see a list of existing VDOMs before you editing a VDOM.
Note: If you misspell a VDOM you are trying to switch to, you will create a new VDOM by that name. Any changes you make will be part of the new VDOM, and not the intended VDOM. If you are having problems where your changes arent visible, back up to the top level and use edit ? to see a list of VDOMs to ensure this has not happened. If it has happened, see Deleting a VDOM on page 1636.
1633
Virtual Domains
edit <chosen_vdom> .. <enter vdom related commands> .. end exit To access a VDOM with a non super_admin account - web-based manager 1 Connect to the FortiGate unit using an interface that belongs to the VDOM to be configured. 2 Log in using an administrator account that has access to the VDOM. The main web-based manager page opens. From here you can access VDOM-specific settings. To access a VDOM with a non-super_admin account - CLI When a non-super_admin logs into the FortiGate, there is not logging into the VDOM as this account only has access to one VDOM. Login: regular_admin Password: <password> .. <enter vdom related commands> .. exit
1634
Virtual Domains
Note: When creating large numbers of VDOMs (up to 250), you cannot enable advanced features such as proxies, web filtering, and antivirus due to limited FortiGate unit resources. Also when creating large numbers of VDOMs, you may experience reduced performance for the same reason.
To create a VDOM - web-based manager 1 Log in with a super_admin account. 2 Go to System > Dashboard > Status and ensure that Virtual Domains are enabled. If not, see Enabling and accessing Virtual Domains on page 1617. 3 Select System > VDOM > VDOM. 4 Select Create New. 5 Enter a unique name for your new VDOM. 6 Enter a short and descriptive comment to identify this VDOM. 7 Select OK. Repeat Steps 4 through to add additional VDOMs. To create a VDOM - CLI config vdom edit <new_vdom_name> end
Note: If you want to edit an existing Virtual Domain in the CLI, and mistype the name a new Virtual Domain will be created with this new misspelled name. If you notice expected configuration changes are not visible, this may be the reason. You should periodically check your VDOM list to ensure there are none of these misspelled VDOMs present.
1635
Virtual Domains
4 Ensure Enabled is not selected, and select OK. The test-vdom entry in the VDOM list is now greyed out, and the Enabled icon is a grey X. To disable a VDOM - CLI config vdom edit test-vdom config system settings set status disable end end To enable a VDOM - web-based manager 1 For Current VDOM, select Global. 2 Go to System > VDOM > VDOM. 3 Select test-vdom by either selecting the check box for test-vdom and selecting Edit or double-click on the grey X Enable icon for test-vdom. 4 Select Enabled, and select OK. The test-vdom entry in the VDOM list is now active, and the Enabled icon is a green check. To disable a VDOM - CLI config vdom edit test-vdom config system settings set status enable end end
Deleting a VDOM
Deleting a VDOM removes it from the FortiGate unit configuration. Before you can delete a VDOM, all references to it must be removed. This includes any objects listed in Per-VDOM settings - web-based manager on page 1622. If there are any references to the VDOM remaining, you will see an error message and not be able to delete the VDOM. The VDOM must also be enabled. A disabled VDOM cannot be deleted. You cannot delete the root VDOM or the management VDOM.
Tip: Before deleting a VDOM, a good practice is to reset any interface referencing
that VDOM to its default configuration, with root selected as the Virtual Domain. The following procedures show how to delete the test-vdom VDOM. To delete a VDOM - web-based manager 1 For Current VDOM, select Global. 2 Go to System > VDOM > VDOM.
1636
Virtual Domains
3 Select the Delete icon for test-vdom. If there is no Delete icon, there are still references to the VDOM that must first be removed. The Delete icon is visible for this VDOM when all the references are removed. 4 Confirm the deletion. To delete a VDOM - CLI config vdom delete test-vdom end
1637
Virtual Domains
The only difference in admin accounts when VDOMs are enabled is selecting which VDOM the admin account belongs to. Otherwise, by default the administration accounts are the same as when VDOMs are disabled and closely resemble the super_admin account in their privileges.
The following procedure creates a new Local administrator account called admin_sales with a password of fortinet in the sales VDOM using the admin_prof default profile. To create an administrator for a VDOM - web-based manager 1 Log in with a super_admin account. 2 Go to System > Admin > Administrators. 3 Select Create New. 4 Select Regular for Type, as you are creating a Local administrator account. 5 If this admin will be accessing the VDOM from a particular IP address or subnet, enter it in Trusted Host #1. See Using trusted hosts on page 1639.
Virtual Domains for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1638
Virtual Domains
6 Select prof_admin for the Admin Profile. 7 Select sales from the list of Virtual Domains. 8 Select OK. To create administrators for VDOMs - CLI config global config system admin edit <new_admin_name> set vdom <vdom_for_this_account> set password <pwd> set accprofile <an_admin_profile> ... end
1639
Virtual Domains
1640
This chapter contains the following sections: Virtual domains in NAT/Route mode WAN Optimization using VDOMs Example NAT/Route VDOM configuration
1641
By default the management VDOM is the root domain. When other VDOMs are configured on your FortiGate unit, management traffic can be moved to one of these other VDOMs. Reasons to move the management VDOM include selecting a non-root VDOM to be your administration VDOM, or the root VDOM not having an interface with a connection to the Internet.
Note: You cannot change the management VDOM if any administrators are using RADIUS authentication.
The following procedure will change the management VDOM from the default root to a VDOM named mgmt_vdom. It is assumed that mgmt_vdom has already been created and has an interface that can access the Internet. To change the management VDOM - web-based manager 1 In Current VDOM, select Global. 2 Select System > VDOM > VDOM. 3 Select the checkbox next to mgmt_vdom. 4 Select Switch Management [root]. To change the management VDOM - CLI config global config system global set management-vdom mgmt_vdom end Management traffic will now originate from mgmt_vdom.
This section includes the following topics: Adding a VLAN to a NAT/Route VDOM Moving an interface to a VDOM Deleting an interface Adding a zone to a VDOM
1642
To add a VLAN subinterface to a VDOM - web-based manager 1 In Current VDOM, select Global. 2 Go to System > Network > Interface. 3 Select Create New. 4 Enter the following information and select OK:
Name Interface VLAN ID Virtual Domain Addressing mode IP/Netmask Administrative Access client1-v100 port2 100 Client1 Manual 172.20.120.110/255.255.255.0 HTTPS, SSH
You will see an expand arrow added to the port2 interface. When the arrow is expanded, the interface shows the client1-v100 VLAN subinterface. To add a VLAN subinterface to a VDOM - CLI config global config system interface edit client1-v100 set type vlan set vlanid 100 set vdom Client1 set interface port2 set ip 172.20.120.110 255.255.255.0 set allowaccess https ssh next end end
1643
The following procedure will move the port3 interface to the Client2 VDOM. This is a common action when configuring a VDOM. It is assumed that the Client2 VDOM has already been created. It is also assumed that your FortiGate unit has a port3 interface. If you are using a different model, your physical interfaces may not be named port2, external or port3. To move an existing interface to a different VDOM - web-based manager 1 For Current VDOM, select Global. 2 Go to System > Network > Interface. 3 Select Edit for the port3 interface. 4 Select Client2 as the new Virtual Domain. 5 Select OK. To move an existing interface to a different VDOM - CLI config global config system interface edit port3 set vdom Client2 next end
Deleting an interface
Before you can delete a virtual interface, or move an interface from one VDOM to another, all references to that interface must be removed. For a list of objects that can refer to an interface see Per-VDOM settings - web-based manager on page 1622. The easiest way to be sure an interface can be deleted is when the Delete icon is no longer greyed out. If it remains greyed out when an interface is selected, that interface still has objects referring to it, or it is a physical interface that cannot be deleted. To delete a virtual interface - web-based manager 1 Ensure all objects referring to this interface have been removed. 2 In Current VDOM, select Global. 3 Select System > Network > Interface. 4 Select the interface to delete. 5 Select the delete icon.
1644
To add a zone to a VDOM - web-based manager 1 In Current VDOM, select the client2 VDOM. 2 Go to System > Network > Interface. 3 Select Create New > Zone. 4 Enter the following information and select OK:
Zone Name Block intra-zone traffic Interface Members accounting Select port3, port2
To add a zone to a VDOM - CLI config vdom edit client2 config system zone edit accounting set interface port3 port2 set intrazone deny next end end
1645
2 Go to System > VDOM > VDOM. 3 Select the Client2 VDOM and select Enter. 4 Go to Router > Static > Static Route. 5 Select Create New. 6 Enter the following information and select OK:
Destination IP/Mask Device Gateway Distance 0.0.0.0/0.0.0.0 port2 10.10.10.1 20
To add a default static route for a VDOM - CLI config vdom edit Client2 config router static edit 4 set device port2 set dst 0.0.0.0 0.0.0.0 set gateway 10.10.10.1 set distance 20 end end
RIP
The RIP dynamic routing protocol uses hop count to determine the best route, with a hop count of 1 being directly attached to the interface and a hop count of 16 being unreachable. For example if two VDOMs on the same FortiGate unit are RIP neighbors, they have a hop count of 1.
1646
OSPF
OSPF communicates the status of its network links to adjacent neighbor routers instead of the complete routing table. When compared to RIP, OSPF is more suitable for large networks, it is not limited by hop count, and is more complex to configure. For smaller OSPF configurations its easiest to just use the backbone area, instead of multiple areas.
BGP
BGP is an Internet gateway protocol (IGP) used to connect autonomous systems (ASes) and is used by Internet service providers (ISPs). BGP stores the full path, or path vector, to a destination and its attributes which aid in proper routing.
1647
Destination Interface/Zone port3 Destination Address Schedule Service Action Log Allowed Traffic any always Multiple - HTTPS, SSH ACCEPT enable
To configure a firewall policy for a VDOM - CLI config vdom edit Client2 config firewall policy edit 12 set srcintf VLAN_200 set srcaddr SlaesLocal set dstintf port3(dmz) set dstaddr any set schedule always set service HTTPS SSH set action accept set status enable set logtraffic enable next end end
1648
The Company A internal network is on the 10.11.101.0/255.255.255.0 subnet. The Company B internal network is on the 10.12.101.0/255.255.255.0 subnet. There are no switches or routers required for this configuration. There are no VLANs in this network topology. The interfaces used in this example are port1 through port4. Different FortiGate models may have different interface labels. port1 and port3 are used as external interfaces. port2 and port4 are internal interfaces. The administrator is a super_admin account. If you are a using a non-super_admin account, refer to Global and per-VDOM settings on page 1621 to see which parts a nonsuper_admin account can also configure.
1649
When configuring firewall policies in the CLI always choose a policy number that is higher than any existing policy numbers, select services before profile-status, and profile-status before profile. If these commands are not entered in that order, they will not be available to enter.
Figure 197: Example VDOM configuration
ISP B 192.168.201.7
10.12.101.55
Company A 10.11.101.0
1650
7 Enter vdomB and select OK. To create two VDOMs - CLI config vdom edit vdomA next edit vdomB end
172.20.201.2/255.255.255.0
5 Select Edit on the port4 interface. 6 Enter the following information and select OK:
Virtual Domain vdomA
1651
Manual
10.11.101.2/255.255.255.0
To configure the vdomA interfaces - CLI config global config system interface edit port1 set vdom vdomA set mode static set ip 172.20.201.2 255.255.255.0 next edit port4 set vdom ABCdomain set mode static set ip 10.11.101.2 255.255.255.0 end end end
5 Select Edit on the port2 interface. 6 Enter the following information and select OK:
Virtual domain Addressing mode IP/Netmask vdomB Manual 10.12.101.2/255.255.255.0
To configure the vdomB interfaces - CLI config global config system interface edit port3 set vdom vdomB set mode static set ip 192.168.201.2 255.255.255.0
Virtual Domains for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1652
next edit port2 set vdom vdomB set mode static set ip 10.12.101.2 255.255.255.0 end end
To add the ABCdomain VDOM firewall addresses - CLI config vdom edit vdomA config firewall address edit Ainternal set type ipmask set subnet 10.11.101.0 255.255.255.0 end end
1653
To add the vdomA firewall policy - web-based manager 1 In Current VDOM, select vdomA. 2 Go to Policy > Policy. 3 Select Create New. 4 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action port4 Ainternal port1 all Always ANY ACCEPT
5 Select Create New. 6 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action port1 all port4 Ainternal Always ANY ACCEPT
To add the vdomA firewall policy - CLI config vdom edit vdomA config firewall policy edit 1 set srcintf port4 set srcaddr Ainternal set dstintf port1 set dstaddr all set schedule always set service ANY set action accept set status enable next edit 2 set srcintf port1 set srcaddr all set dstintf port4 set dstaddr Ainternal set schedule always set service ANY set action accept set status enable end
Virtual Domains for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1654
end
To add a default route to the vdomA - CLI config vdom edit vdomA config router static edit 1 set device port1 set gateway 172.20.201.7 end
1655
3 Select Create New. 4 Enter the following information and select OK:
Address Name Type Subnet / IP Range Interface Binternal Subnet / IP Range 10.12.101.0/255.255.255.0 port2
To add the vdomB firewall address - CLI config vdom edit vdomB config firewall address edit Binternal set type ipmask set subnet 10.12.101.0 255.255.255.0 end end
6 Select Create New. 7 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action port3 all port2 Binternal Always ANY ACCEPT
1656
To add the vdomB firewall policy - CLI config vdom edit vdomB config firewall policy edit 1 set srcintf port2 set dstintf port3 set srcaddr Binternal set dstaddr all set schedule always set service ANY set action accept set status enable edit 1 set srcintf port3 set dstintf port2 set srcaddr all set dstaddr Binternal set schedule always set service ANY set action accept set status enable end end
To add a default route to the vdomB VDOM - CLI config vdom edit vdomB config router static edit 1 set dst 0.0.0.0/0 set device external set gateway 192.168.201.7 end end
FortiOS Handbook v3: Virtual Domains 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1657
Possible reasons for these errors are bad connections or configuration errors. For additional troubleshooting, see Troubleshooting Virtual Domains on page 1715.
Trace complete.
1658
1659
In transparent mode the FortiGate unit is a forwarding bridge, not a switch. A switch can develop a port table and associated MAC addresses, so that it can bridge two ports to deliver the traffic instead of broadcasting to all ports. In transparent mode, the FortiGate unit does not following this switch behavior, but instead is the forwarding bridge that broadcasts all packets out over all interfaces, subject to firewall policies. Features such as broadcast domains, forwarding domains, and STP apply to both FortiGate units and VDOMs in Transparent mode.
Broadcast domains
A broadcast domain is a network segment in which any network equipment can transmit data directly to another device without going through a routing device. All the devices share the same subnet. The subnets are separated by layer-3 devices, such as routers, that can forward traffic from one broadcast domain to the next. Broadcast domains are important to transparent mode FortiGate units because the broadcast domain is the limit of where the FortiGate unit can forward packets when it is in transparent mode.
Forwarding domains
Address Resolution Protocol (ARP) packets are vital to communication on a network, and ARP support is enabled on FortiGate unit interfaces by default. Normally you want ARP packets to pass through the FortiGate unit. However, in Transparent mode ARP packets arriving on one interface are sent to all other interfaces including VLANs giving the appearance of duplicates of the same MAC address on different interfaces. Some layer-2 switches become unstable when they detect these duplicate MAC addresses. Unstable switches may become unreliable or reset and cause network traffic to slow down considerably. When you are using VLANs in Transparent mode, the solution to the duplicate MAC address issue is to use the forward-domain CLI command. This command tags VLAN traffic as belonging to a particular collision group, and only VLANs tagged as part of that collision group receive that trafficit is like an additional set of VLANs. By default, all interfaces and VLANs are part of forward-domain collision group 0. To assign VLAN 200 to collision group 2, VLAN 300 to collision group 3, and all other interfaces to stay in the default collision group 0 enter the following CLI commands: config system interface edit vlan200 set vlanid 200 set forward_domain 2 next edit vlan300 set vlanid 300 set forward_domain 3 next end When using forwarding domains, you may experience connection issues with layer-2 traffic, such as ping, if your network configuration has packets going through the FortiGate unit in Transparent mode multiple times, more than one forwarding domain (such as incoming on one forwarding domain and outgoing on another) IPS and AV enabled.
1660
To provide administrative access to a FortiGate unit or VDOM in Transparent mode, you must define a management IP address and a gateway. This step is not required in NAT/Route mode where you can access the FortiGate unit through the assigned IP address of any interface where administrative access is permitted.
1661
If you incorrectly set the Transparent mode management IP address for your FortiGate unit, you will be unable to access your unit through the web-based manager. In this situation, you will need to connect to the FortiGate unit using the console cable and change the settings so you can access the unit. Alternately, if your unit has an LCD panel, you can change the operation mode and interface information through the LCD panel.
You can also configure the protection profiles that manage antivirus scanning, web filtering and spam filtering. Protection profiles are covered in the FortiGate Administration Guide.
1662
In Transparent mode, you can access the FortiGate web-based manager by connecting to an interface configured for administrative access and using HTTPS to access the management IP address. On the FortiGateunit used for examples in this guide, administrative access is enabled by default on the internal interface and the default management IP address is 10.11.0.1.
To switch the tpVDOM VDOM to Transparent mode - web-based manager 1 Go to Current VDOM menu and select Global. 2 Go to System > VDOM > VDOM. 3 Edit the tpVDOM. 4 Select Transparent for Operation mode. 5 Enter the management IP/Netmask. The IP address must be accessible to the subnet where the management computer is located. For example 10.11.0.99/255.255.255.0 will be able to access the 10.11.0.0 subnet. 6 Select Apply. When you select Apply, the FortiGate unit will log you out. When you log back in, the VDOM will be in Transparent mode. To switch the tpVDOM VDOM to Transparent mode - CLI config vdom edit tpVDOM config system settings set opmode transparent set mangeip 10.11.0.99 255.255.255.0 end end
1663
For the procedures in this section, it is assumed that you have enabled VDOM configuration on your FortiGate unit. For more information, see Enabling and accessing Virtual Domains on page 1617. The VDOM names are similar to the company names for easy recognition. The root VDOM cannot be renamed and is not used in this example. Interfaces used in this example are port1 and port2. Some FortiGate models may not have interfaces with these names. port1 is an external interface. port2 is an internal interface.
1664
192.168.0.1
VLAN Router
10.0.0.1
p port1
in Transparent mode T
port2 po ort r2
VLAN_100_ext VLAN_200_ext
Fa0/8 Fa F 0/ Fa0/5
VLAN Trunk
Fa0/1 0/ 0/1 /1
VLAN Switch S
1665
5 Block all Classifications except Cached Content, and Image Search. 6 Ensure FortiGuard Quota for all Categories and Classifications is Disabled. 7 Select OK. To create a strict web filtering profile - CLI config vdom edit <vdom_name> config webfilter profile edit strict config ftgd-wf set allow g07 g08 g21 g22 c01 c03 set deny g01 g02 g03 g04 g05 g06 c02 c04 c05 c06 c07 end set web-ftgd-err-log enable next To create a relaxed web filtering profile - web-based manager 1 Go to the proper VDOM, and select UTM Profiles > Web Filter > Profile. 2 Select Create New. 3 Enter relaxed for the Name. 4 Expand FortiGuard Web Filtering, and select block for Potentially Security Violating Category, and Spam URL Classification. 5 Enable FortiGuard Quotas to allow 1 hour for all allowed Categories and Classifications.
1666
Adding VLAN subinterfaces Creating the Lunch schedule Configuring Company_A firewall addresses Creating Company_A firewall policies
4 Select Create New. 5 Enter the following information and select OK:
Name Interface VLAN ID Virtual Domain VLAN_100_ext port1 100 Company_A
To add the VLAN subinterfaces - CLI config system interface edit VLAN_100_int set interface port2 set vlanid 100 set vdom Company_A next edit VLAN_100_ext set interface port1 set vlanid 100 set vdom Company_A end
1667
3 Enter Lunch as the name for the schedule. 4 Select Mon, Tues, Wed, Thu, and Fri. 5 Set the Start time as 11:45 and set the Stop time as 14:00. 6 Select OK. To create a recurring schedule for lunchtime - CLI config vdom edit Company_A config firewall schedule recurring edit Lunch set day monday tuesday wednesday thursday friday set start 11:45 set end 14:00 end
1668
Firewall policies allow packets to travel between the internal VLAN_100 interface to the external interface subject to the restrictions of the protection profile. Entering the policies in this order means the last one configured is at the top of the policy list, and will be checked first. This is important because the policies are arranged so if one does not apply the next is checked until the end of the list. To configure Company_A firewall policies - web-based manager 1 Go to Policy > Policy. 2 Select Create New. 3 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action VLAN_100_int CompanyA VLAN_100_ext all always all DENY
This policy is a catch all for outgoing traffic to ensure that if it doesnt match any of the other policies, it will not be allowed. This is standard procedure. 4 Select Create New. 5 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action VLAN_100_ext all VLAN_100_int CompanyA always all DENY
This policy is a catch all for incoming traffic to ensure that if it doesnt match any of the other policies, it will not be allowed. This is standard procedure. 6 Select Create New. 7 Enter the following information and select OK:
1669
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action UTM Web Filtering
This policy enforces strict scanning at all times, while allowing all traffic. It ensures company policies are met for network security. 8 Select Create New. 9 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action UTM Web Filtering VLAN_100_int CompanyA VLAN_100_ext all Lunch all ACCEPT enable relaxed
This policy provides relaxed protection during lunch hours going from strict down to scan for protocol options and web filtering. AntiVirus and Email Filtering remain at strict for security relaxing them would not provide employees additional access to the Internet and it would make the company vulnerable. 10 Verify that the policies entered appear in the list with the last policy (lunch) at the top, and the first policy (deny all) at the bottom. Otherwise traffic will not flow as expected. To configure Company_A firewall policies - CLI config vdom edit Company_A config firewall policy edit 1 set srcintf VLAN_100_int set dstintf VLAN_100_ext set srcaddr all set dstaddr all set action accept set schedule Lunch set UTM enabled set webfiltering relaxed next edit 3 set srcintf VLAN_100_int set dstintf VLAN_100_ext
Virtual Domains for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1670
srcaddr all dstaddr all action accept schedule BusinessDay service HTTP profile_status enable profile BusinessOnly
4 Select Create New. 5 Enter the following information and select OK:
Name Interface VLAN ID Virtual Domain VLAN_200_ext port1 200 Company_B
To add the VLAN subinterfaces - CLI config system interface edit VLAN_200_int set interface internal set vlanid 200 set vdom Company_B next edit VLAN_200_ext set interface external
FortiOS Handbook v3: Virtual Domains 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1671
1672
To configure Company_B firewall policies - web-based manager 1 Go to Policy > Policy. 2 Select Create New. 3 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Address Schedule Service Action VLAN_200_int all all BusinessDay games-chat DENY
This policy prevents the use of network games or chat programs (except NetMeeting) during business hours. 4 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Address Schedule Service Action Protection Profile VLAN_200_int all all Lunch HTTP ACCEPT Relaxed
This policy relaxes the web category filtering during lunch hour. 5 Select Create New. 6 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Address Schedule Service Action Protection Profile VLAN_200_int all all BusinessDay HTTP ACCEPT BusinessOnly
This policy provides rather strict web category filtering during business hours. 7 Select Create New. 8 Enter the following information and select OK:
1673
Source Interface/Zone Source Address Destination Address Schedule Service Action Protection Profile
Because it is last in the list, this policy applies to the times and services not covered in preceding policies. This means that outside of regular business hours, the Relaxed protection profile applies to email and web browsing, and online chat and games are permitted. Company B needs this policy because its employees sometimes work overtime. The other companies in this example maintain fixed hours and do not want any after-hours Internet access. To configure Company_B firewall policies - CLI config firewall policy edit 1 set srcintf VLAN_200_int set srcaddr all set dstintf VLAN_200_ext set dstaddr all set schedule BusinessDay set service Games set action deny next edit 2 set srcintf VLAN_200_int set srcaddr all set dstintf VLAN_200_ext set dstaddr all set action accept set schedule Lunch set service HTTP set profile_status enable set profile Relaxed next edit 3 set srcintf VLAN_200_int set srcaddr all set dstintf VLAN_200_ext set dstaddr all set action accept set schedule BusinessDay set service HTTP set profile_status enable set profile BusinessOnly next edit 4 set srcintf VLAN_200_int
1674
srcaddr all dstintf VLAN_200_ext dstaddr all action accept schedule always service ANY profile_status enable profile Relaxed
1675
encapsulation dot1Q 100 ip address 10.11.0.1 255.255.0.0 ! interface FastEthernet0/0.3 encapsulation dot1Q 200 ip address 10.12.0.1 255.255.0.0 ! The router has the following configuration:
Port 0/0.1 Port 0/0.3 Port 0/0 VLAN ID 100 VLAN ID 200 802.1Q trunk
1676
<10 ms 10.12.0.2
You can repeat this for different routes in the topology. In each case the IP addresses will be the gateway for the starting VLAN, and the end point at the ending VLAN.
1677
1678
Inter-VDOM routing
In the past, virtual domains (VDOMs) were separate from each otherthere was no internal communication. Any communication between VDOMs involved traffic leaving on a physical interface belonging to one VDOM and re-entering the FortiGate unit on another physical interface belonging to another VDOM to be inspected by firewall policies in both directions. Inter-VDOM routing changes this. With VDOM links, VDOMs can communicate internally without using additional physical interfaces. Inter-VDOM routing is the communication between VDOMs. VDOM links are virtual interfaces that connect VDOMs. A VDOM link contains a pair of interfaces with each one connected to a VDOM, and forming either end of the inter-VDOM connection. This chapter contains the following sections: Benefits of inter-VDOM routing Getting started with VDOM links Inter-VDOM configurations Dynamic routing over inter-VDOM links HA virtual clusters and VDOM links Example of inter-VDOM routing
1679
Inter-VDOM routing
Configuration flexibility
A typical VDOM uses at least two interfaces, typically physical interfaces, one for internal and one for external traffic. Depending on the configuration, more interfaces may be required. The one exception to this is possibly one-armed IPS. As explained earlier, the maximum number of VDOMs configurable on a FortiGate unit is the number of physical interfaces available divided by two. VLANs can increase the number by providing multiple virtual interfaces over a single physical interface, but VLANs have some limitations. Using physical interfaces for inter-VDOM communication severely limits the number of possible configurations on your FortiGate unit, but inter-VDOM routing allows these connections to be moved inside the FortiGate unit. Using virtual interfaces, VDOM links, frees up the physical interfaces for external traffic. Using VDOM links on a FortiGate unit with 8 interfaces, you can have 4 VDOMs communicating with each other (meshed configuration) and continue to have 2 physical interfaces each for internal and external connections. This configuration would have required 20 physical interfaces without interVDOM routing. With inter-VDOM routing it only requires 8 physical interfaces, with the other 12 interfaces being internal VDOM links. Inter-VDOM routing allows you to select Standalone VDOM configuration, Management VDOM configuration and Meshed VDOM configuration without being limited by the number of physical interfaces on your FortiGate unit.
1680
Inter-VDOM routing
VDOM
Select the arrow to create a new interface or VDOM link. Interface options include VLAN, Aggregate, Redundant, or loopback interfaces. For more information, see Creating VDOM links on page 1682, or the FortiGate Administration Guide. Select to change interface configuration for the selected interface. This option not available if no interfaces or multiple interfaces are selected. Select to remove an interface from the list. One or more interfaces must be selected for this option to be available. You cannot delete permanent physical interfaces, or any interfaces that have configuration referring to them. See Deleting VDOM links on page 1684 or Deleting an interface on page 1644. Select to change which information is displayed about the interfaces, and in which order the columns appear. Use to display VDOM, VLAN, and other information.
Edit Delete
Column Settings
1681
Inter-VDOM routing
Checkbox
Select the checkbox for an interface to edit or delete that interface. Select multiple interfaces to delete those interfaces. Optionally select the check box at the top of the column to select or unselect all checkboxes. The name of the interface. The name of the VDOM link (vlink1) has an expand arrow to display or hide the pair of VDOM link interfaces. For more information, see Viewing VDOM links on page 1681. The IP address and netmask assigned to this interface. The type of interface such as physical, VLAN, or VDOM link pair. The protocols allowed for administrators to connect to the FortiGate unit. The virtual domain this interface belongs to. For more information on VDOMs, see Virtual Domains in NAT/Route mode on page 1641.
Name
Administrative Status The status of this interface, either set to up (active) or down (disabled).
To configure an inter-VDOM link - web-based manager 1 For Current VDOM, select Global.. 2 Select System > Network > Interface. 3 Select Create New > VDOM link, enter the following information, and select OK.
Name vlink1 (The name can be up to 11 characters long. Valid characters are letters, numbers, -, and _. No spaces are allowed.)
Interface #0
1682
Inter-VDOM routing
Virtual Domain IP/Netmask Administrative Access Interface #1 Virtual Domain IP/Netmask Administrative Access
Note: If your inter-VDOM links have names longer than 8 characters, and you upgrade from FortiOS 3.0 MR3, the names will be truncated to 8 characters and will not function. The solution is to change the names of your inter-VDOM links before you upgrade.
To configure an inter-VDOM link - CLI config global config system vdom-link edit vlink1 next end config system interface edit vlink10 set vdom customer1 next edit vlink11 set vdom customer2 next end Once you have created and bound the interface ends to VDOMs, configure the appropriate firewall policies and other settings that you require. To confirm the inter-VDOM link was created, find the VDOM link pair and use the expand arrow to view the two VDOM link interfaces. You can select edit to change any information.
An IP address is not required for inter-VDOM links because it is an internal connection that can be referred to by the interface name in firewall policies, and other system references. Not using an IP address in the configuration can speed up and simplify configuration for you Also you will not use up all the IP addresses in your subnets if you have many interVDOM links. Half or full numbered interfaces are required if you are doing NAT, either SNAT or DNAT as you need an IP number on both ends to translate between.
1683
Inter-VDOM configurations
Inter-VDOM routing
You can use unnumbered interfaces in static routing, by naming the interface and using 0.0.0.0 for the gateway. Running traceroute will not show the interface in the list of hops. However you can see the interface when you are sniffing packets, which is useful for troubleshooting.
To remove a VDOM link - web-based manager 1 For Current VDOM, select Global.. 2 Select System > Network > Interface. 3 Select Delete for the VDOM link vlink1. To remove a VDOM link - CLI config global config system vdom-link delete vlink1 end For more information, see the FortiGate CLI Reference.
Inter-VDOM configurations
By using fewer physical interfaces to inter-connect VDOMs, inter-VDOM links provide you with more configuration options. None of these configurations use VLANs to reduce the number of physical interfaces. It is generally assumed that an internal or client network will have its own internal interface and an external interface to connect to its ISP and the Internet. These inter-VDOM configurations can use any FortiGate model with possible limitations based on the number of physical interfaces. VLANs can be used to work around these limitations. In the following inter-VDOM diagrams, red indicates the physical FortiGate unit, grey indicate network connections external to the FortiGate unit, and black is used for interVDOM links and VDOMs. This section includes the following topics: Standalone VDOM configuration Independent VDOMs configuration Management VDOM configuration Meshed VDOM configuration
1684
Inter-VDOM routing
Inter-VDOM configurations
Internet
ot o R
Client2 Network
Client1 Network
The configuration shown in Figure 200 has no VDOM inter-connections and requires no special configurations or settings. The standalone VDOM configuration can be used for simple network configurations that only have one department or one company administering the connections, firewalls and other VDOM-dependent settings. However, with this configuration, keeping client networks separate requires many interfaces, considerable firewall design and maintenance, and can quickly become time consuming and complex. Also, configuration errors for one client network can easily affect other client networks, causing unnecessary network downtime.
1685
Inter-VDOM configurations
Inter-VDOM routing
Internet
OM VD 2
OM VD 1
Client2 Network
Client1 Network
This configuration has no communication between VDOMs and apart from initially setting up each VDOM, it requires no special configurations or settings. Any communication between VDOMs is treated as if communication is between separate physical devices. The independent inter-VDOM configuration can be used where more than one department or one company is sharing the FortiGate unit. Each can administer the connections, firewalls and other VDOM-dependent settings for only its own VDOM. To each company or department, it appears as if it has its own FortiGate unit. This configuration reduces the amount of firewall configuration and maintenance required by dividing up the work. However, this configuration lacks a management VDOM for VDOMs 1, 2, and 3. This is illustrated in Figure 50. This management VDOM would enable an extra level of control for the FortiGate unit administrator, while still allowing each company or department to administer its own VDOM.
1686
Inter-VDOM routing
Inter-VDOM configurations
Internet
Ro
ot
OM VD 2
OM VD 1
Client2 Network
Client1 Network
The inter-VDOM links connect the management VDOM to the other VDOMs. This does not require any physical interfaces, and the bandwidth of inter-VDOM links can be faster than physical interfaces, depending on the CPU workload. Only the management VDOM is connected to the Internet. The other VDOMs are connected to internal networks. All external traffic is routed through the management VDOM using inter-VDOM links and firewall policies between the management VDOM and each VDOM. This ensures the management VDOM has full control over access to the Internet, including what types of traffic are allowed in both directions. There is no communication directly between the non-root VDOMs. Security is greatly increased with only one point of entry and exit. Only the management VDOM needs to be fully managed to ensure network security in this case. Each client network can manage its own configuration without compromising security or bringing down another client network. The management VDOM configuration is ideally suited for a service provider business. The service provider administers the management VDOM with the other VDOMs as customers. These customers do not require a dedicated IT person to manage their network. The service provider controls the traffic and can prevent the customers from using banned services and prevent Internet connections from initiating those same banned services. One example of a banned service might be Instant Messaging (IM) at a company concerned about intellectual property. Another example could be to limit bandwidth used by file-sharing applications without banning that application completely. Firewall policies control the traffic between the customer VDOM and the management VDOM and can be customized for each customer. The management VDOM configuration is limited in that the customer VDOMs have no inter-connections. In many situations this limitation is ideal because it maintains proper security. However, some configurations may require customers to communicate with each other, which would be easier if the customer VDOMs were inter-connected.
1687
Inter-VDOM routing
Partial mesh means only some VDOMs are inter-connected. In a full mesh configuration, all VDOMs are inter-connected to all other VDOMs. This can be useful when you want to provide full access between VDOMs but handle traffic differently depending on which VDOM it originates from or is going to.
Figure 203: Meshed VDOMs
Internet
Ro
ot
OM VD 2
OM VD 1
Client2 Network
Client1 Network
With full access between all VDOMs being possible, it is extra important to ensure proper security. You can achieve this level of security by establishing extensive firewall policies and ensuring secure account access for all administrators and users. Meshed VDOM configurations can become complex very quickly, with full mesh VDOMs being the most complex. Ensure this is the proper solution for your situation before using this configuration. Generally, these configurations are seen as theoretical and are rarely deployed in the field.
1688
Inter-VDOM routing
In Multicast, you can configure an interface without using an IP address. However that interface will be unable to become an RP candidate. This limits the roles available to such an interface.
1689
Inter-VDOM routing
Enable VDOM portioning from the web-based manager by moving virtual domains to virtual cluster 2 Enter set vcluster2 enable from the CLI config system ha command to enable virtual cluster 2.
Usually you would enable virtual cluster 2 and expect one cluster unit to be the primary unit for virtual cluster 1 and the other cluster unit to be the primary unit for virtual cluster 2. For this distribution to occur override must be enabled for both virtual clusters. Otherwise you will need to restart the cluster to force it to renegotiate.
1690
Inter-VDOM routing
1691
Inter-VDOM routing
Internet
ISP
port1
DO
M
2 OM s VD Sale
port3
1 OM ting VD coun Ac
port2
Sales 10.12.0.0
Accounting 10.11.0.0
1692
Inter-VDOM routing
end config system vdom edit Accounting next edit Sales next end
4 Select Edit for the port3 interface, enter the following information, and select OK.
Alias Virtual Domain Addressing mode IP/Netmask Administrative Access Description SalesLocal Sales Manual 192.168.1.1/255.255.0.0 HTTPS, PING, SSH This is the sales department internal interface.
5 Select Edit for the port1 interface, enter the following information, and select OK.
Alias Virtual Domain Addressing Mode Distance Retrieve default gateway from server Override internal DNS Administrative Access Description ManagementExternal root DHCP 5 Enable Enable HTTPS, SSH, SNMP This is the accounting department internal interface.
1693
Inter-VDOM routing
Note: When the mode is set to DHCP or PPoE on an interface you can set the distance field. This is the administrative distance for any routes learned through the gateway for this interface. The gateway is added to the static route table with these values. A lower distance indicates a preferred route.
To configure the physical interfaces - CLI config global config system interface edit port2 set alias AccountingLocal set vdom Accounting set mode static set ip 172.100.1.1 255.255.0.0 set allowaccess https ping ssh set description The accounting dept internal interface next edit port3 set alias SalesLocal set vdom Sales set mode static set ip 192.168.1.1 255.255.0.0 set allowaccess https ping ssh set description The sales dept. internal interface next edit port1 set alias ManagementExternal set vdom root set mode DHCP set distance 5 set gwdetect enable set dns-server-override enable set allowaccess https ssh snmp set description The systemwide management interface. next end end
1694
Inter-VDOM routing
To configure the Accounting and management VDOM link - CLI config global config system vdom-link edit AccountVlnk next end config system interface edit AccountVlnk0 set vdom Accounting set ip 0.0.0.0 0.0.0.0 set allowaccess https ping ssh set description Accounting side of the VDOM link next edit AccountVlnk1 set vdom root set ip 0.0.0.0 0.0.0.0 set allowaccess https ping ssh set description Management side of the VDOM link next end end To configure the Sales and management VDOM link - web-based manager 1 In Current VDOM, select Global. 2 Select System > Network > Interface. 3 Select the expand arrow and select Create New > VDOM link. 4 Enter the following information, and select OK.
Name Interface #0 Virtual Domain IP/Netmask Administrative Access Description Sales 0.0.0.0/0.0.0.0 HTTPS, PING, SSH The Sales VDOM side of the link. SalesVlnk
1695
Inter-VDOM routing
Interface #1 Virtual Domain IP/Netmask Administrative Access Description root 0.0.0.0/0.0.0.0 HTTPS, PING, SSH The Management VDOM side of the link.
To configure the Sales and management VDOM link - CLI config global config system vdom-link edit SalesVlnk next end config system interface edit SalesVlnk0 set vdom Accounting set ip 0.0.0.0 0.0.0.0 set allowaccess https ping ssh set description Sales side of the VDOM link next edit SalesVlnk1 set vdom root set ip 0.0.0.0 0.0.0.0 set allowaccess https ping ssh set description Management side of the VDOM link next end end
UTM settings will block all non-essential business websites while logging all web traffic, scan and file filter all web and email protocols, and block game and peer-to-peer applications using application control. For added security, FortiClient is required on internal computers with AntiVirus scanning configured. This is enforced by Endpoint NAC in firewall policies. Using firewall addresses makes the firewall policies easier to read. Also if any changes need to be made in the future, you can simply update the addresses without changing the firewall policies. The addresses required are: AccountingLocal - all traffic from the internal accounting network
1696
Inter-VDOM routing
AccountingVlnk - all traffic from the VDOM link between accounting and management VDOMs SalesLocal - all traffic from the internal sales network SalesVlnk - all traffic from the VDOM link between sales and management VDOM.
The Accounting VDOM requires AccountingLocal, AccountingVlnk, and SalesLocal. The Sales VDOM requires SalesLocal, SalesVlnk, and AccountingLocal. The firewall policies required on the Accounting VDOM are AccountingLocal to Internet Internet to AccountingLocal SalesLocal to AccountingLocal AccountingLocal to SalesLocal
The firewall policies required on the Sales VDOM are SalesLocal to Internet Internet to SalesLocal SalesLocal to AccountingLocal AccountingLocal to SalesLocal
This section includes the following topics: Configuring firewall service groups Configuring UTM settings for the Accounting VDOM Configuring firewall settings for the Accounting VDOM Configuring UTM settings for the Sales VDOM Configuring firewall settings for the Sales VDOM Configuring firewall settings between the Accounting and Sales VDOMs
1697
Inter-VDOM routing
OfficeServices HTTP, HTTPS, SSL, FTP, DNS, NTP, POP3, PING, SMTP
4 Select Create New, enter the following information, and select OK.
Group Name Members AccountingSalesServices HTTPS, POP3, PING, SMTP
To configure two firewall service groups - CLI config vdom edit Accounting config firewall service group edit OfficeServices set member HTTP HTTPS SSL FTP DNS NTP POP3 PING SMTP next edit AccountingSalesServices set member HTTPS POP3 PING SMTP next end end
To configure web filtering for the Accounting VDOM - web-based manager 1 In Current VDOM, select Accounting. 2 Go to UTM Profiles > Web Filter > Profile. 3 Select Create New. 4 Enter webStrict for the Name. 5 Select the arrow to expand the FortiGuard Web Filtering section. 6 Block all Categories except Business Oriented, Other, and Unrated. 7 Block all Classifications except Image Search.. 8 Log all Categories and Classifications. 9 Select OK. To configure web filtering for the Accounting VDOM - CLI config vdom edit Accounting config webfilter profile edit webStrict config ftgd-wf set allow g07 g08 g21 g22 c01 c03 set deny g01 g02 g03 g04 g05 g06 c02 c04 c05 c06 c07 end
Virtual Domains for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1698
Inter-VDOM routing
set web-ftgd-err-log enable next end end To configure AntiVirus for the Accounting VDOM - web-based manager 1 In Current VDOM, select Accounting. 2 Go to UTM Profiles > AntiVirus > Profile. 3 Select Create New. 4 Enter avStrict for the Name. 5 Enable Scan for all protocols. 6 Enable File filter for all protocols, and select built-in-patterns for Option. 7 Enable logging for both Scan and File Filter. 8 Select OK. To configure AntiVirus for the Accounting VDOM - CLI config vdom edit Accounting config antivirus profile edit avStrict config http set options scan file-filter end config ftp set options scan file-filter end config imap set options scan file-filter end config pop3 set options scan file-filter end config smtp set options scan file-filter end config nntp set options scan file-filter end config im set options scan file-filter end set filepattable 1 set av-virus-log enable set av-block-log enable next end end To configure application control for the Accounting VDOM - web-based manager 1 In Current VDOM, select Accounting.
FortiOS Handbook v3: Virtual Domains 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1699
Inter-VDOM routing
2 Go to UTM Profiles > Application Control > Application Sensor. 3 Select Create New (+ button at top right of page). 4 Enter appStrict for Name and select OK. 5 Select Create New. 6 In Filters, set Category to game. 7 In Applications/Settings, enter the following, and select OK.
Action Packet Logging Block Enable
8 Select Create New. 9 In Filters, set Category to p2p. 10 In Applications/Settings, enter the following, and select OK.
Action Packet Logging Block Enable
11 Select Apply. To configure application control for the Accounting VDOM - CLI config vdom edit Accounting config application list edit appStrict config entries edit 1 set category 2 next edit 2 set category 8 next end next end end
1700
Inter-VDOM routing
2 Select Firewall Objects > Address > Address 3 Select Create New, enter the following information, and select OK.
Address Name Type Subnet / IP Range Interface AccountingLocal Subnet/ IP Range 172.100.0.0 port1
4 Select Create New, enter the following information, and select OK.
Address Name Type Subnet / IP Range Interface AccountManagement Subnet/ IP Range 10.0.1.0 AccountVlnk
To configure firewall addresses - CLI config vdom edit Accounting config firewall address edit AccountingLocal set type iprange set subnet 172.100.0.0 set associated-interface port1 next edit AccountManagement set type iprange set subnet 10.0.1.0 set associated-interface AccountVlnk end end To configure protocol options for Accounting VDOM - web-based manager 1 In Current VDOM, select Accounting. 2 Select Policy > Policy > Protocol Options. 3 Select Create New. 4 Enter default for the Name. 5 Select OK. To configure the firewall policies from AccountingLocal to the Internet - web-based manager 1 In Current VDOM, select Accounting. 2 Go to Policy > Policy. 3 Select Create New, enter the following information, and then select OK.
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule FortiOS Handbook v3: Virtual Domains 01-431-99686-20110629 http://docs.fortinet.com/ Feedback port2 AccountingLocal AccountVlnk AccountManagement always
1701
Inter-VDOM routing
Service Action Enable NAT UTM Protocol Option Web Filtering AntiVirus Filtering Application Control Enable Endpoint NAC
4 In Current VDOM, select root. 5 Go to Policy > Policy. 6 Select Create New, enter the following information, and then select OK.
Source Interface/Zone Source Address Destination Address Schedule Service Action Enable NAT UTM Protocol Option Web Filtering AntiVirus Filtering Application Control Enable Endpoint NAC AccountVlnk AccountManagement all always OfficeServices ACCEPT enable enable default webStrict avStrict appStrict disabled
To configure the firewall policies from AccountingLocal to Internet - CLI config vdom edit Accounting config firewall policy edit 1 set srcintf "port2" set dstintf "AccountVlnk" set srcaddr "AccountingLocal" set dstaddr "AccountManagement" set action accept set schedule "always" set service "OfficeServices" set nat enable set utm-status enable set av-profile avStrict set webfilter-profile webStrict set application-list appStrict set profile-protocol-options default set endpoint-check enable
Virtual Domains for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1702
Inter-VDOM routing
set endpoint-profile "FortiClient_installed" next end end config vdom edit root config firewall policy edit 2 set srcintf AccountVlnk set dstintf port1 set srcaddr AccountManagement set dstaddr all set action accept set schedule always set service OfficeServices set nat enable set utm-status enable set av-profile "scan" set webfilter-profile "scan" set application-list "AppControlList" set profile-protocol-options default set endpoint-check disable next end end To configure the firewall policies from Internet to AccountingLocal - web-based manager 1 In Current VDOM, select root. 2 Go to Policy > Policy. 3 Select Create New, enter the following information, and select OK.
Source Interface/Zone Source Address Destination Address Schedule Service Action Enable NAT UTM Protocol Option Web Filtering AntiVirus Filtering Application Control Enable Endpoint NAC port1 all AccountManagement always OfficeServices ACCEPT enable enable default webStrict avStrict appStrict disabled
1703
Inter-VDOM routing
6 Select Create New, enter the following information, and select OK.
Source Interface/Zone Source Address Destination Address Schedule Service Action Enable NAT UTM Protocol Option Web Filtering AntiVirus Filtering Application Control Enable Endpoint NAC AccountVlnk AccountManagement AccountingLocal always OfficeServices ACCEPT enable enable default webStrict avStrict appStrict disabled
To configure the firewall policies from Internet to AccountingLocal - CLI config vdom edit root config firewall policy edit 3 set srcintf port1 set dstintf AccountVlnk set srcaddr all set dstaddr AccountManagement set action accept set schedule always set service OfficeServices set nat enable set utm-status enable set av-profile avStrict set webfilter-profile webStrict set application-list appstrict set profile-protocol-options default set endpoint-check disable next end end config vdom edit Accounting config firewall policy edit 4 set srcintf AccountVlnk set dstintf port2 set srcaddr AccountManagement set dstaddr AccountingLocal set action accept set schedule always set service OfficeServices
Virtual Domains for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1704
Inter-VDOM routing
set set set set set set set next end end
nat enable utm-status enable av-profile avStrict webfilter-profile webStrict application-list appstrict profile-protocol-options default endpoint-check disable
Note that Sales web traffic is different from Accounting, and web filtering is different to account for this. To configure web filtering for the Sales VDOM - web-based manager 1 In Current VDOM, select Sales. 2 Go to UTM Profiles > Web Filter > Profile. 3 Select Create New. 4 Enter webStrict for the Name. 5 In FortiGuard Categories, select all of the categories except Bandwidth Consuming, General Interest - Business and Unrated. 6 In Change Action for Selected Categories select Block. 7 Select Apply. To configure web filtering for the Sales VDOM - CLI config vdom edit Sales config webfilter profile edit webStrict config ftgd-wf set allow g07 g08 g21 g22 c01 c03 set deny g01 g02 g03 g04 g05 g06 c02 c04 c05 c06 c07 end set web-ftgd-err-log enable next end end To configure AntiVirus for the Sales VDOM - web-based manager 1 In Current VDOM, select Sales. 2 Go to UTM Profiles > AntiVirus > Profile. 3 Select Create New.
1705
Inter-VDOM routing
4 Enter avStrict for the Name. 5 Enable virus scan for all protocols. 6 Select Apply. To configure AntiVirus for the Sales VDOM - CLI config vdom edit Sales config antivirus profile edit "avStrict" config http set options scan file-filter end config ftp set options scan file-filter end config imap set options scan file-filter end config pop3 set options scan file-filter end config smtp set options scan file-filter end config nntp set options scan file-filter end config im set options scan file-filter end set filepattable 1 set av-virus-log enable set av-block-log enable next end end To configure application control for the Sales VDOM - web-based manager 1 In Current VDOM, select Accounting. 2 Go to UTM Profiles > Application Control > Application Sensor. 3 Select Create New (+ button at top right of page). 4 Enter appStrict for Name and select OK. 5 Select Create New. 6 In Filters, set Category to game. 7 In Applications/Settings, enter the following, and select OK.
Action Packet Logging Block Enable
1706
Inter-VDOM routing
11 Select Apply. To configure application control for the Sales VDOM - CLI config vdom edit Sales config application list edit "appStrict" config entries edit 1 set category 2 next edit 2 set category 8 next end next end end
4 Go to Firewall Objects > Addresses. 5 Select Create New, enter the following information, and select OK.
1707
Inter-VDOM routing
To configure the firewall addresses - CLI config vdom edit Sales config fireall address edit SalesLocal set type iprange set subnet 172.100.0.0 set associated-interface port2 next edit SalesManagement set type iprange set subnet 10.0.1.0 set associated-interface SalesVlnk next end
To configure the firewall policies from SalesLocal to the Internet - web-based manager 1 In Current VDOM, select Sales. 2 Go to Policy > Policy. 3 Select Create New, enter the following information, and select OK.
Source Interface/Zone Source Address Destination Address Schedule Service Action Log Allowed Traffic Enable Endpoint Control Check port3 SalesLocal SalesManagement always OfficeServices ACCEPT enabled disabled
4 In Current VDOM, select root. 5 Go to Policy > Policy. 6 Select Create New, enter the following information, and select OK.
Source Interface/Zone Source Address SalesVlnk SalesManagement
1708
Inter-VDOM routing
Destination Address Schedule Service Action Protection Profile Log Allowed Traffic Enable Endpoint Control Check
To configure the firewall policies from SalesLocal to the Internet - CLI config vdom edit root config firewall policy edit 6 set srcintf port2 set srcaddr SalesLocal set dstintf SalesVlnk set dstaddr SalesManagement set schedule always set service OfficeServices set action accept set profile-status enable set profile scan set logtraffic enable set endpoint-check enable set endpoint-redir-portal enable next end end config vdom edit Sales config firewall policy edit 7 set srcintf SalesVlnk set srcaddr SalesManagement set dstintf external set dstaddr all set schedule always set service OfficeServices set action accept set profile-status enable set profile scan set logtraffic enable set endpoint-check enable next end end To configure the firewall policies from the Internet to SalesLocal - web-based manager 1 In Current VDOM, select root.
FortiOS Handbook v3: Virtual Domains 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1709
Inter-VDOM routing
2 Go to Policy > Policy. 3 Select Create New, enter the following information, and select OK.
Source Interface/Zone Source Address Destination Address Schedule Service Action Protection Profile Log Allowed Traffic Enable Endpoint Control Check external all SalesManagement always OfficeServices ACCEPT scan enabled disabled
4 In Current VDOM, select Sales. 5 Go to Policy > Policy. 6 Select Create New, enter the following information, and select OK.
Source Interface/Zone Source Address Destination Address Schedule Service Action Protection Profile Log Allowed Traffic Enable Endpoint Control Check SalesVlnk SalesManagement SalesLocal always OfficeServices ACCEPT scan enabled disabled
To configure the firewall policies from the Internet to SalesLocal - CLI config vdom edit root config firewall policy edit 8 set srcintf external set srcaddr all set dstintf SalesVlnk set dstaddr SalesManagement set schedule always set service OfficeServices set action accept set profile-status enable set profile scan set logtraffic enable
1710
Inter-VDOM routing
set endpoint-check enable set endpoint-redir-portal enable next end end config vdom edit Sales config firewall policy edit 9 set srcintf SalesVlnk set srcaddr SalesManagement set dstintf port2 set dstaddr SalesLocal set schedule always set service OfficeServices set action accept set profile-status enable set profile scan set logtraffic enable set endpoint-check enable set endpoint-redir-portal enable next end end
1711
Inter-VDOM routing
4 Go to Policy > Policy. 5 Select Create New, enter the following information, and select OK.
Source Interface/Zone Source Address Destination Address Schedule Service Action Protection Profile Log Allowed Traffic Enable Endpoint Control Check AccountVlnk AccountingManagement SalesManagement always AccountingSalesServices ACCEPT scan enabled disabled
To configure the firewall policy between Sales and Accounting on the management VDOM - CLI config vdom edit root config system firewall policy edit 9 set srcintf SalesVlnk set srcaddr SalesManagement set dstintf AccountVlnk set dstaddr AccountManagement set schedule always set service AccountingSalesServices set action accept set profile-status enable set profile scan set logtraffic enable set endpoint-check enable set endpoint-redir-portal enable next edit 10 set srcintf AccountVlnk set srcaddr AccountManagement set dstintf SalesVlnk set dstaddr SalesManagement set schedule always set service AccountingSalesServices set action accept
Virtual Domains for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1712
Inter-VDOM routing
profile-status enable profile scan logtraffic enable endpoint-check enable endpoint-redir-portal enable
Testing connectivity
Testing connectivity ensures that physical networking connections as well as FortiGate unit interface configurations, including firewall policies, are properly configured. The easiest way to test connectivity is to use the ping and traceroute commands to confirm the connectivity of different routes on the network. Include testing: from AccountingLocal to Internet from Internet to AccountingLocal from SalesLocal to Internet from Internet to SalesLocal from AccountingLocal to SalesLocal.
When using the commands on a Windows computer, go to a command line prompt and enter either ping <IP address> or tracert <IP address>. When using the commands on a FortiGate unit, go to the CLI and enter either exec ping <IP address> or exec traceroute <IP address>.
Troubleshooting Tips
When there are problems with connectivity, the following troubleshooting tips will help resolve the issues. If a multiple hop test, such as traceroute, is not successful then reduce it to a single hop to simplify the test. Test each link of the path to see which hop is down. If all hops are up, check the FortiGate unit policies to ensure they allow basic traffic to flow as expected. If ping does not work, confirm that the FortiGate unit interfaces have Ping enabled and also ensure Ping is enabled in the firewall policies. Otherwise the Ping traffic will be blocked. If one protocol does not work but others do work, check the FortiGate unit firewall policies for that one protocol to ensure it is allowed. If there are unexplained connectivity problems, check the local computer to ensure it does not have a software firewall running that may be blocking traffic. MS Windows computers have a firewall running by default that can cause problems.
1713
Inter-VDOM routing
1714
These problems are caused by a lack of system resources. There are a number of possible reasons for this.
1715
1716
<verbose>
<count>
For a simple sniffing example, enter the CLI command diag sniffer packet port1 none 1 3. This will display the next 3 packets on the port1 interface using no filtering, and using verbose level 1. At this verbosity level you can see the source IP and port, the destination IP and port, action (such as ack), and sequence numbers. In the output below, port 443 indicates these are HTTPS packets, and 172.20.120.17 is both sending and receiving traffic. Head_Office_620b # diag sniffer packet port1 none 1 3 interfaces=[port1] filters=[none] 0.545306 172.20.120.17.52989 -> 172.20.120.141.443: psh 3177924955 ack 1854307757
FortiOS Handbook v3: Virtual Domains 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1717
0.545963 172.20.120.141.443 -> 172.20.120.17.52989: psh 1854307757 ack 3177925808 0.562409 172.20.120.17.52988 -> 172.20.120.141.443: psh 4225311614 ack 3314279933 For a more advanced example of packet sniffing, the following commands will report packets on any interface travelling between a computer with the host name of PC1 and the computer with the host name of PC2. With verbosity 4 and above, the sniffer trace will display the interface names where traffic enters or leaves the FortiGate unit. Remember to stop the sniffer, type CTRL+C. Note that PC1 and PC2 may be VDOMs. FGT# diagnose sniffer packet any "host <PC1> or host <PC2>" 4 or FGT# diagnose sniffer packet any "(host <PC1> or host <PC2>) and icmp" 4 The following sniffer CLI command includes the ARP protocol in the filter which may be useful to troubleshoot a failure in the ARP resolution (for instance PC2 may be down and not responding to the FortiGate ARP requests). FGT# diagnose sniffer packet any "host <PC1> or host <PC2> or arp" 4
The following configuration assumes that PC1 is connected to the internal interface of the FortiGate unit and has an IP address of 10.11.101.200. PC1 is the host name of the computer. To debug the packet flow in the CLI, enter the following commands: FGT# diag debug enable FGT# diag debug flow filter add <PC1> FGT# diag debug flow show console enable FGT# diag debug flow trace start 100 FGT# diag debug enable
1718
The start 100 argument in the above list of commands will limit the output to 100 packets from the flow. This is useful for looking at the flow without flooding your log or your display with too much information. To stop all other debug activities, enter the command: FGT# diag debug flow trace stop The following is an example of debug flow output for traffic that has no matching Firewall Policy, and is in turn blocked by the FortiGate unit. The denied message indicates the traffic was blocked. Note that even with VDOMs not enabled, vd-root is still shown. id=20085 trace_id=319 func=resolve_ip_tuple_fast line=2825 msg="vd-root received a packet(proto=6, 192.168.129.136:2854->192.168.96.153:1863) from port3." id=20085 trace_id=319 func=resolve_ip_tuple line=2924 msg="allocate a new session-013004ac" id=20085 trace_id=319 func=vf_ip4_route_input line=1597 msg="find a route: gw-192.168.150.129 via port1" id=20085 trace_id=319 func=fw_forward_handler line=248 msg=" Denied by forward policy check"
1719
1720
1721
1722
1723
1724
A strong and flexible High availability solution is required for many mission-critical firewall and UTM applications. Each FortiOS high availability solution can be fine tuned to fit into many different network scenarios.
The FGCP is compatible with most network environments and most networking equipment. While initial configuration is relatively quick and easy, a large number of tools and configuration options are available to fine tune the cluster for most situations.
E R xte ou rn te al r
E S xte w rn itc a h l
1725
VRRP
FortiGate units can function as master or backup Virtual Router Redundancy Protocol (VRRP) routers and can be quickly and easily integrated into a network that has already deployed VRRP. A FortiGate unit can be integrated into a VRRP group with any third-party VRRP devices and VRRP can provide redundancy between multiple FortiGate units.
FortiGate unit and VRRP compatible Router in a VRRP group
LAN
Internal Network
In a VRRP configuration, when a FortiGate unit operating as the master unit fails, a backup unit takes its place and continues processing network traffic. If the backup unit is a FortiGate unit, the network continues to benefit from FortiOS security features. If the backup unit is a router, after a failure traffic will continue to flow, but FortiOS security features will be unavailable until the FortiGate unit is back on line. You can include different FortiGate models in the same VRRP group.
1726
VRRP
FortiOS supports VRRP between two or more FortiGate units and between FortiGate units and third-party routers that support VRRP. Using VRRP you can assign VRRP routers as master or backup routers. The master router processes traffic and the backup routers monitor the master router and can begin forwarding traffic if the master fails. Similar to the FGCP you can configuration VRRP between multiple FortiGate units to provide redundancy. You can also create a VRRP group with a FortiGate units and any routers that support VRRP. In a VRRP configuration that consists of one FortiGate unit and one router, normally the FortiGate unit would be the master and all traffic would be processed by the FortiGate unit. If the FortiGate unit fails, all traffic switches to the router. Network connectivity is maintained even though FortiGate security features will be unavailable until the FortiGate unit can is back on line.
1727
VRRP
1728
On startup, after configuring the cluster units with the same HA configuration, the cluster units use the FortiGate Clustering Protocol (FGCP) to find other FortiGate units configured for HA operation and to negotiate to create a cluster. During cluster operation, the FGCP shares communication and synchronization information among the cluster units. This communication and synchronization is called the FGCP heartbeat or the HA heartbeat. Often, this is shortened to just heartbeat. For a cluster to form, the cluster units must be able to communicate using their configured heartbeat interfaces. The cluster uses the FGCP to select the primary unit, and to provide device, link and session failover. The FGCP also manages the two HA modes; active-passive (failover HA) and active-active (load balancing HA). This chapter describes. About the FGCP Configuring a FortiGate unit for FGCP HA operation Active-passive and active-active HA Identifying the cluster and cluster units Device failover, link failover, and session failover Primary unit selection HA override FortiGate HA compatibility with PPPoE and DHCP Hard disk configuration and HA Recommended practices FGCP HA terminology
1729
Figure 205: HA cluster installed between an internal network and the Internet
Inside the cluster the individual FortiGate units are called cluster units. These cluster units share state and configuration information. If one cluster unit fails, the other units in the cluster automatically replace that unit, taking over the work that the failed unit was doing. After the failure, the cluster continues to process network traffic and provide normal FortiGate services with virtually no interruption. Every FortiGate cluster contains one primary unit (also called the master unit) and one or more subordinate units (also called slave or backup units). The primary unit controls how the cluster operates. The roles that the primary and subordinate units play in the cluster depend on the mode in which the cluster operates. See Active-passive HA (failover protection) on page 1735 and Active-active HA (load balancing and failover protection) on page 1736. The ability of an HA cluster to continue providing firewall services after a failure is called failover. FortiGate HA failover means that your network does not have to rely on one FortiGate unit to continue functioning. You can install additional units and form an HA cluster. Other units in the cluster will take over if one of the units fails. A second HA feature, called load balancing, can be used to increase performance. A cluster of FortiGate units can increase overall network performance by sharing the load of processing network traffic and providing Unified Threat Management (UTM) services. The cluster appears to your network to be a single device, adding increased performance without changing your network configuration. Virtual clustering extends HA features to provide failover protection and load balancing for a FortiGate operating with virtual domains. A virtual cluster consists of a cluster of two FortiGate units operating with virtual domains. Traffic on different virtual domains can be load balanced between the cluster units. For details about virtual clustering, see Configuring and connecting virtual clusters on page 1819. FortiGate models that support redundant interfaces can be configured to support a clustering configuration called full mesh HA. Full mesh HA is a method of reducing the number of single points of failure on a network that includes an HA cluster. For details about full mesh HA, see Configuring and operating FortiGate full mesh HA on page 1841.
1730
E R xte ou rn t e al r
E S xte w rn itc a h l
Internal Network
In S ter w n itc al h
Session Failover
FCGP session failover maintains TCP, SIP and IPsec VPN sessions after a failure. Session failover does not failover UDP, multicast, ICMP, or SSL VPN sessions. Session failover may not be required for all networks because many TCP/IP protocols can resume sessions on their own. Supporting session failover adds extra overhead to cluster operations and can be disabled to improve cluster performance if its not required.
Load Balancing
Active-active HA load balances resource-intensive UTM processing among all cluster units to provide better UTM performance than a standalone FortiGate unit. If network traffic consists of mainly TCP sessions, the FGCP can also load balance all TCP sessions to improve TCP performance in some network configurations. You can use accelerated FortiGate interfaces to also accelerate HA load balancing and HA load balancing schedules can be adjusted to optimize performance for the traffic mix on your network. Weighted load balancing can be used to control the relative amount of sessions processed by each cluster unit.
Virtual Clustering
Virtual clustering is an extension of the FGCP for a cluster of 2 FortiGate units operating with multiple VDOMS enabled. Not only does virtual clustering provide failover protection for a multiple VDOM configuration, but a virtual cluster can load balance traffic between the cluster units. Load balancing with virtual clustering is quite efficient and load balances all traffic (not just UTM and TCP traffic). Its possible to fine tune virtual clustering load balancing in real time to actively optimize load sharing between the cluster units without affecting the smooth operation of the cluster.
Full Mesh HA
High availability improves the reliability of a network by replacing a single point of failure (a singe FortiGate unit) with a cluster that can maintain network traffic if one of the cluster units fails. However, in a cluster configuration single points of failure remain. Full mesh HA removes these single points of failure by allowing you to connect redundant switches to each cluster interface. Full mesh HA is achieved by configuring 802.3ad aggregate or redundant interfaces on the FortiGate unit and connecting redundant switches to these interfaces. Configuration is a relatively simple extension of the normal aggregate/redundant interface and HA configurations.
1731
Cluster Management
FortiOS HA provides a wide range of cluster management features: Automatic continuous configuration synchronization. You can get a cluster up and running almost as quickly as a standalone FortiGate unit by performing a few basic steps to configure HA settings and minimal network settings on each cluster unit. When the cluster is operating you can make start configuring FortiGate features such as UTM and IPsec VPN in the same way as for a standalone FortiGate unit. All configuration changes (even complex changes such as switching to multiple VDOM mode or from NAT/Route to Transparent mode) are synchronized among all cluster units. Firmware upgrades/downgrades. Upgrading or downgrading cluster firmware is similar to upgrading or downgrading standalone FortiGate firmware. The Firmware is uploaded once to the primary unit and the cluster automatically upgrades or downgrades all cluster units in one operation with minimal or no service interruption. Individual cluster unit management. In some cases you may want to manage individual cluster units. You can do so from cluster CLI by navigating to each cluster unit. You can also use the reserved management interface feature to give each cluster unit its own IP address and default route. You can use the reserved management interfaces and IP addresses to connect to the GUI and CLI of each cluster unit and configure an SNMP server to poll each cluster unit. Removing and adding cluster units. In one simple step any unit (even the primary unit) can be removed from a cluster and given a new IP address. The cluster keeps operating as it was; the transition happening without interrupting cluster operation. Any unit can also be added to an operating cluster without disrupting network traffic. All you have to do is connect the new unit and change its HA configuration to match the cluster's. The cluster automatically finds and adds the unit and synchronizes its configuration with the cluster. Debug and diagnose commands. A full range of debug and diagnose commands can be used to report on HA operation and find and fix problems. Logging and reporting. All cluster units can be configured to record all log messages. These message can be stored on the individual cluster units or sent to a FortiAnalyzer unit. You can view all cluster unit log messages by logging into any cluster unit. FortiManager support. FortiManager understands FortiOS HA and automatically recognizes when you add a FortiOS cluster to the FortiManager configuration.
1732
4 Enter a new Host Name for this FortiGate unit. Changing the host name makes it easier to identify individual cluster units when the cluster is operating. 5 Go to System > Config > HA and change the following settings:
Mode Group Name Password Active-Passive Example_cluster HA_pass Note: The password must be the same for all FortiGate units in the cluster.
You can accept the default configuration for the remaining HA options and change them later, once the cluster is operating. 6 Select OK. The FortiGate unit negotiates to establish an HA cluster. When you select OK you may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and the FGCP changes the MAC address of the FortiGate unit interfaces (see Cluster virtual MAC addresses on page 1905). To be able to reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all ARP table entries). You may be able to delete the ARP table of your management PC from a command prompt using a command similar to arp -d. 7 Power off the FortiGate unit. 8 Repeat this procedure for all of the FortiGate units in the cluster. Once all of the units are configured, continue with Connecting a FortiGate HA cluster on page 1734. To configure a FortiGate unit for HA operation - CLI 1 Power on the FortiGate unit to be configured. 2 Log into the CLI. 3 Enter the following command to change the FortiGate unit host name. config system global set hostname Example1_host end Changing the host name makes it easier to identify individual cluster units when the cluster is operating. 4 Enter the following command to enable HA: config system ha set mode active-passive set group-name Example_cluster set password HA_pass end You can accept the default configuration for the remaining HA options and change them later, once the cluster is operating.
1733
The FortiGate unit negotiates to establish an HA cluster. You may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and because the FGCP changes the MAC address of the FortiGate unit interfaces (see Cluster virtual MAC addresses on page 1905). To be able to reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. 5 Power off the FortiGate unit. 6 Repeat this procedure for all of the FortiGate units in the cluster. Once all of the units are configured, continue with Connecting a FortiGate HA cluster.
S w
itc
or
t2
or t
t3
Internal Network
t2
P or
t4
P or
S w
itc
h
High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
P R xte ou rn te al r E
P or
or
To connect a FortiGate HA cluster 1 Connect the port1 interfaces of each cluster unit to a switch connected to the Internet.
1734
t1
or
t4
or t
2 Connect the port2 interfaces of each cluster unit to a switch connected to the internal network. 3 Connect the port3 interfaces of the cluster units together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 4 Connect the port4 interfaces of the cluster units together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 5 Power on both of the FortiGate units. As the cluster units start, they negotiate to choose the primary unit and the subordinate units. This negotiation occurs with no user intervention and normally just takes a few seconds. At least one heartbeat interface should be connected together for the cluster to operate. You can also connect the heartbeat interfaces to a network. If the cluster consists of just two FortiGate units, you can connect the heartbeat interfaces directly using a crossover cable. For more information about heartbeat interfaces, see HA heartbeat and communication between cluster units on page 1898. You could use one switch to connect all four heartbeat interfaces. However, this is not recommended because if the switch fails both heartbeat interfaces will become disconnected. You can now configure the cluster as if it is a single FortiGate unit.
1735
If session failover (also called session pickup) is enabled, active-passive HA provides session failover for some communication sessions. See Session failover (session pickup) on page 1932 for information about session failover and its limitations. The following example shows how to configure a FortiGate unit for active-passive HA operation. You would enter the exact same commands on every FortiGate unit in the cluster. config system ha set mode a-p set group-name myname set password HApass end
1736
Group name
Use the group name to identify the cluster. The maximum length of the group name is 32 characters. The group name must be the same for all cluster units before the cluster units can form a cluster. After a cluster is operating, you can change the group name. The group name change is synchronized to all cluster units. The default group name is FGT-HA. The group name appears on the FortiGate dashboard of a functioning cluster as the Cluster Name. To change the group name from the web-based manager go to Config > System > HA and change the Group Name. Enter the following CLI command to change the group name to Cluster_name: config system ha set group-name Cluster_name end
Password
Use the password to identify the cluster. You should always change the password when configuring a cluster. The password must be the same for all FortiGate units before they can form a cluster. The maximum password length is 19 characters. When the cluster is operating you can change the password, if required. Two clusters on the same network cannot have the same password. To change the password from the web-based manager go to Config > System > HA and change the Password. Enter the following CLI command to change the group name to ha_pwd: config system ha set password ha_pwd end
Group ID
Similar to the group name, the group ID is also used to identify the cluster. In most cases you do not have to change the group ID. However, you should change the group ID if you have more than one cluster on the same network. All members of the HA cluster must have the same group ID. The group ID range is from 0 to 63. Changing the group ID changes the cluster virtual MAC address. See Cluster virtual MAC addresses on page 1905. Enter the following CLI command to change the group ID to 10: config system ha set group-id 10 end
1737
If a failover occurs, the cluster also records log messages about the event and can be configured to send log messages to a syslog server and to a FortiAnalyzer unit. The cluster can also send SNMP traps and alert email messages. These alerts can notify network administrators of the failover and may contain information that the network administrators can use to find and fix the problem that caused the failure. For a complete description of device failover, link failover, and session failover, how clusters support these types of failover, and how FortiGate HA clusters compensate for a failure to maintain network traffic flow see HA and failover protection on page 1895.
Greater
Less
Equal
Greater Age
Less
Equal
Less
Equal
Less
1738
For many basic HA configurations primary unit selection simply selects the cluster unit with the highest serial number to become the primary unit. A basic HA configuration involves setting the HA mode to active-passive or active-active and configuring the cluster group name and password. Using this configuration, the cluster unit with the highest serial number becomes the primary unit because primary unit selection disregards connected monitored interfaces (because interface monitoring is not configured), the age of the cluster units would usually always be the same, and all units would have the same device priority. Using the serial number is a convenient way to differentiate cluster units; so basing primary unit selection on the serial number is predictable and easy to understand and interpret. Also the cluster unit with the highest serial number would usually be the newest FortiGate unit with the most recent hardware version. In many cases you may not need active control over primary unit selection, so basic primary unit selection based on serial number is sufficient. In some situations you may want control over which cluster unit becomes the primary unit. You can control primary unit selection by setting the device priority of one cluster unit to be higher than the device priority of all other cluster units. If you change one or more device priorities, during negotiation, the cluster unit with the highest device priority becomes the primary unit. As shown in Figure 207 the FGCP selects the primary unit based on device priority before serial number. For more information about how to use device priorities, see Primary unit selection and device priority on page 1743. The only other way that you can influence primary unit selection is by configuring interface monitoring (also called port monitoring). Using interface monitoring you can make sure that cluster units with failed or disconnected monitored interfaces cannot become the primary unit. See Primary unit selection and monitored interfaces on page 1739. Finally, the age of a cluster unit is determined by a number of cluster operating factors. Normally the age of all cluster units is the same so normally age has no effect on primary unit selection. Age does affect primary unit selection after a monitored interface failure. For more information about age, see Primary unit selection and age on page 1740. This section describes: Primary unit selection and monitored interfaces Primary unit selection and age Primary unit selection and device priority Primary unit selection and FortiGate unit serial number Points to remember about primary unit selection
1739
If a primary unit monitored interface fails or is disconnected, the cluster renegotiates and if this is the only failed or disconnected monitored interface the cluster selects a new primary unit. If a subordinate unit monitored interface fails or is disconnected, the cluster also renegotiates but will not necessarily select a new primary unit. However, the subordinate unit with the failed or disconnected monitored interface cannot become the primary unit. Multiple monitored interfaces can fail or become disconnected on more than one cluster unit. Each time a monitored interface is disconnected or fails, the cluster negotiates to select the cluster unit with the most connected and operating monitored interfaces to become the primary unit. In fact, the intent of the link failover feature is just this, to make sure that the primary unit is always the cluster unit with the most connected and operating monitored interfaces. For information about monitored interfaces and link failover see Link failover on page 1921.
1740
During failover testing where cluster units are failed over repeatedly the age difference between the cluster units will most likely be less than 5 minutes. During normal operation, if a failover occurs, when the failed unit rejoins the cluster its age will be very different from the age of the still operating cluster units so the cluster will not select a new primary unit. However, if a unit fails and is restored in a very short time the age difference may be less than 5 minutes. As a result the cluster may select a new primary unit during some failover testing scenarios.
1741
In the example, the age of the primary unit is 19.4 seconds more than the age of the subordinate unit. The age difference is less than 5 minutes (less than 300 seconds or time is less than 3000) so age has no affect on primary unit selection. The cluster selected the unit with the highest serial number to be the primary unit. If you use execute ha manage 1 to log into the subordinate unit CLI and enter diagnose sys ha dump 1 you get results similar to the following: diagnose sys ha dump 1 HA information. vcluster id=1, nventry=2, state=standy, digest=fe.21.14.b3.e1.8d... ventry idx=1,id=1,FG50012204400045,prio=128,0,claimed=0, override=0,flag=1,time=0,mon=0. mondev=port5,50 ventry idx=0,id=1,FG50012205400050,prio=128,0,claimed=0, override=0,flag=0,time=-194,mon=0. The time for the primary unit is -194, indicating that age of the subordinate unit is 19.4 seconds less than the age of the primary unit. If port5 (the monitored interface) of the primary unit is disconnected, the cluster renegotiates and the former subordinate unit becomes the primary unit. When you log into the new primary unit CLI and enter diagnose sys ha dump 1 you could get results similar to the following: diagnose sys ha dump 1 HA information. vcluster id=1, nventry=2, state=work, digest=9e.70.74.a2.5e.4a... ventry idx=0,id=1,FG50012204400045,prio=128,0,claimed=0, override=0,flag=1,time=0,mon=0. mondev=port5,50 ventry idx=1,id=1,FG50012205400050,prio=128,-50,claimed=0, override=0,flag=0,time=58710,mon=0. The command results show that the age of the new primary unit is 5871.0 seconds more than the age of the new subordinate unit. If port5 of the former primary unit is reconnected the cluster will not select a new primary unit because the age of the primary unit will still be 5871.0 seconds more than the age of the subordinate unit. When you log into the primary unit CLI and enter diagnose sys ha dump 1 you get results similar to the following: diagnose sys ha dump 1 HA information. vcluster id=1, nventry=2, state=work, digest=9e.70.74.a2.5e.4a... ventry idx=0,id=1,FG50012204400045,prio=128,0,claimed=0, override=0,flag=1,time=0,mon=0. mondev=port5,50 ventry idx=1,id=1,FG50012205400050,prio=128,0,claimed=0, override=0,flag=0,time=58710,mon=0.
1742
1743
Normally, when configuring HA you do not have to change the device priority of any of the cluster units. If all cluster units have the same device priority, when the cluster first starts up the FGCP negotiates to select the cluster unit with the highest serial number to be the primary unit. Clusters also function normally if all units have the same device priority. However, you can use the device priority if you want to control the roles that individual units play in the cluster. For example, if you want the same unit to always become the primary unit, set this unit device priority higher than the device priority of other cluster units. Also, if you want a cluster unit to always become a subordinate unit, set this cluster unit device priority lower than the device priority of other cluster units. The device priority range is 0 to 255. The default device priority is 128. If you are configuring a virtual cluster, if you have added virtual domains to both virtual clusters, you can set the device priority that the cluster unit has in virtual cluster 1 and virtual cluster 2. If a FortiGate unit has different device priorities in virtual cluster 1 and virtual cluster 2, the FortiGate unit may be the primary unit in one virtual cluster and the subordinate unit in the other. For more information, see Virtual clustering and load balancing or VDOM partitioning on page 1821.
High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1744
HA override
HA override
The HA override CLI keyword is disabled by default. When override is disabled a cluster may not renegotiate when an event occurs that affects primary unit selection. For example, when override is disabled a cluster will not renegotiate when you change a cluster unit device priority or when you add a new cluster unit to a cluster. This is true even if the unit added to the cluster has a higher device priority than any other unit in the cluster. Also, when override is disabled a cluster does not negotiate if the new unit added to the cluster has a failed or disconnected monitored interface.
Note: For a virtual cluster configuration, override is enabled by default for both virtual clusters when you enable virtual cluster 2. For more information, see Virtual clustering and HA override on page 1820.
In most cases you should keep override disabled to reduce how often the cluster negotiates. Frequent negotiations may cause frequent traffic interruptions. However, if you want to make sure that the same cluster unit always operates as the primary unit and if you are less concerned about frequent cluster negotiation you can enable override. To enable override, select a cluster unit to always be the primary unit. Connect to this cluster unit CLI and use the config system ha CLI command to enable override.
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1745
HA override
For override to be effective, you must also set the device priority highest on the cluster unit with override enabled. To increase the device priority, from the CLI use the config system ha command and increase the value of the priority keyword to a number higher than the default priority of 128. You can also increase the device priority from the web-based manager by going to System > Config > HA. To increase the device priority of the primary unit select edit for the primary or subordinate unit and set the Device Priority to a number higher than 128.
Note: The override setting and device priority value are not synchronized to all cluster units.
With override enabled, the primary unit with the highest device priority will always become the primary unit. Whenever an event occurs that may affect primary unit selection, the cluster negotiates. For example, when override is enabled a cluster renegotiates when you change the device priority of any cluster unit or when you add a new cluster unit to a cluster. This section also describes: Override and primary unit selection Controlling primary unit selection using device priority and override Points to remember about primary unit selection when override is enabled Configuration changes can be lost if override is enabled Override and disconnecting a unit from a cluster
1746
HA override
Greater
Less
Equal
Less
Equal
Greater Age
Less
Equal
Less
Primary Pr r i m a r Unit
1747
HA override
The solution
When override is enabled, you can prevent configuration changes from being lost by doing the following: Verify that all cluster units are operating before making configuration changes (from the web-based manager go to System > Config > HA to view the cluster members list or from the FortiOS CLI enter get system ha status). Make sure the device priority of the primary unit is set higher than the device priorities of all other cluster units before making configuration changes. Disable override either permanently or until all configuration changes have been made and synchronized to all cluster units.
1748
You can configure a cluster to act as a DHCP server or a DHCP relay agent. In both active-passive and active-active clusters DHCP relay sessions are always handled by the primary unit. It is possible that a DHCP relay session could be interrupted by a failover. If this occurs the DHCP relay session is not resumed after the failover and the DHCP client may have to repeat the DHCP request. When a cluster is operating as a DHCP server the primary unit responds to all DHCP requests and maintains the DHCP server address lease database. The cluster also dynamically synchronizes the DHCP server address lease database to the subordinate units. If a failover occurs, the new primary unit will have an up-to-date DHCP server address lease database. Synchronizing the DHCP address lease database prevents the new primary unit from responding incorrectly to new DHCP requests after a failover. Also, it is possible that when FortiGate units first negotiate to form a cluster that a unit that ends up as a subordinate unit in the cluster will have information in its DHCP address lease database that the cluster unit operating as the primary unit does note have. This can happen if a FortiGate unit responds to DHCP requests while operating as a standalone unit and then when the cluster is formed this unit becomes a subordinate unit. Because of this possibility, after a cluster is formed the DHCP address lease databases of all of the cluster units are merged into one database which is then synchronized to all cluster units.
1749
Recommended practices
Fortinet suggests the following practices related to high availability: Use Active-Active HA to distribute TCP and UTM sessions among multiple cluster units. An active-active cluster may have higher throughput than a standalone FortiGate unit or than an active-passive cluster. Use a different host name on each FortiGate unit when configuring an HA cluster. Fewer steps are required to add host names to each cluster unit before configuring HA and forming a cluster. Enabling load-balance-all can increase device and network load since more traffic is load-balanced. This may be appropriate for use in a deployment using the firewall capabilities of the FortiGate unit and IPS but no other content inspection. See Load balancing UTM sessions and TCP sessions on page 1949. An advantage of using session pickup is that non-UTM sessions will be picked up by the new primary unit after a failover. The disadvantage is that the cluster generates more heartbeat traffic to support session pickup as a larger portion of the session table must be synchronized. Session pickup should be configured only when required and is not recommended for use with SOHO FortiGate models. Session pickup should only be used if the primary heartbeat link is dedicated (otherwise the additional HA heartbeat traffic could affect network performance). See Session failover (session pick-up) on page 1932. If you need to enable session pickup, consider enabling session pickup delay to improve performance by reducing the number of sessions that are synchronized. If possible, also consider enabling session synchronization or multiple FortiGate Interfaces. See Improving session synchronization performance on page 1932 for more information. To avoid unpredictable results, when you connect a switch to multiple redundant or aggregate interfaces in an active-passive cluster you should configure separate redundant or aggregate interfaces on the switch; one for each cluster unit. See HA MAC addresses and 802.3ad aggregation on page 1792.
1750
Recommended practices
Use SNMP, syslog, or email alerts to monitor a cluster for failover messages. Alert messages about cluster failovers may help find and diagnose network problems quickly and efficiently. See Operating a cluster on page 1855.
Heartbeat interfaces
Fortinet suggests the following practices related to heartbeat interfaces: Isolate heartbeat interfaces from user networks. Heartbeat packets contain sensitive cluster configuration information and can consume a considerable amount of network bandwidth. If the cluster consists of two FortiGate units, connect the heartbeat interfaces directly using a crossover cable. For clusters with more than two units, connect heartbeat interfaces to a separate switch that is not connected to any network. If heartbeat traffic cannot be isolated from user networks, enable heartbeat message encryption and authentication to protect cluster information. See Enabling or disabling HA heartbeat encryption and authentication on page 1905. Configure and connect multiple heartbeat interfaces so that if one heartbeat interface fails or becomes disconnected, HA heartbeat traffic can continue to be transmitted using the backup heartbeat interface. If heartbeat communication fails, all cluster members will think they are the primary unit resulting in multiple devices on the network with the same IP addresses and MAC addresses (condition referred to as Split Brain) and communication will be disrupted until heartbeat communication can be reestablished. Do not monitor dedicated heartbeat interfaces; monitor those interfaces whose failure should trigger a device failover.
Troubleshooting
The following sections in this document contain troubleshooting information: Troubleshooting HA clusters on page 1814 Troubleshooting virtual clustering on page 1838 Troubleshooting full mesh HA on page 1853 Troubleshooting layer-2 switches on page 1963
1751
FGCP HA terminology
FGCP HA terminology
The following HA-specific terms are used in this document.
Cluster
A group of FortiGate units that act as a single virtual FortiGate unit to maintain connectivity even if one of the FortiGate units in the cluster fails.
Cluster unit
A FortiGate unit operating in a FortiGate HA cluster.
Device failover
Device failover is a basic requirement of any highly available system. Device failover means that if a device fails, a replacement device automatically takes the place of the failed device and continues operating in the same manner as the failed device. See also Device failover, link failover, and session failover on page 1737.
Failover
A FortiGate unit taking over processing network traffic in place of another unit in the cluster that suffered a device failure or a link failure.
Failure
A hardware or software problem that causes a FortiGate unit or a monitored interface to stop processing network traffic.
FGCP
The FortiGate clustering protocol (FGCP) that specifies how the FortiGate units in a cluster communicate to keep the cluster operating.
Full mesh HA
Full mesh HA is a method of removing single points of failure on a network that includes an HA cluster. FortiGate models that support redundant interfaces can be used to create a cluster configuration called full mesh HA. Full mesh HA includes redundant connections between all network components. If any single component or any single connection fails, traffic switches to the redundant component or connection.
Heartbeat
Also called FGCP heartbeat or HA heartbeat. The heartbeat constantly communicates HA status and synchronization information to make sure that the cluster is operating properly.
Heartbeat device
An ethernet network interface in a cluster that is used by the FGCP for heartbeat communications among cluster units.
1752
FGCP HA terminology
Heartbeat failover
If an interface functioning as the heartbeat device fails, the heartbeat is transferred to another interface also configured as an HA heartbeat device.
Hello state
In the hello state a cluster unit has powered on in HA mode, is using HA heartbeat interfaces to send hello packets, and is listening on its heartbeat interfaces for hello packets from other FortiGate units. Hello state may appear in HA log messages.
High availability
The ability that a cluster has to maintain a connection when there is a device or link failure by having another unit in the cluster take over the connection, without any loss of connectivity. To achieve high availability, all FortiGate units in the cluster share session and configuration information.
Interface monitoring
You can configure interface monitoring (also called port monitoring) to monitor FortiGate interfaces to verify that the monitored interfaces are functioning properly and connected to their networks. If a monitored interface fails or is disconnected from its network the interface leaves the cluster and a link failover occurs. For more information about interface monitoring, see Link failover on page 1921.
Link failover
Link failover means that if a monitored interface fails, the cluster reorganizes to reestablish a link to the network that the monitored interface was connected to and to continue operating with minimal or no disruption of network traffic. See also Device failover, link failover, and session failover on page 1737.
Load balancing
Also known as active-active HA. All units in the cluster process network traffic. The FGCP employs a technique called unicast load balancing in which a given interface of all cluster units has the same virtual MAC address. The primary unit is associated with the cluster HA virtual MAC address and cluster IP address. The primary unit is the only cluster unit to receive packets sent to the cluster. The primary unit can process packets itself, or propagate them to subordinate units according to a load balancing schedule.
Monitored interface
An interface that is monitored by a cluster to make sure that it is connected and operating correctly. The cluster monitors the connectivity of this interface for all cluster units. If a monitored interface fails or becomes disconnected from its network, the cluster will compensate.
Primary unit
Also called the primary cluster unit, this cluster unit controls how the cluster operates. The primary unit sends hello packets to all cluster units to synchronize session information, synchronize the cluster configuration, and to synchronize the cluster routing table. The hello packets also confirm for the subordinate units that the primary unit is still functioning. The primary unit also tracks the status of all subordinate units. When you start a management connection to a cluster, you connect to the primary unit.
1753
FGCP HA terminology
In an active-passive cluster, the primary unit processes all network traffic. If a subordinate unit fails, the primary unit updates the cluster configuration database. In an active-active cluster, the primary unit receives all network traffic and re-directs this traffic to subordinate units. If a subordinate unit fails, the primary unit updates the cluster status and redistributes load balanced traffic to other subordinate units in the cluster. The FortiGate firmware uses the term master to refer to the primary unit.
Session failover
Session failover means that a cluster maintains active network sessions after a device or link failover. FortiGate HA does not support session failover by default. To enable session failover you must change the HA configuration to select Enable Session Pick-up. See also Device failover, link failover, and session failover on page 1737.
Session pickup
If you enable session pickup for a cluster, if the primary unit fails or a subordinate unit in an active-active cluster fails, all communication sessions with the cluster are maintained or picked up by the cluster after the cluster negotiates to select a new primary unit. If session pickup is not a requirement of your HA installation, you can disable this option to save processing resources and reduce the network bandwidth used by HA session synchronization. In many cases interrupted sessions will resume on their own after a failover even if session pickup is not enabled. You can also enable session pickup delay to reduce the number of sessions that are synchronized by session pickup.
Standby state
A subordinate unit in an active-passive HA cluster operates in the standby state. In a virtual cluster, a subordinate virtual domain also operates in the standby state. The standby state is actually a hot-standby state because the subordinate unit or subordinate virtual domain is not processing traffic but is monitoring the primary unit session table to take the place of the primary unit or primary virtual domain if a failure occurs. In an active-active cluster all cluster units operate in a work state. When standby state appears in HA log messages this usually means that a cluster unit has become a subordinate unit in an active-passive cluster or that a virtual domain has become a subordinate virtual domain.
State synchronization
The part of the FGCP that maintains connections after failover.
Subordinate unit
Also called the subordinate cluster unit, each cluster contains one or more cluster units that are not functioning as the primary unit. Subordinate units are always waiting to become the primary unit. If a subordinate unit does not receive hello packets from the primary unit, it attempts to become the primary unit. In an active-active cluster, subordinate units keep track of cluster connections, keep their configurations and routing tables synchronized with the primary unit, and process network traffic assigned to them by the primary unit. In an active-passive cluster, subordinate units do not process network traffic. However, active-passive subordinate units do keep track of cluster connections and do keep their configurations and routing tables synchronized with the primary unit.
1754
FGCP HA terminology
The FortiGate firmware uses the terms slave and subsidiary unit to refer to a subordinate unit.
Virtual clustering
Virtual clustering is an extension of the FGCP for FortiGate units operating with multiple VDOMS enabled. Virtual clustering operates in active-passive mode to provide failover protection between two instances of a VDOM operating on two different cluster units. You can also operate virtual clustering in active-active mode to use HA load balancing to load balance sessions between cluster units. Alternatively, by distributing VDOM processing between the two cluster units you can also configure virtual clustering to provide load balancing by distributing sessions for different VDOMs to each cluster unit.
Work state
The primary unit in an active-passive HA cluster, a primary virtual domain in a virtual cluster, and all cluster units in an active-active cluster operate in the work state. A cluster unit operating in the work state processes traffic, monitors the status of the other cluster units, and tracks the session table of the cluster. When work state appears in HA log messages this usually means that a cluster unit has become the primary unit or that a virtual domain has become a primary virtual domain.
1755
FGCP HA terminology
1756
1757
00
.1
P 10 ort .1 2 1. 10 1
itc h
62
0_
ha
_2 P 17 ort 2. 1 20 .1 2 R 17 ou 2. ter 20 .1 20 . 2 0. 14 1
S w
or P or 17 2. 20 .1 P 20 o .1 rt1 41 ha _1 P or t4
t3
10
Port3 and port4 are the default FortiGate-620B heartbeat interfaces. Because the cluster consists of two FortiGate units, you can make the connections between the heartbeat interfaces using crossover cables. You could also use switches and regular ethernet cables.
62
0_
.1 1.
1758
S w
itc h
Configuring a NAT/Route mode active-passive cluster of two FortiGate-620B units - web-based manager
Use the following procedures to configure two FortiGate-620B units for NAT/Route HA operation using the FortiGate web-based manager. These procedures assume you are starting with two FortiGate-620B units with factory default settings.
Note: Give each cluster unit a unique host name to make the individual units easier to identify when they are part of a functioning cluster. The default FortiGate unit host name is the FortiGate serial number. You may want to change this host name to something more meaningful for your network.
To configure the first FortiGate-620B unit (host name 620_ha_1) 1 Power on the first FortiGate unit. 2 On your management computer with an Ethernet connection, set the static IP address to 192.168.1.2 and the netmask to 255.255.255.0. 3 On a management computer, start a web browser and browse to the address https://192.168.1.99 (remember to include the s in https://). The FortiGate login is displayed. 4 Type admin in the Name field and select Login. The FortiGate dashboard is displayed. 5 On the System Information dashboard widget beside Host Name, select Change. 6 Enter a new Host Name for this FortiGate unit.
New Name 620_ha_1
7 Select OK. 8 Go to System > Config > HA and change the following settings:
Mode Group Name Password Active-Passive example1.com HA_pass_1
Note: This is the minimum recommended configuration for an active-active HA cluster. You can also configure other HA options, but if you wait until after the cluster is operating you will only have to configure these options once for the cluster instead of separately for each unit in the cluster.
9 Select OK. The FortiGate unit negotiates to establish an HA cluster. When you select OK you may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and the FGCP changes the MAC address of the FortiGate unit interfaces (see Cluster virtual MAC addresses on page 1905). The MAC addresses of the FortiGate-620B interfaces change to the following virtual MAC addresses: port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1759
port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-0b port20 interface virtual MAC: 00-09-0f-09-00-0c port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0e port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. To confirm these MAC address changes, you can use the get hardware nic (or diagnose hardware deviceinfo nic) CLI command to view the virtual MAC address of any FortiGate unit interface. For example, use the following command to view the port1 interface virtual MAC address (MAC) and the port1 permanent MAC address (Permanent_HWaddr): get hardware nic port1 . . . MAC: 00:09:0f:09:00:00 Permanent_HWaddr: 02:09:0f:78:18:c9 . . . 10 Power off the first FortiGate unit (620_ha_1). To configure the second FortiGate-620B unit (host name 620_ha_2) 1 Power on the second FortiGate unit. 2 On a management computer, start a web browser and browse to the address https://192.168.1.99 (remember to include the s in https://). The FortiGate login is displayed. 3 Type admin in the Name field and select Login. The FortiGate dashboard is displayed. 4 On the System Information dashboard widget, beside Host Name select Change. 5 Enter a new Host Name for this FortiGate unit.
New Name 620_ha_2
6 Select OK.
High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1760
8 Select OK. The FortiGate unit negotiates to establish an HA cluster. When you select OK you may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and because the FGCP changes the MAC address of the FortiGate unit interfaces. To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. 9 Power off the second FortiGate unit. To connect the cluster to the network 1 Connect the port1 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the Internet. 2 Connect the port2 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the internal network. 3 Connect the port3 interfaces of 620_ha_1 and 620_ha_2 together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 4 Connect the port4 interfaces of the cluster units together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 5 Power on the cluster units. The units start and negotiate to choose the primary unit and the subordinate unit. This negotiation occurs with no user intervention and normally takes less than a minute. When negotiation is complete the cluster is ready to be configured for your network. To view cluster status Use the following steps to view the cluster dashboard and cluster members list to confirm that the cluster units are operating as a cluster.
Note: Once the cluster is operating, because configuration changes are synchronized to all cluster units, configuring the cluster is the same as configuring an individual FortiGate unit. You could have performed the following configuration steps separately on each FortiGate unit before you connected them to form a cluster.
1 Start Internet Explorer and browse to the address https://192.168.1.99 (remember to include the s in https://). The FortiGate Login is displayed. 2 Type admin in the Name field and select Login. The FortiGate dashboard is displayed. The System Information dashboard widget shows the Cluster Name (example1.com) and the host names and serial numbers of the Cluster Members. The Unit Operation widget shows multiple cluster units.
1761
3 Go to System > Config > HA to view the cluster members list. The list shows both cluster units, their host names, their roles in the cluster, and their priorities. You can use this list to confirm that the cluster is operating normally. For example, if the list shows only one cluster unit then the other unit has left the cluster for some reason.
Figure 211: Sample FortiGate-620B cluster members list
To troubleshoot the cluster configuration If the cluster members list and the dashboard do not display information for both cluster units, the FortiGate units are not functioning as a cluster. See Troubleshooting HA clusters on page 1814 to troubleshoot the cluster. To add basic configuration settings to the cluster Use the following steps to configure the cluster to connect to its network. The following are example configuration steps only and do not represent all of the steps required to configure the cluster for a given network. 1 Log into the cluster web-based manager. 2 Go to System > Admin > Administrators. 3 For admin, select the Change Password icon 4 Enter and confirm a new password. 5 Select OK. 6 Go to System > Network > Interface. 7 Edit the port2 interface and change IP/Netmask to 10.11.101.100/24.
1762
8 Select OK.
Note: After changing the IP address of the port1 interface you may have to change the IP address of your management computer and then reconnect to the port1 interface using the 172.20.120.141 IP address.
9 Edit the port1 interface and change IP/Netmask to 172.20.120.141/24. 10 Select OK. 11 Go to Router > Static. 12 Change the default route.
Destination IP/Mask Gateway Device Distance 0.0.0.0/0.0.0.0 172.20.120.2 port1 10
13 Select OK.
6 Press Enter to connect to the FortiGate CLI. The FortiGate unit CLI login prompt appears. If the prompt does not appear, press Enter. If it still does not appear, power off your FortiGate unit and power it back on. If you are connected, at this stage you will see startup messages that will confirm you are connected. The login prompt will appear after the startup has completed. 7 Type admin and press Enter twice. 8 Change the host name for this FortiGate unit. config system global set hostname 620_ha_1
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1763
end 9 Configure HA settings. config system ha set mode a-p set group-name example1.com set password HA_pass_1 end The FortiGate unit negotiates to establish an HA cluster. You may temporarily lose network connectivity with the FortiGate unit as the HA cluster negotiates and the FGCP changes the MAC address of the FortiGate unit interfaces (see Cluster virtual MAC addresses on page 1905). The MAC addresses of the FortiGate-620B interfaces change to the following virtual MAC addresses: port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-0b port20 interface virtual MAC: 00-09-0f-09-00-0c port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0e port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. To confirm these MAC address changes, you can use the get hardware nic (or diagnose hardware deviceinfo nic) CLI command to view the virtual MAC address of any FortiGate unit interface. For example, use the following command to view the port1 interface virtual MAC address (MAC) and the port1 permanent MAC address (Permanent_HWaddr): get hardware nic port1 . . . MAC: 00:09:0f:09:00:00 Permanent_HWaddr: 02:09:0f:78:18:c9 . . .
1764
10 Display the HA configuration (optional). get system ha group-id : 0 group-name : example1.com mode : a-p password : * hbdev : "port3" 50 "port4" 50 session-sync-dev : route-ttl : 10 route-wait : 0 route-hold : 10 sync-config : enable encryption : disable authentication : disable hb-interval : 2 hb-lost-threshold : 6 helo-holddown : 20 arps : 5 arps-interval : 8 session-pickup : disable link-failed-signal : disable uninterruptable-upgrade: enable ha-mgmt-status : disable ha-eth-type : 8890 hc-eth-type : 8891 l2ep-eth-type : 8893 subsecond : disable vcluster2 : disable vcluster-id : 1 override : disable priority : 128 monitor : pingserver-monitor-interface: pingserver-failover-threshold: 0 pingserver-flip-timeout: 60 vdom : "root" 11 Power off the FortiGate unit. To configure the second FortiGate-620B unit (host name 620_ha_2) 1 Power on the FortiGate unit. 2 Connect a null modem cable to the communications port of the management computer and to the FortiGate Console port. 3 Start HyperTerminal, enter a name for the connection, and select OK. 4 Configure HyperTerminal to connect directly to the communications port on the computer to which you have connected the null modem cable and select OK. 5 Select the following port settings and select OK.
Bits per second 9600 Data bits Parity 8 None
1765
1 None
6 Press Enter to connect to the FortiGate CLI. The FortiGate unit CLI login prompt appears. 7 Type admin and press Enter twice. 8 Change the host name for this FortiGate unit. config system global set hostname 620_ha_2 end 9 Configure HA settings. config system ha set mode a-p set group-name example1.com set password HA_pass_1 end The FortiGate unit negotiates to establish an HA cluster. You may temporarily lose network connectivity with the FortiGate unit as the HA cluster negotiates and because the FGCP changes the MAC address of the FortiGate unit interfaces. To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. 10 Display the HA configuration (optional). get system ha group-id : 0 group-name : example1.com mode : a-p password : * hbdev : "port3" 50 "port4" 50 session-sync-dev : route-ttl : 10 route-wait : 0 route-hold : 10 sync-config : enable encryption : disable authentication : disable hb-interval : 2 hb-lost-threshold : 6 helo-holddown : 20 arps : 5 arps-interval : 8 session-pickup : disable link-failed-signal : disable uninterruptable-upgrade: enable ha-mgmt-status : disable ha-eth-type : 8890 hc-eth-type : 8891 l2ep-eth-type : 8893 subsecond : disable vcluster2 : disable
High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1766
vcluster-id : 1 override : disable priority : 128 monitor : pingserver-monitor-interface: pingserver-failover-threshold: 0 pingserver-flip-timeout: 60 vdom : "root" 11 Power off the FortiGate unit. To connect the cluster to the network 1 Connect the port1 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the Internet. 2 Connect the port2 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the internal network. 3 Connect the port3 interfaces of 620_ha_1 and 620_ha_2 together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 4 Connect the port4 interfaces of the cluster units together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 5 Power on the cluster units. The units start and negotiate to choose the primary unit and the subordinate unit. This negotiation occurs with no user intervention and normally takes less than a minute. When negotiation is complete the cluster is ready to be configured for your network. To view cluster status Use the following steps to view cluster status from the CLI. 1 Determine which cluster unit is the primary unit. Use the null-modem cable and serial connection to re-connect to the CLI of one of the cluster units. Enter the command get system status. If the command output includes Current HA mode: a-a, master, the cluster units are operating as a cluster and you have connected to the primary unit. Continue with Step 2. If the command output includes Current HA mode: a-a, backup, you have connected to a subordinate unit. Connect the null-modem cable to the other cluster unit, which should be the primary unit and continue with Step 2.
Note: If the command output includes Current HA mode: standalone, the cluster unit is not operating in HA mode and you should review your HA configuration.
2 Enter the following command to confirm the HA configuration of the cluster: get system ha status Model: 620 Mode: a-a Group: 0 Debug: 0 ses_pickup: disable Master:128 620_ha_2 FG600B3908600825 0 Slave :128 620_ha_1 FG600B3908600705 1
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1767
number of vcluster: 1 vcluster 1: work 169.254.0.1 Master:0 FG600B3908600825 Slave :1 FG600B3908600705 The command output shows both cluster units, their host names, their roles in the cluster, and their priorities. You can use this command to confirm that the cluster is operating normally. For example, if the command shows only one cluster unit then the other unit has left the cluster for some reason. To troubleshoot the cluster configuration If the cluster members list and the dashboard do not display information for both cluster units the FortiGate units are not functioning as a cluster. See Troubleshooting HA clusters on page 1814 to troubleshoot the cluster. To add basic configuration settings to the cluster Use the following steps to add some basic settings to the cluster so that it can connect to the network. 1 Log into the primary unit CLI. 2 Add a password for the admin administrative account. config system admin edit admin set password <password_str> end 3 Configure the port1 and port2 interfaces. config system interface edit port1 set ip 172.20.120.141/24 next edit port2 set ip 10.11.101.100/24 end 4 Add a default route. config router static edit 1 set dst 0.0.0.0 0.0.0.0 set gateway 172.20.120.2 set device port1 end
1768
w itc h
or t2
or t3
or t4
S w itc h
or t3
P 10 .1 1. 10 ou R 17 2. 20 .1 1. te 20 .2 r 2
t2
or
_1
Port3 and port4 are the default FortiGate-620B heartbeat interfaces. Because the cluster consists of two FortiGate units, you can make the connections between the heartbeat interfaces using crossover cables. You could also use switches and regular ethernet cables.
62
0_
ha
or
t1
or
t4
or t1
62
0_
ha
_2
1769
4 Switch the cluster to Transparent mode and add basic configuration settings to the cluster. Switch to Transparent mode, add the management IP address and a default route. Add a password for the admin administrative account. View cluster status from the web-based manager or CLI.
Configuring a Transparent mode active-active cluster of two FortiGate-620B units - web-based manager
Use the following procedures to configure the FortiGate-620B units for HA operation using the FortiGate web-based manager. These procedures assume you are starting with two FortiGate-620B units with factory default settings.
Tip: Waiting until you have established the cluster to switch to Transparent mode means fewer configuration steps because you can switch the mode of the cluster in one step.
To configure the first FortiGate-620B unit (host name 620_ha_1) 1 Power on the first FortiGate unit. 2 Set the IP address of a management computer with an Ethernet connection to the static IP address 192.168.1.2 and a netmask of 255.255.255.0. 3 On a management computer, start a web browser and browse to the address https://192.168.1.99 (remember to include the s in https://). The FortiGate login is displayed. 4 Type admin in the Name field and select Login. The FortiGate dashboard is displayed. 5 On the System Information dashboard widget, beside Host Name select Change. 6 Enter a new Host Name for this FortiGate unit.
New Name 620_ha_1
7 Select OK. 8 Go to System > Config > HA and change the following settings:
Mode Group Name Password Active-Active example2.com HA_pass_2
Note: This is the minimum recommended configuration for an active-active HA cluster. You can configure other HA options at this point, but if you wait until the cluster is operating you will only have to configure these options once for the cluster instead of separately for each cluster unit.
9 Select OK. The FortiGate unit negotiates to establish an HA cluster. When you select OK you may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and the FGCP changes the MAC address of the FortiGate unit interfaces (see Cluster virtual MAC addresses on page 1905). The MAC addresses of the FortiGate-620B interfaces change to the following virtual MAC addresses: port1 interface virtual MAC: 00-09-0f-09-00-00
1770
port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-0b port20 interface virtual MAC: 00-09-0f-09-00-0c port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0e port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. To confirm these MAC address changes, you can use the get hardware nic (or diagnose hardware deviceinfo nic) CLI command to view the virtual MAC address of any FortiGate unit interface. For example, use the following command to view the port1 interface virtual MAC address (MAC) and the port1 permanent MAC address (Permanent_HWaddr): get hardware nic port1 . . . MAC: 00:09:0f:09:00:00 Permanent_HWaddr: 02:09:0f:78:18:c9 . . . 10 Power off the first FortiGate unit. To configure the second FortiGate-620B unit (host name 620_ha_2) 1 Power on second FortiGate unit. 2 On a management computer, start Internet Explorer and browse to the address https://192.168.1.99 (remember to include the s in https://). The FortiGate login is displayed.
1771
3 Type admin in the Name field and select Login. The FortiGate dashboard is displayed. 4 On the System Information dashboard widget, beside Host Name select Change. 5 Enter a new Host Name for this FortiGate unit.
New Name 620_ha_2
6 Select OK. 7 Go to System > Config > HA and change the following settings:
Mode Group Name Password Active-Active example2.com HA_pass_2
8 Select OK. The FortiGate unit negotiates to establish an HA cluster. When you select OK you may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and because the FGCP changes the MAC address of the FortiGate unit interfaces. To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. 9 Power off the second FortiGate unit. To connect the cluster to the network 1 Connect the port1 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the Internet. 2 Connect the port2 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the internal network. 3 Connect the port3 interfaces of 620_ha_1 and 620_ha_2 together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 4 Connect the port4 interfaces of the cluster units together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 5 Power on the cluster units. The units start and negotiate to choose the primary unit and the subordinate unit. This negotiation occurs with no user intervention and normally takes less than a minute. When negotiation is complete the cluster is ready to be configured for your network.
1772
To switch the cluster to Transparent mode Switching from NAT/Route to Transparent mode involves adding the Transparent mode management IP address and default route.
Note: Since configuration changes are synchronized to all cluster units, switching the cluster to operate in Transparent mode once the cluster is operating is the same as switching an individual FortiGate unit to Transparent mode. You could have performed the following configuration steps separately on each FortiGate unit before you connected them to form a cluster.
1 Start a web browser and browse to the address https://192.168.1.99 (remember to include the s in https://). The FortiGate Login is displayed. 2 Type admin in the Name field and select Login. 3 Under System Information, beside Operation Mode select Change. 4 Set Operation Mode to Transparent. 5 Configure basic Transparent mode settings.
Operation Mode Management IP/Mask Default Gateway Transparent 10.11.101.100/24 10.11.101.2
6 Select Apply. The cluster switches to operating in Transparent mode. The virtual MAC addresses assigned to the cluster interfaces do not change. To view cluster status Use the following steps to view the cluster dashboard and cluster members list to confirm that the cluster units are operating as a cluster.
Note: Once the cluster is operating, because configuration changes are synchronized to all cluster units, configuring the cluster is the same as configuring an individual FortiGate unit. You could have performed the following configuration steps separately on each FortiGate unit before you connected them to form a cluster.
1 Start Internet Explorer and browse to the address https://10.11.101.100 (remember to include the s in https://). The FortiGate Login is displayed. 2 Type admin in the Name field and select Login. The FortiGate dashboard is displayed. The System Information dashboard widget shows the Cluster Name (example2.com) and the host names and serial numbers of the Cluster Members. The Unit Operation widget shows multiple cluster units. 3 Go to System > Config > HA to view the cluster members list. The list shows both cluster units, their host names, their roles in the cluster, and their priorities. You can use this list to confirm that the cluster is operating normally. For example, if the list shows only one cluster unit then the other unit has left the cluster for some reason.
1773
To troubleshoot the cluster configuration If the cluster members list and the dashboard do not display information for both cluster units, the FortiGate units are not functioning as a cluster. See Troubleshooting HA clusters on page 1814 to troubleshoot the cluster. To add basic configuration settings to the cluster Use the following steps to configure the cluster. Note that the following are example configuration steps only and do not represent all of the steps required to configure the cluster for a given network. 1 Log into the cluster web-based manager. 2 Go to System > Admin > Administrators. 3 For admin, select the Change Password icon 4 Enter and confirm a new password. 5 Select OK.
Note: You added a default gateway when you switched to Transparent mode so you dont need to add a default route as part of the basic configuration of the cluster at this point.
6 Press Enter to connect to the FortiGate CLI. The FortiGate unit CLI login prompt appears.If the prompt does not appear, press Enter. If it still does not appear, power off your FortiGate unit and power it back on. If you are connected, at this stage you will see startup messages that will confirm you are connected. The login prompt will appear after the startup has completed. 7 Type admin and press Enter twice. 8 Change the host name for this FortiGate unit. For example: config system global set hostname 620_ha_1
High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1774
end 9 Configure HA settings. config system ha set mode a-a set group-name example2.com set password HA_pass_2 end
Note: This is the minimum recommended configuration for an active-active HA cluster. You can also configure other HA options, but if you wait until after the cluster is operating you will only have to configure these options once for the cluster instead of separately for each cluster unit.
The FortiGate unit negotiates to establish an HA cluster. You may temporarily lose network connectivity with the FortiGate unit as the HA cluster negotiates and the FGCP changes the MAC address of the FortiGate unit interfaces (see Cluster virtual MAC addresses on page 1905). The MAC addresses of the FortiGate-620B interfaces change to the following virtual MAC addresses: port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-0b port20 interface virtual MAC: 00-09-0f-09-00-0c port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0e port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. To confirm these MAC address changes, you can use the get hardware nic (or diagnose hardware deviceinfo nic) CLI command to view the virtual MAC address of any FortiGate unit interface. For example, use the following command to view the port1 interface virtual MAC address (MAC) and the port1 permanent MAC address (Permanent_HWaddr):
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1775
get hardware nic port1 . . . MAC: 00:09:0f:09:00:00 Permanent_HWaddr: 02:09:0f:78:18:c9 . . . 10 Display the HA configuration (optional). get system ha group-id : 0 group-name : example2.com mode : a-a password : * hbdev : "port3" 50 "port4" 50 session-sync-dev : route-ttl : 10 route-wait : 0 route-hold : 10 sync-config : enable encryption : disable authentication : disable hb-interval : 2 hb-lost-threshold : 6 helo-holddown : 20 arps : 5 arps-interval : 8 session-pickup : disable link-failed-signal : disable uninterruptable-upgrade: enable ha-mgmt-status : disable ha-eth-type : 8890 hc-eth-type : 8891 l2ep-eth-type : 8893 subsecond : disable vcluster2 : disable vcluster-id : 1 override : disable priority : 128 monitor : pingserver-monitor-interface: pingserver-failover-threshold: 0 pingserver-flip-timeout: 60 vdom : "root" 11 Power off the FortiGate unit. To configure the second FortiGate-620B unit (host name 620_ha_2) 1 Power on the FortiGate unit. 2 Connect a null modem cable to the communications port of the management computer and to the FortiGate Console port. 3 Start HyperTerminal, enter a name for the connection, and select OK.
High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1776
4 Configure HyperTerminal to connect directly to the communications port on the computer to which you have connected the null modem cable and select OK. 5 Select the following port settings and select OK.
Bits per second 9600 Data bits Parity Stop bits Flow control 8 None 1 None
6 Press Enter to connect to the FortiGate CLI. The FortiGate unit CLI login prompt appears.If the prompt does not appear, press Enter. If it still does not appear, power off your FortiGate unit and power it back on. If you are connected, at this stage you will see startup messages that will confirm you are connected. The login prompt will appear after the startup has completed. 7 Type admin and press Enter twice. 8 Change the host name for this FortiGate unit. config system global set hostname 620_ha_2 end 9 Configure HA settings. config system ha set mode a-a set group-name example2.com set password HA_pass_2 end The FortiGate unit negotiates to establish an HA cluster. You may temporarily lose network connectivity with the FortiGate unit as the HA cluster negotiates and because the FGCP changes the MAC address of the FortiGate unit interfaces. To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. 10 Display the HA configuration (optional). get system ha group-id : 0 group-name : example2.com mode : a-a password : * hbdev : "port3" 50 "port4" 50 session-sync-dev : route-ttl : 10 route-wait : 0 route-hold : 10 sync-config : enable encryption : disable authentication : disable hb-interval : 2 hb-lost-threshold : 6 helo-holddown : 20
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1777
arps : 5 arps-interval : 8 session-pickup : disable link-failed-signal : disable uninterruptable-upgrade: enable ha-mgmt-status : disable ha-eth-type : 8890 hc-eth-type : 8891 l2ep-eth-type : 8893 subsecond : disable vcluster2 : disable vcluster-id : 1 override : disable priority : 128 monitor : pingserver-monitor-interface: pingserver-failover-threshold: 0 pingserver-flip-timeout: 60 vdom : "root" 11 Power off the FortiGate unit. To connect the cluster to the network 1 Connect the port1 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the Internet. 2 Connect the port2 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the internal network. 3 Connect the port3 interfaces of 620_ha_1 and 620_ha_2 together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 4 Connect the port4 interfaces of the cluster units together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 5 Power on the cluster units. The units start and negotiate to choose the primary unit and the subordinate unit. This negotiation occurs with no user intervention and normally takes less than a minute. When negotiation is complete the cluster is ready to be configured for your network. To connect to the cluster CLI and switch the cluster to Transparent mode 1 Determine which cluster unit is the primary unit. Use the null-modem cable and serial connection to re-connect to the CLI of one of the cluster units. Enter the command get system status. If the command output includes Current HA mode: a-a, master, the cluster units are operating as a cluster and you have connected to the primary unit. Continue with Step 2. If the command output includes Current HA mode: a-a, backup, you have connected to a subordinate unit. Connect to the other cluster unit, which should be the primary unit and continue with Step 2.
Note: If the command output includes Current HA mode: standalone, the cluster unit is not operating in HA mode. See Troubleshooting the initial cluster configuration on page 1814. High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1778
2 Change to transparent mode. config system settings set opmode transparent set manageip 192.168.20.3/24 set gateway 192.168.20.1 end The cluster switches to Transparent Mode, and your administration session is disconnected. You can now connect to the cluster CLI using SSH to connect to the cluster internal interface using the management IP address (192.168.20.3). To view cluster status Use the following steps to view cluster status from the CLI. 1 Determine which cluster unit is the primary unit. Use the null-modem cable and serial connection to re-connect to the CLI of one of the cluster units. Enter the command get system status. If the command output includes Current HA mode: a-a, master, the cluster units are operating as a cluster and you have connected to the primary unit. Continue with Step 2. If the command output includes Current HA mode: a-a, backup, you have connected to a subordinate unit. Connect the null-modem cable to the other cluster unit, which should be the primary unit and continue with Step 2.
Note: If the command output includes Current HA mode: standalone, the cluster unit is not operating in HA mode and you should review your HA configuration.
2 Enter the following command to confirm the HA configuration of the cluster: get system ha status Model: 620 Mode: a-p Group: 0 Debug: 0 ses_pickup: disable Master:128 620_ha_2 FG600B3908600825 0 Slave :128 620_ha_1 FG600B3908600705 1 number of vcluster: 1 vcluster 1: work 169.254.0.1 Master:0 FG600B3908600825 Slave :1 FG600B3908600705 The command output shows both cluster units, their host names, their roles in the cluster, and their priorities. You can use this command to confirm that the cluster is operating normally. For example, if the command shows only one cluster unit then the other unit has left the cluster for some reason. To troubleshoot the cluster configuration If the cluster members list and the dashboard do not display information for both cluster units the FortiGate units are not functioning as a cluster. See Troubleshooting HA clusters on page 1814 to troubleshoot the cluster.
1779
To add a password for the admin administrative account 1 Add a password for the admin administrative account. config system admin edit admin set password <psswrd> end
port1
USB
BASE
USB 1 2 3 4 5 6
port4 10.21.101.10
ACT
FABRIC
base1
port4
USB
BASE
5005_ha_2
1 2 3 4 5 6
base1
7 8 IPM
USB
fabric1 port4
USB
BASE
base1
7 1 2 3 4 5 6 8 IPM
USB
LINK
port1
ACT LINK
fabric1
5005_ha_3
By default fabric1 and fabric2 are the FortiGate-5005FA2 heartbeat interfaces. This example changes the heartbeat configuration to use the base1 and port4 interfaces for the heartbeat. The base1 connection is handled using the base backplane channel switched by the FortiSwitch-5003A board. The port4 connection is handled by connecting the port4 interfaces together using a switch. The cluster connects to the engineering network using fabric1. The FortiSwitch-5003A board provides switching for the fabric1 interfaces and the fabric1 connection to the engineering network.
1780
Configuring a Transparent mode active-active cluster of three FortiGate-5005FA2 units - web-based manager
These procedures assume you are starting with three FortiGate-5005FA2 units with factory default settings but not installed in chassis slots and a FortiSwitch-5003A board installed in chassis slot 1. The chassis is powered on. This configuration works for a FortiGate-5050 chassis or for a FortiGate-5140 chassis. No configuration changes to the FortiSwitch-5003A board are required. To configure the FortiGate-5005FA2 units 1 Power on the first FortiGate unit by inserting it into chassis slot 5. 2 Connect port1 to the network and log into the web-based manager. 3 On the System Information dashboard widget, beside Host Name select Change. 4 Enter a new Host Name for this FortiGate unit.
New Name 5005_ha_1
5 Select OK. 6 Go to System > Network > Interface and select Show backplane interfaces. 7 Make sure the administrative status and link status is for base1 and fabric1. You can edit the interface to set the administrative status to up. The link status will be up if the administrative status is up and the FortiGate-5005FA2 board can connect to the FortiSwitch-5003A board. 8 Go to System > Config > HA and change the following settings:
Mode Group Name Password Active-Active example3.com HA_pass_3 Enable base1 fabric1 fabric2 port4 Select Priority 50
Heartbeat Interface
9 Select OK. The FortiGate unit negotiates to establish an HA cluster. When you select OK you may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and the FGCP changes the MAC address of the FortiGate unit interfaces (see Cluster virtual MAC addresses on page 1905). The MAC addresses of the FortiGate-5005FA2 interfaces change to the following virtual MAC addresses: base1 interface virtual MAC: 00-09-0f-09-00-00 base2 interface virtual MAC: 00-09-0f-09-00-01 fabric1 interface virtual MAC: 00-09-0f-09-00-02 fabric2 interface virtual MAC: 00-09-0f-09-00-03 port1 interface virtual MAC: 00-09-0f-09-00-04 port2 interface virtual MAC: 00-09-0f-09-00-05 port3 interface virtual MAC: 00-09-0f-09-00-06
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1781
port4 interface virtual MAC: 00-09-0f-09-00-07 port5 interface virtual MAC: 00-09-0f-09-00-08 port6 interface virtual MAC: 00-09-0f-09-00-09 port7 interface virtual MAC: 00-09-0f-09-00-0a port8 interface virtual MAC: 00-09-0f-09-00-0b To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. You can use the get hardware nic (or diagnose hardware deviceinfo nic) CLI command to view the virtual MAC address of any FortiGate unit interface. For example, use the following command to view the port1 interface virtual MAC address (Current_HWaddr) and the port1 permanent MAC address (Permanent_HWaddr): get hardware nic port1 . . . Current_HWaddr 00:09:0f:09:00:04 Permanent_HWaddr 00:09:0f:71:0a:dc . . . 10 Power off the first FortiGate unit. 11 Repeat these steps for the second and third FortiGate units, with the following difference. Set the second FortiGate unit host name to:
New Name 5005_ha_2
As you insert and configure each FortiGate unit, they will negotiate and join the cluster using the base1 interface for HA heartbeat communication. To connect the cluster to the network 1 Connect the port1 interfaces of the cluster to a switch that can connect to the router and the internal network. 2 Connect the port4 interfaces of the cluster units together using a switch. These interfaces become the backup heartbeat interface. 3 Connect one of the FortiSwitch-5003A front panel fabric interfaces (for example, F3) to the engineering network. To switch the cluster to operate in Transparent mode Switching from NAT/Route to Transparent mode also involves adding the Transparent mode management IP address and default route. 1 Log into the web-based manager. 2 Under System Information, beside Operation Mode select Change.
1782
5 Select Apply. The cluster switches to operating in Transparent mode. The virtual MAC addresses assigned to the cluster interfaces do not change. You must login again using the new TP address. To view cluster status Use the following steps to view the cluster dashboard and cluster members list to confirm that the cluster units are operating as a cluster. 1 View the system dashboard. The System Information dashboard widget shows the Cluster Name (example3.com) and the host names and serial numbers of the Cluster Members. The Unit Operation widget shows multiple cluster units. 2 Go to System > Config > HA to view the cluster members list. The list shows three cluster units, their host names, their roles in the cluster, and their priorities. You can use this list to confirm that the cluster is operating normally. To troubleshoot the cluster configuration If the cluster members list and the dashboard do not display information for both cluster units, the FortiGate units are not functioning as a cluster. See Troubleshooting HA clusters on page 1814 to troubleshoot the cluster. To add basic configuration settings to the cluster Use the following steps to configure the cluster. The following are example configuration steps only and do not represent all of the steps required to configure the cluster for a given network. 1 Log into the cluster web-based manager. 2 Go to System > Admin > Administrators. 3 For admin, select the Change Password icon 4 Enter and confirm a new password. 5 Select OK. The default route was changed when you switched to Transparent mode.
1783
3 Change the host name for this FortiGate unit. For example: config system global set hostname 5005_ha_1 end 4 Enable showing backplane interfaces. config system global set show-backplane-intf enable end 5 Make sure the administrative status and link status is up for base1 and fabric1. Enter get system interface to view the status of these interfaces. You can use the following commands to set the administrative status to up for these interfaces. config system interface edit base1 set status up next edit fabricq set status up end 6 Configure HA settings. config system ha set mode a-a set group-name example3.com set password HA_pass_3 set hbdev base1 50 port4 50 end
Note: This is the minimum recommended configuration for an active-active HA cluster. You can also configure other HA options, but if you wait until after the cluster is operating you will only have to configure these options once for the cluster instead of separately for each cluster unit.
The FortiGate unit negotiates to establish an HA cluster. You may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and the FGCP changes the MAC address of the FortiGate unit interfaces (see Cluster virtual MAC addresses on page 1905). The MAC addresses of the FortiGate-620B interfaces change to the following virtual MAC addresses: base1 interface virtual MAC: 00-09-0f-09-00-00 base2 interface virtual MAC: 00-09-0f-09-00-01 fabric1 interface virtual MAC: 00-09-0f-09-00-02 fabric2 interface virtual MAC: 00-09-0f-09-00-03 port1 interface virtual MAC: 00-09-0f-09-00-04 port2 interface virtual MAC: 00-09-0f-09-00-05 port3 interface virtual MAC: 00-09-0f-09-00-06 port4 interface virtual MAC: 00-09-0f-09-00-07 port5 interface virtual MAC: 00-09-0f-09-00-08 port6 interface virtual MAC: 00-09-0f-09-00-09 port7 interface virtual MAC: 00-09-0f-09-00-0a
1784
port8 interface virtual MAC: 00-09-0f-09-00-0b To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. You can use the get hardware nic (or diagnose hardware deviceinfo nic) CLI command to view the virtual MAC address of any FortiGate unit interface. For example, use the following command to view the port1 interface virtual MAC address (Current_HWaddr) and the port1 permanent MAC address (Permanent_HWaddr): get hardware nic port1 . . . Current_HWaddr 00:09:0f:09:00:04 Permanent_HWaddr 00:09:0f:71:0a:dc . . . 7 Display the HA configuration (optional). get system ha group-id : 0 group-name : example3.com mode : a-a password : * hbdev : "base1" 50 "port4" 50 session-sync-dev : route-ttl : 10 route-wait : 0 route-hold : 10 sync-config : enable encryption : disable authentication : disable hb-interval : 2 hb-lost-threshold : 20 helo-holddown : 20 arps : 5 arps-interval : 8 session-pickup : disable link-failed-signal : disable uninterruptable-upgrade: enable ha-mgmt-status : disable ha-eth-type : 8890 hc-eth-type : 8891 l2ep-eth-type : 8893 subsecond : disable vcluster2 : disable vcluster-id : 1 override : disable priority : 128 schedule : round-robin monitor : pingserver-monitor-interface:
1785
1786
8 Repeat these steps for the second and third FortiGate units. Set the second FortiGate unit host name to: config system global set hostname 5005_ha_2 end Set the third FortiGate unit host name to: config system global set hostname 5005_ha_3 end As you insert and configure each FortiGate unit they will negotiate and join the cluster using the base1 interface for HA heartbeat communication. To connect the cluster to the network 1 Connect the port1 interfaces of the cluster to a switch that can connect to the router and the internal network. 2 Connect the port4 interfaces of the cluster units together using a switch. These interfaces become the backup heartbeat interface. 3 Connect one of the FortiSwitch-5003A front panel fabric interfaces (for example, F3) to the engineering network. To switch the cluster to Transparent mode 1 Log into the cluster CLI. 2 Change to Transparent mode. config system settings set opmode transparent set manageip 10.22.101.20/24 set gateway 10.22.101.1 end The cluster switches to Transparent Mode. You can now connect to the cluster CLI using SSH to connect to the cluster internal interface using the management IP address (10.22.101.20 ). To view cluster status Use the following steps to view cluster status from the CLI. 1 Log into the CLI. 2 To verify the HA status of the cluster unit that you logged into, enter the CLI command get system status. Look for the following information in the command output.
Current HA mode: a-a, master Current HA mode: a-a, backup Current HA mode: standalone The cluster units are operating as a cluster and you have connected to the primary unit. The cluster units are operating as a cluster and you have connected to a subordinate unit. The cluster unit is not operating in HA mode
1787
3 Enter the following command to confirm the HA configuration of the cluster: get system ha status Model: 5005 Mode: a-a Group: 0 Debug: 0 ses_pickup: disable load_balance: disable schedule: round robin Master:128 5005_ha_1 FG5A253E07600124 0 Slave :128 5005_ha_2 FG5A253E06500088 1 Slave :128 5005_ha_3 FG5A253E06500099 2 number of vcluster: 1 vcluster 1: work 169.254.0.1 Master:0 FG5A253E07600124 Slave :1 FG5A253E06500088 Slave :2 FG5A253E06500099 The command output shows both cluster units, their host names, their roles in the cluster, and their priorities. You can use this command to confirm that the cluster is operating normally. For example, if the command shows only one cluster unit then the other unit has left the cluster for some reason. To troubleshoot the cluster configuration If the cluster members list and the dashboard do not display information for both cluster units the FortiGate units are not functioning as a cluster. See Troubleshooting HA clusters on page 1814 to troubleshoot the cluster. To add a password for the admin administrative account 1 Add a password for the admin administrative account. config system admin edit admin set password <psswrd> end
1788
The new FortiGate units must: Have the same hardware configuration as the original FortiGate unit. Including the same hard disk configuration and the same AMC cards installed in the same slots. Have the same firmware build as the original FortiGate unit. Be set to the same operating mode (NAT or Transparent) as the original FortiGate unit. Be operating in single VDOM mode.
In addition to one or more new FortiGate units, you need sufficient switches to connect all of the FortiGate interfaces in the cluster. Generally you will need one switch per interface, as it will have to connect that same interface on all cluster units. That is, all port1 interfaces use the port1 switch, port2 interfaces use the port2 switch, and so on. Intelligent switches that can be partitioned can reduce your switch requirements. Converting a FortiGate unit to a primary unit and adding in the subordinate unit or units results in a brief service interruption as you disconnect and reconnect FortiGate interfaces and as the cluster negotiates. Therefore, conversion should only be done during off peak hours. To configure the original FortiGate unit for HA operation 1 Connect to the FortiGate unit web-based manager. 2 Go to System > Config > HA. 3 Configure the FortiGate unit for HA operation.
Mode Device Priority Group Name Password Active-Active 255 example4.com HA_pass_4
You can make other HA configuration changes after the cluster is operating. 4 Select OK. The FortiGate unit negotiates to establish an HA cluster. When you select OK you may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and because the FGCP changes the MAC address of the FortiGate unit interfaces (see Cluster virtual MAC addresses on page 1905). To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. 5 Configure the new FortiGate units with the same HA configuration as the original FortiGate unit. The one exception is to keep the device priorities of the new FortiGate units at 128 to ensure the original FortiGate unit will become the primary unit in the new cluster.
Mode Device Priority Group Name Password Active-Active 128 example4.com HA_pass_4
1789
6 Configure the other FortiGate units to the same operation mode as the original FortiGate unit. There is no need to make any other configuration changes (including network configuration changes) to the other FortiGate units. 7 Optionally power off all of the cluster units. If you dont power off all of the units they may not negotiate to form a cluster when they are connected together. 8 Connect the cluster to your network. For example, for a configuration similar to the FortiGate-620B cluster configuration described in this chapter, see To connect the cluster to the network on page 1761. 9 Power on all of the cluster units. As the units start they change their MAC addresses and then negotiate to choose the primary unit and the subordinate units. This negotiation occurs with no user intervention and normally takes less than a minute. The original the FortiGate unit becomes the primary unit because the device priority of the original FortiGate unit is higher than the device priority of the other FortiGate units. The configuration of the original FortiGate unit is synchronized to all the cluster units. As a result, the cluster is quickly up and running and configured for your network. No further configuration changes are required.
1790
1791
itc
itc
2 P A x or g 1 17 t g 00 2. 1 a reg 0 20 n a M .1 d P te b 20 o of .1 rt2 41
62
0_
ha
_1
1792
R 17 ou 2. ter 20 .1 20
or
.2
S w
or
t5
or
t6
62
0_
ha
_2
1793
General configuration steps 1 Configure the FortiGate units for HA operation. Change each units host name. Configure HA. 2 Connect the cluster to the network. 3 View cluster status. 4 Add basic configuration settings and configure the aggregated interfaces. Add a password for the admin administrative account. Add the aggregated interfaces. Disable lacp-ha-slave so that the subordinate unit does not send LACP packets. Add a default route. You could also configure aggregated interfaces in each FortiGate unit before the units form a cluster. 5 Configure HA port monitoring for the aggregated interfaces.
4 Select OK. 5 Go to System > Config > HA and change the following settings.
Mode Group Name Password Active-Passive example5.com HA_pass_5 Enable port5 port6 Select Select Priority 50 50
Heartbeat Interface
Since port3 and port4 will be used for a aggregated interface, you must change the HA heartbeat configuration to not use those interfaces. 6 Select OK. The FortiGate unit negotiates to establish an HA cluster. When you select OK you may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and the FGCP changes the MAC address of the FortiGate unit interfaces (see Cluster virtual MAC addresses on page 1905). The MAC addresses of the FortiGate-620B interfaces change to the following virtual MAC addresses:
1794
port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-0b port20 interface virtual MAC: 00-09-0f-09-00-0c port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0e port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. You can use the get hardware nic (or diagnose hardware deviceinfo nic) CLI command to view the virtual MAC address of any FortiGate unit interface. For example, use the following command to view the port1 interface virtual MAC address (Current_HWaddr) and the port1 permanent MAC address (Permanent_HWaddr): get hardware nic port1 . . . MAC: 00:09:0f:09:00:00 Permanent_HWaddr: 02:09:0f:78:18:c9 . . . 7 Power off the first FortiGate unit. 8 Repeat these steps for the second FortiGate unit. Set the second FortiGate unit host name to:
New Name 620_ha_2
1795
To connect the cluster to the network 1 Connect the port1 and port2 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the Internet. Configure the switch so that the port1 and port2 of 620_ha_1 make up an aggregated interface and port1 and port2 of 620_ha_2 make up a second aggregated interface. 2 Connect the port3 and port4 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the internal network. Configure the switch so that the port3 and port4 of 620_ha_1 make up an aggregated interface and port3 and port4 of 620_ha_2 make up another aggregated interface. 3 Connect the port5 interfaces of 620_ha_1 and 620_ha_2 together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 4 Connect the port5 interfaces of the cluster units together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 5 Power on the cluster units. The units negotiate to choose the primary unit and the subordinate unit. This negotiation occurs with no user intervention and normally takes less than a minute. When negotiation is complete, the cluster is ready to be configured for your network. To view cluster status Use the following steps to view the cluster dashboard and cluster members list to confirm that the cluster units are operating as a cluster. 1 View the system dashboard. The System Information dashboard widget shows the Cluster Name (example5.com) and the host names and serial numbers of the Cluster Members. The Unit Operation widget shows multiple cluster units. 2 Go to System > Config > HA to view the cluster members list. The list shows two cluster units, their host names, their roles in the cluster, and their priorities. You can use this list to confirm that the cluster is operating normally. To troubleshoot the cluster configuration If the cluster members list and the dashboard do not display information for both cluster units, the FortiGate units are not functioning as a cluster. See Troubleshooting HA clusters on page 1814 to troubleshoot the cluster. To add basic configuration settings and the aggregate interfaces Use the following steps to add a few basic configuration settings. 1 Log into the cluster web-based manager. 2 Go to System > Admin > Administrators. 3 For admin, select the Change Password icon. 4 Enter and confirm a new password. 5 Select OK. 6 Go to Router > Static and temporarily delete the default route. You cannot add an interface to a aggregated interface if any settings (such as the default route) are configured for it. 7 Go to System > Network > Interface and select Create New to add the aggregate interface to connect to the Internet.
High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1796
8 Set Type to 802.3ad Aggregate and configure the aggregate interface to be connected to the Internet:
Name Selected Interfaces IP/Netmask Port1_Port2 port1, port2 172.20.120.141/24
9 Select OK. 10 Select Create New to add the aggregate interface to connect to the internal network. 11 Set Type to 802.3ad Aggregate and configure the aggregate interface to be connected to the Internet:
Name Selected Interfaces IP/Netmask Administrative Access Port3_Port4 port3, port4 10.11.101.100/24 HTTPS, PING, SSH
12 Select OK. The virtual MAC addresses of the FortiGate-620B interfaces change to the following. Note that port1 and port2 both have the port1 virtual MAC address and port3 and port4 both have the port3 virtual MAC address: port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-00 (same as port1) port20 interface virtual MAC: 00-09-0f-09-00-0c port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0d (same as port3) port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 13 Connect to the CLI and enter the following command to disable sending LACP packets from the subordinate unit:
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1797
config system interface edit Port1_Port2 set lacp-ha-slave disable next edit Port3_Port4 set lacp-ha-slave disable end 14 Go to Router > Static. 15 Add the default route.
Destination IP/Mask Gateway Device Distance 0.0.0.0/0.0.0.0 172.20.120.2 Port1_Port2 10
16 Select OK. To configure HA port monitoring for the aggregate interfaces 1 Go to System > Config > HA. 2 In the cluster members list, edit the primary unit. 3 Configure the following port monitoring for the aggregate interfaces:
Port Monitor Port1_Port2 Port3_Port4 Select Select
4 Select OK.
1798
end Since port3 and port4 will be used for an aggregated interface, you must change the HA heartbeat configuration. The FortiGate unit negotiates to establish an HA cluster. You may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and the FGCP changes the MAC address of the FortiGate unit interfaces (see Cluster virtual MAC addresses on page 1905). The MAC addresses of the FortiGate-620B interfaces change to the following virtual MAC addresses: port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-0b port20 interface virtual MAC: 00-09-0f-09-00-0c port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0e port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. You can use the get hardware nic (or diagnose hardware deviceinfo nic) CLI command to view the virtual MAC address of any FortiGate unit interface. For example, use the following command to view the port1 interface virtual MAC address (Current_HWaddr) and the port1 permanent MAC address (Permanent_HWaddr): get hardware nic port1 . . . MAC: 00:09:0f:09:00:00 Permanent_HWaddr: 02:09:0f:78:18:c9 . . .
1799
4 Display the HA configuration (optional). get system ha group-id : 0 group-name : example5.com mode : a-p password : * hbdev : "port5" 50 "port6" 50 session-sync-dev : route-ttl : 10 route-wait : 0 route-hold : 10 sync-config : enable encryption : disable authentication : disable hb-interval : 2 hb-lost-threshold : 20 helo-holddown : 20 arps : 5 arps-interval : 8 session-pickup : disable link-failed-signal : disable uninterruptable-upgrade: enable ha-mgmt-status : disable ha-eth-type : 8890 hc-eth-type : 8891 l2ep-eth-type : 8893 subsecond : disable vcluster2 : disable vcluster-id : 1 override : disable priority : 128 monitor : pingserver-monitor-interface: pingserver-failover-threshold: 0 pingserver-flip-timeout: 60 vdom : "root" 5 Repeat these steps for the other FortiGate unit. Set the other FortiGate unit host name to: config system global set hostname 620_ha_2 end To connect the cluster to the network 1 Connect the port1 and port2 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the Internet. Configure the switch so that the port1 and port2 of 620_ha_1 make up an aggregated interface and port1 and port2 of 620_ha_2 make up another aggregated interface. 2 Connect the port3 and port4 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the internal network. Configure the switch so that the port3 and port4 of 620_ha_1 make up an interfaced and port3 and port4 of 620_ha_2 make up another aggregated interface.
1800
3 Connect the port5 interfaces of 620_ha_1 and 620_ha_2 together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 4 Connect the port5 interfaces of the cluster units together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 5 Power on the cluster units. The units start and negotiate to choose the primary unit and the subordinate unit. This negotiation occurs with no user intervention and normally takes less than a minute. When negotiation is complete the cluster is ready to be configured for your network. To view cluster status Use the following steps to view cluster status from the CLI. 1 Log into the CLI. 2 Enter get system status to verify the HA status of the cluster unit that you logged into.Look for the following information in the command output.
Current HA mode: a-a, master The cluster units are operating as a cluster and you have connected to the primary unit. Current HA mode: a-a, backup The cluster units are operating as a cluster and you have connected to a subordinate unit. Current HA mode: standalone The cluster unit is not operating in HA mode
3 Enter the following command to confirm the HA configuration of the cluster: get system ha status Model: 620 Mode: a-a Group: 0 Debug: 0 ses_pickup: disable Master:128 620_ha_2 FG600B3908600825 0 Slave :128 620_ha_1 FG600B3908600705 1 number of vcluster: 1 vcluster 1: work 169.254.0.1 Master:0 FG600B3908600825 Slave :1 FG600B3908600705 The command output shows both cluster units, their host names, their roles in the cluster, and their priorities. You can use this command to confirm that the cluster is operating normally. For example, if the command shows only one cluster unit then the other unit has left the cluster for some reason. To troubleshoot the cluster configuration If the cluster members list and the dashboard do not display information for both cluster units the FortiGate units are not functioning as a cluster. See Troubleshooting HA clusters on page 1814 to troubleshoot the cluster.
1801
To add basic configuration settings and the aggregate interfaces Use the following steps to add a few basic configuration settings and the aggregate interfaces. 1 Add a password for the admin administrative account. config system admin edit admin set password <psswrd> end 2 Temporarily delete the default route. You cannot add an interface to an aggregate interface if any settings (such as the default route) are configured for it. In this example the index of the default route is 1. config router static delete 1 end 3 Add the aggregate interfaces: config system interface edit Port1_Port2 set type aggregate set lacp-ha-slave disable set member port1 port2 set ip 172.20.120.141/24 set vdom root next edit Port3_Port4 set type aggregate set lacp-ha-slave disable set member port3 port4 set ip 10.11.101.100/24 set vdom root end The virtual MAC addresses of the FortiGate-620B interfaces change to the following. Note that port1 and port2 both have the port1 virtual MAC address and port3 and port4 both have the port3 virtual MAC address: port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-00 (same as port1) port20 interface virtual MAC: 00-09-0f-09-00-0c
1802
port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0d (same as port3) port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 4 Add the default route. config router static edit 1 set dst 0.0.0.0 0.0.0.0 set gateway 172.20.120.2 set device Port1_Port2 end To configure HA port monitoring for the aggregate interfaces 1 Configure HA port monitoring for the aggregate interfaces. config system ha set monitor Port1_Port2 Port3_Port4 end
t5
or
t6
itc
or
un P da or n 10 t3 t in .1 an te 1. d rfa 10 P c 1. ort e 10 4 0
ed
62
0_
ha
ed
un
_1
R 17 ou 2. ter 20 .1 20
or
t6
.2
S w
itc P or t5
This example describes how to configure an HA cluster consisting of two FortiGate-620B units with a a redundant interface connection to the Internet and to an internal network. The connection to the Internet uses port1 and port2. The connection to the internal network uses port3 and port4. The HA heartbeat uses port5 and port6. The redundant interfaces are also configured as HA monitored interfaces.
Connecting multiple redundant interfaces to one switch while operating in activepassive HA mode
HA assigns the same virtual MAC addresses to the subordinate unit interfaces as are assigned to the corresponding primary unit interfaces. Consider a cluster of two FortiGate units operating in active-passive mode with a redundant interface consisting of port1 and port2. You can connect multiple redundant interfaces to the same switch if you configure the switch so that it defines multiple separate redundant interfaces and puts the redundant interfaces of each cluster unit into separate redundant interfaces. In this configuration, each cluster unit forms a separate redundant interface with the switch. However, if the switch is configured with a single four-port redundant interface configuration, because the same MAC addresses are being used by both cluster units, the switch adds all four interfaces (port1 and port2 from the primary unit and port1 and port2 from the subordinate unit) to the same redundant interface. To avoid unpredictable results, when you connect a switch to multiple redundant interfaces in an active-passive cluster you should configure separate redundant interfaces on the switch; one for each cluster unit.
Connecting multiple redundant interfaces to one switch while operating in activeactive HA mode
In an active-active cluster, all cluster units send and receive packets. To operate a cluster with redundant interfaces in active-active mode, with multiple redundant interfaces connected to the same switch, you must separate the redundant interfaces of each cluster unit into different redundant interfaces on the connecting switch.
1804
4 Select OK. 5 Go to System > Config > HA and change the following settings.
Mode Group Name Password Active-Passive example6.com HA_pass_6 Enable port5 port6 Select Select Priority 50 50
Heartbeat Interface
Since port3 and port4 will be used for a redundant interface, you must change the HA heartbeat configuration.
1805
6 Select OK. The FortiGate unit negotiates to establish an HA cluster. When you select OK you may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and the FGCP changes the MAC address of the FortiGate unit interfaces (see Cluster virtual MAC addresses on page 1905). The MAC addresses of the FortiGate-620B interfaces change to the following virtual MAC addresses: port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-0b port20 interface virtual MAC: 00-09-0f-09-00-0c port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0e port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. You can use the get hardware nic (or diagnose hardware deviceinfo nic) CLI command to view the virtual MAC address of any FortiGate unit interface. For example, use the following command to view the port1 interface virtual MAC address (Current_HWaddr) and the port1 permanent MAC address (Permanent_HWaddr): get hardware nic port1 . . . MAC: 00:09:0f:09:00:00 Permanent_HWaddr: 02:09:0f:78:18:c9 . . . 7 Power off the first FortiGate unit.
1806
8 Repeat these steps for the second FortiGate unit. Set the second FortiGate unit host name to:
New Name 620_ha_2
To connect the cluster to the network 1 Connect the port1 and port2 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the Internet. Configure the switch so that the port1 and port2 of 620_ha_1 make up a redundant interface and port1 and port2 of 620_ha_2 make up another redundant interface. 2 Connect the port3 and port4 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the internal network. Configure the switch so that the port3 and port4 of 620_ha_1 make up a redundant interface and port3 and port4 of 620_ha_2 make up another redundant interface. 3 Connect the port5 interfaces of 620_ha_1 and 620_ha_2 together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 4 Connect the port5 interfaces of the cluster units together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 5 Power on the cluster units. The units start and negotiate to choose the primary unit and the subordinate unit. This negotiation occurs with no user intervention and normally takes less than a minute. When negotiation is complete the cluster is ready to be configured for your network. To view cluster status Use the following steps to view the cluster dashboard and cluster members list to confirm that the cluster units are operating as a cluster. 1 View the system dashboard. The System Information dashboard widget shows the Cluster Name (example5.com) and the host names and serial numbers of the Cluster Members. The Unit Operation widget shows multiple cluster units. 2 Go to System > Config > HA to view the cluster members list. The list shows two cluster units, their host names, their roles in the cluster, and their priorities. You can use this list to confirm that the cluster is operating normally. To troubleshoot the cluster configuration If the cluster members list and the dashboard do not display information for both cluster units the FortiGate units are not functioning as a cluster. See Troubleshooting HA clusters on page 1814 to troubleshoot the cluster. To add basic configuration settings and the redundant interfaces Use the following steps to add a few basic configuration settings. 1 Log into the cluster web-based manager. 2 Go to System > Admin > Administrators. 3 For admin, select the Change Password icon 4 Enter and confirm a new password. 5 Select OK.
1807
6 Go to Router > Static and temporarily delete the default route. You cannot add an interface to a redundant interface if any settings (such as the default route) are configured for it. 7 Go to System > Network > Interface and select Create New to add the redundant interface to connect to the Internet. 8 Set Type to Redundant Interface and configure the redundant interface to be connected to the Internet:
Name Selected Interfaces IP/Netmask Port1_Port2 port1, port2 172.20.120.141/24
9 Select OK. 10 Select Create New to add the redundant interface to connect to the internal network. 11 Set Type to Redundant Interface and configure the redundant interface to be connected to the Internet:
Name Selected Interfaces IP/Netmask Administrative Access Port3_Port4 port3, port4 10.11.101.100/24 HTTPS, PING, SSH
12 Select OK. The virtual MAC addresses of the FortiGate-620B interfaces change to the following. Note that port1 and port2 both have the port1 virtual MAC address and port3 and port4 both have the port3 virtual MAC address: port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-00 (same as port1) port20 interface virtual MAC: 00-09-0f-09-00-0c port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0d (same as port3) port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10
1808
port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 13 Go to Router > Static. 14 Add the default route.
Destination IP/Mask Gateway Device Distance 0.0.0.0/0.0.0.0 172.20.120.2 Port1_Port2 10
15 Select OK. To configure HA port monitoring for the redundant interfaces 1 Go to System > Config > HA. 2 In the cluster members list, edit the primary unit. 3 Configure the following port monitoring for the redundant interfaces:
Port Monitor Port1_Port2 Port3_Port4 Select Select
4 Select OK.
1809
port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-0b port20 interface virtual MAC: 00-09-0f-09-00-0c port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0e port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. You can use the get hardware nic (or diagnose hardware deviceinfo nic) CLI command to view the virtual MAC address of any FortiGate unit interface. For example, use the following command to view the port1 interface virtual MAC address (Current_HWaddr) and the port1 permanent MAC address (Permanent_HWaddr): get hardware nic port1 . . . MAC: 00:09:0f:09:00:00 Permanent_HWaddr: 02:09:0f:78:18:c9 . . . 4 Display the HA configuration (optional). get system ha group-id : 0 group-name : example6.com mode : a-p password : * hbdev : "port5" 50 "port6" 50 session-sync-dev : route-ttl : 10
High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1810
route-wait : 0 route-hold : 10 sync-config : enable encryption : disable authentication : disable hb-interval : 2 hb-lost-threshold : 20 helo-holddown : 20 arps : 5 arps-interval : 8 session-pickup : disable link-failed-signal : disable uninterruptable-upgrade: enable ha-mgmt-status : disable ha-eth-type : 8890 hc-eth-type : 8891 l2ep-eth-type : 8893 subsecond : disable vcluster2 : disable vcluster-id : 1 override : disable priority : 128 monitor : pingserver-monitor-interface: pingserver-failover-threshold: 0 pingserver-flip-timeout: 60 vdom : "root" 5 Repeat these steps for the other FortiGate unit. Set the other FortiGate unit host name to: config system global set hostname 620_ha_2 end To connect the cluster to the network 1 Connect the port1 and port2 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the Internet. Configure the switch so that the port1 and port2 of 620_ha_1 make up a redundant interface and port1 and port2 of 620_ha_2 make up another redundant interface. 2 Connect the port3 and port4 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the internal network. Configure the switch so that the port3 and port4 of 620_ha_1 make up a redundant interface and port3 and port4 of 620_ha_2 make up another redundant interface. 3 Connect the port5 interfaces of 620_ha_1 and 620_ha_2 together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 4 Connect the port5 interfaces of the cluster units together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 5 Power on the cluster units. The units start and negotiate to choose the primary unit and the subordinate unit. This negotiation occurs with no user intervention and normally takes less than a minute. When negotiation is complete the cluster is ready to be configured for your network.
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1811
To view cluster status Use the following steps to view cluster status from the CLI. 1 Log into the CLI. 2 Enter get system status to verify the HA status of the cluster unit that you logged into.Look for the following information in the command output.
Current HA mode: a-a, master Current HA mode: a-a, backup Current HA mode: standalone The cluster units are operating as a cluster and you have connected to the primary unit. The cluster units are operating as a cluster and you have connected to a subordinate unit. The cluster unit is not operating in HA mode
3 Enter the following command to confirm the HA configuration of the cluster: get system ha status Model: 620 Mode: a-a Group: 0 Debug: 0 ses_pickup: disable Master:128 620_ha_2 FG600B3908600825 0 Slave :128 620_ha_1 FG600B3908600705 1 number of vcluster: 1 vcluster 1: work 169.254.0.1 Master:0 FG600B3908600825 Slave :1 FG600B3908600705 The command output shows both cluster units, their host names, their roles in the cluster, and their priorities. You can use this command to confirm that the cluster is operating normally. For example, if the command shows only one cluster unit then the other unit has left the cluster for some reason. To troubleshoot the cluster configuration If the cluster members list and the dashboard do not display information for both cluster units the FortiGate units are not functioning as a cluster. See Troubleshooting HA clusters on page 1814 to troubleshoot the cluster. To add basic configuration settings and the redundant interfaces Use the following steps to add a few basic configuration settings and the redundant interfaces. 1 Add a password for the admin administrative account. config system admin edit admin set password <psswrd> end 2 Temporarily delete the default route. You cannot add an interface to a redundant interface if any settings (such as the default route) are configured for it. In this example the index of the default route is 1. config router static delete 1 end 3 Add the redundant interfaces:
1812
config system interface edit Port1_Port2 set type redundant set member port1 port2 set ip 172.20.120.141/24 set vdom root next edit Port3_Port4 set type redundant set member port3 port4 set ip 10.11.101.100/24 set vdom root end The virtual MAC addresses of the FortiGate-620B interfaces change to the following. Note that port1 and port2 both have the port1 virtual MAC address and port3 and port4 both have the port3 virtual MAC address: port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-00 (same as port1) port20 interface virtual MAC: 00-09-0f-09-00-0c port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0d (same as port3) port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 4 Add the default route. config router static edit 1 set dst 0.0.0.0 0.0.0.0 set gateway 172.20.120.2 set device Port1_Port2 end
1813
Troubleshooting HA clusters
To configure HA port monitoring for the redundant interfaces 1 Configure HA port monitoring for the redundant interfaces. config system ha set monitor Port1_Port2 Port3_Port4 end
Troubleshooting HA clusters
This section describes some HA clustering troubleshooting techniques.
1814
Troubleshooting HA clusters
5 Disconnect a cable for one of the HA heartbeat interfaces. The cluster should keep functioning, using the other HA heartbeat interface. 6 If you have port monitoring enabled, disconnect a network cable from a monitored interface. Traffic should continue with minimal interruption. To verify the cluster configuration - web-based manager 1 Log into the cluster web-based manager. 2 Check the system dashboard to verify that the System Information widget displays all of the cluster units. 3 Check the cluster member graphic to verify that the correct cluster unit interfaces are connected. 4 Go to System > Config > HA and verify that all of the cluster units are displayed on the cluster members list. 5 From the cluster members list, edit the primary unit (master) and verify the cluster configuration is as expected. To troubleshoot the cluster configuration - web-based manager 1 Connect to each cluster unit web-based manager and verify that the HA configurations are the same. To connect to each web-based manager, you may need to disconnect some units from the network to connect to the other if the units have the same IP address. 2 If the configurations are the same, try re-entering the cluster Password on each cluster unit in case you made an error typing the password when configuring one of the cluster units. 3 Check that the correct interfaces of each cluster unit are connected. Check the cables and interface LEDs. Use the Unit Operation dashboard widget, system network interface list, or cluster members list to verify that each interface that should be connected actually is connected. If Link is down re-verify the physical connection. Try replacing network cables or switches as required. To verify the cluster configuration - CLI 1 Log into each cluster unit CLI. You can use the console connection if you need to avoid the problem of units having the same IP address. 2 Enter the command get system status. Look for the following information in the command output.
Current HA mode: a-a, master The cluster units are operating as a cluster and you have connected to the primary unit. Current HA mode: a-a, backup The cluster units are operating as a cluster and you have connected to a subordinate unit. Current HA mode: standalone The cluster unit is not operating in HA mode
3 Verify that the get system ha status command displays all of the cluster units. 4 Enter the get system ha command to verify that the HA configuration is correct and the same for each cluster unit.
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1815
Troubleshooting HA clusters
To troubleshoot the cluster configuration - CLI 1 Try using the following command to re-enter the cluster password on each cluster unit in case you made an error typing the password when configuring one of the cluster units. config system ha set password <password> end 2 Check that the correct interfaces of each cluster unit are connected. Check the cables and interface LEDs. Use get hardware nic <interface_name> command to confirm that each interface is connected. If the interface is connected the command output should contain a Link: up entry similar to the following: get hardware nic port1 . . . Link: up . . . If Link is down, re-verify the physical connection. Try replacing network cables or switches as required.
1816
Troubleshooting HA clusters
The web-based manager and CLI will not allow you to configure HA if: You have configured a FortiGate interface to get its IP address using DHCP or PPPoE. See FortiGate HA compatibility with PPPoE and DHCP on page 1749. You have enabled VRRP. See VRRP on page 1967.
You have enabled TCP session synchronization. See TCP session synchronization on page 1973. Some third-party network equipment may prevent HA heartbeat communication, resulting in a failure of the cluster or the creation of a split brain scenario. For example, some switches use packets with the same Ethertype as HA heartbeat packets use for internal functions and when used for HA heartbeat communication the switch generates CRC errors and the packets are not forwarded. See Heartbeat packet Ethertypes on page 1902. Very busy clusters may not be able to send HA heartbeat packets quickly enough, also resulting in a split brain scenario. You may be able to resolve this problem by modifying HA heartbeat timing. See Modifying heartbeat timing on page 1903. Very busy clusters may suffer performance reductions if session pickup is enabled. If possible you can disable this feature to improve performance. If you require session pickup for your cluster, several options are available for improving session pickup performance. See Improving session synchronization performance on page 1932. If it takes longer than expected for a cluster to failover you can try changing how the primary unit sends gratuitous ARP packets. See Changing how the primary unit sends gratuitous ARP packets after a failover on page 1906. You can also improve failover times by configuring the cluster for subsecond failover. See Subsecond failover on page 1927 and Failover performance on page 1942. When you first put a FortiGate unit in HA mode you may loose connectivity to the unit. This occurs because HA changes the MAC addresses of all FortiGate unit interfaces, including the one that you are connecting to. The cluster MAC addresses also change if you change the some HA settings such as the cluster group ID. The connection will be restored in a short time as your network and PC updates to the new MAC address. To reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. Since HA changes all cluster unit MAC addresses, if your network uses MAC address filtering you may have to make configuration changes to account for the HA MAC addresses. A network may experience packet loss when two FortiGate HA clusters have been deployed in the same broadcast domain. Deploying two HA clusters in the same broadcast domain can result in packet loss because of MAC address conflicts. The packet loss can be diagnosed by pinging from one cluster to the other or by pinging both of the clusters from a device within the broadcast domain. You can resolve the MAC address conflict by changing the HA Group ID configuration of the two clusters. The HA Group ID is sometimes also called the Cluster ID. See Diagnosing packet loss with two FortiGate HA clusters in the same broadcast domain on page 1910. The cluster CLI displays slave is not in sync messages if there is a synchronization problem between the primary unit and one or more subordinate units. See How to diagnose HA out of sync messages on page 1916.
1817
Troubleshooting HA clusters
If you have configured dynamic routing and the new primary unit takes too long to update its routing table after a failover you can configure graceful restart and also optimize how routing updates are synchronized. See Configuring graceful restart for dynamic routing failover on page 1918 and Controlling how the FGCP synchronizes routing updates on page 1919. Some switches may not be able to detect that the primary unit has become a subordinate unit and will keep sending packets to the former primary unit. This can occur after a link failover if the switch does not detect the failure and does not clear its MAC forwarding table. See Updating MAC forwarding tables when a link failover occurs on page 1925. If a link not directly connected to a cluster unit (for example, between a switch connected to a cluster interface and the network) fails you can enable remote link failover to maintain communication. See Remote link failover on page 1927. If you find that some cluster units are not running the same firmware build you can reinstall the correct firmware build on the cluster to upgrade all cluster units to the same firmware build. See Synchronizing the firmware build running on a new cluster unit on page 1882.
1818
1819
S w
itc
or t2
or t5
itc
or t6
or t2
or
t5
_1
ha
62
0_
or
t1
Usually you would enable virtual cluster 2 and expect one cluster unit to be the primary unit for virtual cluster 1 and the other cluster unit to be the primary unit for virtual cluster 2. For this distribution to occur override must be enabled for both virtual clusters. Otherwise you will need to restart the cluster to force it to renegotiate.
Note: If override is enabled the cluster may renegotiate too often.You can choose to disable override at any time. If you decide to disable override, for best results, you should disable it for both cluster units.
S w
1820
Internal Network
P or t6
S w
itc
P ou te r
itc
or t1
62
Engineering Network
0_
ha
_2
1821
The following example shows how to configure active-active virtual clustering: config global config system ha set mode a-a set group-name vexample1.com set password vHA_pass_1 end end The following example shows how to configure active-passive virtual clustering: config global config system ha set mode a-p set group-name vexample1.com set password vHA_pass_1 end end The following example shows how to configure VDOM partitioning for virtual clustering. In the example, the FortiGate unit is configured with three VDOMs (domain_1, domain_2, and domain_3) in addition to the root VDOM. The example shows how to set up a basic HA configuration that sets the device priority of virtual cluster 1 to 200. The example also shows how to enable vcluster2, how to set the device priority of virtual cluster 2 to 100 and how to add the virtual domains domain_2 and domain_3 to virtual cluster 2. When you enable multiple VDOMs, vcluster2 is enabled by default. Even so the command to enable vcluster2 is included in this example in case for some reason it has been disabled. When vcluster2 is enabled, override is also enabled. The result of this configuration would be that the cluster unit that you are logged into becomes the primary unit for virtual cluster 1. This cluster unit processes all traffic for the root and domain_1 virtual domains. config global config system ha set mode a-p set group-name vexample1.com set password vHA_pass_1 set priority 200 set vcluster2 enable config secondary-vcluster set vdom domain_2 domain_3 set priority 100 end end end The following example shows how to use the execute ha manage command to change the device priorities for virtual cluster 1 and virtual cluster 2 for the other unit in the cluster. The commands set the device priority of virtual cluster 1 to 100 and virtual cluster 2 to 200.
1822
The result of this configuration would be that the other cluster unit becomes the primary unit for virtual cluster 2. This other cluster unit would process all traffic for the domain_2 and domain_3 virtual domains. config global execute ha manage 1 config system ha set priority 100 set vcluster2 enable config secondary-vcluster set priority 200 end end end end
1823
Figure 217: Example virtual cluster of two FortiGate-620B units showing VDOM partitioning
or t2
or t5
or t2
or t5
P or t6
or t6
or t1
62
0_
ha
_2
_1
62
ha
or t1
root Traffic Eng_vdm Traffic Port1: Port2: Port5: Port6: 172.20.120.141 10.11.101.100 172.20.120.143 10.12.101.100
1824
R 17 ou 2. ter 20 .1 20
.2
Configuring virtual clustering with two VDOMs and VDOM partitioning web-based manager
These procedures assume you are starting with two FortiGate-620B units with factory default settings. To configure the FortiGate-620B units for HA operation 1 Power on the first FortiGate-620B unit and log into the web-based manager. 2 On the System Information dashboard widget, beside Host Name select Change. 3 Enter a new Host Name for this FortiGate unit.
New Name 620_ha_1
4 Select OK. 5 Go to System > Config > HA and change the following settings.
Mode Group Name Password Active-Passive vexample2.com vHA_pass_2
6 Select OK. The FortiGate unit negotiates to establish an HA cluster. When you select OK you may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and the FGCP changes the MAC address of the FortiGate unit interfaces (see Cluster virtual MAC addresses on page 1905). The MAC addresses of the FortiGate-620B interfaces change to the following virtual MAC addresses: port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-0b port20 interface virtual MAC: 00-09-0f-09-00-0c port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0e port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13
1825
To be able to reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. You can use the get hardware nic (or diagnose hardware deviceinfo nic) CLI command to view the virtual MAC address of any FortiGate unit interface. For example, use the following command to view the port1 interface virtual MAC address (Current_HWaddr) and the port1 permanent MAC address (Permanent_HWaddr): get hardware nic port1 . . . MAC: 00:09:0f:09:00:00 Permanent_HWaddr: 02:09:0f:78:18:c9 . . . 7 Power off the first FortiGate unit. 8 Repeat these steps for the second FortiGate unit. Set the second FortiGate unit host name to:
New Name 620_ha_2
To connect the cluster to the network 1 Connect the port1 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the Internet. 2 Connect the port5 interfaces of 620_ha_1 and 620_ha_2 to switch connected to the Internet. You could use the same switch for the port1 and port5 interfaces. 3 Connect the port2 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the internal network. 4 Connect the port6 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the engineering network. 5 Connect the port3 interfaces of the cluster units together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 6 Connect the port4 interfaces of the cluster units together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 7 Power on the cluster units. The units start and negotiate to choose the primary unit and the subordinate unit. This negotiation occurs with no user intervention. When negotiation is complete you can continue. To configure VDOM settings for the cluster 1 Log into the web-based manager. 2 On the System Information dashboard widget, beside Virtual Domain select Enable. 3 Select OK and then log back into the web-based manager. 4 Go to System > VDOM and select Create New to add a new VDOM.
Name Eng_vdm High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1826
5 Go to System > Network > Interface. 6 Edit the port5 interface, add it to the Eng_vdm VDOM and configure other interface settings:
Alias Virtual Domain IP/Netmask Engineering_external Eng_vdm 172.20.120.143/24
7 Select OK. 8 Edit the port6 interface, add it to the Eng_vdm VDOM and configure other interface settings:
Alias Virtual Domain IP/Netmask Administrative Access Engineering_internal Eng_vdm 10.120.101.100/24 HTTPS, PING, SSH
9 Select OK. To add a default route to each VDOM 1 Go to System > VDOM and Enter the root VDOM. 2 Go to Router > Static. 3 Change the default route.
Destination IP/Mask Gateway Device Distance 0.0.0.0/0.0.0.0 172.20.120.2 port1 10
4 Select Global. 5 Go to System > VDOM and Enter the Eng_vdm VDOM. 6 Go to Router > Static. 7 Change the default route.
Destination IP/Mask Gateway Device Distance 0.0.0.0/0.0.0.0 172.20.120.2 port5 10
To configure VDOM partitioning 1 Go to System > Config > HA. The cluster members shows two cluster units in Virtual Cluster 1. 2 Edit the cluster unit with the Role of MASTER. 3 Change VDOM partitioning to move the Eng_vdm to the Virtual Cluster 2 list. 4 Select OK. 5 Change the Virtual Cluster 1 and Virtual Cluster 2 device priorities for each cluster unit to the following:
1827
Device Priority Host Name 620_ha_1 620_ha_2 Virtual Cluster 1 200 100 Virtual Cluster 2 100 200
You can do this by editing the HA configurations of each cluster unit in the cluster members list and changing device priorities. Since the device priority of Virtual Cluster 1 is highest for 620_ha_1 and since the root VDOM is in Virtual Cluster 1, all traffic for the root VDOM is processed by 620_ha_1. Since the device priority of Virtual Cluster 2 is highest for 620_ha_2 and since the Eng_vdm VDOM is in Virtual Cluster 2, all traffic for the Eng_vdm VDOM is processed by 620_ha_2. To view cluster status and verify the VDOM partitioning configuration 1 Log into the web-based manager. 2 Go to System > Config > HA. The cluster members list should show the following: Virtual Cluster 1 contains the root VDOM. 620_ha_1 is the primary unit (master) for Virtual Cluster 1. Virtual Cluster 2 contains the Eng_vdm VDOM. 620_ha_2 is the primary unit (master) for Virtual Cluster 2.
Figure 218: Example virtual clustering cluster members list
1828
To test the VDOM partitioning configuration You can do the following to confirm that traffic for the root VDOM is processed by 620_ha_1 and traffic for the Eng_vdm is processed by 620_ha_2. 1 Log into the web-based manager by connecting to port2 using IP address 10.11.101.100. You will log into 610_ha_1 because port2 is in the root VDOM and all traffic for this VDOM is processed by 610_ha_1. You can confirm that you have logged into 610_ha_1 by checking the HTML title displayed by your web browser. The title will include the 610_ha_1 host name. Also on the System Information dashboard widget displays the serial number of the 610_ha_1 FortiGate unit. 2 Log into the web-based manager by connecting to port6 using IP address 10.12.101.100. You will log into 610_ha_2 because port6 is in the Eng_vdm VDOM and all traffic for this VDOM is processed by 610_ha_2. 3 Add security policies to the root virtual domain that allows communication from the internal network to the Internet and connect to the Internet from the internal network. 4 Log into the web-based manager and go to Config > System > HA and select View HA Statistics. The statistics display shows more active sessions, total packets, network utilization, and total bytes for the 620_ha_1 unit. 5 Add security policies to the Eng_vdm virtual domain that allow communication from the engineering network to the Internet and connect to the Internet from the engineering network. 6 Log into the web-based manager and go to Config > System > HA and select View HA Statistics. The statistics display shows more active sessions, total packets, network utilization, and total bytes for the 620_ha_2 unit.
Configuring virtual clustering with two VDOMs and VDOM partitioning - CLI
These procedures assume you are starting with two FortiGate-620B units with factory default settings. To configure the FortiGate-620B units for HA operation 1 Power on the first FortiGate-620B unit and log into the CLI. 2 Change the host name for this FortiGate unit: config system global set hostname 620_ha_1 end 3 Configure HA settings. config system ha set mode a-p set group-name vexample2.com set password vHA_pass_2 end
1829
The FortiGate unit negotiates to establish an HA cluster. You may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and the FGCP changes the MAC address of the FortiGate unit interfaces (see Cluster virtual MAC addresses on page 1905). The MAC addresses of the FortiGate-620B interfaces change to the following virtual MAC addresses: port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-0b port20 interface virtual MAC: 00-09-0f-09-00-0c port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0e port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 To be able to reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. You can use the get hardware nic (or diagnose hardware deviceinfo nic) CLI command to view the virtual MAC address of any FortiGate unit interface. For example, use the following command to view the port1 interface virtual MAC address (Current_HWaddr) and the port1 permanent MAC address (Permanent_HWaddr): get hardware nic port1 . . . MAC: 00:09:0f:09:00:00 Permanent_HWaddr: 02:09:0f:78:18:c9 . . . 4 Display the HA configuration (optional). get system ha group-id : 0 group-name : vexample2.com
High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1830
mode : a-p password : * hbdev : "port3" 50 "port4" 50 session-sync-dev : route-ttl : 10 route-wait : 0 route-hold : 10 sync-config : enable encryption : disable authentication : disable hb-interval : 2 hb-lost-threshold : 20 helo-holddown : 20 arps : 5 arps-interval : 8 session-pickup : disable link-failed-signal : disable uninterruptable-upgrade: enable ha-mgmt-status : disable ha-eth-type : 8890 hc-eth-type : 8891 l2ep-eth-type : 8893 subsecond : disable vcluster2 : disable vcluster-id : 1 override : disable priority : 128 monitor : pingserver-monitor-interface: pingserver-failover-threshold: 0 pingserver-flip-timeout: 60 vdom : "root" 5 Power off the first FortiGate unit. 6 Repeat these steps for the second FortiGate unit. Set the other FortiGate unit host name to: config system global set hostname 620_ha_2 end To connect the cluster to the network 1 Connect the port1 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the Internet. 2 Connect the port5 interfaces of 620_ha_1 and 620_ha_2 to switch connected to the Internet. You could use the same switch for port1 and port5. 3 Connect the port2 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the internal network. 4 Connect the port6 interfaces of 620_ha_1 and 620_ha_2 to a switch connected to the engineering network. 5 Connect the port3 interfaces of the cluster units together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch.
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1831
6 Connect the port4 interfaces of the cluster units together. You can use a crossover Ethernet cable or regular Ethernet cables and a switch. 7 Power on the cluster units. The units start and negotiate to choose the primary unit and the subordinate unit. This negotiation occurs with no user intervention. When negotiation is complete you can continue. To configure VDOM settings for the cluster 1 Log into the CLI. 2 Enter the following command to enable multiple VDOMs for the cluster. config system global set vdom-admin enable end 3 Log back into the CLI. 4 Enter the following command to add the Eng_vdm VDOM: config vdom edit Eng_vdm end 5 Edit the port5 interface, add it to the Eng_vdm VDOM and configure other interface settings: config global config system interface edit port5 set vdom Eng_vdm set alias Engineering_external set ip 172.20.12.143/24 next edit port6 set vdom Eng_vdm set alias Engineering_internal set ip 10.120.101.100/24 end end To add a default route to each VDOM 1 Enter the following command to add default routes to the root and Eng_vdm VDOMs. config vdom edit root config router static edit 1 set dst 0.0.0.0/0.0.0.0 set gateway 172.20.120.2 set device port1 end next edit Eng_vdm config router static edit 1 set dst 0.0.0.0/0.0.0.0 set gateway 172.20.120.2
High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1832
set device port5 end end To configure VDOM partitioning 1 Enter the get system ha status command to view cluster unit status: For example, from the 620_ha_2 cluster unit CLI: config global get system ha status Model: 620 Mode: a-p Group: 0 Debug: 0 ses_pickup: disable Master:128 620_ha_2 FG600B3908600825 0 Slave :128 620_ha_1 FG600B3908600705 1 number of vcluster: 1 vcluster 1: work 169.254.0.1 Master:0 FG600B3908600825 Slave :1 FG600B3908600705 This command output shows that VDOM partitioning has not been configured because only virtual cluster 1 is shown. The command output also shows that the 620_ha_2 is the primary unit for the cluster and for virtual cluster 1 because this cluster unit has the highest serial number 2 Enter the following commands to configure VDOM partitioning: config global config system ha set vcluster2 enable config secondary-vcluster set vdom Eng_vdm end end end 3 Enter the get system ha status command to view cluster unit status: For example, from the 620_ha_2 cluster unit CLI: config global get system ha status Model: 620 Mode: a-p Group: 0 Debug: 0 ses_pickup: disable Master:128 620_ha_2 FG600B3908600825 0 Slave :128 620_ha_1 FG600B3908600705 1 number of vcluster: 2 vcluster 1: work 169.254.0.1 Master:0 FG600B3908600825 Slave :1 FG600B3908600705 vcluster 2: work 169.254.0.1 Master:0 FG600B3908600825
1833
Slave :1 FG600B3908600705 This command output shows VDOM partitioning has been configured because both virtual cluster 1 and virtual cluster 2 are visible. However the configuration is not complete because 620_ha_2 is the primary unit for both virtual clusters. The command output shows this because under both vcluster entries the Master entry shows FG600B3908600825, which is the serial number of 620_ha_2. As a result of this configuration, 620_ha_2 processes traffic for both VDOMs and 620_ha_1 does not process any traffic. 4 Change the Virtual Cluster 1 and Virtual Cluster 2 device priorities for each cluster unit so that 620_ha_1 processes virtual cluster 1 traffic and 620_ha_2 processes virtual cluster 2 traffic. Since the root VDOM is in virtual cluster 1 and the Eng_vdm VDOM is in virtual cluster 2 the result of this configuration will be that 620_ha_1 will process all root VDOM traffic and 620_ha_2 will process all Eng_vdm traffic. You make this happen by changing the cluster unit device priorities for each virtual cluster. You could use the following settings:
Device Priority Host Name 620_ha_1 620_ha_2 Virtual Cluster 1 200 100 Virtual Cluster 2 100 200
Since the device priority is not synchronized you can edit the device priorities of each virtual cluster on each FortiGate unit separately. To do this: Log into the CLI and note the FortiGate unit you have actually logged into (for example, by checking the host name displayed in the CLI prompt). Change the virtual cluster 1 and 2 device priorities for this cluster unit. Then use the execute ha manage command to log into the other cluster unit CLI and set its virtual cluster 1 and 2 device priorities. Enter the following commands from the 620_ha_1 cluster unit CLI: config global config system ha set priority 200 config secondary-vcluster set priority 100 end end end Enter the following commands from the 620_ha_2 cluster unit CLI: config global config system ha set priority 100 config secondary-vcluster set priority 200 end end end
Note: The cluster may renegotiate during this step resulting in a temporary loss of connection to the CLI and a temporary service interruption.
1834
Since the device priority of Virtual Cluster 1 is highest for 620_ha_1 and since the root VDOM is in Virtual Cluster 1, all traffic for the root VDOM is processed by 620_ha_1. Since the device priority of Virtual Cluster 2 is highest for 620_ha_2 and since the Eng_vdm VDOM is in Virtual Cluster 2, all traffic for the Eng_vdm VDOM is processed by 620_ha_2. To verify the VDOM partitioning configuration 1 Log into the 620_ha_2 cluster unit CLI and enter the following command: config global get system ha status Model: 620 Mode: a-p Group: 0 Debug: 0 ses_pickup: disable Slave :100 620_ha_2 FG600B3908600825 0 Master:200 620_ha_1 FG600B3908600705 1 number of vcluster: 2 vcluster 1: standby 169.254.0.2 Slave :1 FG600B3908600825 Master:0 FG600B3908600705 vcluster 2: work 169.254.0.1 Master:0 FG600B3908600825 Slave :1 FG600B3908600705 The command output shows that 620_ha_1 is the primary unit for virtual cluster 1 (because the command output show the Master of virtual cluster 1 is the serial number of 620_ha_1) and that 620_ha_2 is the primary unit for virtual cluster 2. If you enter the same command from the 620_ha_1 CLI the same information is displayed but in a different order. The command always displays the status of the cluster unit that you are logged into first. config global get system ha status Model: 620 Mode: a-p Group: 0 Debug: 0 ses_pickup: disable Master:200 620_ha_1 FG600B3908600705 1 Slave :100 620_ha_2 FG600B3908600825 0 number of vcluster: 2 vcluster 1: work 169.254.0.2 Master:0 FG600B3908600705 Slave :1 FG600B3908600825 vcluster 2: standby 169.254.0.1 Slave :1 FG600B3908600705 Master:0 FG600B3908600825
1835
To test the VDOM partitioning configuration You can do the following to confirm that traffic for the root VDOM is processed by 620_ha_1 and traffic for the Eng_vdm is processed by 620_ha_2. These steps assume the cluster is operating correctly. 1 Log into the CLI by connecting to port2 using IP address 10.11.101.100. You will log into 610_ha_1 because port2 is in the root VDOM and all traffic for this VDOM is processed by 610_ha_1. You can confirm that you have logged into 610_ha_1 by checking the host name in the CLI prompt. Also the get system status command displays the status of the 610_ha_1 cluster unit. 2 Log into the web-based manager or CLI by connecting to port6 using IP address 10.12.101.100. You will log into 610_ha_2 because port6 is in the Eng_vdm VDOM and all traffic for this VDOM is processed by 610_ha_2. 3 Add security policies to the root virtual domain that allow communication from the internal network to the Internet and connect to the Internet from the internal network. 4 Log into the web-based manager and go to Config > System > HA and select View HA Statistics. The statistics display shows more active sessions, total packets, network utilization, and total bytes for the 620_ha_1 unit. 5 Add security policies to the Eng_vdm virtual domain that allow communication from the engineering network to the Internet and connect to the Internet from the engineering network. 6 Log into the web-based manager and go to Config > System > HA and select View HA Statistics. The statistics display shows more active sessions, total packets, network utilization, and total bytes for the 620_ha_2 unit.
1836
Table 106: Virtual Cluster 1 configuration Virtual Domains root vdom_1 Hostname FortiGate_A Priority 200 Role Primary Table 107: Virtual Cluster 2 configuration Virtual Domains vdom_2 vdom_3 Hostname FortiGate_A Priority 100 Role Subordinate FortiGate_B Priority 200 Role Primary FortiGate_B Priority 100 Role Subordinate
1 Add an inter-VDOM link called vc1link. config global config system vdom-link edit vc1link end Adding the inter-VDOM link also adds two interfaces. In this example, these interfaces are called vc1link0 and vc1link1. These interfaces appear in all CLI and web-based manager interface lists. These interfaces can only be added to virtual domains in virtual cluster 1. 2 Bind the vc1link0 interface to the root virtual domain and bind the vc1link1 interface to the vdom_1 virtual domain. config system interface edit vc1link0 set vdom root next edit vc1link1 set vdom vdom_1 end
1837
To add an inter-VDOM link to virtual cluster 2 This procedure describes how to create an inter-VDOM link to virtual cluster 2 that results in a link between the vdom_2 and vdom_3 virtual domains. 3 Add an inter-VDOM link called vc2link. config global config system vdom-link edit vc2link set vcluster vcluster2 end Adding the inter-VDOM link also adds two interfaces. In this example, these interfaces are called vc2link0 and vc2link1. These interfaces appear in all CLI and web-based manager interface lists. These interfaces can only be added to virtual domains in virtual cluster 2. 4 Bind the vc2link0 interface to the vdom_2 virtual domain and bind the vc2link1 interface to the vdom_3 virtual domain. config system interface edit vc2link0 set vdom vdom_2 next edit vc2link1 set vdom vdom_3 end
1838
2 To verify that the correct cluster unit is processing traffic for a VDOM: Add security policies to the VDOM that allow communication between the interfaces in the VDOM. Optionally enable traffic logging and other monitoring for that VDOM and these security policies. Start communication sessions that pass traffic through the VDOM. Log into the web-based manager and go to Config > System > HA and select View HA Statistics. Verify that the statistics display shows more active sessions, total packets, network utilization, and total bytes for the unit that should be processing all traffic for the VDOM. Optionally check traffic logging and the Top Sessions Widget for the FortiGate unit that should be processing traffic for that VDOM to verify that the traffic is being processed by this FortiGate unit.
1839
1840
1841
R S w itc h P or t2
Internal Network 10.11.101.0
ou t3 or P P or t4 t3 t2 or P or t4 S w itc P or h P or
High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
t1 R ou te r
1842
62
0_
ha
P or
_1
t1
62
0_
ha
_2
te
R P ed o 10 rt und .1 3 a an 1. n t 10 d In 1. Po te 10 rt rfa 0 4 ce P or t5 P or t6
S w
t5
un P da or n 10 t3 t In . 1 a n te 1. d rfa 10 P c 1. ort e 10 4 0
or t
S w
or
ed
IS L
62
0_
For simplicity these procedures assume that you are starting with two new FortiGate units set to the factory default configuration. However, starting from the default configuration is not a requirement for a successful HA deployment. FortiGate HA is flexible enough to support a successful configuration from many different starting points.
S w 1
IS L
1843
These procedures describe how to configure a cluster operating in NAT/Route mode because NAT/Route is the default FortiGate operating mode. However, the steps are the same if the cluster operates in Transparent mode. You can either switch the cluster units to operate in Transparent mode before beginning these procedures, or you can switch the cluster to operate in Transparent mode after HA is configured and the cluster is connected and operating.
1844
How packets travel from the internal network through the full mesh cluster and to the Internet
If the cluster is operating in active-passive mode and 620_ha_2 is the primary unit, all packets take the following path from the internal network to the internet: 1 From the internal network to Sw4. Sw4 is the active connection to 620_ha_2; which is the primary unit. The primary unit receives all packets. 2 From Sw4 to the 620_ha_2 port3 interface. Active connection between Sw4 and 620_ha_2. Port3 is the active member of the redundant interface. 3 From 620_ha_2 port3 to 620_ha_2 port1. Active connection between 620_ha_2 and Sw2. Port1 is the active member of the redundant interface. 4 From Sw2 to the external router and the Internet.
Heartbeat Interface
5 Select OK. The FortiGate unit negotiates to establish an HA cluster. When you select OK you may temporarily lose connectivity with the FortiGate unit as the HA cluster negotiates and the FGCP changes the MAC address of the FortiGate unit interfaces (see Cluster virtual MAC addresses on page 1905). The MAC addresses of the FortiGate-620B interfaces change to the following virtual MAC addresses: port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1845
port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-0b port20 interface virtual MAC: 00-09-0f-09-00-0c port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0e port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 To be able to reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. You can use the get hardware nic (or diagnose hardware deviceinfo nic) CLI command to view the virtual MAC address of any FortiGate unit interface. For example, use the following command to view the port1 interface virtual MAC address (Current_HWaddr) and the port1 permanent MAC address (Permanent_HWaddr): get hardware nic port1 . . . MAC: 00:09:0f:09:00:00 Permanent_HWaddr: 02:09:0f:78:18:c9 . . . 6 Power off the first FortiGate unit. 7 Repeat these steps for the second FortiGate unit. Set the second FortiGate unit host name to:
New Name 620_ha_2
To connect the cluster to your network 1 Make the following physical network connections for 620_ha_1: Port1 to Sw1 (active) Port2 to Sw2 (inactive) Port3 to Sw3 (active) Port4 to Sw4 (inactive) 2 Make the following physical network connections for 620_ha_2: Port1 to Sw2 (active) Port2 to Sw1 (inactive) Port3 to Sw4 (active) Port4 to Sw3 (inactive)
1846
3 Connect Sw3 and Sw4 to the internal network. 4 Connect Sw1 and Sw2 to the external router. 5 Enable ISL communication between Sw1 and Sw2 and between Sw3 and Sw4. 6 Power on the cluster units. The units start and negotiate to choose the primary unit and the subordinate unit. This negotiation occurs with no user intervention. When negotiation is complete the cluster is ready to be configured for your network. To view cluster status Use the following steps to view the cluster dashboard and cluster members list to confirm that the cluster units are operating as a cluster. 1 View the system dashboard. The System Information dashboard widget shows the Cluster Name (Rexample1.com) and the host names and serial numbers of the Cluster Members. The Unit Operation widget shows multiple cluster units. 2 Go to System > Config > HA to view the cluster members list. The list shows two cluster units, their host names, their roles in the cluster, and their priorities. You can use this list to confirm that the cluster is operating normally. To troubleshoot the cluster configuration If the cluster members list and the dashboard does not display information for both cluster units the FortiGate units are not functioning as a cluster. See Troubleshooting HA clusters on page 1814 to troubleshoot the cluster. To add basic configuration settings and the redundant interfaces Use the following steps to add a few basic configuration settings. 1 Log into the cluster web-based manager. 2 Go to System > Admin > Administrators. 3 For admin, select the Change Password icon 4 Enter and confirm a new password. 5 Select OK. 6 Go to Router > Static and temporarily delete the default route. You cannot add an interface to a redundant interface if any settings (such as the default route) are configured for it. 7 Go to System > Network > Interface and select Create New and configure the redundant interface to connect to the Internet.
Name Type Selected Interfaces IP/Netmask Port1_Port2 Redundant port1, port2 172.20.120.141/24
8 Select OK. 9 Select Create New and configure the redundant interface to connect to the internal network.
1847
10 Select OK. The virtual MAC addresses of the FortiGate-620B interfaces change to the following. Notice that port1 and port2 both have the port1 virtual MAC address and port3 and port4 both have the port3 virtual MAC address: port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-00 (same as port1) port20 interface virtual MAC: 00-09-0f-09-00-0c port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0d (same as port3) port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 11 Go to Router > Static. 12 Add the default route.
Destination IP/Mask Gateway Device Distance 0.0.0.0/0.0.0.0 172.20.120.2 Port1_Port2 10
13 Select OK.
1848
To configure HA port monitoring for the redundant interfaces 1 Go to System > Config > HA. 2 In the cluster members list, edit the primary unit. 3 Configure the following port monitoring for the redundant interfaces:
Port Monitor Port1_Port2 Port3_Port4 Select Select
4 Select OK.
1849
port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0e port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 To be able to reconnect sooner, you can update the ARP table of your management PC by deleting the ARP table entry for the FortiGate unit (or just deleting all arp table entries). You may be able to delete the arp table of your management PC from a command prompt using a command similar to arp -d. You can use the get hardware nic (or diagnose hardware deviceinfo nic) CLI command to view the virtual MAC address of any FortiGate unit interface. For example, use the following command to view the port1 interface virtual MAC address (Current_HWaddr) and the port1 permanent MAC address (Permanent_HWaddr): get hardware nic port1 . . . MAC: 00:09:0f:09:00:00 Permanent_HWaddr: 02:09:0f:78:18:c9 . . . 4 Power off the first FortiGate unit. 5 Repeat these steps for the second FortiGate unit. Set the other FortiGate unit host name to: config system global set hostname 620_ha_2 end To connect the cluster to your network 1 Make the following physical network connections for 620_ha_1: Port1 to Sw1 (active) Port2 to Sw2 (inactive) Port3 to Sw3 (active) Port4 to Sw4 (inactive) 2 Make the following physical network connections for 620_ha_2: Port1 to Sw2 (active) Port2 to Sw1 (inactive) Port3 to Sw4 (active) Port4 to Sw3 (inactive) 3 Connect Sw3 and Sw4 to the internal network. 4 Connect Sw1 and Sw2 to the external router. 5 Enable ISL communication between Sw1 and Sw2 and between Sw3 and Sw4.
1850
6 Power on the cluster units. The units start and negotiate to choose the primary unit and the subordinate unit. This negotiation occurs with no user intervention. When negotiation is complete the cluster is ready to be configured for your network. To view cluster status Use the following steps to view cluster status from the CLI. 1 Log into the CLI. 2 Enter get system status to verify the HA status of the cluster unit that you logged into. If the command output includes Current HA mode: a-a, master, the cluster units are operating as a cluster and you have connected to the primary unit. If the command output includes Current HA mode: a-a, backup, you have connected to a subordinate unit. If the command output includes Current HA mode: standalone the cluster unit is not operating in HA mode. 3 Enter the following command to confirm the HA configuration of the cluster: get system ha status Model: 620 Mode: a-a Group: 0 Debug: 0 ses_pickup: disable Master:128 620_ha_2 FG600B3908600825 0 Slave :128 620_ha_1 FG600B3908600705 1 number of vcluster: 1 vcluster 1: work 169.254.0.1 Master:0 FG600B3908600825 Slave :1 FG600B3908600705 The command output shows both cluster units, their host names, their roles in the cluster, and their priorities. You can use this command to confirm that the cluster is operating normally. For example, if the command shows only one cluster unit then the other unit has left the cluster for some reason. 4 Use the execute ha manage command to connect to the other cluster units CLI and use these commands to verify cluster status. To troubleshoot the cluster configuration If the cluster members list and the dashboard does not display information for both cluster units the FortiGate units are not functioning as a cluster. See Troubleshooting HA clusters on page 1814 to troubleshoot the cluster.
1851
To add basic configuration settings and the redundant interfaces Use the following steps to add a few basic configuration settings. Some steps use the CLI and some the web-based manager. 1 Log into the cluster CLI. 2 Add a password for the admin administrative account. config system admin edit admin set password <password_str> end 3 Temporarily delete the default route. You cannot add an interface to a redundant interface if any settings (such as the default route) are configured for it. config router static delete 1 end 4 Go to System > Network > Interface and select Create New to add the redundant interface to connect to the Internet. 5 Add the redundant interface to connect to the Internet. config sysetem interface edit Port1_Port2 set type redundant set member port1 port2 end 6 Add the redundant interface to connect to the internal network. config sysetem interface edit Port3_Port4 set type redundant set member port3 port4 end The virtual MAC addresses of the FortiGate-620B interfaces change to the following. Note that port1 and port2 both have the port1 virtual MAC address and port3 and port4 both have the port3 virtual MAC address: port1 interface virtual MAC: 00-09-0f-09-00-00 port10 interface virtual MAC: 00-09-0f-09-00-01 port11 interface virtual MAC: 00-09-0f-09-00-02 port12 interface virtual MAC: 00-09-0f-09-00-03 port13 interface virtual MAC: 00-09-0f-09-00-04 port14 interface virtual MAC: 00-09-0f-09-00-05 port15 interface virtual MAC: 00-09-0f-09-00-06 port16 interface virtual MAC: 00-09-0f-09-00-07 port17 interface virtual MAC: 00-09-0f-09-00-08 port18 interface virtual MAC: 00-09-0f-09-00-09 port19 interface virtual MAC: 00-09-0f-09-00-0a port2 interface virtual MAC: 00-09-0f-09-00-00 (same as port1) port20 interface virtual MAC: 00-09-0f-09-00-0c
1852
port3 interface virtual MAC: 00-09-0f-09-00-0d port4 interface virtual MAC: 00-09-0f-09-00-0d (same as port3) port5 interface virtual MAC: 00-09-0f-09-00-0f port6 interface virtual MAC: 00-09-0f-09-00-10 port7 interface virtual MAC: 00-09-0f-09-00-11 port8 interface virtual MAC: 00-09-0f-09-00-12 port9 interface virtual MAC: 00-09-0f-09-00-13 7 Go to Router > Static. 8 Add the default route. config router static edit 1 set dst 0.0.0.0 0.0.0.0 set gateway 172.20.120.2 set device Port1_Port2 end To configure HA port monitoring for the redundant interfaces 1 Enter the following command to configure port monitoring for the redundant interfaces: config system ha set monitor Port1_Port2 Port3_Port4 end
1853
1854
Operating a cluster
With some exceptions, you can operate a cluster in much the same way as you operate a standalone FortiGate unit. This chapter describes those exceptions and also the similarities involved in operating a cluster instead of a standalone FortiGate unit. This chapter contains the following sections: Operating a cluster Operating a virtual cluster Managing individual cluster units using a reserved management interface The primary unit acts as a router for subordinate unit management traffic Clusters and FortiGuard services Clusters and logging Clusters and SNMP Clusters and file quarantine Cluster members list Virtual cluster members list Viewing HA statistics Changing the HA configuration of an operating cluster Changing the HA configuration of an operating virtual cluster Changing the subordinate unit host name and device priority Upgrading cluster firmware Downgrading cluster firmware Backing up and restoring the cluster configuration Monitoring cluster units for failover Viewing cluster status from the CLI Disconnecting a cluster unit from a cluster Adding a disconnected FortiGate unit back to its cluster
Operating a cluster
The configurations of all of the FortiGate units in a cluster are synchronized so that the cluster units can simulate a single FortiGate unit. Because of this synchronization, you manage the HA cluster instead of managing the individual cluster units. You manage the cluster by connecting to the web-based manager using any cluster interface configured for HTTPS or HTTP administrative access. You can also manage the cluster by connecting to the CLI using any cluster interface configured for SSH or telnet administrative access. The cluster web-based manager dashboard displays the cluster name, the host name and serial number of each cluster member, and also shows the role of each unit in the cluster. The roles can be master (primary unit) and slave (subordinate units). The dashboard also displays a cluster unit front panel illustration.
1855
Operating a cluster
You can also go to System > Config > HA to view the cluster members list. This includes status information for each cluster unit. You can also use the cluster members list for a number of cluster management functions including changing the HA configuration of an operating cluster, changing the host name and device priority of a subordinate unit, and disconnecting a cluster unit from a cluster. See Cluster members list on page 1876. You can use log messages to view information about the status of the cluster. See Viewing and managing log messages for individual cluster units on page 1864. You can use SNMP to manage the cluster by configuring a cluster interface for SNMP administrative access. Using an SNMP manager you can get cluster configuration information and receive traps. You can configure a reserved management interface to manage individual cluster units. You can use this interface to access the web-based manager or CLI and to configure SNMP management for individual cluster units. See Managing individual cluster units using a reserved management interface on page 1857. You can manage individual cluster units by using SSH, telnet, or the CLI console on the web-based manager dashboard to connect to the CLI of the cluster. From the CLI you can use the execute ha manage command to connect to the CLI of any unit in the cluster. You can also manage individual cluster units by using a null-modem cable to connect to any cluster unit CLI. From there you can use the execute ha manage command to connect to the CLI of each unit in the cluster.
1856
Operating a cluster
The configuration and maintenance options that you have when you connect to a virtual cluster web-based manager or CLI depend on the virtual domain that you connect to and the administrator account that you use to connect. If you connect to a cluster as the administrator of a virtual domain, you connect directly to the virtual domain. Since HA virtual clustering is a global configuration, virtual domain administrators cannot see HA configuration options. However, virtual domain administrators see the host name of the cluster unit that they are connecting to on the web browser title bar or CLI prompt. This host name is the host name of the primary unit for the virtual domain. Also, when viewing log messages by going to Log & Report > Log Access virtual domain administrator can select to view log messages for either of the cluster units. If you connect to a virtual cluster as the admin administrator you connect to the global web-based manager or CLI. Even so, you are connecting to an interface and to the virtual domain that the interface has been added to. The virtual domain that you connect to does not make a difference for most configuration and maintenance operations. However, there are a few exceptions. You connect to the FortiGate unit that functions as the primary unit for the virtual domain. So the host name displayed on the web browser title bar and on the CLI is the host name of this primary unit.
1857
Operating a cluster
The reserved management interface and IP address should not be used for managing a cluster using FortiManager. To correctly manage a FortiGate HA cluster with FortiManager use the IP address of one of the cluster unit interfaces. If you use a reserved management interface, FortiManager will assume it is connected to a single FortiGate unit instead of a cluster. If you enable SNMP administrative access for the reserved management interface you can use SNMP to monitor each cluster unit using the reserved management interface IP address. To monitor each cluster unit using SNMP, just add the IP address of each cluster units reserved management interface to the SNMP server configuration. You must also enable direct management of cluster members in the cluster SNMP configuration. If you enable HTTPS or HTTP administrative access for the reserved management interfaces you can connect to the web-based manager of each cluster unit. Any configuration changes made to any of the cluster units is automatically synchronized to all cluster units. From the subordinate units the web-based manager has the same features as the primary unit except that unit-specific information is displayed for the subordinate unit, for example: The Dashboard System Information widget displays the subordinate unit serial number but also displays the same information about the cluster as the primary unit On the Cluster members list (go to System > Config > HA) you can change the HA configuration of the subordinate unit that you are logged into. For the primary unit and other subordinate units you can change only the host name and device priority. Log Access displays the logs of the subordinate that you are logged into fist, You use the HA Cluster list to view the log messages of other cluster units including the primary unit.
If you enable SSH or TELNET administrative access for the reserved management interfaces you can connect to the CLI of each cluster unit. The CLI prompt contains the host name of the cluster unit that you have connected to. Any configuration changes made to any of the cluster units is automatically synchronized to all cluster units. You can also use the execute ha manage command to connect to other cluster unit CLIs. The reserved management interface is available in NAT/Route and in Transparent mode. It is also available if the cluster is operating with multiple VDOMs. In Transparent mode you cannot normally add an IP address to an interface. However, you can add an IP address to the reserved management interface.
Configuring the reserved management interface and SNMP remote management of individual cluster units
This example describes how to configure SNMP remote management of individual cluster units using the HA reserved management interface. The configuration consists of two FortiGate-620B units already operating as a cluster. In the example, the port8 interface of each cluster unit is connected to the internal network using the switch and configured as the reserved management interface.
1858
Operating a cluster
S w itc h
10 P 1. ort 10 2 0
.1 1.
S w i tc h
P 17 ort 2. 1 20 .1 2 R ou te r
Internal Network
10
To configure the reserved management interface - web-based manager 1 Go to System > Config > HA. 2 Edit the primary unit. 3 Select Reserve Management Port for Cluster Member and select port8. 4 Select OK. To configure the reserved management interface - CLI From the CLI you can also configure a default route that is only used by the reserved management interface. 1 Log into the CLI of any cluster unit. 2 Enter the following command to enable the reserved management interface, set port8 as the reserved interface, and add a default route of 10.11.101.100 for the reserved management interface. config system ha set ha-mgmt-status enable set ha-mgmt-interface port8 set ha-mgmt-interface-gateway 10.11.101.100 end The reserved management interface default route is not synchronized to other cluster units.
or
t8
:1
0.
0 P (S ort u b 8: o r 10 d i .1 n a 1. 0. 14 t e 10 1 U 1 .2 ni 0 t) 2
P 10 ort .1 2 1. 10
1.
10
1859
Operating a cluster
To change the primary unit reserved management interface configuration web-based manager You can change the IP address of the primary unit reserved management interface from the primary unit web-based manager. Configuration changes to the reserved management interface are not synchronized to other cluster units. 1 From a PC on the internal network, browse to http://10.11.101.100 and log into the cluster web-based manager. This logs you into the primary unit web-based manager. You can identify the primary unit from its serial number or host name that appears on the System Information dashboard widget. 2 Go to System > Network > Interface and edit the port8 interface as follows:
Alias IP/Netmask Administrative Access primary_reserved 10.11.101.101/24 Ping, SSH, HTTPS, SNMP
3 Select OK. You can now log into the primary unit web-based manager by browsing to https://10.11.101.101. You can also log into this primary unit CLI by using an SSH client to connect to 10.11.101.101. To change subordinate unit reserved management interface configuration - CLI At this point you cannot connect to the subordinate unit reserved management interface because it does not have an IP address. Instead, this procedure describes connecting to the primary unit CLI and using the execute ha manage command to connect to subordinate unit CLI to change the port8 interface. You can also use a serial connection to the cluster unit CLI. Configuration changes to the reserved management interface are not synchronized to other cluster units. 1 Connect to the primary unit CLI and use the execute ha manage command to connect to a subordinate unit CLI. You can identify the subordinate unit from is serial number or host name. The host name appears in the CLI prompt. 2 Enter the following command to change the port8 IP address to 10.11.101.102 and set management access to HTTPS, ping, SSH, and SNMP. config system interface edit port8 set ip 10.11.101.102/24 set allowaccess https ping ssh snmp end You can now log into the subordinate unit web-based manager by browsing to https://10.11.101.102. You can also log into this subordinate unit CLI by using an SSH client to connect to 10.11.101.102.
1860
Operating a cluster
To configure the cluster for SNMP management using the reserved management interfaces - CLI This procedure describes how to configure the cluster to allow the SNMP server to get status information from the primary unit and the subordinate unit. The SNMP configuration is synchronized to all cluster units. To support using the reserved management interfaces, you must add at least one HA direct management host to an SNMP community. If your SNMP configuration includes SNMP users with user names and passwords you must also enable HA direct management for SNMP users. 1 Enter the following command to add an SNMP community called Community and add a host to the community for the reserved management interface of each cluster unit. The host includes the IP address of the SNMP server (10.11.101.20). config system snmp community edit 1 set name Community config hosts edit 1 set ha-direct enable set ip 10.11.101.20 end end 2 Enter the following command to add an SNMP user for the reserved management interface. config system snmp user edit 1 set ha-direct enable set notify-hosts 10.11.101.20 end Configure other settings as required. To get CPU, memory, and network usage of each cluster unit using the reserved management IP addresses From the command line of an SNMP manager, you can use the following SNMP commands to get CPU, memory and network usage information for each cluster unit. In the examples, the community name is Community. The commands use the MIB field names and OIDs listed in Table 109 on page 1872. Enter the following commands to get CPU, memory and network usage information for the primary unit with reserved management IP address 10.11.101.101 using the MIB fields: snmpget -v2c -c Community 10.11.101.101 fgHaStatsCpuUsage snmpget -v2c -c Community 10.11.101.101 fgHaStatsMemUsage snmpget -v2c -c Community 10.11.101.101 fgHaStatsNetUsage Enter the following commands to get CPU, memory and network usage information for the primary unit with reserved management IP address 10.11.101.101 using the OIDs: snmpget -v2c -c Community 10.11.101.101 1.3.6.1.4.1.12356.101.13.2.1.1.3.1 snmpget -v2c -c Community 10.11.101.101 1.3.6.1.4.1.12356.101.13.2.1.1.4.1 snmpget -v2c -c Community 10.11.101.101 1.3.6.1.4.1.12356.101.13.2.1.1.5.1
1861
The primary unit acts as a router for subordinate unit management traffic
Operating a cluster
Enter the following commands to get CPU, memory and network usage information for the subordinate unit with reserved management IP address 10.11.101.102 using the MIB fields: snmpget -v2c -c Community 10.11.101.102 fgHaStatsCpuUsage snmpget -v2c -c Community 10.11.101.102 fgHaStatsMemUsage snmpget -v2c -c Community 10.11.101.102 fgHaStatsNetUsage Enter the following commands to get CPU, memory and network usage information for the subordinate unit with reserved management IP address 10.11.101.102 using the OIDs: snmpget -v2c -c Community 10.11.101.102 1.3.6.1.4.1.12356.101.13.2.1.1.3.1 snmpget -v2c -c Community 10.11.101.102 1.3.6.1.4.1.12356.101.13.2.1.1.4.1 snmpget -v2c -c Community 10.11.101.102 1.3.6.1.4.1.12356.101.13.2.1.1.5.1
The primary unit acts as a router for subordinate unit management traffic
HA uses routing and inter-VDOM links to route subordinate unit management traffic through the primary unit to the network. Similar to a standalone FortiGate unit, subordinate units may generate their own management traffic, including: DNS queries. FortiGuard Web Filtering rating requests. Log messages to be sent to a FortiAnalyzer unit, to a syslog server, or to the FortiGuard Analysis and Management Service. Log file uploads to a FortiAnalyzer unit. Quarantine file uploads to a FortiAnalyzer unit. SNMP traps. Communication with remote authentication servers (RADIUS, LDAP, TACACS+ and so on)
Subordinate units send this management traffic over the HA heartbeat link to the primary unit. The primary unit forwards the management traffic to its destination. The primary unit also routes replies back to the subordinate unit in the same way. HA uses a hidden VDOM called vsys_ha for HA operations. The vsys_ha VDOM includes the HA heartbeat interfaces, and all communication over the HA heartbeat link goes through the vsys_ha VDOM. To provide communication from a subordinate unit to the network, HA adds hidden inter-VDOM links between the primary unit management VDOM and the primary unit vsys_ha VDOM. By default, root is the management VDOM. Management traffic from the subordinate unit originates in the subordinate unit vsys_ha VDOM. The vsys_ha VDOM routes the management traffic over the HA heartbeat link to the primary unit vsys_ha VDOM. This management traffic is then routed to the primary unit management VDOM and from there out onto the network. DNS queries and FortiGuard Web Filtering and Email Filter requests are still handled by the HA proxy so the primary unit and subordinate units share the same DNS query cache and the same FortiGuard Web Filtering and Email Filter cache. In a virtual clustering configuration, the cluster unit that is the primary unit for the management virtual domain maintains the FortiGuard Web Filtering, Email Filtering, and DNS query cache.
1862
Operating a cluster
vsys_ha
169.254.0.1 HA link
169.254.0.2
vsys_ha
Network
Primary unit
Subordinate unit
1863
Operating a cluster
Because the subordinate units process traffic, they may also be making FortiGuard Web Filtering and Email Filter requests. The primary unit receives all such requests from the subordinate units and relays them to the FDN and then relays the FDN responses back to the subordinate units. The FortiGuard Web Filtering and Email Filtering URL caches are maintained on the primary unit. The primary unit caches are used for primary and subordinate unit requests.
1864
Operating a cluster
Standby
HA log Event log messages also indicate the virtual cluster that the cluster unit is operating in as well as the member number of the unit in the cluster. If virtual domains are not enabled, all clusters unit are always operating in virtual cluster 1. If virtual domains are enabled, a cluster unit may be operating in virtual cluster 1 or virtual cluster 2. The member number indicates the position of the cluster unit in the cluster members list. Member 0 is the primary unit. Member 1 is the first subordinate unit, member 2 is the second subordinate unit, and so on. The following log message indicates that the cluster unit with host name 5005_ha_2 and serial number FG5A253E06500088 has become the primary unit because it is operating in the work state as member 0. 2010-01-13 13:45:32 log_id=0105037892 type=event subtype=ha pri=notice vd="root" msg="Virtual cluster's member state moved" vcluster=1 vcluster_state=work vcluster_member=0 hostname=5005_ha_2 sn=FG5A253E06500088 The following log message indicates that the cluster unit with host name 5005_ha_1 and serial number FG5A253E06500088 has become the first subordinate unit in an activepassive cluster because it is operating in the standby state as member 1. 2010-01-13 14:28:39 log_id=0105037892 type=event subtype=ha pri=notice vd="root" msg="Virtual cluster's member state moved" vcluster=1 vcluster_state=standby vcluster_member=1 hostname=5005_ha_2 sn=FG5A253E06500088 The following log message indicates that the cluster unit with host name 5005_ha_1 and serial number FG5A253E07600124 has become the first subordinate unit in an activeactive cluster because it is operating in the work state as member 1. 2010-01-13 14:23:58 log_id=0105037892 type=event subtype=ha pri=notice vd="root" msg="Virtual cluster's member state moved" vcluster=1 vcluster_state=work vcluster_member=1 hostname=5005_ha_1 sn=FG5A253E07600124 The following log message indicates that the FortiGate unit was disconnected from a cluster. The message shows that the cluster unit was disconnected over the telnet link between cluster units and the HA mode was changed from active-active to standalone. 2010-01-13 13:45:09 log_id=0104032140 type=event subtype=admin vd=root pri=notice user="FGT_ha_admin" ui=telnet(169.254.0.2) old=A-A new=standalone msg="User FGT_ha_admin changed HA mode from A-A to standalone"
1865
Operating a cluster
HA log messages
See the FortiGate Log Message Reference for a listing of and descriptions of the HA log messages.
1866
Operating a cluster
1867
Operating a cluster
1868
Operating a cluster
When incremental synchronization makes the same change to a subordinate unit the subordinate unit writes the following log message: 2009-11-13 09:11:45 log_id=0104032126 type=event subtype=admin vd=root pri=notice user="admin" ui=ha_daemon seq=1 sintf="external" dintf="internal" saddr="all" daddr="all" act=accept nat=no iptype=ipv4 schd="always" svr="ANY" log=no idbased=no msg="User admin added IPv4 firewall policy 3 from GUI(172.20.120.11)" Notice that the two messages are identical (including the log IDs) except that on the subordinate unit the ui (user interface) is ha_daemon. ha_daemon is the name of the user interface used by the HA synchronization process to make incremental synchronization configuration changes.
Fortigate HA message "HA master heartbeat interface <intf_name> lost neighbor information"
The following HA log messages may be recorded by an operating cluster: 2009-02-16 11:06:34 device_id=FG2001111111 log_id=0105035001 type=event subtype=ha pri=critical vd=root msg="HA slave heartbeat interface internal lost neighbor information" 2009-02-16 11:06:40 device_id=FG2001111111 log_id=0105035001 type=event subtype=ha pri=notice vd=root msg="Virtual cluster 1 of group 0 detected new joined HA member" 2009-02-16 11:06:40 device_id=FG2001111111 log_id=0105035001 type=event subtype=ha pri=notice vd=root msg="HA master heartbeat interface internal get peer information"
1869
Operating a cluster
These log messages indicate that the cluster units could not connect to each other over the HA heartbeat link for the period of time that is given by hb-interval x hb-lost-threshold, which is 1.2 seconds with the default values. To diagnose this problem 1 Check all heartbeat interface connections including cables and switches to make sure they are connected and operating normally. 2 Use the following commands to display the status of the heartbeat interfaces. get hardware nic <heartbeat_interface_name> diagnose hardware deviceinfo nic <heartbeat_interface_name> The status information may indicate the interface status and link status and also indicate if a large number of errors have been detected. 3 If the log message only appear during peak traffic times, increase the tolerance for missed HA heartbeat packets by using the following commands to increase the lost heartbeat threshold and heartbeat interval: config system ha set hb-lost-threshold 12 set hb-interval 4 end These settings multiply by 4 the loss detection interval. You can use higher values as well. 4 Optionally disable session-pickup to reduce the processing load on the heartbeat interfaces. 5 Instead of disabling session-pickup you can enable session-pickup-delay to reduce the number of sessions that are synchronized. With this option enabled only sessions that are active for more than 30 seconds are synchronized. It may be useful to monitor CPU and memory usage to check for low memory and high CPU usage. You can configure event logging to monitor CPU and memory usage. You can also enable the CPU over usage and memory low SNMP events. Once this monitoring is in place, try and determine if there have been any changes in the network or an increase of traffic recently that could be the cause. Check to see if the problem happens frequently and if so what the pattern is. To monitor the CPU of the cluster units and troubleshoot further, use the following procedure and commands: get system performance status get sys performance top 2 diagnose sys top 2 These commands repeated at frequent intervals will show the activity of the CPU and the number of sessions. Search the Fortinet Knowledge Base for articles about monitoring CPU and Memory usage. If the problem persists, gather the following information (a console connection might be necessary if connectivity is lost) and provide it to Technical Support when opening a ticket: Debug log from the web-based manager: System > Maintenance > Advanced > debug log CLI command output: diag sys top 2 (keep it running for 20 seconds) get sys perf status (repeat this command multiple times to get good samples)
High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1870
Operating a cluster
get sys ha status diag sys ha status diag sys ha dump all diag sys ha dump 2 diag sys ha dump 3 diag netlink dev list diag hardware dev nic <Heartbeat port Name> execute log filter category event execute log display
1871
Operating a cluster
Table 109: SNMP field names and OIDs MIB field fgHaSystemMode fgHaGroupId fgHaPriority fgHaOverride fgHaAutoSync OID .1.3.6.1.4.1.12356.101.13.1.1.0 .1.3.6.1.4.1.12356.101.13.1.2.0 .1.3.6.1.4.1.12356.101.13.1.3.0 .1.3.6.1.4.1.12356.101.13.1.4.0 .1.3.6.1.4.1.12356.101.13.1.5.0 Description HA mode (standalone, a-a, or a-p) The HA priority of the cluster unit. Default 128. The HA priority of the cluster unit. Default 128. Whether HA override is disabled or enabled for the cluster unit. Whether automatic HA synchronization is disabled or enabled. The HA load balancing schedule. Set to none unless operating in a-p mode. The HA group name. The cluster index of the cluster unit. 1 for the primary unit, 2 to x for the subordinate units. The serial number of the cluster unit. The cluster units current CPU usage. The cluster units current Memory usage. The cluster units current Network bandwidth usage. The cluster units current session count. The cluster units current packet count. The cluster units current byte count. The number of attacks reported by the IPS for the cluster unit.
fgHaSchedule
.1.3.6.1.4.1.12356.101.13.1.6.0
fgHaGroupName fgHaStatsIndex
.1.3.6.1.4.1.12356.101.13.1.7.0 .1.3.6.1.4.1.12356.101.13.2.1.1.1.1
fgHaStatsSerial fgHaStatsCpuUsage
.1.3.6.1.4.1.12356.101.13.2.1.1.2.1 .1.3.6.1.4.1.12356.101.13.2.1.1.3.1
fgHaStatsMemUsage .1.3.6.1.4.1.12356.101.13.2.1.1.4.1 fgHaStatsNetUsage fgHaStatsSesCount fgHaStatsPktCount fgHaStatsByteCount fgHaStatsIdsCount fgHaStatsAvCount .1.3.6.1.4.1.12356.101.13.2.1.1.5.1 .1.3.6.1.4.1.12356.101.13.2.1.1.6.1 .1.3.6.1.4.1.12356.101.13.2.1.1.7.1 .1.3.6.1.4.1.12356.101.13.2.1.1.8.1 .1.3.6.1.4.1.12356.101.13.2.1.1.9.1
.1.3.6.1.4.1.12356.101.13.2.1.1.10.1 The number of viruses reported by the antivirus system for the cluster unit. .1.3.6.1.4.1.12356.101.13.2.1.1.11.1 The hostname of the cluster unit.
fgHaStatsHostname
To get the HA priority for the primary unit The following SNMP get command gets the HA priority for the primary unit. The community name is public. The IP address of the cluster interface configured for SNMP management access is 10.10.10.1. The HA priority MIB field is fgHaPriority and the OID for this MIB field is 1.3.6.1.4.1.12356.101.13.1.3.0 The first command uses the MIB field name and the second uses the OID: snmpget -v2c -c public 10.10.10.1 fgHaPriority snmpget -v2c -c public 10.10.10.1 1.3.6.1.4.1.12356.101.13.1.3.0
1872
Operating a cluster
1873
Operating a cluster
1874
Operating a cluster
All cluster units can also quarantine files to a FortiAnalyzer unit. When you configure a FortiAnalyzer unit to receive quarantine files from a cluster, you should add each cluster unit to the FortiAnalyzer device configuration so that the FortiAnalyzer unit can receive quarantine files from all cluster units.
1875
Operating a cluster
View HA Statistics
Display the serial number, status, and monitor information for each cluster unit. See Viewing HA statistics on page 1878.
Up and down arrows Change the order in which cluster members are listed. The operation of the cluster or of the units in the cluster are not affected. All that changes is the order in which cluster units are displayed on the cluster members list. Cluster member Illustrations of the front panels of the cluster units. If the network jack for an interface is shaded green, the interface is connected. Pause the mouse pointer over each illustration to view the cluster unit host name, serial number, and how long the unit has been operating (up time).a The list of monitored interfaces is also displayed. The host name of the FortiGate unit. The default host name of the FortiGate unit is the FortiGate unit serial number. To change the primary unit host name, go to the system dashboard and select Change beside the current host name int System Information widget. To change a subordinate unit host name, from the cluster members list select the edit icon for a subordinate unit. The status or role of the cluster unit in the cluster. Role is MASTER for the primary (or master) unit Role is SLAVE for all subordinate (or backup) cluster units
Hostname
Role
1876
Operating a cluster
Priority
The device priority of the cluster unit. Each cluster unit can have a different device priority. During HA negotiation, the unit with the highest device priority becomes the primary unit. The device priority range is 0 to 255. The default device priority is 128. Disconnect the cluster unit from the cluster. See Disconnecting a cluster unit from a cluster on page 1892. Select Edit to change a cluster unit HA configuration. For a primary unit, select Edit to change the cluster HA configuration. You can also change the device priority of the primary unit. For a primary unit in a virtual cluster, select Edit to change the virtual cluster HA configuration. You can also change the virtual cluster 1 and virtual cluster 2 device priority of this cluster unit. For a subordinate unit, select Edit to change the subordinate unit host name and device priority. See Changing the subordinate unit host name and device priority on page 1880. For a subordinate unit in a virtual cluster, select Edit to change the subordinate unit host name. In addition you can change the device priority for the subordinate unit for the selected virtual cluster.
Download debug log Download an encrypted debug log to a file. You can send this debug log file to Fortinet Technical Support to help diagnose problems with the cluster or with individual cluster units.
a.In this case, with the mouse position showing a pop-up, it would be worth showing the mouse cursor itself in the screen capture.
1877
Viewing HA statistics
Operating a cluster
Download Debug Log Up and Down Arrows Edit Disconnect from Cluster
The fields and functions of the virtual cluster members list are the same as the fields and functions described in Cluster members list on page 1876 with the following exceptions. When you select the edit icon for a primary unit in a virtual cluster, you can change the virtual cluster 1 and virtual cluster 2 device priority of this cluster unit and you can edit the VDOM partitioning configuration of the cluster. When you select the edit icon for a subordinate unit in a virtual cluster, you can change the device priority for the subordinate unit for the selected virtual cluster.
Also, the HA cluster members list changes depending on the cluster unit. For the virtual cluster described in the Example: virtual clustering with two VDOMs and VDOM partitioning on page 1823 if you connect to port5 using you are connecting to 620b_ha_2 (620b_ha_2 is displayed on the web browser title bar or in the CLI prompt). If you connect to port1 you are connecting to 620b_ha_1 (620b_ha_2 is displayed on the web browser title bar or in the CLI prompt).
Viewing HA statistics
From the cluster members list you can select View HA statistics to display the serial number, status, and monitor information for each cluster unit. To view HA statistics, go to System > Config > HA and select View HA Statistics.
1878
Operating a cluster
Refresh every
Select to control how often the web-based manager updates the HA statistics display. Use the serial number ID to identify each FortiGate unit in the cluster. The cluster ID matches the FortiGate unit serial number. Indicates the status of each cluster unit. A green check mark indicates that the cluster unit is operating normally. A red X indicates that the cluster unit cannot communicate with the primary unit. The time in days, hours, minutes, and seconds since the cluster unit was last started. Displays system status information for each cluster unit. The current CPU status of each cluster unit. The web-based manager displays CPU usage for core processes only. CPU usage for management processes (for example, for HTTPS connections to the web-based manager) is excluded. The current memory status of each cluster unit. The web-based manager displays memory usage for core processes only. Memory usage for management processes (for example, for HTTPS connections to the web-based manager) is excluded. The number of communications sessions being processed by the cluster unit. The number of packets that have been processed by the cluster unit since it last started up. The number of viruses detected by the cluster unit. The number of bytes that have been processed by the cluster unit since it last started up.
Back to HA monitor Close the HA statistics list and return to the cluster members list. Serial No. Status
Memory Usage
Network Utilization The total network bandwidth being used by all of the cluster unit interfaces.
Intrusion Detected The number of intrusions or attacks detected by Intrusion Protection running on the cluster unit.
1879
Operating a cluster
You can use the HA configuration page to check and fine tune the configuration of the cluster after the cluster is up and running. For example, if you connect or disconnect cluster interfaces you may want to change the Port Monitor configuration. Any changes you make on this page, with the exception of changes to the device priority, are first made to the primary unit configuration and then synchronized to the subordinate units. Changing the device priority only affects the primary unit.
1880
Operating a cluster
To upgrade the firmware without interrupting communication through the cluster, the cluster goes through a series of steps that involve first upgrading the firmware running on the subordinate units, then making one of the subordinate units the primary unit, and finally upgrading the firmware on the former primary unit. These steps are transparent to the user and the network, but depending upon your HA configuration may result in the cluster selecting a new primary unit. The following sequence describes in detail the steps the cluster goes through during a firmware upgrade and how different HA configuration settings may affect the outcome. 1 The administrator uploads a new firmware image from the web-based manager or CLI. 2 If the cluster is operating in active-active mode load balancing is turned off. 3 The cluster upgrades the firmware running on all of the subordinate units. 4 Once the subordinate units have been upgraded, a new primary unit is selected. This primary unit will be running the new upgraded firmware. 5 The cluster now upgrades the firmware of the former primary unit. If the age of the new primary unit is more than 300 seconds (5 minutes) greater than the age of all other cluster units, the new primary unit continues to operate as the primary unit. This is the intended behavior but does not usually occur because the age difference of the cluster units is usually less than the cluster age difference margin of 300 seconds. So instead, the cluster negotiates again to select a primary unit as described in Primary unit selection on page 1738. You can keep the cluster from negotiating again by reducing the cluster age difference margin using the ha-uptime-diff-margin option. However, you should be cautious when reducing the age or other problems may occur. For information about the cluster age difference margin, see Cluster age difference margin (grace period) on page 1740). For more information about changing the cluster age margin, see Changing the cluster age difference margin on page 1741. 6 If the cluster is operating in active-active mode, load balancing is turned back on.
1881
Operating a cluster
uninterruptable-upgrade is enabled by default. If you disable uninterruptableupgrade the cluster still upgrades the firmware on all cluster units, but all cluster units are upgraded at once; which takes less time but interrupts communication through the cluster.
1882
Operating a cluster
This example, describes separating each unit from the cluster and downgrading the firmware for the standalone FortiGate units. There are several ways you could disconnect units from the cluster. This example describes using the disconnect from cluster function described in Disconnecting a cluster unit from a cluster on page 1892. 1 Go to System > Maintenance > Backup & Restore and backup the cluster configuration. From the CLI use execute backup config. 2 Go to System > Config > HA and for 620_ha_1 select Disconnect from cluster icon. 3 Select the port2 interface and enter an IP address and netmask of 10.11.101.101/24 and select OK. From the CLI you can enter the following command (FG600B3908600705 is the serial number of the cluster unit) to be able to manage the standalone FortiGate unit by connecting to the port2 interface with IP address and netmask 10.11.101.101/24. execute ha disconnect FG600B3908600705 port2 10.11.101.101/24 After 620_ha_1 is disconnected, 620_ha_2 continues processing traffic. 4 Connect to the 620_ha_1 web-based manager or CLI using IP address 10.11.101.101/24 and follow normal procedures to downgrade standalone FortiGate unit firmware. 5 When the downgrade is complete confirm that the configuration of 620_ha_1 is correct. 6 Set the HA mode of 620_ha_2 to Standalone and follow normal procedures to downgrade standalone FortiGate unit firmware. Network communication will be interrupted for a short time during the downgrade. 7 When the downgrade is complete confirm that the configuration of 620_ha_2 is correct. 8 Set the HA mode of 620_ha_2 to Active-Passive or the required HA mode. 9 Set the HA mode of 620_ha_1 to the same mode as 620_ha_2. If you have not otherwise changed the HA settings of the cluster units and if the firmware downgrades have not affected the configurations the units should negotiate and form cluster running the downgraded firmware.
To backup these configuration settings for each cluster unit you must log into each cluster unit and backup its configuration. If you need to restore the configuration of the cluster including the configuration settings that are not synchronized you should first restore the configuration of the primary unit and then restore the configuration of each cluster unit. Alternatively you could log into each cluster unit and manually add the configuration settings that were not restored.
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1883
Operating a cluster
If a subordinate unit fails, the cluster continues to function normally. Failure of a subordinate unit results in the following: If event logging is enabled and HA activity event is selected, the primary unit records log messages that show that a subordinate has been removed from the cluster. See Example log messages on page 1866 for some example message sequences. If alert email is configured to send email for HA activity events, the new primary unit sends an alert email containing the log message recorded by the event log. The cluster contains fewer FortiGate units. The failed unit no longer appears on the Cluster Members list.
1884
Operating a cluster
For a virtual cluster configuration, the get system ha status command displays information about how the cluster unit that you have logged into is operating in virtual cluster 1 and virtual cluster 2. For example, if you connect to the cluster unit that is the primary unit for virtual cluster 1 and the subordinate unit for virtual cluster 2, the output of the get system ha status command shows virtual cluster 1 in the work state and virtual cluster 2 in the standby state. The get system ha status command also displays additional information about virtual cluster 1 and virtual cluster 2. The command display includes the following fields.
Fields Model Mode Group Debug ses_pickup load balance schedule Master Slave Description The FortiGate model number. The HA mode of the cluster: a-a or a-p. The group ID of the cluster. The debug status of the cluster. The status of session pickup: enable or disable. The status of the load-balance-all keyword: enable or disable. Relevant to active-active clusters only. The active-active load balancing schedule. Relevant to active-active clusters only. Master displays the device priority, host name, serial number, and cluster index of the primary (or master) unit. Slave displays the device priority, host name, serial number, and cluster index of the subordinate (or slave, or backup) unit or units. The list of cluster units changes depending on how you log into the CLI. Usually you would use SSH or telnet to log into the primary unit CLI. In this case the primary unit would be at the top the list followed by the other cluster units. If you use execute ha manage or a console connection to log into a subordinate unit CLI, and then enter get system ha status the subordinate unit that you have logged into appears at the top of the list of cluster units.
number of vcluster The number of virtual clusters. If virtual domains are not enabled, the cluster has one virtual cluster. If virtual domains are enabled the cluster has two virtual clusters.
1885
Operating a cluster
Description The HA state (hello, work, or standby) and HA heartbeat IP address of the cluster unit that you have logged into in virtual cluster 1. If virtual domains are not enabled, vcluster 1 displays information for the cluster. If virtual domains are enabled, vcluster 1 displays information for virtual cluster 1. The HA heartbeat IP address is 169.254.0.2 if you are logged into the primary unit of virtual cluster 1 and 169.254.0.1 if you are logged into a subordinate unit of virtual cluster 1. vcluster 1 also lists the primary unit (master) and subordinate units (slave) in virtual cluster 1. The list includes the cluster index and serial number of each cluster unit in virtual cluster 1. The cluster unit that you have logged into is at the top of the list. If virtual domains are not enabled and you connect to the primary unit CLI, the HA state of the cluster unit in virtual cluster 1 is work. The display lists the cluster units starting with the primary unit. If virtual domains are not enabled and you connect to a subordinate unit CLI, the HA state of the cluster unit in virtual cluster 1 is standby. The display lists the cluster units starting with the subordinate unit that you have logged into. If virtual domains are enabled and you connect to the virtual cluster 1 primary unit CLI, the HA state of the cluster unit in virtual cluster 1 is work. The display lists the cluster units starting with the virtual cluster 1 primary unit. If virtual domains are enabled and you connect to the virtual cluster 1 subordinate unit CLI, the HA state of the cluster unit in virtual cluster 1 is standby. The display lists the cluster units starting with the subordinate unit that you are logged into. vcluster 2 only appears if virtual domains are enabled. vcluster 2 displays the HA state (hello, work, or standby) and HA heartbeat IP address of the cluster unit that you have logged into in virtual cluster 2. The HA heartbeat IP address is 169.254.0.2 if you are logged into the primary unit of virtual cluster 2 and 169.254.0.1 if you are logged into a subordinate unit of virtual cluster 2. vcluster 2 also lists the primary unit (master) and subordinate units (slave) in virtual cluster 2. The list includes the cluster index and serial number of each cluster unit in virtual cluster 2. The cluster unit that you have logged into is at the top of the list. If you connect to the virtual cluster 2 primary unit CLI, the HA state of the cluster unit in virtual cluster 2 is work. The display lists the cluster units starting with the virtual cluster 2 primary unit. If you connect to the virtual cluster 2 subordinate unit CLI, the HA state of the cluster unit in virtual cluster 2 is standby. The display lists the cluster units starting with the subordinate unit that you are logged into.
Examples
The following example shows get system ha status output for a cluster of two FortiGate-5001SX units operating in active-active mode. The cluster group ID, session pickup, load balance all, and the load balancing schedule are all set to the default values. The device priority of the primary unit is also set to the default value. The device priority of the subordinate unit has been reduced to 100. The host name of the primary unit is 5001_Slot_4. The host name of the subordinate unit in is 5001_Slot_3. The command output was produced by connecting to the primary unit CLI (host name 5001_Slot_4). Model: 5000 Mode: a-a Group: 0 Debug: 0 ses_pickup: disable load_balance: disable schedule: round robin
High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1886
Operating a cluster
Master:128 5001_Slot_4 FG50012204400045 1 Slave :100 5001_Slot_3 FG50012205400050 0 number of vcluster: 1 vcluster 1: work 169.254.0.2 Master:0 FG50012204400045 Slave :1 FG50012205400050 The following command output was produced by using execute HA manage 0 to log into the subordinate unit CLI of the cluster shown in the previous example. The host name of the subordinate unit is 5001_Slot_3. Model: 5000 Mode: a-a Group: 0 Debug: 0 ses_pickup: disable load_balance: disable schedule: round robin Slave :100 5001_Slot_3 FG50012205400050 0 Master:128 5001_Slot_4 FG50012204400045 1 number of vcluster: 1 vcluster 1: work 169.254.0.2 Slave :1 FG50012205400050 Master:0 FG50012204400045 The following example shows get system ha status output for a cluster of three FortiGate-5001 units operating in active-passive mode. The cluster group ID is set to 20 and session pickup is enabled. Load balance all and the load balancing schedule are set to the default value. The device priority of the primary unit is set to 200. The device priorities of the subordinate units are set to 128 and 100. The host name of the primary unit is 5001_Slot_5. The host names of the subordinate units are 5001_Slot_3 and 5001_Slot_4. Model: 5000 Mode: a-p Group: 20 Debug: 0 ses_pickup: enable load_balance: disable schedule: round robin Master:200 5001_Slot_5 FG50012206400112 0 Slave :100 5001_Slot_3 FG50012205400050 1 Slave :128 5001_Slot_4 FG50012204400045 2 number of vcluster: 1 vcluster 1: work 169.254.0.1 Master:0 FG50012206400112 Slave :1 FG50012204400045 Slave :2 FG50012205400050 The following example shows get system ha status output for a cluster of two FortiGate-5001 units with virtual clustering enabled. This command output was produced by logging into the primary unit for virtual cluster 1 (hostname: 5001_Slot_4, serial number FG50012204400045). The virtual clustering output shows that the cluster unit with host name 5001_Slot_4 and serial number FG50012204400045 is operating as the primary unit for virtual cluster 1 and the subordinate unit for virtual cluster 2.
1887
Operating a cluster
For virtual cluster 1 the cluster unit that you have logged into is operating in the work state and the serial number of the primary unit for virtual cluster 1 is FG50012204400045. For virtual cluster 2 the cluster unit that you have logged into is operating in the standby state and the serial number of the primary unit for virtual cluster 2 is FG50012205400050. Model: 5000 Mode: a-p Group: 20 Debug: 0 ses_pickup: enable load_balance: disable schedule: round robin Master:128 5001_Slot_4 FG50012204400045 1 Slave :100 5001_Slot_3 FG50012205400050 0 number of vcluster: 2 vcluster 1: work 169.254.0.2 Master:0 FG50012204400045 Slave :1 FG50012205400050 vcluster 2: standby 169.254.0.1 Slave :1 FG50012204400045 Master:0 FG50012205400050 The following example shows get system ha status output for the same cluster as shown in the previous example after using execute ha manage 0 to log into the primary unit for virtual cluster 2 (hostname: 5001_Slot_3, serial number FG50012205400050). Model: 5000 Mode: a-p Group: 20 Debug: 0 ses_pickup: enable load_balance: disable schedule: round robin Slave :100 5001_Slot_3 FG50012205400050 0 Master:128 5001_Slot_4 FG50012204400045 1 number of vcluster: 2 vcluster 1: standby 169.254.0.2 Slave :1 FG50012205400050 Master:0 FG50012204400045 vcluster 2: work 169.254.0.1 Master:0 FG50012205400050 Slave :1 FG50012204400045 The following example shows get system ha status output for a virtual cluster configuration where the cluster unit with hostname: 5001_Slot_4 and serial number FG50012204400045 is the primary unit for both virtual clusters. This command output is produced by logging into cluster unit with host name 5001_Slot_4 and serial number FG50012204400045. Model: 5000 Mode: a-p Group: 20 Debug: 0 ses_pickup: enable load_balance: disable schedule: round robin Master:128 5001_Slot_4 FG50012204400045 1
High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1888
Operating a cluster
Slave :100 5001_Slot_3 FG50012205400050 0 number of vcluster: 2 vcluster 1: work 169.254.0.2 Master:0 FG50012204400045 Slave :1 FG50012205400050 vcluster 2: work 169.254.0.2 Master:0 FG50012204400045 Slave :1 FG50012205400050
1889
Operating a cluster
1890
Operating a cluster
get system ha status Model: 5000 Mode: a-p Group: 0 Debug: 0 ses_pickup: disable Master:128 5001_slot_7 FG50012205400050 0 Slave :200 5001_slot_11 FG50012204400045 1 number of vcluster: 1 vcluster 1: work 169.254.0.2 Master:1 FG50012205400050 Slave :0 FG50012204400045 The actual cluster indexes have not changed but the operating cluster indexes have. Also, the HA heartbeat IP address displayed for vcluster 1 has changed to 169.254.0.2.
1891
Operating a cluster
You can use the execute ha manage command from the CLI of any cluster unit to log into the CLI of another the cluster unit. Usually you would use this command from the CLI of the primary unit to log into the CLI of a subordinate unit. However, if you have logged into a subordinate unit CLI, you can use this command to log into the primary unit CLI, or the CLI of another subordinate unit. Using SSH or telnet or the web-based manager dashboard CLI console you can only log into the primary unit CLI. Using a direct console connection you can log into any cluster unit. In both cases you can use execute ha manage to connect to the CLI of other cluster units.
Note: You log into the subordinate unit using the FGT_ha_admin administrator account. This built-in administrator account gives you read and write permission on the subordinate unit. Normally this built-in administrative account is not visible, however FGT_ha_admin does appear in event log messages.
1 Use SSH to connect to the cluster and log into the primary unit CLI. Connect to any cluster interface configured for SSH administrative access to log into the cluster. 2 Enter the following command followed by a space and type a question mark (?): execute ha manage The CLI displays a list of all the subordinate units in the cluster. Each cluster unit is numbered, starting at 1. The information displayed for each cluster unit includes the unit serial number and the host name of the unit. 3 Complete the command with the number of the subordinate unit to log into. For example, to log into subordinate unit 1, enter the following command: execute ha manage 1 Press Enter to connect to and log into the CLI of the selected subordinate unit. If this subordinate unit has a different host name, the CLI prompt changes to this host name. You can use CLI commands to manage this subordinate unit. If you make changes to the configuration of any cluster unit (primary or subordinate unit) these changes are synchronized to all cluster units. 4 You can now use the execute ha manage command to connect to any other cluster unit (including the primary unit). You can also use the exit command to return to the primary unit CLI.
1892
Operating a cluster
When the cluster unit is disconnected the HA mode is changed to standalone. In addition, all interface IP addresses of the disconnected unit are set to 0.0.0.0 except for the interface that you configure. Otherwise the configuration of the disconnected unit is not changed. The HA configuration of the disconnected unit is not changed either (except to change the HA mode to Standalone). To disconnect a cluster unit from a cluster - web-based manager 1 Go to System > Config > HA to view the cluster members list. 2 Select the Disconnect from cluster icon for the cluster unit to disconnect from the cluster. 3 Select the interface that you want to configure. You also specify the IP address and netmask for this interface. When the FortiGate unit is disconnected, all management access options are enabled for this interface. 4 Specify an IP address and netmask for the interface. You can use this IP address to connect to the interface to configure the disconnected FortiGate unit. 5 Select OK. The FortiGate unit is disconnected from the cluster and the cluster may renegotiate and select a new primary unit. The selected interface of the disconnected unit is configured with the specified IP address and netmask. To disconnect a cluster unit from a cluster - CLI 1 Enter the following command to disconnect a cluster unit with serial number FGT5002803033050. The internal interface of the disconnected unit is set to IP address 1.1.1.1 and netmask 255.255.255.0. execute ha disconnect FGT5002803033050 internal 1.1.1.1 255.255.255.0
The following procedure assumes that the disconnected FortiGate unit is correctly physically connected to your network and to the cluster but is not running in HA mode and not part of the cluster.
1893
Operating a cluster
Before you start this procedure you should note the device priority of the primary unit. To add a disconnected FortiGate unit back to its cluster - web-based manager 1 Log into the disconnected FortiGate unit. If virtual domains are enabled, log in as the admin administrator and select Global Configuration. 2 Go to System > Config > HA. 3 Change Mode to match the mode of the cluster. 4 If required, change the group name and password to match the cluster. 5 Set the Device Priority lower than the device priority of the primary unit. 6 Select OK. The disconnected FortiGate unit joins the cluster. To add a disconnected FortiGate unit back to its cluster - CLI 1 Log into the CLI of the FortiGate unit to be added back to the cluster. 2 Enter the following command to access the global configuration and add the FortiGate unit back to a cluster operating in active-passive mode and set the device priority to 50 (a low number) so that this unit will not become the primary unit: config global config system ha set mode a-p set priority 50 end end You may have to also change the group name, group id and password. However if you have not changed these for the cluster or the FortiGate unit after it was disconnected from the cluster you should not have to adjust them now.
1894
1895
While the cluster is functioning, the primary unit functions as the FortiGate network security device for the networks that it is connected to. In addition, the primary unit and subordinate units use the HA heartbeat to keep in constant communication. The subordinate units report their status to the cluster unit and receive and store connection and state table updates.
Device failure
If the primary unit encounters a problem that is severe enough to cause it to fail, the remaining cluster units negotiate to select a new primary unit. This occurs because all of the subordinate units are constantly waiting to negotiate to become primary units. Only the heartbeat packets sent by the primary unit keep the subordinate units from becoming primary units. Each received heartbeat packet resets negotiation timers in the subordinate units. If this timer is allowed to run out because the subordinate units do not receive heartbeat packets from the primary unit, the subordinate units assume that the primary unit has failed, and negotiate to become primary units themselves. Using the same FCGP negotiation process that occurs when the cluster starts up, after they determine that the primary unit has failed, the subordinate units negotiate amongst themselves to select a new primary unit. The subordinate unit that wins the negotiation becomes the new primary unit with the same MAC and IP addresses as the former primary unit. The new primary unit then sends gratuitous ARP packets out all of its interfaces to inform attached switches to send traffic to the new primary unit. Sessions then resume with the new primary unit.
Link failure
If a primary unit interface fails or is disconnected while a cluster is operation, a link failure occurs. When a link failure occurs the cluster units negotiate to select a new primary unit. Since the primary unit has not stopped operating, it participates in the negotiation. The link failure means that a new primary unit must be selected and the cluster unit with the link failure joins the cluster as a subordinate unit. Just as for a device failover, the new primary unit sends gratuitous arp packets out all of its interfaces to inform attached switches to send traffic to it. Sessions then resume with the new primary unit. If a subordinate unit experiences a device failure its status in the cluster does not change. However, in future negotiations a cluster unit with a link failure is unlikely to become the primary unit.
Session failover
If you enable session failover (also called session pickup) for the cluster, during cluster operation the primary unit informs the subordinate units of changes to the primary unit connection and state tables, keeping the subordinate units up-to-date with the traffic currently being processed by the cluster. After a failover the new primary unit recognizes open sessions that were being handled by the cluster. The sessions continue to be processed by the new primary unit and are handled according to their last known state. If you leave session pickup disabled, the cluster does not keep track of sessions and after a failover, active sessions have to be restarted or resumed.
1896
Device failover
The FGCP provides transparent device failover. Device failover is a basic requirement of any highly available system. Device failover means that if a device fails, a replacement device automatically takes the place of the failed device and continues operating in the same manner as the failed device. In the case of FortiOS HA, the device is the primary unit. If the primary unit fails, device failover ensures that one of the subordinate units in the cluster automatically takes the place of the primary unit and can continue processing network traffic in the same way as the failed primary unit.
Note: Device failover does not maintain communication sessions. After a device failover, communication sessions have to be restarted. To maintain communication sessions, you must enable session failover. See Session failover (session pick-up) on page 1932.
FortiGate HA device failover is supported by the HA heartbeat, virtual MAC addresses, configuration synchronization, route synchronization and IPsec VPN SA synchronization. The HA heartbeat makes sure that the subordinate units detect a primary unit failure. If the primary unit fails to respond on time to HA heartbeat packets the subordinate units assume that the primary unit has failed and negotiate to select a new primary unit. The new primary unit takes the place of the failed primary unit and continues functioning in the same way as the failed primary unit. For the new primary unit to continue functioning like the failed primary unit, the new primary unit must be able to reconnect to network devices and the new primary unit must have the same configuration as the failed primary unit.
1897
FortiGate HA uses virtual MAC addresses to reconnect the new primary unit to network devices. The FGCP causes the new primary unit interfaces to acquire the same virtual MAC addresses as the failed primary unit. As a result, the new primary unit has the same network identity as the failed primary unit. The new primary unit interfaces have different physical connections than the failed primary unit. Both the failed and the new primary unit interfaces are connected to the same switches, but the new primary unit interfaces are connected to different ports on these switches. To make sure that the switches send packets to the new primary unit, the new primary unit interfaces send gratuitous ARP packets to the connected switches. These gratuitous ARP packets notify the switches that the primary unit MAC and IP addresses are on different switch ports and cause the switches to send packets to the ports connected to the new primary unit. In this way, the new primary unit continues to receive packets that would otherwise have been sent to the failed primary unit. Configuration synchronization means that the new primary unit always has the same configuration as the failed primary unit. As a result the new primary unit operates in exactly the same way as the failed primary unit. If configuration synchronization were not available the new primary unit may not process network traffic in the same way as the failed primary unit. Route synchronization synchronizes the primary unit routing table to all subordinate units so that after a failover the new primary unit does not have to form a completely new routing table. IPsec VPN SA synchronization synchronizes IPsec VPN security associations (SAs) and other IPsec session data so that after a failover the new primary unit can resume IPsec tunnels without having to establish new SAs.
1898
Heartbeat interfaces
A heartbeat interface is an Ethernet network interface in a cluster that is used by the FGCP for HA heartbeat communications between cluster units. To change the HA heartbeat configuration go to System > Config > HA and select the FortiGate interfaces to use as HA heartbeat interfaces. From the CLI enter the following command to make port4 and port5 HA heartbeat interfaces and give both interfaces a heartbeat priority of 150: config system ha set hbdev port4 150 port5 150 end The following example shows how to change the default heartbeat interface configuration so that the port4 and port1 interfaces can be used for HA heartbeat communication and to give the port4 interface the highest heartbeat priority so that port4 is the preferred HA heartbeat interface. config system ha set hbdev port4 100 port1 50 end By default, for most FortiGate models two interfaces are configured to be heartbeat interfaces. You can change the heartbeat interface configuration as required. For example you can select additional or different heartbeat interfaces. You can also select only one heartbeat interface. In addition to selecting the heartbeat interfaces, you also set the Priority for each heartbeat interface. In all cases, the heartbeat interface with the highest priority is used for all HA heartbeat communication. If the interface fails or becomes disconnected, the selected heartbeat interface that has the next highest priority handles all heartbeat communication. If more than one heartbeat interface has the same priority, the heartbeat interface with the highest priority that is also highest in the heartbeat interface list is used for all HA heartbeat communication. If this interface fails or becomes disconnected, the selected heartbeat interface with the highest priority that is next highest in the list handles all heartbeat communication. The default heartbeat interface configuration sets the priority of two heartbeat interfaces to 50. You can accept the default heartbeat interface configuration if one or both of the default heartbeat interfaces are connected. You can select different heartbeat interfaces, select more heartbeat interfaces and change heartbeat priorities according to your requirements. For the HA cluster to function correctly, you must select at least one heartbeat interface and this interface of all of the cluster units must be connected together. If heartbeat communication is interrupted and cannot failover to a second heartbeat interface, the cluster units will not be able to communicate with each other and more than one cluster unit may become a primary unit. As a result the cluster stops functioning normally because multiple devices on the network may be operating as primary units with the same IP and MAC addresses creating a kind if split brain scenario. The heartbeat interface priority range is 0 to 512. The default priority when you select a new heartbeat interface is 0. The higher the number the higher the priority. In most cases you can maintain the default heartbeat interface configuration as long as you can connect the heartbeat interfaces together. Configuring HA heartbeat interfaces is the same for virtual clustering and for standard HA clustering.
1899
You can enable heartbeat communications for physical interfaces, but not for VLAN subinterfaces, IPsec VPN interfaces, redundant interfaces, or for 802.3ad aggregate interfaces. You cannot select these types of interfaces in the heartbeat interface list. Selecting more heartbeat interfaces increases reliability. If a heartbeat interface fails or is disconnected, the HA heartbeat fails over to the next heartbeat interface. You can select up to 8 heartbeat interfaces. This limit only applies to FortiGate units with more than 8 physical interfaces. HA heartbeat traffic can use a considerable amount of network bandwidth. If possible, enable HA heartbeat traffic on interfaces used only for HA heartbeat traffic or on interfaces connected to less busy networks.
1900
If more than one connected heartbeat interface has the highest priority the FGCP selects the heartbeat interface with the lowest interface index. The web-based manager lists the FortiGate unit interfaces in alphabetical order. This order corresponds to the interface index order with lowest index at the top and highest at the bottom. If more than one heartbeat interface has the highest priority, the FGCP selects the interface that is highest in the heartbeat interface list (or first in alphabetical order) for heartbeat communication. If the interface that is processing heartbeat traffic fails or becomes disconnected, the FGCP uses the same criteria to select another heartbeat interface for heartbeat communication. If the original heartbeat interface is fixed or reconnected, the FGCP again selects this interface for heartbeat communication. The HA heartbeat communicates cluster session information, synchronizes the cluster configuration, synchronizes the cluster routing table, and reports individual cluster member status. The HA heartbeat constantly communicates HA status information to make sure that the cluster is operating properly.
However, interfaces are indexed in hash map order, rather than purely by alphabetic order or purely by interface number value comparisons. As a result, the list is sorted primarily alphabetical by interface name (for example, base1 is before port1), then secondarily by index numbers: port1 port10 port2 through port9
1901
Master:0 FG600B3908600825 Slave :1 FG600B3908600705 You can also use the execute traceroute command from the subordinate unit CLI to display HA heartbeat IP addresses and the HA inter-VDOM link IP addresses. For example, use execute ha manage 1 to connect to the subordinate unit CLI and then enter the following command to trace the route to an IP address on your network:
execute traceroute 172.20.20.10 traceroute to 172.20.20.10 (172.20.20.10), 32 hops max, 72 byte packets 1 169.254.0.1 0 ms 0 ms 0 ms 2 169.254.0.66 0 ms 0 ms 0 ms 3 172.20.20.10 0 ms 0 ms 0 ms
Both HA heartbeat and data traffic are supported on the same FortiGate interface. All heartbeat communication takes place on a separate VDOM called vsys_ha. Heartbeat traffic uses a virtual interface called port_ha in the vsys_ha VDOM. Data and heartbeat traffic use the same physical interface, but theyre logically separated into separate VDOMs.
Because heartbeat packets are recognized as level2 frames, the switches and routers on your heartbeat network that connect to heartbeat interfaces must be configured to allow them. If level2 frames are dropped by these network devices, heartbeat traffic will not be allowed between the cluster units. Some third-party network equipment may use packets with these Ethertypes for other purposes. For example, Cisco N5K/Nexus switches use Ethertype 0x8890 for some functions. When one of these switches receives Ethertype 0x8890 packets from an attached cluster unit, the switch generates CRC errors and the packets are not forwarded. As a result, FortiGate units connected with these switches cannot form a cluster.
1902
In some cases, if the heartbeat interfaces are connected and configured so regular traffic flows but heartbeat traffic is not forwarded, you can change the configuration of the switch that connects the HA heartbeat interfaces to allow level2 frames with Ethertypes 0x8890, 0x8893, and 0x8891 to pass. Alternatively, you can use the following CLI options to change the Ethertypes of the HA heartbeat packets: config system ha set ha-eth-type <ha_ethertype_4-digit_hex set hc-eth-type <hc_ethertype_4-digit_ex> set l2ep-eth-type <l2ep_ethertype_4-digit_hex> end For example, use the following command to change the Ethertype of the HA heartbeat packets from 0x8890 to 0x8895 and to change the Ethertype of HA Telnet session packets from 0x8891 to 0x889f: config system ha set ha-eth-type 8895 set l2ep-eth-type 889f end
1903
1904
1905
When the new primary unit is selected after a failover, the primary unit sends gratuitous ARP packets to update the devices connected to the cluster interfaces (usually layer-2 switches) with the virtual MAC address. Gratuitous ARP packets configure connected network devices to associate the cluster virtual MAC addresses and cluster IP address with primary unit physical interfaces and with the layer-2 switch physical interfaces. This is sometimes called using gratuitous ARP packets (sometimes called GARP packets) to train the network. The gratuitous ARP packets sent from the primary unit are intended to make sure that the layer-2 switch forwarding databases (FDBs) are updated as quickly as possible. Sending gratuitous ARP packets is not required for routers and hosts on the network because the new primary unit will have the same MAC and IP addresses as the failed primary unit. However, since the new primary unit interfaces are connected to different switch interfaces than the failed primary unit, many network switches will update their FDBs more quickly after a failover if the new primary unit sends gratuitous ARP packets.
Changing how the primary unit sends gratuitous ARP packets after a failover
When a failover occurs it is important that the devices connected to the primary unit update their FDBs as quickly as possible to reestablish traffic forwarding. Depending on your network configuration, you may be able to change the number of gratuitous ARP packets and the time interval between ARP packets to reduce the cluster failover time. You cannot disable sending gratuitous ARP packets, but you can use the following command to change the number of packets that are sent. For example, enter the following command to send 20 gratuitous ARP packets: config system ha set arps 20 end You can use this command to configure the primary unit to send from 1 to 60 ARP packets. Usually you would not change the default setting of 5. In some cases, however, you might want to reduce the number of gratuitous ARP packets. For example, if your cluster has a large number of VLAN interfaces and virtual domains and because gratuitous ARP packets are broadcast, sending a higher number gratuitous ARP packets may generate a lot of network traffic. As long as the cluster still fails over successfully, you could reduce the number of gratuitous ARP packets that are sent to reduce the amount of traffic produced after a failover. If failover is taking longer that expected, you may be able to reduce the failover time by increasing the number gratuitous ARP packets sent. You can also use the following command to change the time interval in seconds between gratuitous ARP packets. For example, enter the following command to change the time between ARP packets to 3 seconds: config system ha set arps-interval 3 end The time interval can be in the range of 1 to 20 seconds. The default is 8 seconds between gratuitous ARP packets. Normally you would not need to change the time interval. However, you could decrease the time to be able send more packets in less time if your cluster takes a long time to failover.
1906
There may also be a number of reasons to set the interval higher. For example, if your cluster has a large number of VLAN interfaces and virtual domains and because gratuitous ARP packets are broadcast, sending gratuitous ARP packets may generate a lot of network traffic. As long as the cluster still fails over successfully you could increase the interval to reduce the amount of traffic produced after a failover. For more information about gratuitous ARP packets see RFC 826 and RFC 3927.
<vcluster_integer> is 0 for virtual cluster 1 and 2 for virtual cluster 2. If virtual domains are not enabled, HA sets the virtual cluster to 1 and by default all interfaces are in the root virtual domain. Including virtual cluster and virtual domain factors in the virtual MAC address formula means that the same formula can be used whether or not virtual domains and virtual clustering is enabled. <idx> is the index number of the interface. Interfaces are numbered from 0 to x (where x is the number of interfaces). Interfaces are numbered according to their has map order. See Interface index and display order on page 1901. The first interface has an index of 0. The second interface in the list has an index of 1 and so on.
Note: Only the <idx> part of the virtual MAC address is different for each interface. The <vcluster_integer> would be different for different interfaces if multiple VDOMs have been added.
1907
port4 virtual MAC: 00-09-0f-09-00-04 port5 virtual MAC: 00-09-0f-09-00-05 port6 virtual MAC: 00-09-0f-09-00-06 port7 virtual MAC: 00-09-0f-09-00-07 port8 virtual MAC: 00-09-0f-09-00-08 port9 virtual MAC: 00-09-0f-09-00-09 port11 virtual MAC: 00-09-0f-09-00-0a port12 virtual MAC: 00-09-0f-09-00-0b port1 virtual MAC: 00-09-0f-09-22-00 port10 virtual MAC: 00-09-0f-09-22-01 port2 virtual MAC: 00-09-0f-09-22-02 port3 virtual MAC: 00-09-0f-09-22-03 port4 virtual MAC: 00-09-0f-09-22-04 port5 virtual MAC: 00-09-0f-09-22-05 port6 virtual MAC: 00-09-0f-09-22-06 port7 virtual MAC: 00-09-0f-09-22-07 port8 virtual MAC: 00-09-0f-09-22-08 port9 virtual MAC: 00-09-0f-09-22-09 port11 virtual MAC: 00-09-0f-09-22-0a port12 virtual MAC: 00-09-0f-09-22-0b
A cluster with virtual domains enabled where the HA group ID has been changed to 23, port5 and port 6 are in the root virtual domain (which is in virtual cluster1), and port7 and port8 are in the vdom_1 virtual domain (which is in virtual cluster 2) would have the following virtual MAC addresses: port5 interface virtual MAC: 00-09-0f-09-23-05 port6 interface virtual MAC: 00-09-0f-09-23-06 port7 interface virtual MAC: 00-09-0f-09-23-27 port8 interface virtual MAC: 00-09-0f-09-23-28
1908
For an operating cluster, the current hardware address of each cluster unit interface is changed to the HA virtual MAC address by the FGCP. The macaddr option is not available for a functioning cluster. You cannot change an interface MAC address and you cannot view MAC addresses from the system interface CLI command. You can use the get hardware nic <interface_name_str> command to display both MAC addresses for any FortiGate interface. This command displays hardware information for the specified interface. Depending on their hardware configuration, this command may display different information for different interfaces. You can use this command to display the current hardware address as Current_HWaddr and the permanent hardware address as Permanent_HWaddr. For some interfaces the current hardware address is displayed as MAC. The command displays a great deal of information about the interface so you may have to scroll the output to find the hardware addresses.
Note: You can also use the diagnose hardware deviceinfo nic <interface_str> command to display both MAC addresses for any FortiGate interface.
Before HA configuration the current and permanent hardware addresses are the same. For example for one of the units in Cluster_1: FGT60B3907503171 # get hardware nic internal . . . MAC: 02:09:0f:78:18:c9 Permanent_HWaddr: 02:09:0f:78:18:c9 . . . During HA operation the current hardware address becomes the HA virtual MAC address, for example for the units in Cluster_1: FGT60B3907503171 # get hardware nic internal . . . MAC: 00:09:0f:09:00:02 Permanent_HWaddr: 02:09:0f:78:18:c9 . . . The following command output for Cluster_2 shows the same current hardware address for port1 as for the internal interface of Cluster_2, indicating a MAC address conflict. FG300A2904500238 # get hardware nic port1 . . . MAC: 00:09:0f:09:00:02 Permanent_HWaddr: 00:09:0F:85:40:FD . . .
1909
Diagnosing packet loss with two FortiGate HA clusters in the same broadcast domain
A network may experience packet loss when two FortiGate HA clusters have been deployed in the same broadcast domain. Deploying two HA clusters in the same broadcast domain can result in packet loss because of MAC address conflicts. The packet loss can be diagnosed by pinging from one cluster to the other or by pinging both of the clusters from a device within the broadcast domain. You can resolve the MAC address conflict by changing the HA Group ID configuration of the two clusters. The HA Group ID is sometimes also called the Cluster ID. This section describes a topology that can result in packet loss, how to determine if packets are being lost, and how to correct the problem by changing the HA Group ID.
Note: Note: Packet loss on a network can also be caused by IP address conflicts. Finding and fixing IP address conflicts can be difficult. However, if you are experiencing packet loss and your network contains two FortiGate HA clusters you can use the information in this article to eliminate one possible source of packet loss.
Example topology
The topology below shows two clusters. The Cluster_1 internal interfaces and the Cluster_2 port 1 interfaces are both connected to the same broadcast domain. In this topology the broadcast domain could be an internal network. Both clusters could also be connected to the Internet or to different networks.
Figure 228: Example HA topology with possible MAC address conflicts
t2 P or
3 por t3
rt
s Clu
or t1 P
S w itc h
In
ter
te
rn
po
t2
or
t1
or
al
L2
an w 2 an
s Clu
w an 1
In
ter
te
rn
al
1910
an
The primary unit synchronizes all other configuration settings, including the other HA configuration settings.
1911
Incremental synchronization
When you log into the cluster web-based manager or CLI to make configuration changes, you are actually logging into the primary unit. All of your configuration changes are first made to the primary unit. Incremental synchronization then immediately synchronizes these changes to all of the subordinate units. When you log into a subordinate unit CLI (for example using execute ha manage) all of the configuration changes that you make to the subordinate unit are also immediately synchronized to all cluster units, including the primary unit, using the same process. Incremental synchronization also synchronizes other dynamic configuration information such as the DHCP server address lease database, routing table updates, IPsec SAs, MAC address tables, and so on. See FortiGate HA compatibility with PPPoE and DHCP on page 1749 for more information about DHCP server address lease synchronization and Synchronizing routing table updates on page 1918 for information about routing table updates. Whenever a change is made to a cluster unit configuration, incremental synchronization sends the same configuration change to all other cluster units over the HA heartbeat link. An HA synchronization process running on the each cluster unit receives the configuration change and applies it to the cluster unit. The HA synchronization process makes the configuration change by entering a CLI command that appears to be entered by the administrator who made the configuration change in the first place.
1912
Synchronization takes place silently, and no log messages are recorded about the synchronization activity. However, log messages can be recorded by the cluster units when the synchronization process enters CLI commands. You can see these log messages on the subordinate units if you enable event logging and set the minimum severity level to Information and then check the event log messages written by the cluster units when you make a configuration change. See Configuration change synchronized from primary unit to subordinate unit on page 1868. You can also see these log messages on the primary unit if you make configuration changes from a subordinate unit. See Configuration change synchronized from subordinate unit to primary unit on page 1869.
Periodic synchronization
Incremental synchronization makes sure that as an administrator makes configuration changes, the configurations of all cluster units remain the same. However, a number of factors could cause one or more cluster units to go out of sync with the primary unit. For example, if you add a new unit to a functioning cluster, the configuration of this new unit will not match the configuration of the other cluster units. Its not practical to use incremental synchronization to change the configuration of the new unit. Periodic synchronization is a mechanism that looks for synchronization problems and fixes them. Every minute the cluster compares the configuration file checksum of the primary unit with the configuration file checksums of each of the subordinate units. If all subordinate unit checksums are the same as the primary unit checksum, all cluster units are considered synchronized. If one or more of the subordinate unit checksums is not the same as the primary unit checksum, the subordinate unit configuration is considered out of sync with the primary unit. The checksum of the out of sync subordinate unit is checked again every 15 seconds. This re-checking occurs in case the configurations are out of sync because an incremental configuration sequence has not completed. If the checksums do not match after 5 checks the subordinate unit that is out of sync retrieves the configuration from the primary unit. The subordinate unit then reloads its configuration and resumes operating as a subordinate unit with the same configuration as the primary unit. The configuration of the subordinate unit is reset in this way because when a subordinate unit configuration gets out of sync with the primary unit configuration there is no efficient way to determine what the configuration differences are and to correct them. Resetting the subordinate unit configuration becomes the most efficient way to resynchronize the subordinate unit. Synchronization requires that all cluster units run the same FortiOS firmware build. If some cluster units are running different firmware builds, then unstable cluster operation may occur and the cluster units may not be able to synchronize correctly.
Note: Re-installing the firmware build running on the primary unit forces the primary unit to upgrade all cluster units to the same firmware build.
1913
slave's configuration is not in sync with master's, sequence:3 slave's configuration is not in sync with master's, sequence:4 slave starts to sync with master logout all admin users slave succeeded to sync with master
If synchronization problems occur the console message sequence may be repeated over and over again. The messages all include a type value (in the example type 0x3). The type value can help Fortinet Support diagnose the synchronization problem.
Table 111: HA out of sync object messages and the configuration objects that they reference Out of Sync Message HA_SYNC_SETTING_CONFIGURATION = 0x03 HA_SYNC_SETTING_AV = 0x10 HA_SYNC_SETTING_VIR_DB = 0x11 HA_SYNC_SETTING_SHARED_LIB = 0x12 HA_SYNC_SETTING_SCAN_UNIT = 0x13 HA_SYNC_SETTING_IMAP_PRXY = 0x14 HA_SYNC_SETTING_SMTP_PRXY = 0x15 HA_SYNC_SETTING_POP3_PRXY = 0x16 HA_SYNC_SETTING_HTTP_PRXY = 0x17 HA_SYNC_SETTING_FTP_PRXY = 0x18 HA_SYNC_SETTING_FCNI = 0x19 HA_SYNC_SETTING_FDNI = 0x1a HA_SYNC_SETTING_FSCI = 0x1b HA_SYNC_SETTING_FSAE = 0x1c HA_SYNC_SETTING_IDS = 0x20 HA_SYNC_SETTING_IDSUSER_RULES = 0x21 HA_SYNC_SETTING_IDSCUSTOM = 0x22 HA_SYNC_SETTING_IDS_MONITOR = 0x23 HA_SYNC_SETTING_IDS_SENSOR = 0x24 HA_SYNC_SETTING_NIDS_LIB = 0x25 HA_SYNC_SETTING_WEBLISTS = 0x30 HA_SYNC_SETTING_CONTENTFILTER = 0x31 HA_SYNC_SETTING_URLFILTER = 0x32 HA_SYNC_SETTING_FTGD_OVRD = 0x33 HA_SYNC_SETTING_FTGD_LRATING = 0x34 HA_SYNC_SETTING_EMAILLISTS = 0x40 HA_SYNC_SETTING_EMAILCONTENT = 0x41 Configuration Object /data/config
/etc/vir /data/lib/libav.so /bin/scanunitd /bin/imapd /bin/smtp /bin/pop3 /bin/thttp /bin/ftpd /etc/fcni.dat /etc/fdnservers.dat /etc/sci.dat /etc/fsae_adgrp.cache /etc/ids.rules /etc/idsuser.rules
/bin/ipsmonitor /bin/ipsengine /data/lib/libips.so /data/cmdb/webfilter.bword /data/cmdb/webfilter.urlfilter /data/cmdb/webfilter.fgtd-ovrd /data/cmdb/webfilter.fgtd-ovrd /data/cmdb/spamfilter.bword High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1914
Table 111: HA out of sync object messages and the configuration objects that they reference Out of Sync Message HA_SYNC_SETTING_EMAILBWLIST = 0x42 HA_SYNC_SETTING_IPBWL = 0x43 HA_SYNC_SETTING_MHEADER = 0x44 HA_SYNC_SETTING_RBL = 0x45 HA_SYNC_SETTING_CERT_CONF = 0x50 HA_SYNC_SETTING_CERT_CA = 0x51 HA_SYNC_SETTING_CERT_LOCAL = 0x52 HA_SYNC_SETTING_CERT_CRL = 0x53 HA_SYNC_SETTING_DB_VER = 0x55 HA_GET_DETAIL_CSUM = 0x71 HA_SYNC_CC_SIG = 0x75 HA_SYNC_CC_OP = 0x76 HA_SYNC_CC_MAIN = 0x77 HA_SYNC_FTGD_CAT_LIST = 0x7a Configuration Object /data/cmdb/spamfilter.emailbwl /data/cmdb/spamfilter.ipbwl /data/cmdb/spamfilter.mheader /data/cmdb/spamfilter.rbl /etc/cert/cert.conf /etc/cert/ca /etc/cert/local /etc/cert/crl
1915
all: c5 90 ed 22 24 3e 96 06 44 35 b6 63 7c 84 88 d5 The following example shows using this command for the primary unit of a cluster with multiple VDOMs. Two VDOMs have been added named test and Eng_vdm. From the primary unit: config global diagnose sys ha showcsum is_manage_master()=1, is_root_master()=1 debugzone global: 65 75 88 97 2d 58 1b bf 38 d3 3d 52 5b 0e 30 a9 test: a5 16 34 8c 7a 46 d6 a4 1e 1f c8 64 ec 1b 53 fe root: 3c 12 45 98 69 f2 d8 08 24 cf 02 ea 71 57 a7 01 Eng_vdm: 64 51 7c 58 97 79 b1 b3 b3 ed 5c ec cd 07 74 09 all: 30 68 77 82 a1 5d 13 99 d1 42 a3 2f 9f b9 15 53 checksum global: 65 75 88 97 2d 58 1b bf 38 d3 3d 52 5b 0e 30 a9 test: a5 16 34 8c 7a 46 d6 a4 1e 1f c8 64 ec 1b 53 fe root: 3c 12 45 98 69 f2 d8 08 24 cf 02 ea 71 57 a7 01 Eng_vdm: 64 51 7c 58 97 79 b1 b3 b3 ed 5c ec cd 07 74 09 all: 30 68 77 82 a1 5d 13 99 d1 42 a3 2f 9f b9 15 53 From the subordinate unit: config global diagnose sys ha showcsum is_manage_master()=0, is_root_master()=0 debugzone global: 65 75 88 97 2d 58 1b bf 38 d3 3d 52 5b 0e 30 a9 test: a5 16 34 8c 7a 46 d6 a4 1e 1f c8 64 ec 1b 53 fe root: 3c 12 45 98 69 f2 d8 08 24 cf 02 ea 71 57 a7 01 Eng_vdm: 64 51 7c 58 97 79 b1 b3 b3 ed 5c ec cd 07 74 09 all: 30 68 77 82 a1 5d 13 99 d1 42 a3 2f 9f b9 15 53 checksum global: 65 75 88 97 2d 58 1b bf 38 d3 3d 52 5b 0e 30 a9 test: a5 16 34 8c 7a 46 d6 a4 1e 1f c8 64 ec 1b 53 fe root: 3c 12 45 98 69 f2 d8 08 24 cf 02 ea 71 57 a7 01 Eng_vdm: 64 51 7c 58 97 79 b1 b3 b3 ed 5c ec cd 07 74 09 all: 30 68 77 82 a1 5d 13 99 d1 42 a3 2f 9f b9 15 53
1916
diagnose debug application hasync -1 Collect the console output and compare the out of sync messages with the information in Table 111 on page 1914. 3 Enter the following commands to turn off debugging. diagnose debug disable diagnose debug reset To determine what part of the configuration is causing the problem If the previous procedure displays messages that include sync object 0x30 (for example, HA_SYNC_SETTING_CONFIGURATION = 0x03) there is a synchronization problem with the configuration. Use the following steps to determine the part of the configuration that is causing the problem. If your cluster consists of two cluster units, use this procedure to capture the configuration checksums for each unit. If your cluster consists of more that two cluster units, repeat this procedure for all cluster units that returned messages that include 0x30 sync object messages. 1 Connect to each cluster unit CLI by connected to the console port. 2 Enter the following command to turn on terminal capture diagnose debug enable 3 Enter the following command to stop HA synchronization. execute ha sync stop 4 Enter the following command to display configuration checksums. diagnose sys ha showcsum 1 5 Copy the output to a text file. 6 Repeat for all affected units. 7 Compare the text file from the primary unit with the text file from each cluster unit to find the checksums that do not match. You can use a diff function to compare text files. 8 Repeat steps 4 to 7 for each checksum level: diagnose sys ha showcsum 2 diagnose sys ha showcsum 3 diagnose sys ha showcsum 4 diagnose sys ha showcsum 5 diagnose sys ha showcsum 6 diagnose sys ha showcsum 7 diagnose sys ha showcsum 8 9 When the non-matching checksum is found, attempt to drill down further. This is possible for objects that have sub-components. For example you can enter the following commands: diagnose sys ha showcsum system.global diagnose sys ha showcsum system.interface Generally it is the first non-matching checksum in one of the levels that is the cause of the synchronization problem. 10 Attempt to can remove/change the part of the configuration that is causing the problem. You can do this by making configuration changes from the primary unit or subordinate unit CLI. 11 Enter the following commands to start HA configuration and stop debugging:
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1917
1918
config router ospf set restart-mode graceful-restart end To make sure the new primary unit keeps its synchronized routing data long enough to acquire new routing data, you should also increase the HA route time to live, route wait, and route hold values to 60 using the following CLI command: config system ha set route-ttl 60 set route-wait 60 set route-hold 60 end
1919
To avoid flooding routing table updates to subordinate units, set route-hold to a relatively long time to prevent subsequent updates from occurring too quickly. Flooding routing table updates can affect cluster performance if a great deal of routing information is synchronized between cluster units. Increasing the time between updates means that this data exchange will not have to happen so often. The route-hold time should be coordinated with the route-wait time.
Change the time the primary unit waits after receiving a routing update
Change the route-wait time to change how long the primary unit waits after receiving routing updates before sending the updates to the subordinate units. For quick routing table updates to occur, set route-wait to a relatively short time so that the primary unit does not hold routing table changes for too long before updating the subordinate units. The route-wait range is 0 to 3600 seconds. The default route-wait is 0 seconds. Normally, because the route-wait time is 0 seconds the primary unit sends routing table updates to the subordinate units every time its routing table changes. Once a routing table update is sent, the primary unit waits the route-hold time before sending the next update. Usually routing table updates are periodic and sporadic. Subordinate units should receive these changes as soon as possible so route-wait is set to 0 seconds. route-hold can be set to a relatively long time because normally the next route update would not occur for a while. In some cases, routing table updates can occur in bursts. A large burst of routing table updates can occur if a router or a link on a network fails or changes. When a burst of routing table updates occurs, there is a potential that the primary unit could flood the subordinate units with routing table updates. Flooding routing table updates can affect cluster performance if a great deal of routing information is synchronized between cluster units. Setting route-wait to a longer time reduces the frequency of additional updates are and prevents flooding of routing table updates from occurring.
1920
Link failover
IPsec SAs are not synchronized until the IKE process has finished synchronizing the ISAKMP SAs. This is required in for dialup tunnels since it is the synchronizing of the ISAKMP SA that creates the dialup tunnel. A dialup interface is created as soon as the phase1 is complete. This ensures that the when HA synchronizes phase1 information the dialup name is included. If the IKE process re-starts for any reason it deletes any dialup tunnels that exist. This forces the peer to re-key them. IPsec SA deletion happens immediately. Routes associated with a dialup tunnel that is being deleted are cleaned up synchronously as part of the delete, rather than waiting for the SA hard-expiry. The FGCP does not sync the IPsec tunnel MTU from the primary unit to the subordinate units. This means that after HA failover if the first packet received by the FortiGate unit arrives after the HA route has been deleted and before the new route is added and the packet is larger than the default MTU of 1024 then the FortiGate unit sends back an ICMP fragmentation required. However, as soon as routing is reestablished then the MTU will be corrected and traffic will flow.
Link failover
Link failover means that if a monitored interface fails, the cluster reorganizes to reestablish a link to the network that the monitored interface was connected to and to continue operating with minimal or no disruption of network traffic. You configure monitored interfaces (also called interface monitoring or port monitoring) by selecting the interfaces to monitor as part of the cluster HA configuration. You can monitor up to 16 interfaces. This limit only applies to FortiGate units with more than 16 physical interfaces. In a multiple VDOM configuration you can monitor up to 16 interfaces per virtual cluster. The interfaces that you can monitor appear on the port monitor list. You can monitor all FortiGate interfaces including redundant interfaces and 802.3ad aggregate interfaces. You cannot monitor the following types of interfaces (you cannot select the interfaces on the port monitor list):
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1921
Link failover
FortiGate interfaces that contain an internal switch. VLAN subinterfaces. IPsec VPN interfaces. Individual physical interfaces that have been added to a redundant or 802.3ad aggregate interface. FortiGate-5000 series backplane interfaces that have not been configured as network interfaces.
If you are configuring a virtual cluster you can create a different port monitor configuration for each virtual cluster. Usually for each virtual cluster you would monitor the interfaces that have been added to the virtual domains in each virtual cluster.
Tip: Wait until after the cluster is up and running to enable interface monitoring. You do not need to configure interface monitoring to get a cluster up and running and interface monitoring will cause failovers if for some reason during initial setup a monitored interface has become disconnected. You can always enable interface monitoring once you have verified that the cluster is connected and operating properly.
Note: You should only monitor interfaces that are connected to networks, because a failover may occur if you monitor an unconnected interface.
To enable interface monitoring - web-based manager Use the following steps to monitor the port1 and port2 interfaces of a cluster. 1 Connect to the cluster web-based manager. 2 Go to System > Config > HA and edit the primary unit (Role is MASTER). 3 Select the Port Monitor check boxes for the port1 and port2 interfaces and select OK. The configuration change is synchronized to all cluster units. To enable interface monitoring - CLI Use the following steps to monitor the port1 and port2 interfaces of a cluster. 1 Connect to the cluster CLI. 2 Enter the following command to enable interface monitoring for port1 and port2. configure system ha set monitor port1 port2 end The following example shows how to enable monitoring for the external, internal, and DMZ interfaces. config system ha set monitor external internal dmz end With interface monitoring enabled, during cluster operation, the cluster monitors each cluster unit to determine if the monitored interfaces are operating and connected. Each cluster unit can detect a failure of its network interface hardware. Cluster units can also detect if its network interfaces are disconnected from the switch they should be connected to.
1922
Link failover
Note: Cluster units cannot determine if the switch that its interfaces are connected to is still connected to the network. However, you can use remote IP monitoring to make sure that the cluster unit can connect to downstream network devices. See Remote link failover on page 1927.
Because the primary unit receives all traffic processed by the cluster, a cluster can only process traffic from a network if the primary unit can connect to it. So, if the link between a network and the primary unit fails, to maintain communication with this network, the cluster must select a different primary unit; one that is still connected to the network. Unless another link failure has occurred, the new primary unit will have an active link to the network and will be able to maintain communication with it. To support link failover, each cluster unit stores link state information for all monitored cluster units in a link state database. All cluster units keep this link state database up to date by sharing link state information with the other cluster units. If one of the monitored interfaces on one of the cluster units becomes disconnected or fails, this information is immediately shared with all cluster units.
1923
Link failover
Link Failure Occurs Primary Unit Link Failure Packets from Internal network
If a monitored interface on the primary unit fails, the cluster renegotiates and selects the cluster unit with the highest monitor priority to become the new primary unit. The cluster unit with the highest monitor priority is the cluster unit with the most monitored interfaces connected to networks. After a link failover, the primary unit processes all traffic and all subordinate units, even the cluster unit with the link failure, share session and link status. In addition all configuration changes, routes, and IPsec SAs are synchronized to the cluster unit with the link failure. In an active-active cluster, the primary unit load balances traffic to all the units in the cluster. The cluster unit with the link failure can process connections between its functioning interfaces (for, example if the cluster has connections to an internal, external, and DMZ network, the cluster unit with the link failure can still process connections between the external and DMZ networks).
1924
Link failover
If a monitored interface on a subordinate unit fails, the subordinate unit shares this information with all cluster units. The cluster does not renegotiate. The subordinate unit with the failed monitored interface continues to function in the cluster. In an active-active cluster, the subordinate unit can continue processing connections between functioning interfaces. The primary unit re-distributes traffic that was being processed by the failed interface of the subordinate unit to other cluster units. If session pickup is enabled, similar to a failover, some of these sessions continue while others must restart. See Session failover (session pick-up) on page 1932.
1925
Link failover
P In ort E ter 2 n a fa b l ce ed M
on
ito
itc
itc
P In ort t D er 3 i s fa ab c le e M d o ni to
on P E ito ort na ri 2 bl ng ed
ac
rf
In ort E ter 1 n a fa b l ce ed M
In
te
on
ito
rin
1926
ou
Internal Network
S w
itc
te
In ort E ter 1 n a fa b l ce ed M
rin
on
ito
rin
Subsecond failover
Subsecond failover
HA link failover supports subsecond failover (that is a failover time of less than one second). Subsecond failover is available for interfaces that can issue a link failure system call when the interface goes down. When an interface experiences a link failure and sends the link failure system call, the FGCP receives the system call and initiates a link failover. For interfaces that do not support subsecond failover, port monitoring regularly polls the connection status of monitored interfaces. When a check finds that an interface has gone down, port monitoring causes a link failover. Subsecond failover results in a link failure being detected sooner because the system doesnt have to wait for the next poll to find out about the failure. Subsecond failover requires interfaces that support sending the link failure system call. This functionality is available for: Interfaces with network processors (NP2, NP4, etc.) Interfaces with content processors (CP4, CP5, CP6, etc.) Interfaces in Fortinet Mezzanine Cards that include network and content processors (FMC-XD2, FMC-XG2, etc.) Accelerated interface modules (FortiGate-ASM-FB4, ADM-FB8, ADM-XB2, ADM-XD4, RTM-XD2 etc). Interfaces in security processor modules (FortiGate-ASM-CE4, ASM-XE2, etc)
Subsecond failover can accelerate HA failover to reduce the link failover time to less than one second under ideal conditions. Actual failover performance may be vary depending on traffic patterns and network configuration. For example, some network devices may respond slowly to an HA failover. No configuration changes are required to support subsecond failover. However, for best subsecond failover results, the recommended heartbeat interval is 100ms and the recommended lost heartbeat threshold is 5. (See Changing the heartbeat interval on page 1904) config system ha set hb-lost-threshold 5 set hb-interval 1 end For information about how to reduce failover times, see Failover performance on page 1942.
1927
By being able to detect failures in network equipment not directly connected to the cluster, remote IP monitoring can be useful in a number of ways depending on your network configuration. For example, in a full mesh HA configuration, with remote IP monitoring, the cluster can detect failures in network equipment that is not directly connected to the cluster but that would interrupt traffic processed by the cluster if the equipment failed.
Figure 231: Example HA remote IP monitoring topology
nk
Li
itc
Sw
t2
or
a U ry ni t
rim
Physical Ping Server from Link Primary unit Operating cannot Reach Monitored Monitored IP, Remote IP Causing HA 192.168.20.20 Failover
In the simplified example topology shown in Figure 231, the switch connected directly to the primary unit is operating normally but the link on the other side of the switches fails. As a result traffic can no longer flow between the primary unit and the Internet. To detect this failure you can create a remote IP monitoring configuration consisting of a ping server dead gateway detection configuration for port2 of the cluster. The primary unit tests connectivity to 192.168.20.20. If the ping server cannot connect to 192.268.20.20 the cluster to fails over and the subordinate unit becomes the new primary unit. The remote HA monitoring ping server on the new primary unit can connect to 192.168.20.20 so the failover maintains connectivity between the internal network and the Internet through the cluster.
or
1928
itch
itc
P or t
Link Failure
Internal Network
S w
itc
P or t
t1
ou
te
S U ub n i or t di n
at
To configure remote IP monitoring 1 Enter the following commands to configure HA remote monitoring for the example topology. Enter the pingserver-monitor-interface keyword to enable HA remote IP monitoring on port2. Leave the pingserver-failover-threshold set to the default value of 0. You can change this value if you do not want a failover to occur if only one ping server fails. Enter the pingserver-flip-timeout keyword to set the flip timeout to 120 minutes. After a failover, if HA remote IP monitoring on the new primary unit also causes a failover, the flip timeout prevents the failover from occurring until the timer runs out. Setting the pingserver-flip-timeout to 120 means that remote IP monitoring can only cause a failover every 120 minutes. This flip timeout is required to prevent repeating failovers if remote IP monitoring causes a failover from all cluster units because none of the cluster units can connect to the monitored IP addresses. config system ha set pingserver-monitor-interface port2 set pingserver-failover-threshold 0 set pingserver-flip-timeout 120 end 2 Enter the following commands to add the ping server for the port2 interface and to set the HA remote IP monitoring priority for this ping server. Enter the detectserver keyword to add the ping server and set the ping server IP address to 192.168.20.20. Leave the ha-priority keyword set to the default value of 1. You only need to change this priority if you change the HA ping server failover threshold. The hapriority setting is not synchronized among cluster units. Use the interval keyword to set the time between ping server pings and use the failtime keyword to set the number of times that the ping can fail before a failure is detected (the failover threshold). The following example reduces the failover threshold to 2 but keeps the ping interval at the default value of 5. config router gwdetect edit port2 set server 192.168.20.20 set ha-priority 1 set interval 5 set failtime 2 end
Note: You can also do this from the web-based manager by going to Router > Static > Settings, selecting Create New to add a new dead gateway detection configuration, setting Ping Server to 192.168.20.20, HA Priority to 1, Ping Interval to 5, and Failover Threshold to 2.
1929
For example, enable remote IP monitoring for interfaces named port2, port20, and vlan_234: config system ha set pingserver-monitor-interface port2 port20 vlan_234 set pingserver-failover-threshold 10 set pingserver-flip-timeout 120 end Then configure ping servers for each of these interfaces. In the following example, default values are accepted for all settings other than the server IP address. config router gwdetect edit port2 set server 192.168.20.20 next edit port20 set server 192.168.20.30 next edit vlan_234 set server 172.20.12.10 end
1930
If only one of the ping servers fails, the total ping server HA priority will be 5, which is lower than the failover threshold so a failover will not occur. If a second ping server fails, the total ping server HA priority of 10 will equal the failover threshold, causing a failover. By adding multiple ping servers to the remote HA monitoring configuration and setting the HA priorities for each, you can fine tune remote IP monitoring. For example, if it is more important to maintain connections to some networks you can set the HA priorities higher for these ping servers. And if it is less important to maintain connections to other networks you can set the HA priorities lower for these ping servers. You can also adjust the failover threshold so that if the cluster cannot connect to one or two high priority IP addresses a failover occurs. But a failover will not occur if the cluster cannot connect to one or two low priority IP addresses.
Flip timeout
The HA remote IP monitoring configuration also involves setting a flip timeout. The flip timeout is required to reduce the frequency of failovers if, after a failover, HA remote IP monitoring on the new primary unit also causes a failover. This can happen if the new primary unit cannot connect to one or more of the monitored remote IP addresses. The result could be that until you fix the network problem that blocks connections to the remote IP addresses, the cluster will experience repeated failovers. You can control how often the failovers occur by setting the flip timeout. The flip timeout stops HA remote IP monitoring from causing a failover until the primary unit has been operating for the duration of the flip timeout. If you set the flip timeout to a relatively high number of minutes you can find and repair the network problem that prevented the cluster from connecting to the remote IP address without the cluster experiencing very many failovers. Even if it takes a while to detect the problem, repeated failovers at relatively long time intervals do not usually disrupt network traffic.
1931
1932
end Enabling session pickup delay means that if a failover occurs more sessions may not be resumed after a failover. In most cases short duration sessions can be restarted with only a minor traffic interruption. However, if you notice too many sessions not resuming after a failover you might want to disable this setting.
1933
Note: Active-active clusters can resume some of these sessions after a failover. See Active-active HA subordinate units sessions can resume after a failover on page 1936 for details.
If you use these features to protect most of the sessions that your cluster processes, enabling session failover may not actually provide significant session failover protection. TCP sessions that are not being processed by these UTM features resume after a failover even if these sessions are accepted by security policies with UTM options configured. Only TCP sessions that are actually being processed by these UTM features do not resume after a failover. For example: TCP sessions that are not virus scanned, web filtered, spam filtered, content archived, or are not SIP, SIMPLE, or SCCP signal traffic resume after a failover, even if they are accepted by a security policy with UTM options enabled. For example, SNMP TCP sessions resume after a failover because FortiOS does not apply any UTM options to SNMP sessions. TCP sessions for a protocol for which UTM features have not been enabled resume after a failover even if they are accepted by a security policy with UTM features enabled. For example, if you have not enabled any antivirus or content archiving settings for FTP, FTP sessions resume after a failover. IPS does not affect session failover. Sessions being scanned by IPS resume after a failover. After a failover; however, IPS can only perform packet-based inspection of resumed sessions; reducing the number of vulnerabilities that IPS can detect. This limitation only applies to in-progress resumed sessions. Application control does not affect session failover. Sessions that are being monitored by application control resume after a failover. Logging enabled form UTM features does not affect session failover. UTM logging writes event log messages for UTM events; such as when a virus is found by antivirus scanning, when Web Filtering blocks a URL, and so on. Logging does not enable features that would prevent sessions from being failed over, logging just reports on the activities of enabled features.
If more than one UTM feature is applied to a TCP session, that session will not resume after a failover as long as one of the UTM features prevents session failover. For example: Sessions being scanned by IPS and also being virus scanned do not resume after a failover. Sessions that are being monitored by application control and that are being DLP archived or virus scanned will not resume after a failover.
1934
SIP calls being set up at the time of a failover may lose signaling messages. In most cases the SIP clients and servers should use message retransmission to complete the call setup after the failover has completed. As a result, SIP users may experience a delay if their calls are being set up when an HA a failover occurs. But in most cases the call setup should be able to continue after the failover.
Session failover and explicit web proxy, WCCP, and WAN optimization sessions
Similar to UTM sessions, the explicit web proxy, WCCP and WAN optimization features all require the FortiGate unit to maintain very large amounts of internal state information for each session. This information is not maintained and these sessions do not resume after a failover.
1935
UDP sessions accepted by NAT policies will not resume after a failover because NAT will usually give the new session a different source port. So only traffic for UDP protocols that can handle the source port changing during a session will continue to flow.
This mechanism for continuing sessions is not the same as session failover because:
1936
In a cluster, the primary unit only stores web cache and byte cache databases. These databases are not synchronized to the subordinate units. So, after a failover, the new primary unit must rebuild its web and byte caches. As well, the new primary unit cannot connect to a SAS partition that the failed primary unit used. Rebuilding the byte caches can happen relatively quickly because the new primary unit gets byte cache data from the other FortiGate units that it is participating with in WAN optimization tunnels.
1937
In NAT/Route mode, the HA cluster works as a gateway when it responds to ARP requests. Therefore, the client and server only know the gateway MAC addresses. The client only knows the cluster internal virtual MAC address (MAC_V_int) and the server only know the cluster external virtual MAC address (MAC_V_int). Cluster virtual MAC addresses are described in Cluster virtual MAC addresses on page 1905.
Figure 232: NAT/Route mode active-passive packet flow
Switch 1 HA cluster Switch 2
Primary Unit
Client
IP: 10.11.101.10 MAC: MAC_Client
Subordinate Unit
Web Server
IP: 172.20.120.130 MAC: MAC_Server
6 The primary unit processes the packet. 7 The primary unit forwards the packet from its external interface to the web server.
IP address Source Destination 172.20.120.141 172.20.120.130 MAC address MAC_V_ext MAC_Server
8 The primary unit continues to process packets in this way unless a failover occurs.
1938
3 The primary unit intercepts the ARP request, and responds with the external virtual MAC address (MAC_V_ext) which corresponds its IP address of 172.20.120.141. 4 The web server then sends response packets to the primary unit external interface.
IP address Source Destination 172.20.120.130 172.20.120.141 MAC address MAC_Server MAC_V_ext
5 The primary unit processes the packet. 6 The primary unit forwards the packet from its internal interface to the client.
IP address Source Destination 10.11.101.10 MAC address MAC_Client
172.20.120.130 MAC_V_int
7 The primary unit continues to process packets in this way unless a failover occurs.
1939
The HA virtual MAC addresses are not directly involved in communication between the client and the server. The client computer sends packets to the mail server and the mail server sends responses. In both cases the packets are intercepted and processed by the cluster. The clusters presence on the network is transparent to the client and server computers. The primary unit sends gratuitous ARP packets to Switch 1 that associate all MAC addresses on the network segment connected to the cluster external interface with the HA virtual MAC address. The primary unit also sends gratuitous ARP packets to Switch 2 that associate all MAC addresses on the network segment connected to the cluster internal interface with the HA virtual MAC address. In both cases, this results in the switches sending packets to the primary unit interfaces.
Figure 233: Transparent mode active-passive packet flow
Switch 1 HA cluster Switch 2
Primary Unit
Client
IP: 10.11.101.10 MAC: MAC_Client
Subordinate Unit
Mail Server
IP: 10.11.101.200 MAC: MAC_Server
6 The primary unit processes the packet. 7 The primary unit forwards the packet from its external interface to the mail server.
IP address Source Destination 10.11.101.10 10.11.101.200 MAC address MAC_Client MAC_Server
8 The primary unit continues to process packets in this way unless a failover occurs.
1940
5 The primary unit processes the packet. 6 The primary unit forwards the packet from its internal interface to the client.
IP address Source Destination 10.11.101.200 10.11.101.10 MAC address MAC_Server MAC_Client
7 The primary unit continues to process packets in this way unless a failover occurs.
1941
Failover performance
Failover performance
This section describes the designed device and link failover times for a FortiGate cluster and also shows results of a failover performance test.
1942
Failover performance
Reduce the time between gratuitous arp packets. This may also caused connected network equipment to recognize the failover sooner. To send 50 gratuitous arp packets with 1 second between each packet: config system ha set arp 50 set arps-interval 1 end Reduce the number of lost heartbeat packets and reduce the heartbeat interval timers to be able to more quickly detect a device failure. To set the lost heartbeat threshold to 3 packets and the heartbeat interval to 100 milliseconds: config system ha set hb-interval 3 set hb-lost-threshold 1 end Reduce the hello state hold down time to reduce the amount of the time the cluster waits before transitioning from the hello to the work state. To set the hello state hold down time to 5 seconds: config system ha set helo-holddown 5 end Enable sending a link failed signal after a link failover to make sure that attached network equipment responds a quickly as possible to a link failure. To enable the link failed signal: config system ha set link-failed-signal enable end
1943
Failover performance
1944
1945
Active-active HA provides session failover protection for all TCP sessions except UTM sessions. Active-active HA does not provide session failover for UTM sessions. Active-active HA also does not provide session failover for UDP, ICMP, multicast, and broadcast sessions. Protection profile sessions and all UDP, ICMP, multicast, and broadcast sessions are not failed over and must be restarted. If a subordinate unit fails, the primary unit redistributes all TCP communications sessions among the remaining cluster units. Protection profile sessions that are in progress on the subordinate unit that failed are not failed over and must be restarted. All sessions being processed by the primary unit, including UDP, ICMP, multicast, and broadcast sessions, are not affected. Because of the limitation of not supporting failover of UDP, ICMP, multicast, and broadcast sessions, active-active HA can be a less robust session failover solution than active-passive HA. See Session failover (session pick-up) on page 1932 more information about FortiGate session failover and its limitations. Active-active HA does maintain as many UTM sessions as possible after a failover by continuing to process the UTM sessions that were being processed by the cluster units that are still operating. See Active-active HA subordinate units sessions can resume after a failover on page 1936 for more information. Active-passive HA does not support maintaining UTM sessions after a failover.
Hub
Random IP
IP Port
1946
Once a packet has been propagated to a subordinate unit, all packets are part of that same communication session are also propagated to that same subordinate unit. Traffic is distributed according to communication session, not just according to individual packet. Any subordinate unit that receives a forwarded packet processes it, without applying load balancing. Note that subordinate units are still considered to be active, because they perform routing, virus scanning, and other FortiGate unit tasks on their share of the traffic. Active subordinate units also share their session and link status information with all cluster units. The only things that active members do not do is make load balancing decisions. Even though the primary unit is responsible for the load balancing process, the primary unit still acts like a FortiGate unit in that it processes packets, performing, routing, firewall, virus scanning, and other FortiGate unit tasks on its share of the traffic. Depending on the load balancing schedule used, the primary unit may assign itself a smaller share of the total load.
1947
Normally you would not change the HTTPS port. However, if your network uses a proxy server for HTTPS traffic you may have to use the config antivirus service command to configure your cluster to use a custom HTTPS port. If your network uses a proxy server you might also use the same port for both HTTP and HTTPS traffic. In this case you would use config antivirus service to configure the FortiGate unit to use custom ports for both HTTP and HTTPS traffic. Using the same port for HTTP and HTTPS traffic can cause problems with active-active clusters because active-active clusters always load balance HTTP traffic. If both HTTP and HTTPS use the same port, the active-active cluster cannot tell the difference between HTTP and HTTPS traffic and will load balance both HTTP and HTTPS traffic. As mentioned above, load balancing HTTPS traffic may cause problems with HTTPS web filtering. To avoid this problem, you should configure your proxy server to use different ports for HTTP and HTTPS traffic. Then use the config antivirus service command to configure your cluster to also use different ports for HTTP and HTTPS.
1948
1949
1950
You set the weight for each unit separately. For the example cluster of 5 FortiGate-620B units you can set the weight for each unit as follows: config system ha set mode a-a set schedule weight-roud-robin set weight 0 5 set weight 1 10 set weight 2 15 set weight 3 20 set weight 4 30 end If you enter the get command to view the HA configuration the output for weight would be: weight 5 10 15 20 30 40 40 40 40 40 40 40 40 40 40 40 This configuration has the following results if the output of the get system ha status command is that shown above: The first five connections are processed by the primary unit (host name head_office_cla, priority 0, weight 5). From the output of the The next 10 connections are processed by the first subordinate unit (host name head_office_clb, priority 1, weight 10) The next 15 connections are processed by the second subordinate unit (host name head_office_clc, priority 2, weight 15) The next 20 connections are processed by the third subordinate unit (host name head_office_cld, priority 3, weight 20) The next 30 connections are processed by the fourth subordinate unit (host name head_office_cle, priority 4, weight 30)
Dynamically optimizing weighted load balancing according to how busy cluster units are
In conjunction with using static weights to load balance sessions among cluster units you can configure a cluster to load balance sessions according to individual cluster unit CPU usage, memory usage, and number of UTM proxy sessions. If any of these system loading indicators increases above configured thresholds, weighted load balancing sends fewer new sessions to the busy unit until it recovers. High CPU or memory usage indicates that a unit is under increased load and may not be able to process more sessions. UTM proxy use is also a good indicator of how busy a cluster unit is since processing high numbers of UTM proxy sessions can quickly reduce overall cluster unit performance. For example, if you set a CPU usage high watermark, when a cluster units CPU usage reaches the high watermark threshold fewer sessions are sent to it. With fewer sessions to process the cluster units CPU usage should fall back to a low watermark threshold. When this happens the cluster resumes load balancing sessions to the cluster unit as normal. You can set different high and low watermark thresholds for CPU usage and memory usage, and for the number of HTTP, FTP, IMAP, POP3, SMTP, or NNTP UTM proxy sessions. For each loading indicator you set a high watermark threshold a low watermark threshold and a weight. When you first enable this feature the weighted load balancing configuration is synchronized to all cluster units. Subsequent changes to the weighted load balancing configuration are not synchronized so you can configure different weights on each cluster unit.
1951
If a cluster units CPU usage reaches the high watermark threshold fewer sessions are sent to it. With fewer sessions to process the cluster units CPU usage should fall back to the low watermark threshold. When this happens the cluster resumes sending sessions to at the previous rate. The CPU usage, memory usage, and UTM proxy weights determine how the cluster load balances sessions when a high watermark threshold is reached and also affect how the cluster load balances sessions when multiple cluster units reach different high watermark thresholds at the same time. For example, you might be less concerned about a cluster unit reaching the memory usage high watermark threshold than reaching the CPU usage high watermark threshold. If this is the case you can set the weight lower for memory usage. Then, if one cluster unit reaches the CPU usage high watermark threshold and a second cluster unit reaches the memory usage high watermark threshold the cluster will load balance more sessions to the unit with high memory usage and fewer sessions to the cluster unit with high CPU usage. As a result, reaching the CPU usage high watermark will have a greater affect on how sessions are redistributed than reaching the memory usage high watermark. When a high watermark threshold is reached, the corresponding weight is subtracted from the static weight of the cluster unit. The lower the weight the fewer the number of sessions that are load balanced to that unit. Subsequently when the low watermark threshold is reached, the static weight of the cluster returns to its configured value. For the weights to all be effective the weights assigned to the load indicators should usually be lower than or equal to the static weights assigned to the cluster units. Use the following command to set thresholds and weights for CPU and memory usage and UTM proxy sessions: config system ha set mode a-a set schedule weight-round-robin set cpu-threshold <weight> <low> <high> set memory-threshold <weight> <low> <high> set http-proxy-threshold <weight> <low> <high> set ftp-proxy-threshold <weight> <low> <high> set imap-proxy-threshold <weight> <low> <high> set nntp-proxy-threshold <weight> <low> <high> set pop3-proxy-threshold <weight> <low> <high> set smtp-proxy-threshold <weight> <low> <high> end For each option, the weight range is 0 to 255 and the default weight is 5. The low and high watermarks are a percent (0 to 100). The default low and high watermarks are 0 which means they are disabled. The high watermark must be greater than the low watermark. For CPU and memory usage the low and high watermarks are compared with the percentage CPU and memory use of the cluster unit. For each of the UTM proxies the high and low watermarks are compared to a number that represents percent of the max number of proxy sessions being used by a proxy. This number is calculated using the formula: proxy usage = (current sessions * 100) / max sessions where: current sessions is the number of active sessions for the proxy type. max sessions is the session limit for the proxy type. The session limit depends on the FortiGate unit and its configuration.
1952
You can use the following command to display the maximum and current number of sessions for a UTM proxy: get test { ftpd | http | imap | nntp | pop3 | smtp} 4 You can use the following command to display the maximum number of session and the and current number of sessions for all of the proxies: get test proxyworker 4 The command output includes lines similar to the following: get test http 4 HTTP Common Current Connections 5000/8032 In the example, 5000 is the current number of proxy connections being used by HTTP and 8032 is the maximum number of proxy sessions allowed. For this example the proxy usage would be: proxy usage = (5000 * 100) / 8032 proxy usage = 62%
Connect to the cluster CLI and use the following command to set the CPU usage threshold weight to 30, low watermark to 60, and high watermark to 80. This command also sets the memory usage threshold weight to 10, low watermark to 60, and high watermark to 90. config system ha set mode a-a set schedule weight-round-robin set cpu-threshold 30 60 80 set memory-threshold 10 60 90 end
62
0_
ha
_1
62
0_
ha _2
62
0_
ha
_3
1953
The static weights for the cluster units remain at the default values of 40. Since this command changes the mode to a-a and the schedule to weight-round-robin for the first time, the weight settings are synchronized to all cluster units. As a result of this configuration, if the CPU usage of any cluster unit (for example, 620_ha_1) reaches 80% the static weight for that cluster unit is reduced from 40 to 10 and only 10 of every 120 new sessions are load balanced to this cluster unit. If the memory usage of 620_ha_1 also reaches 90% the static weight further reduces to 0 and no new sessions are load balanced to 620_ha_1. Also, if the memory usage of 620_ha_2 reaches 90% the static weight of 620_ha_2 reduces to 30 and 30 of every 120 new sessions are load balanced to 620_ha_2. Now that you have established the weight load balancing configuration for the entire cluster you can monitor the cluster to verify that processing gets distributed evenly to all cluster units. From the web-based manager you can go do System > Config > HA > View HA Statistics and see the CPU usage, active sessions, memory usage and other statistics for all of the cluster units. If you notice that one cluster unit is more or less busy than others you can adjust the dynamic weights separately for each cluster unit. For example, in some active-active clusters the primary unit may tend to be busier than other cluster units because in addition to processing sessions the primary unit also receives all packets sent to the cluster and performs load balancing to distribute the sessions to other cluster units. To reduce the load on the primary unit you could reduce the CPU and memory usage high watermark thresholds for the primary unit so that fewer sessions are distributed to the primary unit. You could also reduce the primary units high watermark setting for the proxies to distribute more proxy sessions to other cluster units.
Note: Note that this would only be useful if you are using device priorities and override settings to make sure the same unit always becomes the primary unit. See Controlling primary unit selection using device priority and override on page 1747.
If the example cluster is configured for 620_ha_2 to be the primary unit, connect to the 620_ha_2s CLI and enter the following command to set CPU usage, memory usage, and proxy usage high watermark thresholds lower. config system ha set cpu-threshold 30 60 70 set memory-threshold 30 60 70 set http-proxy-threshold 30 60 70 set ftp-proxy-threshold 30 60 70 set imap-proxy-threshold 30 60 70 set nntp-proxy-threshold 30 60 70 set pop3-proxy-threshold 30 60 70 set smtp-proxy-threshold 30 60 70 end As a result, when any of these factors reaches 70% on the primary unit, fewer sessions will be processed by the primary unit, preventing the number of sessions being processed from rising.
1954
In NAT/Route mode, the HA cluster works as a gateway when it responds to ARP requests. Therefore, the client and server only know the gateway MAC addresses. The client only knows the cluster internal virtual MAC address (MAC_V_int) and the server only know the cluster external virtual MAC address (MAC_V_int). The cluster virtual MAC address is described in Cluster virtual MAC addresses on page 1905.
Figure 235: NAT/Route mode active-active packet flow
Switch 1 HA cluster Switch 2
Primary Unit
Client
IP: 10.11.101.10 MAC: MAC_Client
Subordinate Unit
MAC: MAC_S_int MAC: MAC_S_ext
Web Server
IP: 172.20.120.130 MAC: MAC_Server
1955
4 The primary unit intercepts the ARP request, and responds with the internal virtual MAC address (MAC_V_int) which corresponds to its IP address of 10.11.101.100. 5 The clients request packet reaches the primary unit internal interface.
IP address Source Destination 10.11.101.10 172.20.120.130 MAC address MAC_Client MAC_V_int
6 The primary unit decides that the subordinate unit should handle this packet, and forwards it to the subordinate unit internal interface. The source MAC address of the forwarded packet is changed to the actual MAC address of the primary unit internal interface.
IP address Source Destination 10.11.101.10 172.20.120.130 MAC address MAC_P_int MAC_S_int
7 The subordinate unit recognizes that the packet has been forwarded from the primary unit and processes it. 8 The subordinate unit forwards the packet from its external interface to the web server.
IP address Source Destination 172.20.120.141 172.20.120.130 MAC address MAC_S_ext MAC_Server
9 The primary unit forwards further packets in the same session to the subordinate unit. 10 Packets for other sessions are load balanced by the primary unit and either sent to the subordinate unit or processed by the primary unit.
1956
5 The primary unit decides that the subordinate unit should handle this packet, and forwards it to the subordinate unit external interface. The source MAC address of the forwarded packet is changed to the actual MAC address of the primary unit external interface.
IP address Source Destination 172.20.120.130 172.20.120.141 MAC address MAC_P_ext MAC_S_ext
6 The subordinate unit recognizes that packet has been forwarded from the primary unit and processes it. 7 The subordinate unit forwards the packet from its internal interface to the client.
IP address Source Destination 172.20.120.130 10.11.101.10 MAC address MAC_S_int MAC_Client
8 The primary unit forwards further packets in the same session to the subordinate unit. 9 Packets for other sessions are load balanced by the primary unit and either sent to the subordinate unit or processed by the primary unit.
1957
The HA virtual MAC addresses are not directly involved in communicate between the client and the server. The client computer sends packets to the mail server and the mail server sends responses. In both cases the packets are intercepted and load balanced among cluster members. The clusters presence on the network and its load balancing are transparent to the client and server computers. The primary unit sends gratuitous ARP packets to Switch 1 that associate all MAC addresses on the network segment connected to the cluster external interface with the external virtual MAC address. The primary unit also sends gratuitous ARP packets to Switch 2 that associate all MAC addresses on the network segment connected to the cluster internal interface with the internal virtual MAC address. In both cases, this results in the switches sending packets to the primary unit interfaces.
1958
Primary Unit
MAC: MAC_P_int Cluster Internal Interface MAC: MAC_P_ext Cluster External Interface
Client
IP: 10.11.101.10 MAC: MAC_Client
Subordinate Unit
MAC: MAC_S_int MAC: MAC_S_ext
Mail Server
IP: 10.11.101.200 MAC: MAC_Server
6 The primary unit decides that the subordinate unit should handle this packet, and forwards it to the subordinate unit internal interface. The source MAC address of the forwarded packet is changed to the actual MAC address of the primary unit internal interface.
IP address Source Destination 10.11.101.10 10.11.101.200 MAC address MAC_P_int MAC_S_int
7 The subordinate unit recognizes that packet has been forwarded from the primary unit and processes it. 8 The subordinate unit forwards the packet from its external interface to the mail server.
IP address Source Destination 10.11.101.10 10.11.101.200 MAC address MAC_S_ext MAC_Server
9 The primary unit forwards further packets in the same session to the subordinate unit. 10 Packets for other sessions are load balanced by the primary unit and either sent to the subordinate unit or processed by the primary unit.
1959
5 The primary unit decides that the subordinate unit should handle this packet, and forwards it to the subordinate unit external interface. The source MAC address of the forwarded packet is changed to the actual MAC address of the primary unit external interface.
IP address Source Destination 10.11.101.200 10.11.101.10 MAC address MAC_P_ext MAC_S_ext
6 The subordinate unit recognizes that packet has been forwarded from the primary unit and processes it. 7 The subordinate unit forwards the packet from its internal interface to the client.
IP address Source Destination 10.11.101.200 10.11.101.10 MAC address MAC_S_int MAC_Client
8 The primary unit forwards further packets in the same session to the subordinate unit. 9 Packets for other sessions are load balanced by the primary unit and either sent to the subordinate unit or processed by the primary unit.
1960
5 Traffic sent to the cluster is now received and processed by the new primary unit. If there were more than two cluster units in the original cluster, the new primary unit would load balance packets to the remaining cluster members.
1961
1962
P E or S xte t1 w rn itc a h l P or t1 R ou te r
Internal Network
Assigning the virtual MAC addresses in this way results in two restrictions when installing HA clusters: Two clusters with the same group ID cannot connect to the same switch and cannot be installed on the same network unless they are separated by a router. Two or more interfaces on the same primary unit cannot be connected to the same switch unless the traffic is separated using VLANs and unless the switch is VLANaware.
or ti un Ga it te #1
or
t2
In S ter w n itc al h P or t2
F o un rt it iGa #2 te
1963
Forward Delay
For an active-active HA cluster to be compatible with the spanning tree algorithm, the FGCP requires that the sum of maximum age and forward delay should be less than 20 seconds. The maximum age and forward delay settings are designed to prevent layer 2 loops. If there is no possibility of layer 2 loops in the network, you could reduce the forward delay to the minimum value. For some Dell 3348 switches the default maximum age is 20 seconds and the default forward delay is 15 seconds. In this configuration the switch cannot work with a FortiGate HA cluster. However, the switch and cluster are compatible if the maximum age is reduced to 10 seconds and the forward delay is reduced to 5 seconds.
1964
1965
You can also use the following CLI commands to change the Ethertypes of the HA heartbeat packets: config system ha set ha-eth-type <ha_ethertype_4-digit_hex> set hc-eth-type <hc_ethertype_4-digit_hex> set l2ep-eth-type <l2ep_ethertype_4-digit_hex> end For more information, see Heartbeat packet Ethertypes on page 1902.
1966
VRRP
A Virtual Router Redundancy Protocol FortiGate unit and VRRP compatible (VRRP) configuration can be used as a Router in a high availability solution to make sure that VRRP group a network maintains connectivity with the LAN Internet (or with other networks) even if the default router for the network fails. Using Internal VRRP, if a router or a FortiGate unit fails all Network traffic to this router transparently fails over to another router or FortiGate unit that takes over the role of the router or FortiGate unit that failed. If the failed router or FortiGate unit is restored, it will once again take over processing traffic for the network. VRRP is described by RFC 3768. To configure VRRP you create a VRRP group that contains two or more routers. Some or all of these routers can be FortiGate units. You can include different FortiGate models in the same VRRP group. The group members are configured to be the master router and one or more backup routers of the VRRP group. The network directs all traffic to the masters IP address and MAC address. If the master fails, VRRP dynamically shifts packet forwarding to a backup router. VRRP provides this redundancy without user intervention or additional configuration to any of the devices on the network. The VRRP redundancy scheme means that devices on the network keep a single IP address for the default gateway and this IP address maps to a well-known virtual MAC address. If the VRRP master fails, one of the backup units becomes the new master and acquires virtual IP and MAC addresses that match the addresses of the master. The network then automatically directs all traffic to the backup unit. VRRP uses the broadcast capabilities of Ethernet networks. A long as one of the routers in a VRRP group is running, ARP requests for the default gateway IP address always receive replies. Additionally, hosts can send packets outside their subnet without interruption. FortiGate units support VRRP and can be quickly and easily integrated into a network that has already deployed a group of routers using VRRP. You can also create a new VRRP configuration consisting of a FortiGate unit acting as a VRRP master with one or more VRRP-compatible routers acting as backup routers. Some or all of those backup routers can be FortiGate units. During normal operation the VRRP master unit sends VRRP advertisement messages to the backup units. A backup unit will not attempt to become a master unit while it is receiving these messages. When a FortiGate unit operating as a VRRP master fails, a backup unit takes its place and continues processing network traffic. The backup unit assumes the master unit has failed if it stops receiving the advertisement messages from the master unit. The backup unit with the highest priority becomes the new master unit after a short delay. During this delay the new master unit sends gratuitous ARPs to the network to map the virtual router IP address it its MAC address. As a result, all packets sent to the default route IP address are sent the new master unit. If the backup unit is a FortiGate unit, the network continues to benefit from FortiOS security features. If the backup unit is a router, after a failure traffic will continue to flow, but FortiOS security features will be unavailable until the FortiGate unit is back on line.
1967
VRRP
During a VRRP failover, as the backup unit starts to forward traffic it will not have session information for all of the failed over in-progress sessions. If the backup unit is operating as a normal FortiGate unit it will not be able to forward this traffic because of the lack of session information. To resolve this problem, immediately after a failover and for a short time as its taking over traffic processing, the backup unit operates with asymmetric routing enabled. This allows the backup unit to re-create all of the in-progress sessions and add them to the session table. While operating with asymmetric routing enabled, the backup unit cannot apply security functions. When the start-time ends the backup unit disables asymmetric routing and returns to normal operation including applying security functions.
The VRRP virtual MAC address feature is disabled by default. Wen you enable the feature on a FortiGate interface, all of the VRRP routers added to that interface use their own VRRP virtual MAC address. Each virtual MAC address will be different because each virtual router has its own ID. Use the following command to enable the VRRP virtual MAC address on the port2 interface: config system interface edit port2 set vrrp-virtual-mac enable end end
High Availability for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1968
VRRP
Configuring VRRP
The port2 interface will now accept packets sent to the MAC addresses of the VRRP virtual routers added to this interface. Using the VRRP virtual MAC address can improve network efficiency especially on large and complex LANs because when a failover occurs devices on the LAN do not have to learn a new MAC address for the new VRRP router. If the VRRP virtual MAC address feature is disabled, the VRRP group uses the MAC address of the master. In the case of a FortiGate VRRP virtual router this is the MAC address of the FortiGate interface that the VRRP virtual routers are added to. If a master fails, when the new master takes over it sends gratuitous ARPs to associate the VRRP virtual router IP address with the MAC address of the new master (or the interface of the FortiGate unit that has become the new master). If the VRRP virtual MAC address is enabled the new master uses the same MAC address as the old master.
Configuring VRRP
To configure VRRP you must configure two or more FortiGate interfaces or routers with the same virtual router ID and IP address. Then these FortiGate units or routers can automatically join the same VRRP group. You must also assign priorities to each of the FortiGate units or routers in the VRRP group. One of the FortiGate units or routers must have the highest priority to become the master. The other FortiGate units or routers in the group are assigned lower priorities and become backup units. All of the units in the VRRP group should have different priorities. If the master unit fails, VRRP automatically fails over to the remaining unit in the group with the highest priority. You configure VRRP from the FortiGate CLI by adding a VRRP virtual router to a FortiGate interface. You can add VRRP virtual routers to multiple FortiGate interfaces and you can add more than one virtual router to the same interface.
1969
Configuring VRRP
VRRP
Internal Network
To configure the FortiGate units for VRRP 1 Select one of the FortiGate units to be the VRRP master and the other to be the backup unit. 2 From the master units CLI, enter the following command to enable the VRRP virtual MAC address on the port2 interface and add the VRRP virtual router to the port2 interface: config system interface edit port2 set vrrp-virtual-mac enable config vrrp edit 5 set vrip 10.31.101.120 set priority 255 end end 3 From the backup units CLI, enter the following command to enable the VRRP virtual MAC address on the port2 interface and add the VRRP virtual router to the port2 interface: config system interface edit port2 set vrrp-virtual-mac enable config vrrp edit 5 set vrip 10.31.101.120 set priority 50 end end
1970
VRRP
Configuring VRRP
Example VRRP configuration: VRRP load balancing two FortiGate units and two VRRP groups
In this configuration two VRRP groups are involved. Each FortiGate unit participates in both of them. One FortiGate unit is the master of one group and the other FortiGate unit is the master of the other group. The network distributes traffic between two different default routes (10.31.101.120 and 10.31.101.130). One VRRP group is configured with one of the default route IP addresses and the other VRRP group get the other default route IP address. So during normal operation both FortiGate units are processing traffic and the VRRP groups are used to load balance the traffic between the two FortiGate units. If one of the FortiGate units fails, the remaining FortiGate unit becomes the master of both VRRP groups. The network sends all traffic for both default routes to this FortiGate unit. The result is a configuration that under normal operation load balances traffic between two FortiGate units, but if one of the FortiGate units fails, all traffic fails over to the unit that is still operating. This example also includes enabling the VRRP virtual MAC address on both FortiGate unit port2 interfaces so that the VRRP groups use their VRRP virtual MAC addresses.
Figure 239: Example VRRP configuration with two FortiGate units and two VRRP groups
F o V rt i R vr R Ga i P te d vr pr ip = 5 Ba Un V io = ck it up B vr RR rit 10 vr id P y = .31 pr ip = 1 Ma 50 .1 01 io = 0 st er rit 10 .1 y .3 20 = 1 25 .1 5 01 .1 30
Internal Network
To configure the FortiGate units 1 Log into the CLI of FortiGate unit A. 2 Enter the following command to enable the VRRP virtual MAC address feature and add the VRRP groups to the port2 interface of FortiGate unit A: config system interface edit port2 set vrrp-virtual-mac enable config vrrp edit 50 (32) set vrip 10.31.101.120 set priority 255 next edit 100 (64)
FortiOS Handbook v3: High Availability 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
D 10 efa .3 ul 1. t R 10 o 1. ut 12 e 0
D 10 efa .3 ul 1. t R 10 o 1. ut 13 e 0
1971
Configuring VRRP
VRRP
set vrip 10.31.101.130 set priority 50 end end 3 Log into the CLI of FortiGate unit B. 4 Enter the following command to enable the VRRP virtual MAC address feature and add the VRRP groups to the port2 interface of FortiGate unit B: config system interface edit port2 set vrrp-virtual-mac enable config vrrp edit 50 set vrip 10.31.101.120 set priority 50 next edit 100 set vrip 10.31.101.130 set priority 255 end end
1972
Standalone session synchronization can be used instead of HA to provide TCP session synchronization between two peer FortiGate units. If the external load balancers direct all sessions to one peer the affect is similar to active-passive HA. If external load balancers or routers load balance traffic to both peers, the effect is similar to active-active HA. The load balancers should be configured so that all of the packets for any given session are processed by the same peer. This includes return packets.
Figure 240: Standalone session synchronization
LAN
Internal Network
FortiGate unit
yc Se hr ss i io Li niz n nk at io n
FortiGate unit Fo
By default, standalone session synchronization synchronizes all TCP sessions. You can optionally add filters to a configuration control which TCP sessions are synchronized. You can add filters to only synchronize packets from specified source and destination addresses, specified source and destination interfaces, and specified predefined firewall TCP services.
1973
Unlike HA, standalone session synchronization does not include configuration synchronization. In fact, the configuration of the two peers is not identical because in most cases the peers would have different IP addresses. Also unlike HA, load balancing is done by external routers or load balancers. The FortiGate units only perform session synchronization and session failover.
1974
You must configure session synchronization on both peers. The session synchronization configurations of each peer should compliment the other. In fact you can manage and configure both peers as separate FortiGate units. Using FortiManager, you can manage both peers as two separate FortiGate devices. On each peer, configuring session synchronization consists of selecting the virtual domains to be synchronized using the syncvd field, selecting the virtual domain on the other peer that receives the synchronization packets using the peervd field, and setting IP address of the interface in the peer unit that receives the synchronization packets using the peerip field. The interface with the peerip must be in the peervd virtual domain. The syncvd and peervd settings must be the same on both peers. However, the peerip settings will be different because the peerip setting on the first peer includes the IP address of an interface on the second peer. And the peerip setting on the second peer includes the IP address of an interface on the first peer. Because session synchronization does not synchronize FortiGate configuration settings you must configure both peers separately. For session synchronization to work properly all session synchronized virtual domains must be added to both peers. The names of the matching interfaces in each virtual domain must also be the same; this includes the names of matching VLAN interfaces. Note that the index numbers of the matching interfaces and VLAN interfaces can be different. Also the VLAN IDs of the matching VLAN interfaces can be different. As well, the session synchronized virtual domains should have the same security policies so that sessions can be resumed after a failover using the same security policies. For a configuration example, see Basic example configuration on page 1976.
1975
V P or t1
.1
ro
ot
do er
or
t2
_1
To configure standalone session synchronization 1 Configure the load balancer or router to send all sessions to peer_1. 2 Configure the load balancer or router to send all traffic to peer_2 if peer_1 fails. 3 Use normal FortiGate configuration steps on peer_1: Enable virtual domain configuration. Add the vdom_1 virtual domain. Add port1 and port2 to the vdom_1 virtual domain and configure these interfaces. Set the IP address of port1 to 192.168.20.1. Set the IP address of port2 to 172.110.20.1. Set the IP address of port3 to 10.10.10.1. Add route mode security policies between port1 and port2 to vdom_1. 4 Enter the following commands to configure session synchronization for peer_1
do
or
t1
ro
1976
Lo ou ad ter B or al an c
10
ot
_1
config system session-sync edit 1 set peerip 10.10.10.2 set peervd root set syncvd vdom_1 end 5 Use normal FortiGate configuration steps on peer_2: Enable virtual domain configuration. Add the vdom_1 virtual domain. Add port1 and port2 to the vdom_1 virtual domain and configure these interfaces. Set the IP address of port1 to 192.168.20.2. Set the IP address of port2 to 172.110.20.2. Set the IP address of port3 to 10.10.10.1. Add route mode security policies between port1 and port2 to vdom_1. 6 Enter the following commands to configure session synchronization for peer_1 config system session-sync edit 1 set peerip 10.10.10.1 set peervd root set syncvd vdom_1 end To add a filter You can add a filter to this basic configuration if you only want to synchronize some TCP sessions. For example you can enter the following commands on both FortiGate units to edit the standalone sessions configurations and add a filter so that only HTTP sessions are synchronized config system session-sync edit 1 config filter set service HTTP end end
1977
1978
1979
1980
Quality of Service
Quality of service (QoS) is the capability of the network to adjust some quality aspects for selected flows within your overall network traffic, and may include such techniques as priority-based queuing and traffic policing. Because bandwidth is finite and because some types of traffic are slow, jitter or packet loss sensitive, bandwidth intensive, or operation critical, QoS can be a useful tool for optimizing the performance of the various applications on your network. Before implementing QoS, organizations should first identify the types of traffic that are important to the organization, the types of traffic that use high amounts of bandwidth, and the types of traffic that are sensitive to latency or packet loss.
1981
Traffic policing
For example, a company might want to guarantee sufficient bandwidth for revenue producing e-commerce traffic. They need to ensure that transactions can be completed and that clients do not experience service delays and interruptions. At the same time, the company may need to ensure low latency for voice over IP (VoIP) traffic used by sales and customer support, while traffic latency and bursts may be less critical to the success of other network applications such as long term, resumable file transfers. Many organizations discover that QoS is especially important for managing their voice and streaming multi-media traffic. These types of traffic can rapidly consume bandwidth and are sensitive to latency. Discovering the needs and relative importance of each traffic type on your network will help you to design an appropriate overall approach, including how you will configure each available QoS component technique. Some organizations discover that they only need to configure bandwidth limits for some services. Other organizations determine that they need to fully configure interface and security policy bandwidth limits for all services, and prioritize queuing of critical services relative to traffic rate. You can implement QoS on FortiGate units for services including H.323, TCP, UDP, ICMP, and ESP, using the following techniques:
Traffic policing Traffic shaping Drops packets that do not conform to bandwidth limitations. Helps to ensure that the traffic may consume bandwidth at least at the guaranteed rate by assigning a greater priority queue if the guarantee is not being met. Also ensures that the traffic cannot consume bandwidth greater than the maximum at any given instant in time. Flows greater than the maximum rate are subject to traffic policing. Transmits packets in order of their assigned priority queue for that physical interface. All traffic in a higher priority traffic queue must be completely transmitted before traffic in lower priority queues will be transmitted.
Queuing
When deciding how to configure QoS techniques, it can be helpful to know when FortiGate units employ each technique in the overall traffic processing flow, and the considerations that arise from those mechanisms.
Traffic policing
As traffic arrives (ingress) and departs (egress) on an interface, the FortiGate unit begins to process the traffic. In later phases of the network processing, such as enforcing maximum bandwidth use on sessions handled by a security policy, if the current rate for the destination interface or traffic regulated by that security policy is too high, the FortiGate unit may be required to drop the packet. As a result, time spent on prior processing, such as web filtering, decryption or IPS, can be wasted on some packets that are not ultimately forwarded. This applies to VLAN interfaces as well has physical interfaces. You can prevent this wasted effort on ingress by configuring the FortiGate unit to preemptively drop excess packets when they are received at the source interface, before most other traffic processing is performed: config system interface edit <interface_name> set inbandwidth <rate_int> next end where <rate_int> is the bandwidth limit in Kb/s. Excess packets will be dropped. If inbandwidth is 0, the rate is not limited. A similar command is available that can be performed on egress as well using the CLI commands:
Traffic Shaping for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1982
config system interface edit <interface_name> set outbandwidth <rate_int> next end As with ingress, setting the rate to 0 (zero) sets the rate to unlimited. Rate limiting traffic accepted by the interface enables you to restrict incoming traffic to rates that, while no longer the full capacity of the interface, at the traffic shaping point in the processing are more likely to result in acceptable rates of outgoing traffic per destination interface or all security policies. This conserves FortiGate processing resources for those packets that are more likely to be viable completely to the point of egress. Excessive traffic policing can degrade network performance rather than improve it. For details on factors you may want to consider when configuring traffic policing, see Important considerations on page 1988.
Prioritization and traffic shaping behavior varies by your configuration, the service types and traffic volumes, and by whether the traffic is through traffic, or the traffic originates from or terminates at the FortiGate unit itself.
1983
FortiGate traffic
For traffic types originating on or terminating at the FortiGate unit, such as administrative access to the FortiGate through HTTPS or SSH, or IPsec tunnel negotiations, security policies do not apply, and therefore FortiGate units do not apply traffic shaping. Such traffic also uses the highest priority queue, queue 0. In other words: packet priority = 0 Exceptions to this rule include traffic types that, while technically originated by the FortiGate unit, are connections related to a session governed by a security policy. For example, if you have enabled scanning by FortiGuard Antivirus, traffic from the sender technically terminates at the FortiGate proxy that scans that traffic type; the FortiGate unit initiates a second connection that transmits scanned content to its destination. Because the second connections traffic is technically originating from the FortiGate proxy and therefore the FortiGate unit itself, it uses the highest priority queue, queue 0. However, this connection is logically associated with through traffic, and is therefore subject to possible bandwidth enforcement and guarantees in its governing security policy. In this way, it behaves partly like other through traffic.
Through traffic
For traffic passing through the FortiGate unit, which method a FortiGate unit uses to determine the priority queue varies by whether you have enabled Traffic Shaping. Packets may or may not use a priority queue directly or indirectly derived from the type of service (ToS) bit sometimes used instead with differentiated services in the packets IP header. If Traffic Shaping is not enabled in the security policy, the FortiGate unit neither limits nor guarantees bandwidth, and traffic for that session uses the priority queue determined directly by matching the ToS bit in its header with your configured values: config system global set tos-based-priority {high | low | medium} end or, if you have configured a priority specifically for that TOS bit value: config system tos-based-priority edit <id_int> set tos [0-15] set priority {high | low | medium} next end where tos is the value of the ToS bit in the packets IP header, and high has a priority value of 0 and low is 2. Priority values configured in the second location will override the global ToS-based priority. In other words: packet priority = ToS-based priority For example, you might specify that packets with a ToS bit value of 2 should use queue 0, the highest priority queue: config system tos-based-priority edit 15 set tos 2 set priority high next end
1984
If Traffic Shaping is enabled in the security policy using shared traffic shapers, the FortiGate unit may instead or also subject packets to traffic policing, or priority queue increase in an effort to meet bandwidth guarantees configured in the shaper: config firewall shaper traffic-shaper edit <shaper_name> ... set priority {high | medium | low} set maximum-bandwidth <rate> set guaranteed-bandwidth <rate> end where high has a priority value of 1 and low is 3, and <rate_int> is the bandwidth limit in Kb/s.
Figure 242: Traffic queuing as packet rate increases
BVm^bjb7VcYl^Yi]
3 1 2
EVX`ZigViZ @7$h
<jVgVciZZY7VcYl^Yi]
3 2
FjZjZ%
FjZjZ C
If the current packet rate is less than Guaranteed Bandwidth, packets use priority queue 0. In other words: packet priority = 0 If the current packet rate is greater than Guaranteed Bandwidth but less than Maximum Bandwidth, the FortiGate unit assigns a priority queue by adding the numerical value of the security policy-based priority, where the value of High is 1, and Low is 3, with the numerical value of the ToS-based priority, where high has a priority value of 0 and low is 2. Because the two values are added, depending on the your configured ToS-based priorities, packets in this category could use queues from queue 1 to queue 5. In other words: packet priority = ToS-based priority + security policy-based priority For example, if you have enabled Traffic Shaping in the security policy, and the security policys Traffic Priority is Low (value 3), and the priority normally applied to packets with that ToS bit is medium (value 1), then packets have a total packet priority of 4, and use priority queue 4.
If the current packet rate exceeds Maximum Bandwidth, excess packets are dropped.
1985
Bursts are not redistributed over a longer interval, so bursts are propagated rather than smoothed, although their peak size is limited. Maximum burst size is the capacity of the bucket (the configured bandwidth limit); actual size varies by the current number of tokens in the bucket, which may be less than bucket capacity, due to deductions from previous packets and the fixed rate at which tokens accumulate. A depleted bucket refills at the rate of your configured bandwidth limit. Bursts cannot borrow tokens from other time intervals. This behavior is illustrated in Figure 243 on page 1987.
1986
BVm^bjb 7VcYl^Yi]
H^oZ@7
I^bZhZXdcYh
7jghih^oZ
Id`Zch^cWjX`ZiVkV^aVWaZWVcYl^Yi]
By limiting traffic peaks and token regeneration in this way, the available bandwidth at a given moment may be less than bucket capacity, but your limit on the total amount per time interval is ensured. That is, total bandwidth use during each interval of 1 second is at most the integral of your configured rate. You may observe that external clients, such as FTP or BitTorrent clients, initially report rates between Maximum Bandwidth and twice that of Maximum Bandwidth, depending on the size of their initial burst. This is notably so when a connection is initiated following a period of no network activity.The apparent discrepancy in rates is caused by a difference of perspective when delimiting time intervals. A burst from the client may initially consume all tokens in the bucket, and before the end of 1 second, as the bucket regenerates, be allowed to consume almost another buckets worth of bandwidth. From the perspective of the client, this constitutes one time interval. From the perspective of the FortiGate unit, however, the bucket cannot accumulate tokens while full; therefore, the time interval for token regeneration begins after the initial burst, and does not contain the burst. These different points of reference result in an initial discrepancy equal to the size of the burst the clients rate contains it, but the FortiGate units rate does not. If the connection is sustained to its limit and time progresses over an increasing number of intervals, however, this discrepancy decreases in importance relative to the bandwidth total, and the clients reported rate will eventually approach that of the FortiGate units configured rate limit. For example, your Maximum Bandwidth might be 50 Kb/s and there has been no network activity for one or more seconds. The bucket is full. A burst from an FTP client immediately consumes 50 Kb. Because the bucket completely regenerates over 1 second, by the time almost another 1 second has elapsed from the initial burst, traffic can consume another 49.999 Kb, for a total of 99.999 Kb between the two points in time. From the vantage point of an external FTP client regulated by this bandwidth limit, it therefore initially appears that the bandwidth limit is 99.999 Kb/s, almost twice the configured limit of 50 Kb/s. However, bucket capacity only regenerates at your configured rate of 50 Kb/s, and so the
1987
Important considerations
connection can only consume a maximum of 50 Kb during each second thereafter. The result is that as bandwidth consumption is averaged over an increasing number of time intervals, each of which are limited to 50 Kb/s, the effects of the first intervals doubled bandwidth size diminishes proportionately, and the clients reported rate eventually approach your configured rate limit. This effect is illustrated in Table 112 on page 1988.
Table 112: Effects of a 50 Kb/s limit on client reported rates Total size transferred (Kb) 99.999 (50 + 49.999) 149.999 199.999 249.999 299.999 349.999 ... Time (s) 1 2 3 4 5 6 ... Rate reported by client (Kb/s) 99.999 74.999 66.666 62.499 59.998 58.333 ...
Guaranteed Bandwidth can also be described using a token bucket metaphor. However, because this feature attempts to achieve or exceed a rate rather than limit it, the FortiGate unit does not discard non-conforming packets, as it does for Maximum Bandwidth; instead, when the flow does not achieve the rate, the FortiGate unit increases the packets priority queue, in an effort to increase the rate. Guaranteed and maximum bandwidth rates apply to the bidirectional total for all sessions controlled by the security policy. For example, an FTP connection may entail two separate connections for the data and control portion of the session; some packets may be reply traffic rather than initiating traffic. All packets for both connections are counted when calculating the packet rate for comparison with the guaranteed and maximum bandwidth rate.
Important considerations
In essence, by implementing QoS, you trade some performance and/or stability from traffic X by discarding packets or introducing latency in order to improve performance and stability of traffic Y. The best traffic shaping configuration for your network will appropriately balance the needs of each traffic flow by considering not only the needs of your particular organization, but also the resiliency and other characteristics of each particular service. For example, you may find that web browsing traffic is both more resistant to interruptions or latency and less business critical than UDP or VoIP traffic, and so you might implement less restrictive QoS measures on UDP or VoIP traffic than on HTTP traffic. An appropriate QoS configuration will also take into account the physical limits of your network devices, and the interactions of the aforementioned QoS mechanisms, described in Bandwidth guarantee, limit, and priority interactions on page 1983. You may choose to configure QoS differently based upon the hardware limits of your network and FortiGate unit. Traffic shaping may be less beneficial in extremely high-volume situations where traffic exceeds a network interfaces or your FortiGate models overall physical capacity. A FortiGate unit must have sufficient resources, such as memory and processing power, to process all traffic it receives, and to process it at the required rate; if it does not have this capacity, then dropped packets and increased latency
1988
Important considerations
are likely to occur. For example, if the total amount of memory available for queuing on a physical interface is frequently exceeded by your networks typical packet rates, frames and packets must be dropped. In such a situation, you might choose to implement QoS using a higher model FortiGate unit, or to configure an incoming bandwidth limit on each interface. Incorrect traffic shaping configurations can actually further degrade certain network flows, because excessive discarding of packets or increased latency beyond points that can be gracefully handled by that protocol can create additional overhead at upper layers of the network, which may be attempting to recover from these errors. For example, a configuration might be too restrictive on the bandwidth accepted by an interface, and may therefore drop too many packets, resulting in the inability to complete or maintain a SIP call. To optimize traffic shaping performance, first ensure that the network interfaces Ethernet statistics are clean of errors, collisions, or buffer overruns. To check the interface, enter the following diagnose command to see the traffic statistics: diagnose hardware deviceinfo nic <port_name> If these are not clean, adjust FortiGate unit and settings of routers or other network devices that are connected to the FortiGate unit. For additional information, see Troubleshooting on page 2013. Once Ethernet statistics are clean, you may want to use only some of the available FortiGate QoS techniques, or configure them differently, based upon the nature of FortiGate QoS mechanisms described in Bandwidth guarantee, limit, and priority interactions on page 1983. Configuration considerations include: For maximum bandwidth limits, ensure that bandwidth limits at the source interface and/or the security policy are not too low, which can cause the FortiGate unit to discard an excessive number of packets. For prioritization, consider the ratios of how packets are distributed between available queues, and which queue is used by which types of services. If you assign most packets to the same priority queue, it negates the effects of configuring prioritization. If you assign many high bandwidth services to high priority queues, lower priority queues may be starved for bandwidth and experience increased or indefinite latency. For example, you may want to prioritize a latency-sensitive service such as SIP over a bandwidth-intensive service such as FTP. Consider also that bandwidth guarantees can affect the queue distribution, assigning packets to queue 0 instead of their typical queue in high-volume situations. You may or may not want to guarantee bandwidth, because it causes the FortiGate unit to assign packets to queue 0 if the guaranteed packet rate is not currently being met. Comparing queuing behavior for lower-bandwidth and higher-bandwidth situations, this would mean that effects of prioritization only become visible as traffic volumes rise and exceed their guarantees. Because of this, you might want only some services to use bandwidth guarantees, to avoid the possibility that in high-volume situations all traffic uses the same queue, thereby negating the effects of configuring prioritization.
1989
Important considerations
For prioritization, configure prioritization for all through traffic. You may want to configure prioritization by either ToS-based priority or security policy priority, but not both. This simplifies analysis and troubleshooting. Traffic subject to both security policy and ToS-based priorities will use a combined priority from both of those parts of the configuration, while traffic subject to only one of the prioritization methods will use only that priority. If you configure both methods, or if you configure either method for only a subset of your traffic, packets for which a combined priority applies will frequently receive a lower priority queue than packets for which you have only configured one priority method, or for which you have not configured prioritization. For example, if both ToS-based priority and security policy priority both dictate that a packet should receive a medium priority, in the absence of bandwidth guarantees, a packet will use queue 3, while if only ToS-based priority had been configured, the packet would have used queue 1, and if only security policy-based priority had been configured, the packet would have used queue 2. If no prioritization had been configured at all, the packet would have used queue 0.
For example alternative QoS implementations that illustrate these considerations, see Examples on page 2005
1990
Shared policy shaping and per IP shaping are enabled within the security policy, while the application control shaping is configured in UTM Profiles > Application Control and enabled in the security policy by selecting UTM Profiles and selecting the application control profile from the drop-down list. For more information on setting up the shapers in a security policy, and how the FortiGate unit triages the different shapers, see Shaping order of operations on page 1995.
1991
Per policy
When selecting a shaper to be per policy, the FortiGate unit will apply the shaping rules defined to each security policy individually. For example, the shaper is set to be per policy with a maximum bandwidth of 1000 Kb/s. There are four security policies monitoring traffic through the FortiGate unit. Three of these have the shaper enabled. Each security policy has the same maximum bandwidth of 1000 Kb/s. Per policy traffic shaping is compatible with client/server (active-passive) transparent mode WAN optimization rules. Traffic shaping is ignored for peer-to-peer WAN optimization and for client/server WAN optimization not operating in transparent mode.
All policies
When selecting a shaper to be for all policies - For All Policies Using This Shaper - the FortiGate unit applies the shaping rules to all policies using the same shaper. For example, the shaper is set to be per policy with a maximum bandwidth of 1000 Kb/s. There are four security policies monitoring traffic through the FortiGate unit. All four have the shaper enabled. Each security policy must share the defined 1000 Kb/s, and is set on a first come, first served basis. For example, if policy 1 uses 800 Kb/s, the remaining three must share 200 Kb/s. As policy 1 uses less bandwidth, it is opened up to the other policies to use as required. Once used, any other policies will encounter latency until free bandwidth opens from a policy currently in use.
Traffic priority
Select a Traffic Priority of high, medium or low, so the FortiGate unit manages the relative priorities of different types of traffic. For example, a policy for connecting to a secure web server needed to support e-commerce traffic should be assigned a high traffic priority. Less important services should be assigned a low priority. The firewall provides bandwidth to low-priority connections only when bandwidth is not needed for high-priority connections. Be sure to enable traffic shaping on all security policies. If you do not apply any traffic shaping rule to a policy, the policy is set to high priority by default. Distribute security policies over all three priority queues.
1992
Per-IP shaping
Example
The following steps creates a Per Policy traffic shaper called Throughput with a maximum traffic amount of 720,000 Kb/s, and a guaranteed traffic of 150,000 Kb/s with a high traffic priority. To create the shared shaper - web-based manager 1 Go to Firewall Objects > Traffic Shaper > Shared and select Create New. 2 Enter the Name Throughput. 3 Select Per Policy. 4 Select the Maximum Bandwidth check box and enter the value 120000. 5 Select the Guaranteed Bandwidth check box and enter the value 150000. 6 Set the Traffic Priority to High. 7 Select OK. To create the shared shaper - CLI config firewall shaper traffic-shaper edit Throughput set per-policy enable set maximum-bandwidth 720000 set guaranteed-bandwidth 150000 set priority high end
Per-IP shaping
Traffic shaping by IP enables you to apply traffic shaping to all source IP addresses in the security policy. As well as controlling the maximum bandwidth users of a selected policy, you can also define the maximum number of concurrent sessions. Per-IP traffic shaping enables you limit the behavior of every member of a policy to avoid one user from using all the available bandwidth - it now is shared within a group equally. Using a per-IP shaper avoids having to create multiple policies for every user you want to apply a shaper.
Note: Per-IP traffic shaping is not supported over NP2 interfaces.
Example
The following steps creates a Per-IP traffic shaper called Accounting with a maximum traffic amount of 720,000 Kb/s, and the number of concurrent sessions of 200.
1993
To create the shared shaper - web-based manager 1 Go to Firewall Objects > Traffic Shaper > Per-IP. 2 Select Create New. 3 Enter the Name Accounting. 4 Select the Maximum Bandwidth check box and enter the value 720000. 5 Select the Maximum Concurrent Sessions check box and enter the value 200. 6 Select OK. To create the shared shaper - CLI config firewall shaper per-ip-shaper edit Accounting set max-bandwidth 720000 set max-concurrent-sessions 200 end
Example
This example sets the traffic shaping definition for Facebook to a medium priority, a default traffic shaper. To add traffic shaping for Facebook - web-based manager 1 Go to UTM Objects > Application Control > Application Sensor. 2 Select the Create New Plus icon in the upper right corner of the screen to create a new application group, and enter the name Web. 3 Select OK. 4 Select Create New. 5 Select Web from the Category drop-down list. 6 Select Facebook from the Application drop-down list. 7 Select Monitor for the Action. 8 Select Traffic Shaping and select medium-priority from the drop-down list. 9 Select OK.
1994
To add traffic shaping for Facebook - CLI config application list edit web config entries edit 1 set category 12 set application 15832 set action pass set shaper medium-priority end end end
With this hierarchy, if an application control list has a traffic shaper defined, it will have precedence always over any other security policy shaper. For example, with the example above creating an application control for Facebook, the shaper defined for Facebook will supersede any security policy enabled traffic shapers. While the Facebook application may reach its maximum bandwidth, the user can still have the bandwidth room available from the shared shaper and, if enabled, the per-IP shaper. Equally, any security policy shared shaper will have precedence over any per-IP shaper. However, traffic that exceeds any of these shapers will be dropped. For example, the policy shaper will take effect first, however, if the per-IP shaper limit is reached first, then traffic for that user will be dropped even if the shared shaper limit for the policy has not been exceeded.
1995
To enable traffic shaping - CLI config firewall policy edit <policy_number> ... set traffic-shaper <shaper_name> set per-ip-shaper <shaper_name> end
1996
Table 113: The role of each bit in the IP header TOS 8-bit field bits 0, 1, 2 Precedence Some networks treat high precedence traffic as more important traffic. Precedence should only be used within a network, and can be used differently in each network. Typically you do not care about these bits. When set to 1, this bit indicates low delay is a priority. This is useful for such services as VoIP where delays degrade the quality of the sound. When set to 1, this bit indicates high throughput is a priority. This is useful for services that require lots of bandwidth such as video conferencing. When set to 1, this bit indicates high reliability is a priority. This is useful when a service must always be available such as with DNS servers. When set to 1, this bit indicates low cost is a priority. Generally there is a higher delivery cost associated with enabling bits 3,4, or 5, and bit 6 indicates to use the lowest cost route. Not used at this time.
bit 3
Delay
bit 4
Throughput
bit 5
Reliability
bit 6
Cost
bit 7
The TOS value is set in the CLI using the commands: config system tos-based-priority edit <sequence_number> set tos <ip_tos_value> set priority [high | medium | low] end Where tos is Enter the value of the type of service bit in the IP datagram header with a value between 0 and 15, and priority is the priority of this type of service priority. These priority levels conform to the firewall traffic shaping priorities. For a list of ToS values and their DSCP equivalents see Tos and DSCP mapping on page 2003.
Example
config system tos-based-priority edit 1 set tos 1 set priority low next edit 4 set tos 4 set priority medium next edit 6 set tos 6 set priority high next end
1997
Differentiated Services
TOS in FortiOS
Traffic shaping and TOS follow the following sequence: 1 The CLI command tos-based-priority acts as a tos-to-priority mapping. FortiOS maps the TOS to a priority when it receives a packet. 2 Traffic shaping settings adjust the packets priority according the traffic. 3 Deliver the packet based on its priority.
Differentiated Services
Differentiated Services describes a set of end-to-end Quality of Service (QoS) capabilities. End-to-end QoS is the ability of a network to deliver service required by specific network traffic from one end of the network to another. By configuring differentiated services, you configure your network to deliver particular levels of service for different packets based on the QoS specified by each packet. Differentiated Services (also called DiffServ) is defined by RFC 2474 and 2475 as enhancements to IP networking to enable scalable service discrimination in the IP network without the need for per-flow state and signaling at every hop. Routers that can understand differentiated services sort IP traffic into classes by inspecting the DS field in IPv4 header or the Traffic Class field in the IPv6 header. You can use the FortiGate Differentiated Services feature to change the DSCP (Differentiated Services Code Point) value for all packets accepted by a policy. The network can use these DSCP values to classify, mark, shape, and police traffic, and to perform intelligent queuing. DSCP features are applied to traffic by configuring the routers on your network to apply different service levels to packets depending on the DSCP value of the packet. If the differentiated services feature is not enabled, the FortiGate unit treats traffic as if the DSCP value is set to the default (00), and will not change IP packets' DSCP field. DSCP values are also not applied to traffic if the traffic originates from a FortiGate unit itself. The FortiGate unit applies the DSCP value to the differentiated services (formerly TOS) field in the first word of the IP header. The typical first word of an IP header, with the default DSCP value, is 4500: 4 for IPv4 5 for a length of five words 00 for the default DSCP value
You can change the packet's DSCP field for traffic initiating a session (forward) or for reply traffic (reverse) and enable each direction separately and configure it in the security policy. Note: Changes to DSCP values in a security policy effect new sessions. If traffic must use the new DSCP values immediately, clear all existing sessions.
1998
Differentiated Services
DSCP is enabled using the CLI command: config firewall policy edit <policy_number> ... set diffserv-forward enable set diffservcode-forward <binary_integer> set diffserv-reverse enable set diffservcode-rev <binary_integer> end For more information on the different DCSP commands, see the examples below and the CLI Reference.
Note: If you only set diffserv-forward and diffserv-reverse without setting the corresponding diffvercode values, the FortiGate unit will reset the bits to zero.
For a list of DSCP values and their ToS equivalents see Tos and DSCP mapping on page 2003. DSCP values can also be defined within a shared shaper as a single value, and per-IP shaper for forward and reverse directions.
DSCP examples
For all the following DSCP examples, the FortiGate and client PC configuration is the following diagram and used firewall-based DSCP configurations.
P or
U se r 1
t6 e at tiG or F A t3 or P 2 N A W e at tiG or F B U se r 2 a rn te In l
Example
In this example, an ICMP ping is executed between User 1and FortiGate B, through a FortiGate unit. DSCP is disabled on FortiGate B, and FortiGate A contains the following configuration: config firewall policy edit 2 set srcintf port6 set dstintf port3 set src addr all
FortiOS Handbook v3: Traffic Shaping 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1999
Differentiated Services
dstaddr all action accept schedule always service ANY diffserv-forward enable diffservcode-forward 101110
As a result, FortiGate A changes the DSCP field for outgoing traffic, but not to its reply traffic. The binary DSCP values used map to the following hexadecimal TOS field values, which are observable by a sniffer (also known as a packet tracer): DSCP 000000 is TOS field 0x00 DSCP 101110 is TOS field 0xb8, the recommended DSCP value for expedited forwarding (EF)
If you performed an ICMP ping between User 1 and User 2, the following output illustrates the IP headers for the request and the reply by sniffers on each of FortiGate units network interfaces. The right-most two digits of each IP header are the TOS field, which contains the DSCP value.
User 1 4500 4500 4500 4500 45b8 4500 45b8 4500 45b8 4500 45b8 4500 User 2
Example
In this example, an ICMP ping is executed between User 1 and FortiGate B, through FortiGate A. DSCP is disabled on FortiGate B, and FortiGate A contains the following configuration: config firewall policy edit 2 set srcintf port6 set dstintf port3 set src addr all set dstaddr all set action accept set schedule always set service ANY" set diffserv-forward enable set diffserv-rev enable set diffservcode-forward 101110 set diffservcode-rev 101111 end As a result, FortiGate A changes the DSCP field for both outgoing traffic and its reply traffic. The binary DSCP values in map to the following hexadecimal TOS field values, which are observable by a sniffer (also known as a packet tracer): DSCP 000000 is TOS field 0x00 DSCP 101110 is TOS field 0xb8, the recommended DSCP value for expedited forwarding (EF) DSCP 101111 is TOS field 0xbc
2000
Differentiated Services
If you performed an ICMP ping between User 1 and User 2, the output below illustrates the IP headers observed for the request and the reply by sniffers on each of FortiGate A's and FortiGate B's network interfaces. The right-most two digits of each IP header are the TOS field, which contains the DSCP value.
User 1 4500 45bc 4500 45bc 45b8 4500 45b8 4500 45b8 4500 45b8 4500 User 2
Example
In this example, an ICMP ping is executed between User 1 and FortiGate B, through FortiGate A. DSCP is enabled for both traffic directions on FortiGate A, and enabled only for reply traffic on FortiGate B. FortiGate A contains the following configuration: config firewall policy edit 2 set srcintf port6 set dstintf port3 set src addr all set dstaddr all set action accept set schedule always set service ANY set diffserv-forward enable set diffserv-rev enable set diffservcode-forward 101110 set diffservcode-rev 101111 end FortiGate B contains the following configuration: config firewall policy edit 2 set srcintf wan2 set dstintf internal set src addr all set dstaddr all set action accept set schedule always set service ANY set diffserv-rev enable set diffservcode-rev 101101 end As a result, FortiGate A changes the DSCP field for both outgoing traffic and its reply traffic, and FortiGate B changes the DSCP field only for reply traffic. The binary DSCP values in this configuration map to the following hexadecimal TOS field values: DSCP 000000 is TOS field 0x00 DSCP 101101 is TOS field 0xb4 DSCP 101110 is TOS field 0xb8, the recommended DSCP value for expedited forwarding (EF) DSCP 101111 is TOS field 0xbc
2001
Differentiated Services
If you performed an ICMP ping between User 1 and User 2, the output below illustrates the IP headers observed for the request and the reply by sniffers on each of FortiGate A's and FortiGate B's network interfaces. The right-most two digits of each IP header are the TOS field, which contains the DSCP value.
User 1 4500 45bc 4500 45bc 45b8 45b4 45b8 45b4 45b8 4500 45b8 4500 User 2
Example
In this example, HTTPS and DNS traffic is sent from User 1 to FortiGate B, through FortiGate A. DSCP is enabled for both traffic directions on FortiGate A, and enabled only for reply traffic on FortiGate B. FortiGate A contains the following configuration: config firewall policy edit 2 set srcintf port6 set dstintf port3 set src addr all set dstaddr all set action accept set schedule always set service ANY set diffserv-forward enable set diffserv-rev enable set diffservcode-forward 101110 set diffservcode-rev 101111 end FortiGate B contains the following configuration: config firewall policy edit 2 set srcintf wan2 set dstintf internal set src addr all set dstaddr all set action accept set schedule always set service ANY set diffserv-rev enable set diffservcode-rev 101101 end As a result, FortiGate A changes the DSCP field for both outgoing traffic and its reply traffic, but FortiGate B changes the DSCP field only for reply traffic which passes through its internal interface. Since the example traffic does not pass through the internal interface, FortiGate B does not mark the packets. The binary DSCP values in this configuration map to the following hexadecimal TOS field values: DSCP 000000 is TOS field 0x00 DSCP 101101 is TOS field 0xb4, which is configured on FortiGate B but not observed by the sniffer because the example traffic originates from the FortiGate unit itself, and therefore does not match that security policy. DSCP 101110 is TOS field 0xb8, the recommended DSCP value for expedited forwarding (EF)
Traffic Shaping for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2002
If you sent HTTPS or DNS traffic from User 1 to FortiGate B, the following would illustrate the IP headers observed for the request and the reply by sniffers on each of FortiGate A's and FortiGate B's network interfaces. The right-most two digits of each IP header are the TOS field, which contains the DSCP value.
User 1 4500 45bc 4500 45bc 45b8 4500 45b8 4500 User 2
2003
2004
Examples
While it is possible to configure QoS using a combination of security policies and in ToS-based priorities, and to distribute traffic over all six of the possible queues for each physical interface, the results of those configurations can be more difficult to analyze due to their complexity. In those cases, prioritization behavior can vary by several factors, including traffic volume, ToS (type of service) or differentiated services markings, and correlation of session to a security policy. The following simple examples illustrate QoS configurations using either prioritization by security policy, or prioritization by ToS bit, but not both. The examples also assume you are not configuring traffic shaping for interfaces that receive hardware acceleration from network processing units (NPU).
2005
Examples
To configure bandwidth guarantees, limits, and priorities 1 Go to Firewall Objects > Traffic Shaper > Shared, and select Create New. 2 Enter a name for the shaper. 3 Enter the Guaranteed Bandwidth, if any. Bandwidth guarantees affect prioritization. While packet rates are less than this rate, they use priority queue 0. If this is not the effect you intend, consider entering a small guaranteed rate, or enter 0 to effectively disable bandwidth guarantees. 4 Enter Maximum Bandwidth. Packets greater than this rate will be discarded. 5 Select the Traffic Priority. High has a priority value of 1, while Low is 3. While the current packet rate is below Guaranteed Bandwidth, the FortiGate unit will disregard this setting, and instead use priority queue 0. 6 Select OK.
Sample configuration
This sample configuration limits ingressing bandwidth to 500 Kb/s. It also applies separate traffic shapers to FTP and HTTP traffic. In addition to the interface bandwidth limit, HTTP traffic is subject to a security policy bandwidth limit of 200 Kb/s. All egressing FTP traffic greater than 10 Kb/s is subject to a low priority queue (queue 3), while all egressing HTTP traffic greater than 100 Kb/s is subject to a medium priority queue (queue 2). That is, unless FTP traffic rates are lower than their guaranteed rate, and web traffic rates are greater than their guaranteed rate, FTP traffic is lower priority than web traffic. Traffic less than these guaranteed bandwidth rates use the highest priority queue (queue 0). Set the inbandwidth limits. This setting is only available in the CLI: config system interface edit wan1 set inbandwidth 500 next end Create the traffic shapers or FTP and HTTP. To configure the shapers - web-based manager 1 Go to Firewall Objects > Traffic Shaper > Shared, and select Create New. 2 Enter FTP for the name of the shaper. 3 Enter the Guaranteed Bandwidth, of 10 Kbps. 4 Enter Maximum Bandwidth of 500 Kbps. 5 Select the Traffic Priority of Low. 6 Select OK. 7 Select Create New. 8 Enter HTTP for the name of the shaper. 9 Enter the Guaranteed Bandwidth, of 100 Kbps. 10 Enter Maximum Bandwidth of 200 Kbps.
2006
Examples
11 Select the Traffic Priority of Medium. 12 Select OK. To configure the shapers - CLI config firewall shaper traffic-shaper edit FTP set maximum-bandwidth 500 set guaranteed-bandwidth 10 set per-policy enable set priority low end next edit HTTP set maximum-bandwidth 200 set guaranteed-bandwidth 100 set per-policy enable set priority medium end
2007
Examples
set tos-based-priority {high | low | medium} end where high has a priority value of 0 and low is 2. If you want to prioritize some ToS bit values differently than the global ToS-based priority, configure the priority for packets with that ToS bit value using the following commands: config system tos-based-priority edit <id_int> set tos [0-15] set priority {high | low | medium} next end where and tos is the value of the ToS bit in the packets IP header, and high has a priority value of 0 and low is 2. Priority values configured in this location will override the global ToS-based priority.
Sample configuration
This sample configuration limits ingressing bandwidth to 500 Kb/s. It also queues egressing traffic based upon the ToS bit in the IP header of ingressing packets. Unless specified for the packets ToS bit value, packets use the low priority queue (queue 2). For ToS bit values 4 and 15, the priorities are specified as medium (value 1) and high (value 0), respectively. config system interface edit wan1 set inbandwidth 500 next end config system global set tos-based-priority low end config system tos-based-priority edit 4 set tos 4 set priority medium next edit 15 set tos 15 set priority high next end
2008
Examples
To enable this requirement, you need to create three separate shapers and three security policies for each traffic type.
Note: For this example, the actual values are not actual values, they are used for the simplicity of the example.
VoIP shaper
The VoIP functionary is a key component to the business as a communication tool and as such requires a guaranteed bandwidth. To create a VoIP shaper - web-based manager 1 Go to Firewall Objects > Traffic Shaping > Shared. 2 Enter the Name voip. 3 Select Per Policy. 4 Enter the Maximum Bandwidth of 1000 Kb/s 5 Enter the Guaranteed Bandwidth of 800 Kb/s. 6 Select a Traffic Priority of High. 7 Select OK. To create a VoIP shaper - CLI config firewall shaper traffic-shaper edit voip set maximum-bandwidth 1000 set guaranteed-bandwidth 800 set per-policy enable set priority high end This ensures that whatever number of policies use this shaper, the defined bandwidth will always be the same. At the same time, the bandwidth is continually guaranteed at 800 Kb/s but if available can be as much as 1000 Kb/s. Setting the priority to high ensures that the FortiGate unit always considers VoIP traffic as the most important.
FTP shaper
The FTP shaper sets the maximum bandwidth to use to avoid sudden spikes by sudden uploading or downloading of large files, and interfering with other more important traffic. To create a FTP shaper - web-based manager 1 Go to Firewall Objects > Traffic Shaping > Shared. 2 Enter the Name ftp. 3 Select For all Policies Using This Shaper. 4 Enter the Maximum Bandwidth of 200 Kb/s
2009
Examples
5 Enter the Guaranteed Bandwidth of 200 Kb/s. 6 Select a Traffic Priority of Low. 7 Select OK. To create a FTP shaper - CLI config firewall shaper traffic-shaper edit ftp set maximum-bandwidth 200 set guaranteed-bandwidth 200 set priority low end For this shaper, the maximum and guaranteed bandwidth are set low and to the same value. In this case, the bandwidth is restricted to a specific amount. By also setting the traffic priority low ensures more important traffic will be able to pass before FTP traffic.
2010
Examples
To enable traffic shaping in the security policy - web-based manager 1 Go to Policy > Policy > Policy and select Create New. 2 Enter the following and select:
Source interface/Zone Source address Destination interface/Zone Destination address Schedule Service Action Internal All WAN1 All always SIP ALLOW
3 Select Traffic Shaping. 4 From the drop-down list, select the voip shaper created in the previous steps. 5 Select Reverse Direction Traffic Shaping. 6 Select OK. To enable traffic shaping in the security policy - CLI config firewall policy edit 6 set srcintf internal set scraddr all set dstintf wan1 set dstaddr all set action accept set schedule always set service sip set traffic-shaper voip set reverse-traffic-shaper voip end
2011
Examples
2012
Troubleshooting
This chapter outlines some troubleshooting tips and steps to diagnose the shapers and whether they are working correctly. These diagnose commands include: diagnose system tos-based-priority diagnose firewall shaper traffic-shaper diagnose firewall per-ip-shaper diagnose debug flow This chapter includes the topics: Interface diagnosis Shaper diagnose commands Packet loss with statistics on shapers Packet lost with the debug flow Session list details with dual traffic shaper Additional Information
Interface diagnosis
To optimize traffic shaping performance, first ensure that the network interfaces Ethernet statistics are clean of errors, collisions, or buffer overruns.To check the interface, enter the following diagnose command to see the traffic statistics: diagnose hardware deviceinfo nic <port_name>
TOS command
Use the following command to list command to view information of the TOS lists and traffic. diagnose system tos-based-priority This example displays the priority value currently correlated with each possible TOS bit value. Priority values are displayed in order of their corresponding TOS bit values, which can range between 0 and 15, from lowest TOS bit value to highest. For example, if you have not configured TOS-based priorities, the following appears... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...reflecting that all packets are currently using the same default priority, high (value 0).
2013
Troubleshooting
If you have configured a TOS-based priority of low (value 2) for packets with a ToS bit value of 3, the following appears... 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 ...reflecting that most packets are using the default priority value, except those with a ToS bit value of 3.
Shared shaper
To view information for the shared traffic shaper for security policies enter the command diagnose firewall shaper traffic-shaper list The resultant output displays the information on all available shapers. The more shapers available the longer the list. For example: name Throughput maximum-bandwidth 1200000 Kb/sec guaranteed-bandwidth 50000 Kb/sec current-bandwidth 0 B/sec priority 1 packets dropped 0 Additional commands include: diagnose firewall shaper traffic-shaper state - provides the total number of traffic shapers on the FortiGate unit. diagnose firewall shaper traffic-shaper stats - provides summary statistics on the shapers. Sample output looks like the following: shapers 9 ipv4 0 ipv6 0 drops 0
Per-IP shaper
To view information for the per-IP shaper for security policies enter the command diagnose firewall shaper per-ip-shaper list The resultant output displays the information on all available per-IP shapers. The more shapers available the longer the list. For example: name accounting_group maximum-bandwidth 200000 Kb/sec maximum-concurrent-session 55 packet dropped 0 Additional commands include: diagnose firewall shaper per-ip-shaper state - provides the total number of per-ip shapers on the FortiGate unit. diagnose firewall shaper per-ip-shaper stats - provides summary statistics on the shapers. Sample output looks like the following: memory allocated 3 packet dropped: 0 You can also clear the per-ip statistical data to begin a fresh diagnoses using: diagnose firewall shaper per-ip-shaper clear
2014
Troubleshooting
2015
Additional Information
Troubleshooting
statistic(bits/packets/allow_err): org=96/2/1 reply=0/0/0 tuples=2 orgin->sink: org pre->post, reply pre->post dev=2->3/3->2 gwy=10.160.0.1/0.0.0.0 hook=pre dir=org act=dnat 192.168.171.243:2538>192.168.182.110:80(10.160.0.1:80) hook=post dir=reply act=snat 10.160.0.1:80>192.168.171.243:2538(192.168.182.110:80) pos/(before,after) 0/(0,0), 0/(0,0) misc=0 policy_id=2 auth_info=0 chk_client_info=0 vd=0 serial=00011e81 tos=ff/ff app=0 dd_type=0 dd_rule_id=0
Additional Information
Packets discarded by the shaper impact flow-control mechanisms like TCP. For more accurate testing results prefer UDP protocol. Traffic shaping accuracy is optimum for security policies without a protection profile where no FortiGate content inspection is processed. Do not oversubscribe an outbandwith throughput. For example, sum[guaranteed BW] < outbandwith. For accuracy in bandwidth calculation, it is required to set the outbandwidth parameter on the interfaces. For more information see Bandwidth guarantee, limit, and priority interactions on page 1983. The FortiGate unit is not prioritizing traffic based on the DSCP marking configured in the security policy. However, TOS based prioritizing can be made at ingress. For more information see Differentiated Services on page 1998.
2016
2017
2018
Overview
FortiOS Carrier provides all the features found on FortiGate units plus added features specific to carrier networks. These features include: MMS GTP
MMS
MMS is a standard for sending messages that include multimedia content between mobile phones. MMS is also popular as a method of delivering news and entertainment content including videos, pictures, and text. Carrier networks include four different MMS types of messages MM1, MM3, MM4, and MM7. See MMS background on page 2020.
GTP
The GPRS Tunneling Protocol (GTP) runs on GPRS carrier networks. GPRS is a GSM packet radio standard. It provides more efficient usage of the radio interface so that mobile devices can share the same radio channel. FortiOS supports GTPv1 release 7.15.0 and GTPv1 release 8.12.0. GPRS provides direct connections to the Internet (TCP/IP) and X.25 networks for point-topoint services (connection-less/connection oriented) and point-to-multipoint services (broadcast). GPRS currently supports data rates from 9.6 kbps to more than 100 kbps, and it is best suited for burst forms of traffic. GPRS involves both radio and wired components. The mobile phone sends the message to a base station unit (radio based) that converts the message from radio to wired, and sends the message to the carrier network and eventually the Internet (wired carrier network). See GTP basic concepts on page 2031.
2019
MMS background
MMS background
MMS is a common method for mobile users to send and receive multimedia content. A Carrier network supports MMS across its network. This makes up the MMS Service Provider Network (MSPN). Messages can be sent or received between the MMSC and a number of other services including the Internet, content providers, or other carriers. Each of these different service connections uses different MMS formats including MM1 and MM7 MMS messages (essentially HTTP format), and MM3 and MM4 messages (SMTP formatted). These different formats reflect the different purposes and content for each type of MMS message.
Figure 244: MMS content interfaces
MM3
(SMTP)
Mobile Users
MM1 (HTTP)
MMSC
Content Provider
MM7
(HTTP/SOAP)
MM4
(SMTP)
Other Operator
MM1
(HTTP) Mobile Users
2020
MMS background
Table 115: MMS content interfaces that Type MM 1 MM 3 MM 4 MM 7 Transaction Handset to MMSC Between MMSC and Internet Between Operator MMSCs Content Providers to MMSC Similar to HTTP SMTP SMTP HTTP and SOAP
MMSC
Receiver (receives MMS message from sender) 2. m-notification.req (indicates mesage is available for delivery, includes size, expiry and URI)
1. m-send.req (contains the MMS message and is directed to the URI of the MMSC)
3. m-send.conf (confirms message receipt and handles any error conditions, also includes transaction identity)
If the recipient is on another carrier, the MMSC forwards the message to the recipient's carrier. This forwarding uses the MM4 content interface for forwarding content between operator MMSCs (see Figure 246). Before the MMSC can forward the message to the final recipient, it must first determine if the receivers handset can receive MMS messages using the MM1 content interface. If the recipient can use the MM1 content interface, the content is extracted and sent to a temporary storage server with an HTTP front-end.
2021
MMS background
To retrieve the message, the receivers handset establishes a connection with the MMSC. An HTTP get request is then sent from the recipient to the MMSC. This message contains the URL where the content of the message is stored. The MMSC responds with a retrieve confirmation (m-retrieve.conf) HTTP response that contains the message.
Figure 246: MM4 messages sent between operator MMSCs
1. MM4-forward.req (contains the MMS content and is directed to the receiving MMSC. X-MMS headers contain MMS extensions) 2. MM4-forward.res (administrative message to confirm transaction with status code)
3. MM4-delivery-report.req (feedback required by UA pr VASP) 4. MM4-delivery_report.res (response to feedback request with status codes)
This causes the receivers handset to retrieve the content from the embedded URL. Several messages are exchanged to indicate status of the delivery attempt. Before delivering content, some MMSCs also include a content adaptation service that attempts to modify the multimedia content into a format suitable for the recipients handset. If the receivers handset is not MM1 capable, the message can be delivered to a web based service and the receiver can view the content from a normal Internet browser. The URL for the content can be sent to the receiver in an SMS text message. Using this method, non-MM1 capable recipients can still receive MMS content. Email and web-based gateways from MMSC to the Internet use the MM3 content interface. On the receiving side, the content servers can typically receive service requests both from WAP and normal HTTP browsers, so delivery via the web is simple. For sending from external sources to handsets, most carriers allow MIME encoded message to be sent to the receiver's phone number with a special domain.
2022
MM3
(SMTP)
Mobile Users
MM1 (HTTP)
FortiOS Carrier
Content Provider
MMSC
MM4 M M4
(SMTP)
Other Operator
MM1
(HTTP) Mob Use
FortiOS Carrier can send MMS messages to senders informing those senders that their devices are infected. FortiOS Carrier can also send MMS notifications to administrators to inform them of suspicious activity on their networks. For message floods and duplicate messages, FortiOS Carrier does not send notifications to message senders but does send notifications to administrators and sends messages to sender handsets to complete MM1 and MM4 sessions. Where MMS messaging uses the TCP/IP set of protocols, SMS text messaging uses the Signaling System Number 7 (SS7) set of protocols, which is not supported by FortiOS.
2023
Sender
FortiOS Carrier
MMSC
1. Open TCP session 2. Open TCP session 3. m-send.req 5. Reset TCP session 4. Content blocked 6. m-send.conf replacement message 7. Close TCP Session 8. m-send.rec notification message to sender
(MM1 or MM7/SOAP payload, by configuration)
Sent once per notification period, regardless of how many messages are blocked 9. Notification message to administrators (various protocols) Sent once per notification period, regardless of how many messages are blocked
FortiOS Carrier also sends m-send.rec notifications messages to the MMSC that are then forwarded to the sender to notify them of blocked messages.
2024
MMSC
FortiOS Carrier 1. GET request for message 2. GET request for message 3. m-retrieve.conf mesage 5. m-retrieve.conf replacement message 4. Content blocked
Receiver
Sent once per notification period, regardless of how many messages are blocked 7. Notification message to administrators (various protocols) Sent once per notification period, regardless of how many messages are blocked
Filtering MM3 and MM4 messages works in an similar way (see Figure 250 and Figure 251). FortiOS Carrier intercepts connections to the MMSC, and scans messages as configured. When messages are blocked, FortiOS Carrier closes sessions as required, sends confirmation messages to the sender, notifies administrators, and notifies senders and receivers of messages.
2025
Figure 250: MM3 MMS scanning of messages sent from a sender on the Internet to an MMSC
Internet
FortiOS Carrier
MMSC
1. Open TCP session 2. Open TCP session 3. Send full email message 3. m-retrieve.conf mesage 4. Send full email message Without . on single line
5. Content blocked 7. Send 550 Error and replacement message 8. Close TCP session 9. MM3 notification message Sent once per notification period, regardless of how many messages are blocked
10. Notification message to administrators (various protocols) Sent once per notification period, regardless of how many messages are blocked
2026
Figure 251: MM4 MMS scanning of messages sent between operator MMSCs
FortiOS Carrier
2. Open TCP session 3. Send full MM4-forward.req message 5. m-retrieve.conf mesage 4. Send full MM4-forward.req message Without . on single line
6. Content blocked 8. Send 250 response 9. Close TCP session 10. Open new TCP session 11. Send MM4-forward.res message 12. Close TCP session
13. MM4-forward.req notification Sent once per notification period, regardless of how many messages are blocked
14. Notification message to administrators (various protocols) Sent once per notification period, regardless of how many messages are blocked
2027
Figure 252: MM7 MMS scanning of messages sent between a VASP and an MMSC
FortiOS Carrier
Receiving MMSC
2. Open TCP session 3. submit.req or delivery.req 5. Reset TCP session 4. Content blocked 6. submit.resp/delivery.resp replacement message 7. Close TCP session 8. submit.req/delivery.req notification message Sent once per notification period, regardless of how many messages are blocked 9. Notification message to administrators (various protocols) Sent once per notification period, regardless of how many messages are blocked
2028
Figure 253: MM1 message flood and duplicate message blocking of sent messages
Sender
FortiOS Carrier
MMSC
2. Open TCP session 3. m-send.req 5. Reset TCP session 4. Flood or duplicate blocked 6. m-send.conf replacement message 7. Close TCP Session 8. Notification message to administrators (various protocols) Sent once per notification period, regardless of how many messages are blocked
Figure 254: MM1 message flood and duplicate message blocking of received messages
MMSC
FortiOS Carrier
Receiver
1. GET request for message 2. GET request for message 3. m-retrieve.conf mesage 5. m-retrieve.conf replacement message 4. Flood or duplicate blocked 6. Notification message to administrators (various protocols) Sent once per notification period, regardless of how many messages are blocked
2029
FortiOS Carrier
2. Open TCP session 3. Send full MM4-forward.req message 5. m-retrieve.conf mesage 4. Send full MM4-forward.req message Without . on single line
6. Flood or duplicate blocked 8. Send 250 response 9. Close TCP session 10. Open new TCP session 11. Send MM4-forward.res message 12. Close TCP session
13. Notification message to administrators (various protocols) Sent once per notification period, regardless of how many messages are blocked
2030
Bypassing MMS protection profile filtering based on users carrier end points
Bypassing MMS protection profile filtering based on users carrier end points
You can use carrier end point filtering to exempt MMS sessions from MMS protection profile filtering. Carrier end point filtering matches carrier end points in MMS sessions with carrier end point patterns. If you add a carrier end point pattern to a filter list and set the action to exempt from all scanning, all messages from matching carrier end points bypass MMS protection profile filtering. See Controlling access to MMS services based on a users carrier end point on page 87.
2031
PDP Context
The packet data protocol (PDP) context is a connection between a mobile station and the end address that goes through the SGSN and GGSN. It includes identifying information about the mobile customer used by each server or device to properly forward the call data to the next hop in the carrier network, typically using a GTP tunnel between the SGSN and GGSN. When a mobile customer has an active voice or data connection open, both the SGSN and GGSN have the PDP context information for that customer and session. When a mobile phone wants to communicate with an address on an external packet network, either an IP or X.25 address, the mobile station that phone is connected to opens a PDP context through the SGSN and GGSN to the end address. Before any traffic is sent, the PDP context must first be activated. The information included in the PDP context includes the customers IP address, the IMSI number of the mobile handset, and the tunnel endpoint ID for both the SGSN and GGSN. The ID is a unique number, much like a session ID on a TCP/IP firewall. All this information ensures a uniquely identifiable connection is made. Since one mobile device may have multiple connections open at one time, such as data connections to different Internet services and voice connections to different locations, there may be more than one PDP context with the same IP address making the extra identifying information required. The end point that the mobile phone is connecting to only knows about the GGSN the rest of the GPRS connection is masked by the GGSN. Along the PDP context path, communication is accomplished in using three different protocols. The connection between the Mobile Station and SGSN uses the SM protocol. Between SGSN and GGSN GTP is used. Between GGSN and the end point either IP or X.25 is used.
FortiOS Carrier is concerned with the SGSN to GGSN part of the PDP context the part that uses GTP. For more about PDP context, see Tunnel Management Messages on page 2129.
2032
7 The GGSN then sends back to the SGSN the result of the PDP context creation and if necessary the MS PDP address. 8 The SGSN sends an Activate PDP context accept message to the MS by returning negotiated the PDP context information and if necessary the MS PDP address. 9 Now traffic can pass from the MS to the external network end point. A GGSN creates a PDP context 1 The network receives an IP packet from an external network. 2 The GGSN checks if the PDP Context has already been created. 3 If not, the GGSN sends a PDU notification request to the SGSN in order to initiate a PDP context activation. 4 The GGSN retrieves the IP address of the appropriate SGSN address by interrogating the HLR from the IMSI identifier of the MS. 5 The SGSN sends to the MS a request to activate the indicated PDP context. 6 The PDP context activation procedure follows the one initiated by the MS. See A Mobile Station creates a PDP context on page 2032. 7 When the PDP context is activated, the IP packet can be sent from the GGSN to the MS.
GPRS security
The GPRS network has some built-in security in the form of GPRS authentication. However this is minimal, and is not sufficient for carrier network security needs. A GTP firewall, such as FortiOS Carrier, is required to secure the Gi, Gn, and Gp interfaces.
GPRS authentication
GPRS authentication is handled by the SGSN to prevent unauthorized GPRS calls from reaching the GSM network beyond the SGSN (the base station system, and mobile station). Authentication is accomplished using some of the customers information with a random number and uses two algorithms to create ciphers that then allow authentication for that customer. User identity confidentiality ensures that customer information stays between the mobile station and the SGSN no identifying information goes past the SGSN. Past that point other numbers are used to identify the customer and their connection on the network. Periodically the SGSN may request identity information from the mobile station to compare to what is on record. This specifically looks at the IMEI number.
FortiOS Handbook v3: FortiOS Carrier 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2033
Call confidentiality is achieved through the use of a cipher, similar to the GPRS authentication described earlier. The cipher is applied between the mobile station and the SGSN. Essentially a cipher mask is XORd with each outgoing frame, and the receiving side XORs with its own cipher to result in the original frame and data.
GPRS networks also rely on access points and PDP contexts as central parts of the communication structure. These are not actual devices, but they are still critical . For more information on APN, see Access Point Number (APN) on page 2136. For more information on PDP Context, see PDP Context on page 2032. These devices, their roles, neighboring devices, the interfaces and protocols they use are outlined in the following table. These devices and their connections can be viewed in the Packet flow through the GPRS network on page 2038.
Table 116: Devices on a GPRS network Device role Mobile Phone Mobile Stations (MS) SGSN (local) Neighboring Devices MS Mobile Phone, SGSN MS, SGSN (local or remote), GGSN (local and remote), CDR, CFR, HLR, VLR SGSN (local) SGSN (local or remote), GGSN (local and remote), CDR, CFR, HLR, VLR SGSN (local), WAP gateway, Internet, other external services SGSN (local), GGSN (local) SGSN (local), GGSN (local) interfaces used radio access technology Gb Ga, Gb, Gn, Gp, Gz Gn Ga, Gi, Gn, Gp, Gz Gi, Gp Ga, Gz Ga, Gz IP, Frame Relay IP, Frame Relay, GTP, GTP GTP IP, GTP, GTP IP, GTP GTP GTP Protocols used
SGSN (remote) GGSN (local) GGSN (remote) CDR, CFR HLR, VLR
2034
Radio access
For a mobile phone to access the GPRS core network, it must first connect to a mobile station. This is a cellular tower that is connected to the carrier network. How the mobile phone connects to the mobile station (MS) is determined by what radio access technologies are supported by the MS.
Transport
Transport protocols move data along the carrier network between radio access and the Internet or other carrier networks.
GTP
GPRS Tunnelling Protocol (GTP) is a group of IP-based communications protocols used to carry General Packet Radio Service (GPRS) within Global System for Mobile Communications (GSM) and Universal Mobile Telecommunications System (UMTS) networks. It allows carriers to transport actual cellular packets over their network via tunneling. This tunneling allows users to move between SGSNs and still maintain connection to the the Internet through the GGSN. On a GPRS network, Packet Data Protocol (PDP) context is a data structure used by both the Serving GPRS Support Node (SGSN) and the Gateway GPRS Support Node (GGSN). The PDP context contains the subscribers information including their access point, IP address, IMSI number, and their tunnel endpoint ID for each of the SGSN and GGSN. There have been two versions of GTP to date. The original version of GTP (version 0) had the following differences from the current version (version 1). the tunnel identification was not random there were options for transporting X.25 the fixed port number 3386 was used for all functions, not just charging Optionally TCP was allowed as a transport instead of UDP not all message types are supported in version 0
GTP-C
GTP-C refers to the control layer of the GPRS Transmission network. This part of the protocol deals with network related traffic. FortiOS Carrier handles GTP-c in GTPv1 by using the Tunnel Endpoint IDentifier (TEID), IP address and a Network layer Service Access Point Identifier (NSAPI), sometimes called the application identifier, is an integer value that is part of the PDP context header information used to identify a unique PDP context in a mobile station, and SGSN. For more information on GTP-C, see GTP-C messages on page 2129.
GTP-U
GTP-U refers to the user layer of the GPRS Tunneling network. This part of the protocol deals with user related traffic, user tunnels, and user administration issues.
2035
A GTP-U tunnel is identified by a TEID, an IP address, and a UDP port number. This information uniquely identifies the limb of a GTPv1 PDP context. The IP address and the UDP port number define a UDP/IP path, a connectionless path between two endpoints (i.e. SGSN or GGSN). The TEID identifies the tunnel endpoint in the receiving GTP-U protocol entity; it allows for the multiplexing and demultiplexing of GTP tunnels on a UDP/IP path between a given GSN-GSN pair. For more information on GTP-U, see GTPU messages on page 2130. The GTP core network consists of one or more SGSNs and GGSNs.
GGSN
THE GGSN connects the GPRS network to outside networks such as the Internet. These outside networks are called packet data networks (PDNs). The GGSN acts as an edge router between the two different networks the GGSN forwards incoming packets from the external PDN to the addressed SGSN and the GGSN also forwards outgoing packets to the external PDN. the GGSN also converts the packets from the GPRS packets with SGSN to the external packets, such as IP or X.25.
SGSN
The SGSN connects the GPRS network to mobile stations, and mobile units. Each SGSN has a geographical area, and mobile phones in that area connect to the GPRS network through this SGSN. The SGSN also maintains a location register that contains customers location and user profiles until they connect through a different SGSN at which time the customer information is moved to the new SGSN. This information is used for packet routing and transfer, mobility management also known as location management, logical link management, and authentication and billing functions.
2036
HLR
The Home Location Register (HLR) is a central database that contains details of each mobile phone subscriber that is authorized to use the GSM core network. There can be several logical, and physical, HLRs per public land mobile network (PLMN), though one international mobile subscriber identity (IMSI)/MSISDN pair can be associated with only one logical HLR (which can span several physical nodes) at a time. The HLRs store details of every SIM card issued by the mobile phone operator. Each SIM has a unique identifier called an IMSI which is the primary key to each HLR record.
VLR
The Visitor Location Register (VLR) is a database which stores information about all the mobile devices that are currently under the jurisdiction of the Mobile Switching Center which it serves. Of all the information the VLR stores about each Mobile Station, the most important is the current Location Area Identity (LAI). This information is vital in the call setup process. Whenever an MSC detects a new MS in its network, in addition to creating a new record in the VLR, it also updates the HLR of the mobile subscriber, informing it of the new location of that MS. For more information on GTP, see GTP-U and Charging Management Messages on page 2130.
2037
Table 117: GPRS network interfaces, their roles, and billing Name Ga Device connections that Traffic Protocol use this interface used CDR and GSN (SGSNs and GGSNs) MS and SGSN Its role or how it affects billing
GTP - GTP CDR have the accounting records, that modified to are compiled in the GSN and then sent to include CDR role the Charging Gateway (CG) Frame Relay or IP IP based When an IP address moves to a new MS, the old MS may continue to use and bill that IP address. This is the connection to the Internet. If the GTP tunnel is deleted without notifying the Gi interface, the connection may remain open incurring additional charges. FortiOS Carrier adds this interface to a firewall. See Antioverbilling with FortiOS Carrier on page 2126. When the GTP tunnel is deleted, need to inform other interfaces immediately to prevent misuse of connections remaining open. FortiOS Carrier adds this interface to a firewall. Used for the offline charging interface. Ga is used for online charging.
Gb
Gi
Gn
GTP
Gp Gz
GTP GTP
Note: Corporate customers may have a direct connection to the Gi interface for higher security. The Gi interface is normally an IP network, though a tunnelling protocol such as GRE or IPsec may be used instead.
/z
Ga
a/ z
Gn
Gi
Gp
Gn
Gi
Gb
Gn
2038
1 A mobile phone places a call using a mobile station (MS). This connection between the mobile phone and the MS is a radio connection using one of the radio access technologies. See Radio Access Technology (RAT) type on page 2136. 2 The MS connects to a GPRS System Node (GSN) specifically a Sending GSN. This connection uses the Gb interface and typically uses IP address or Frame Relay. 3 The SGSN checks the mobile phone information located in the home location register (HLR) or visitor location register (VLR) to ensure there is subscriber information for that phone. If this mobile phone is from another network, it uses the VLR and updates its home carriers information with its current location and information. This connection involves the Ga or Gz interfaces, and uses the GTP protocol for communication. 4 The SGSN checks to make sure the phone did not transfer this connection from a different MS. If it did, the connection has already been established (along with the billing) and is handed off to this SGSN. If the call is being handed over from another SGSN, it will use the Gn interface between the two SGSNs. 5 The SGSN sends GTP messages to the local external Gateway GSN (GGSN) to create a GTP tunnel for this PDP context to access the Internet. It is possible that a remote GGSN has access to a service, such as a WAP gateway, that the local GGSN is missing. In this situation, the local SGSN uses the Gp interface to connect to the remote GGSN. Both the Gn and Gp interfaces use GTP. 6 The both the local and remote GGSNs connect to external services outside the GPRS network. These services can include a WAP gateway, a corporate IP network directly connected to the GPRS network, or the Internet. The connection from the GGSN to the external services uses the Gi interface.
2039
2040
MMS profiles
Since MMS profiles can be used by more than one security policy, you can configure one profile for the traffic types handled by a set of security policies requiring identical protection levels and types, rather than repeatedly configuring those same profile settings for each individual security policy.
Note: If the security policy requires authentication, do not select the MMS profile in the security policy. This type of profile is specific to the authenticating user group. For details on configuring the profile associated with the user group, see User Groups in the User Authentication guide.
For example, while traffic between trusted and untrusted networks might need strict protection, traffic between trusted internal addresses might need moderate protection. To provide the different levels of protection, you might configure two separate protection profiles: one for traffic between trusted networks, and one for traffic between trusted and untrusted networks. Once you have configured the MMS profile, you can then apply the profile to MMS traffic by applying it to a security policy. MMS profiles can contain settings relevant to many different services. Each security policy uses the subset of the MMS profile settings that apply to the sessions accepted by the security policy. In this way, you might define just one MMS profile that can be used by many security policies, each policy using a different or overlapping subset of the MMS profile. The MMS Profile page contains options for each of the following: MMS scanning MMS Bulk Email Filtering Detection
2041
Name Ref.
New MMS Profile page Provides settings for configuring an MMS profile. This page also provides settings for configuring DLP archives and logging. Profile Name Comment MMS Scanning MMS Bulk Email Enter a name for the profile. Enter a description about the profile. This is optional. Configure MMS Scanning options. See MMS scanning options on page 2043. Configure MMS Bulk Email options. See MMS bulk email filtering options on page 2044.
Filtering Detection Configure Filtering Detection options. See MMS bulk email filtering options on page 2044. MMS Address Translation MMS Notification Configure MMS Address Translation options. See MMS Address Translation options on page 2046 Configure MMS Notification options. MMS Notification options on page 2047.
2042
Configure DLP archive option. See DLP Archive options on page 2049 Configure logging options. See Logging on page 2050.
Virus
Content Filter
Carrier End Point Block Select to add Carrier End Point Filtering in this MMS profile. Select the carrier end point filter list to apply it to the profile. For information about carrier end point filtering, see Carrier Endpoint Filter Lists on page 2056. MMS Content Checksum Select to add MMS Content Checksum in this MMS profile. Select the MMS content checksum list to apply it to the profile. Pass Fragmented Messages Comfort Clients Select to pass fragmented MM3 and MM4 messages. Fragmented MMS messages cannot be scanned for viruses. If you do not select these options, fragmented MM3 and MM4 message are blocked. Select client comforting for MM1 and MM7 sessions. Since MM1 and MM7 messages use HTTP, MM1 and MM7 client comforting operates like HTTP client comforting.
2043
Comfort Servers
Select server comforting for each protocol. Similar to client comforting, you can use server comforting to prevent server connection timeouts that can occur while waiting for the unit to buffer and scan large POST requests from slow clients. Enter the time in seconds before client and server comforting starts after the download has begun, and the time between sending subsequent data. The number of bytes sent by client or server comforting at each interval.
Oversized MMS Message Select Block or Pass for files and email messages exceeding configured thresholds for each protocol. The oversize threshold refers to the final size of the message, including attachments, after encoding by the client. Clients can use a variety of encoding types; some result in larger file sizes than the original attachment. As a result, a file may be blocked or logged as oversized even if the attachment is several megabytes smaller than the oversize threshold. Threshold (1K-800MB) Enter the oversized file threshold and select KB or MB. If a file is larger than the threshold the file is passed or blocked depending on the Oversized MMS Message setting. The web-based manager displays the allowed threshold range. The threshold maximum is 10% of the units RAM.
2044
MMS Bulk Email Filtering Detection section of the New MMS Profile page This section of the New MMS Profile page contains numerous sections where you can configure specific settings for flood threshold, duplicate threshold and recipient MSISDNs. Message Flood section of the new MMS Profile page The message flood settings for each flood threshold. Expand each to configure settings for a threshold. Flood Threshold 1 Expand to reveal the flood threshold settings for Flood Threshold 1. The settings for Flood Threshold 1 are the same for Flood Threshold 2 and 3. Select to apply Flood Threshold 1 to the MSISDN exception.
Enable
Message Flood Window Enter the period of time during which a message flood will be detected if the Message Flood Limit is exceeded. The message flood window can be 1 to 2880 minutes (48 hours). Message Flood Limit Message Flood Block Time Message Flood Action Flood Threshold 2 Flood Threshold 3 Enter the number of messages which signifies a message flood if exceeded within the Message Flood Window. Enter the amount of time during which the unit performs the Message Flood Action after a message flood is detected. Select one or more actions that the unit should perform when a message flood is detected. Expand to configure settings for Flood Threshold 2. Expand to configure settings for Flood Threshold 3.
Duplicate Message section of the new MMS Profile page The duplicate message threshold settings. Expand each to configure settings for a threshold. MM1 Retrieve Duplicate Enable Select to scan MM1 mm1-retr messages for duplicates. By default, mm1-retr messages are not scanned for duplicates as they may often be the same without necessarily being bulk or spam. Select to enable the selected duplicate message threshold and to make the rest of the options available for configuration. Enter the period of time during which excessive message duplicates will be detected if the Duplicate message Limit it exceeded. The duplicate message window can be 1 to 2880 minutes (48 hours). Enter the number of messages which signifies excessive message duplicates if exceeded within the Duplicate Message Window. Enter the amount of time during which the unit will perform the Duplicate Message Action after a message flood is detected. Select one or more actions that the unit should perform when excessive message duplication is detected. Expand to configure settings for Duplicate Threshold 2. Expand to configure settings for Duplicate Threshold 3.
Enable Duplicate Message Window Duplicate Message Limit Duplicate Message Block Time Duplicate Message Action Duplicate Threshold 2 Duplicate Threshold 3
Recipient MSISDN section of the New MMS Profile page The recipient MSISDN settings for each recipient MSISDN. When you select Create New, you are automatically redirected to the New MSISDN page. Recipient MSISDN Flood Threshold 1 Flood Threshold 2 Flood Threshold 3 The name of the recipient MSISDN. Indicates with a checkmark that Flood Threshold 1 settings is associated with that recipient MSISDN. Indicates with a checkmark that Flood Threshold 2settings is associated with that recipient MSISDN. Indicates with a check mark that Flood Threshold 3 settings is associated with that recipient MSISDN.
2045
Indicates with a checkmark that Duplicate Threshold 1 settings is associated with that recipient MSISDN. Indicates with a checkmark that Duplicate Threshold 2 settings is associated with that recipient MSISDN. Indicates with a checkmark that Duplicate Threshold 3 settings is associated with that recipient MSISDN. Modifies the settings of a Recipient MSISDN in the Recipient MSISDN list. When you select Edit, you are automatically redirected to the New MSISDN page. Removes a Recipient MSISDN in the Recipient MSISDN list within the Recipient MSISDN section of the page. Creates a new Recipient MSISDN. When you select Create New, you are automatically redirected to the New MSISDN page. Enter a name for the recipient MSISDN. Select to apply Flood Threshold 1 to the MSISDN exception. Select to apply Flood Threshold 2 to the MSISDN exception. Select to apply Flood Threshold 3 to the MSISDN exception. Select to apply Duplicate Threshold 1 to the MSISDN exception. Select to apply Duplicate Threshold 2 to the MSISDN exception. Select to apply Duplicate Threshold 3 to the MSISDN exception.
Delete New MSISDN page Create New Recipient MSISDN Flood Threshold 1 Flood Threshold 2 Flood Threshold 3 Duplicate Threshold 1 Duplicate Threshold 2 Duplicate Threshold 3
2046
Enter the sender address identifier that includes the carrier end point. The default identifier is x-up-calling-line-id. If the Sender Address Source is HTTP Header Field, the address and its identifier in the HTTP request header takes the format: <Sender Address Identifier>: <MSISDN_value> Where the <MSISDN_value> is the carrier end point. For example, the HTTP header might contain: x-up-calling-line-id: 6044301297 where x-up-calling-line-id would be the Sender Address Identifier. If the Sender Address Source is Cookie, the address and its identifier in the HTTP request headers Cookie field takes the format of attribute-value pairs: Cookie: id=<cookie-id>; <Sender Address Identifier>=<MSISDN Value> For example, the HTTP request headers might contain: Cookie: id=0123jf!a;x-up-calling-lineid=6044301297 where x-up-calling-line-id would be the Sender Address Identifier. Select to convert the sender address from ASCII to hexadecimal or from hexadecimal to ASCII. This is required by some applications. Select the following to enable adding endpoint prefixes for logging and notification. Select to enable adding the country code to the extracted carrier end point, such as the MSISDN, for logging and notification purposes. You can limit the number length for the test numbers used for internal monitoring without a country code. Enter a carrier end point prefix that should be added to all carrier end points. Use the prefix to add extra information to the carrier end point in the log entry. Enter the minimum length. If this and Maximum Length are set to zero (0), length is not limited. Enter the maximum length. If this and Minimum Length are set to zero (0), length is not limited.
Convert Sender Address From/To Hex Add Endpoint Prefix for Logging/Notification Enable
Prefix
2047
There are separate notifications for each notification type, including virus events. Virus event notifications include the virus name. Up to three viruses are tracked for each user at a time. If a fourth virus is found, one of the existing tracked viruses is removed from the list. The notifications are MM1 m-send-req messages sent from the unit directly to the MMSC for delivery to the client. The host name of the MMSC, the URL to which m-sendreq messages are sent, and the port must be specified.
MMS Notification section of the New MMS Profile page Antivirus Notification List Optionally select an antivirus notification list to select a list of virus names to send notifications for. The unit sends a notification message whenever a virus name or prefix in the antivirus notification list matches the name of a virus detected in a session scanned by the MMS protection profile. Select Disabled if you do not want to use a notification list. To create an antivirus notification list, see Notification List on page 2052. Instead of selecting a notification list you can configure the Virus Scan Notification Type to send notifications for all viruses. Message Protocol In each column, select the protocol used to send notification messages. You can use a different protocol to send the notification message than the protocol on which the violation that caused the notification message was sent. The MMS Notifications options change depending on the message protocol that you select. Select the MM7 message type to use if sending notifications using MM7. Select to use the information in the headers of the original message to address the notification message. If you do not select this option, you can enter the required addressing information manually. You cannot select Detect Server Details if you are sending notification messages using a different message protocol. Enter the FQDN or the IP address of the destination server. Enter the URL of the server. This option is available only when Message Protocol is mm1 or mm7. Enter the port number of the server. Enter the user name required for sending messages using this server (optional). This option is available only when Message Protocol is mm7. Enter the password required for sending messages using this server (optional). This option is available only when Message Protocol is mm7. Enter the value-added-service-provider ID to be used when sending a notification message. This option is available only when Message Protocol is mm7. Enter the value-added-service ID to be used when sending a notification message. This option is available only when Message Protocol is mm7. In each column, select notification for all MMS event types, then enter the amount of time and select the time unit for notice intervals. Alternatively, expand All Notification Types, and then select notification for individual MMS event types. Then enter the amount of time and select the time unit for notice intervals. In each column, select to notify when messages are blocked by the content filter, then enter the amount of time and select the time unit for notice intervals.
Hostname URL
Port Username
Password
VASP ID
VAS ID
Content Filter
2048
File Block
In each column, select to notify when messages are blocked by file block, then enter the amount of time and select the time unit for notice intervals. In each column, select to notify when messages are blocked, then enter the amount of time and select the time unit for notice intervals. In each column, select to notify when message flood events occur, then enter the amount of time and select the time unit for notice intervals. In each column, select to notify when duplicate message events occur, then enter the amount of time and select the time unit for notice intervals. In each column, select to notify when the content within an MMS message is scanned and banned because of the checksum value that was matched.
Duplicate
Notifications Per Second Enter the number of notifications to send per second. If you enter zero(0), the notification rate is not limited. Limit Day of Week Window Start Time Select the days of the week to send notifications. Select the time of day to begin the message alert window. By default, the message window starts at 00:00. You can change this if you want to start the message window later in the day. Select the time of day at which to end the message alert window. By default, the message window ends at 00:24. You can change this if you want to end the message window earlier in the day.
Window Duration
The unit only allows one sixteenth of its memory for transferring content archive files. For example, for units with 128RAM, only 8MB of memory is used when transferring content archive files. It is recommended not to enable full content archiving if antivirus scanning is also configured because of these memory constraints.
2049
DLP Archive section of the New MMS Profile page Display DLP metainformation on the system dashboard Archive to FortiAnalyzer/FortiGuard Select each required protocol to display the content archive summary in the Log and Archive Statistics dashboard widget. Select the type of archiving that you want for the protocol (MM1, MM3, MM4, and MM7). You can choose from Full, Summary or None. None Do not send content archives. Summary Send content archive metadata only. Includes information such as date and time, source and destination, request and response size, and scan result. Full Send content archive both metadata and copies of files or messages. In some cases, FortiOS Carrier may not archive content, or may make only a partial content archive, regardless of your selected option. This behavior varies by prerequisites for each protocol. This option is available only if a FortiAnalyzer unit or FortiGuard Analysis and Management Service is configured.
Logging
You can enable logging in an MMS profile to write event log messages when the MMS profile options that you have enabled perform an action. For example, if you enable MMS antivirus protection, you could also use the MMS profile logging options to write an event log message every time a virus is detected. You must first configure how the unit stores log messages so that you can then record these logs messages.
Logging section of the New MMS Profile page MMS-Antivirus Viruses Blocked Files Intercepted Files If antivirus settings are enabled for this MMS profile, select the following options to record Antivirus Log messages. Record a log message when this MMS profile detects a virus. Record a log message when antivirus file filtering enabled in this MMS profile blocks a file. Record a log message when this MMS profile intercepts a file.
Oversized Files/Emails Record a log message when this MMS profile encounters an oversized file or email message. Oversized files and email messages cannot be scanned for viruses. MMS Scanning If MMS scanning settings are enabled for this MMS profile, select the following options to record Email Filter Log messages. Select to log MMS Bulk AntiSpam events. You must also select which protocols to write log messages for in the MMS bulk email filtering part of the MMS profile. For more information, see MMS bulk email filtering options on page 2044.
Notification Messages Select to log the number of MMS notification messages sent. Bulk Messages
Carrier End Point Filter Select to log MMS carrier end point filter events, such as MSISDN filtering. Block MMS Content Checksum Content Block Select to log MMS content checksum activity. Select to log content blocking events.
2050
Configure MMS content checksum lists in UTM > Carrier > MMS Content Checksum using the following table.
MMS Content Checksum page Lists each individual content checksum list that you created. On this page, you can edit, delete or create a content checksum list. Create New Creates a new MMS content checksum list. When you select Create New, you are automatically redirected to the New List. This page provides a name field and comment field. You must enter a name to go to MMS Content Checksum Settings page. Modifies settings to a MMS content checksum. When you select Edit, you are automatically redirected to the MMS Content Checksum Settings page. Removes an MMS content checksum from the page. To remove multiple content checksum lists from within the list, on the MMS Content Checksum page, in each of the rows of the content checksum lists you want removed, select the check box and then select Delete. To remove all content checksum lists from list, on the MMS Content Checksum page, select the check box in the check box column and then select Delete. The name of the MMS content checksum list that you created. The number of checksums that are included in that content checksum list. The MMS profile or profiles that have the MMS content checksum list applied to the profile or profiles. A description given to the MMS content checksum. Displays the number of times the object is referenced to other objects. For example, av_1 profile is applied to a security policy; on the Profile page (UTM > Antivirus > Profile), 1 appears in Ref. . To view the location of the referenced object, select the number in Ref., and the Object Usage window appears displaying the various locations of the referenced object. To view more information about how the object is being used, use one of the following icons that is avialable within the Object Usage window: View the list page for these objects automatically redirects you to the list page where the object is referenced at. Edit this object modifies settings within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy and so, when this icon is selected, the user is redirected to the Edit Policy page. View the details for this object table, similar to the log viewer table, contains information about what settings are configured within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy, and that security policys settings appear within the table.
Edit
Delete
MMS Content Checksum Settings page Provides settings for configuring content checksum lists that contain content checksums. Each content checksum can be enabled or disable within the content checksum list. Name If you are editing an existing checksum setting and want to change the name, enter a new name in this field. You must select OK to save the change. If you are editing an existing checksum setting and want to change or add a description, enter the new text in this field. You must select OK to save the changes. Adds a new content checksum. When you select Create New, you are automatically redirected to the New Entry page.
Comments
Create New
2051
Edit Delete
Modifies settings within a content checksum. When you select Edit, you are automatically redirected to the Edit Entry page. Removes a content checksum from the list on the page. To remove multiple content checksum entries from within the list, on the MMS Content Checksum Settings page, in each of the rows of the notification lists you want removed, select the check box and then select Delete. To remove all content checksum entries from within the list, on the MMS Content Checksum Settings page, select the check box in the check box column and then select Delete. Enables a content checksum that is disabled. Disables a content checksum. Removes all checksums that are listed on the MMS Content Checksum Settings page. Displays whether or not the checksum is enabled. The name of the content checksum. The content checksum. Use to navigate through the list. Enter the name of the content checksum Enter the content checksum. Select to enable the checksum.
Enable Disable Remove All Entries Enable Name Content Checksum Page Controls New Entry page Name Content Checksum Enable
Notification List
The Notification List menu allows you to configure a list of viruses. This virus list provides a list for scanning viruses in MMS messages.
Edit Delete
2052
Ref.
Displays the number of times the object is referenced to other objects. For example, av_1 profile is applied to a security policy; on the Profile page (UTM > Antivirus > Profile), 1 appears in Ref. . To view the location of the referenced object, select the number in Ref., and the Object Usage window appears displaying the various locations of the referenced object. To view more information about how the object is being used, use one of the following icons that is avialable within the Object Usage window: View the list page for these objects automatically redirects you to the list page where the object is referenced at. Edit this object modifies settings within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy and so, when this icon is selected, the user is redirected to the Edit Policy page. View the details for this object table, similar to the log viewer table, contains information about what settings are configured within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy, and that security policys settings appear within the table.
Notification List Settings page Provides settings for configuring a notification list, which is a list of viruses and is used for scanning viruses in MMS messages. This list is called the Antivirus Notification List in an MMS profile. Name Comments Create New Edit Delete If editing the name of a notification list, enter the new name in this field. You must select OK to save the change. If you want to enter a comment, enter the comment in the field. You must select OK to save the change. Creates a notification entry in the list. When you select Create New, you are automatically redirected to the New Entry page. Modifies settings within a notification list. When you select Edit, you are automatically redirected to the Edit Entry page. Removes a notification entry from the list on the page. To remove multiple notification entries from within the list, on the Notification List Settings page, in each of the rows of the entries you want removed, select the check box and then select Delete. To remove all notification entries from the list, on the Notification List Settings page, select the check box in the check box column and then select Delete. Enables a notification entry that is disabled. Disables a notification entry. Removes all notification entries that are listed on the Notification List Settings page. Displays whether or not the checksum is enabled. The name of the virus that was added to the list. The type of match that will be used to match the virus stated in the notification list to the actual virus that is found. Enter the virus name. Select the type of match that will be used to match the virus stated in the notification list to the actual virus that is found. Select to enable the virus in the list.
Enable Disable Remove All Entries Enable Virus Name/Profile Entry Type New Entry page Virus Name/Profile Entry Type Enable
2053
Message Flood
The convenience offered by MM1 and MM4 messaging can be abused by users sending spam or attempting to overload the network with an excess of messages. MMS flood prevention can help prevent this type of abuse. A message flood occurs when a single subscriber sends a volume of messages that exceed the flood threshold that you set. The threshold defines the maximum number of messages allowed, the period during which the subscriber sent messages are considered, and the length of time the sender is restricted from sending messages after a flood is detected. For example, for the first threshold you may determine that any subscriber who sends more than 100 MM1 messages in an hour (60 minutes) will have all messages blocked for 30 minutes.
Action Log Description Add a log entry indicating that a message flood has occurred. You must also enable logging for MMS Scanning > Bulk Messages in the Logging section of the MMS protection profile. Save the first message to exceed the flood threshold, or all the messages that exceed the flood threshold, in the DLP archive. DLP archiving flood messages may not always produce useful results. Since different messages can be causing the flood, reviewing the archived messages may not be a good indication of what is causing the problem since the messages could be completely random. All the messages that exceed the flood threshold will be saved in the DLP archive. Save only the first message to exceed the flood threshold in the DLP archive. Other messages in the flood are not saved. For message floods this may not produce much useful information since a legitimate message could trigger the flood threshold. Messages that exceed the flood threshold are passed to the recipients, but if quarantine is enabled for intercepted messages, a copy of each message will also quarantined for later examination. If the quarantine of intercepted messages is disabled, the Intercept action has no effect. Messages that exceed the flood threshold are blocked and will not be delivered to the message recipients. If quarantine is enabled for blocked messages, a copy of each message will quarantined for later examination. If the flood threshold is exceeded, the FortiOS Carrier unit will send an MMS flood notification message. In the web-based manager when Alert Notification is selected it displays the fields to configure the notification.
DLP Archive
Intercept
Block
Alert Notification
Flood protection for MM1 messages prevents your subscribers from sending too many messages to your MMSC. Configuring flood protection for MM4 messages prevents another service provider from sending too many messages from the same subscriber to your MMSC.
2054
Remove All Entries Protocol MMS Profile Sender Level Count Window Size (minutes) Timer (minutes:seconds) Page Controls
Duplicate Message
Duplicate message protection for MM1 messages prevents multiple subscribers from sending duplicate messages to your MMSC. Duplicate message protection for MM4 messages prevents another service provider from sending duplicate messages from the same subscriber to your MMSC. The unit keeps track of the sent messages. If the same message appears more often than the threshold value that you have configured, action is taken. Possible actions are logging the duplicate messages, blocking or intercepting them, archiving, and sending an alert to inform an administrator that duplicate messages are occurring.
2055
Checksum Status
The checksum of the MMS message. Either flagged or blank. Flagged means that the actions defined in the MMS profile are taken. For more information, see MMS bulk email filtering options on page 2044. Displays the number of messages in the last window of time. The period of time during which a message flood will be detected if the Message Flood Limit is exceeded. Either the time left in the window if the message is unflagged, or the time until the message will be unflagged if it is already flagged.
Edit Delete
2056
Ref.
Displays the number of times the object is referenced to other objects. For example, av_1 profile is applied to a security policy; on the Profile page (UTM > Antivirus > Profile), 1 appears in Ref. . To view the location of the referenced object, select the number in Ref., and the Object Usage window appears displaying the various locations of the referenced object. To view more information about how the object is being used, use one of the following icons that is avialable within the Object Usage window: View the list page for these objects automatically redirects you to the list page where the object is referenced at. Edit this object modifies settings within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy and so, when this icon is selected, the user is redirected to the Edit Policy page. View the details for this object table, similar to the log viewer table, contains information about what settings are configured within that particular setting that the object is referenced with. For example, av_1 profile is referenced with a security policy, and that security policys settings appear within the table.
Carrier Endpoint Filter LIsts Settings page Provides settings for configuring an endpoint filter. Name Comments Create New Edit Delete Enable Disable Remove All Entries Enable Pattern The name you entered on the New List page, after selecting Create New on the Carrier Endpoint Filter page. A description about the endpoint filter. You can add one here if you did not enter one on the New List page. Creates a new endpoint filter list. When you select Create New, you are automatically redirected to the New Entry page. Select to modify the settings of a pattern in the list. Select to remove a pattern in the list. Enables a disabled pattern in the list. Disables a pattern in the list. Removes all patterns in the list on the Carrier Endpoint Filter Lists Settings page. Indicates whether or not the pattern is enabled. Enter or change the pattern that FortiOS Carrier uses to match with carrier end points. The pattern can be a single carrier end point or consist of wildcards or Perl regular expressions that will match more than one carrier end point. Set Pattern Type to correspond to the pattern that you want to use. Select the action taken by FortiOS Carrier for messages from a carrier end point that matches the carrier end point pattern: The type of pattern chosen. Enter or change the pattern that FortiOS Carrier uses to match with carrier end points. The pattern can be a single carrier end point or consist of wildcards or Perl regular expressions that will match more than one carrier end point. Set Pattern Type to correspond to the pattern that you want to use. Select the action taken by FortiOS Carrier for messages from a carrier end point that matches the carrier end point pattern: MMS messages from the carrier end point are delivered, the message content is DLP archived according to MMS DLP archive settings. Content archiving is also called DLP archiving.
2057
Intercept
MMS messages from the carrier end point are delivered. Based on the quarantine configuration, attached files may be removed and quarantined. Select a pattern type from the drop-down list. Select to enable this carrier end point filter pattern.
IP Filter
You can use carrier end point IP filtering to block traffic from source IP addresses associated with carrier end points. You can also configure the unit to record log messages whenever carrier end point IP filtering blocks traffic. Carrier end point IP filtering blocks traffic at the IP level, before the traffic is accepted by a security policy. You configure carrier end point IP filtering by going to UTM > Carrier > IP Filter and adding carrier end points to the IP filter list. For each carrier end point you can enable or disabling blocking traffic and logging blocked traffic. The unit looks in the current user context list for the carrier end points in the IP filter list and extracts the source IP addresses for these carrier end points. Then any communication session with a source IP address that matches one of these IP addresses is blocked at the IP level, before the communication session is accepted by a security policy. The unit dynamically updates the list of IP addresses to block as the user context list changes. Only these updated IP addresses are blocked by carrier end point IP filtering.
Note: You cannot add carrier end point patterns to the carrier end point IP filter list. You must enter complete and specific carrier end points that are valid for your network. Note: The only action available is block. You cannot use carrier end point IP filtering to exempt carrier end points from IP filtering or to content archive or quarantine communication sessions.
2058
Indicates that the IP filter will be logged. Use to navigate through the list.
New Entry Page Provides settings for configuring the IP filter. Log Blocked Traffic Block Traffic Select to record a log message when carrier end point IP filtering blocks a communication session. Select to block traffic from the carrier end point. Block Traffic is selected by default.
GTP Profile
You can configure multiple GTP profiles within the GTP menu. GTP profiles concern GTP activity flowing through the unit. These GTP profiles are then applied to a security policy.
Name Ref.
New GTP Profile page Provides settings for configuring a GTP profile. Name General Settings Message Type Filtering FortiOS Handbook v3: FortiOS Carrier 01-431-99686-20110629 http://docs.fortinet.com/ Feedback Enter a name for the GTP profile. Configure general options for the GTP profile. See General settings options on page 2060. Configure filtering for messages. See Message type filtering options on page 2061.
2059
APN Filtering IMSI Filtering Advanced Filtering IE removal policy Encapsulated IP Traffic Filtering
Configure filtering options for APN. See APN filtering options on page 2061. Configure filtering options for IMSI. See IMSI filtering options on page 2063. Configure advanced filtering options. See Advanced filtering options on page 2064. Configure IE removal policy options. See Information element removal policy options on page 2066. Configure filtering options for encapsulated IP traffic. See Encapsulated IP traffic filtering options on page 2066.
Encapsulated Non-IP Configure filtering options for encapsulated non-IP end user addresses. See Encapsulated non-IP end user traffic filtering options on page 2067. End User Address Filtering Protocol Anomaly Anti-Overbilling Log Configure protocol anomaly options. See Protocol anomaly prevention options on page 2068. Configure anti-overbilling options. See Anti-overbilling options on page 2068. Configure log options. See Log options on page 2069.
GTP-in-GTP
Tunnel Limit
2060
Tunnel Timeout
Enter the maximum number of seconds that a GTP tunnel is allowed to remain active. After the timeout the unit deletes GTP tunnels that have stopped processing data. A GTP tunnel may hang for various reasons. For example, during the GTP tunnel tear-down stage, the "delete pdap context response" message may get lost. By setting a timeout value, you can configure the FortiOS Carrier firewall to remove the hanging tunnels. The default is 86400 seconds, or 24 hours. Enter the number of packets per second to limit the traffic rate to protect the GSNs from possible Denial of Service (DoS) attacks. The default limit of 0 does not limit the message rate. GTP DoS attacks can include: Border gateway bandwidth saturation: A malicious operator can connect to your GRX and generate high traffic towards your Border Gateway to consume all the bandwidth. GTP flood: A GSN can be flooded by illegitimate traffic Select the allowed list of IP addresses allowed to take over a GTP session when the mobile device moves locations. Handover is a fundamental feature of GPRS/UMTS, which enables subscribers to seamlessly move from one area of coverage to another with no interruption of active sessions. Session hijacking can come from the SGSN or the GGSN, where a fraudulent GSN can intercept another GSN and redirect traffic to it. This can be exploited to hijack GTP tunnels or cause a denial of service. When the handover group is defined it acts like a whitelist with an implicit default deny at the end the GTP address must be in the group or the GTP message will be blocked. This stops handover requests from untrusted GSNs. Use Authorized SGSNs to only allow authorized SGSNs to send packets through the unit and to block unauthorized SGSNs. Go to Firewall Objects > Address > Address and add the IP addresses of the authorized SGSNs to a firewall address or address group. Then set Authorized SGSNs to this firewall address or address group. You can use Authorized SGSNs to allow packets from SGSNs that have a roaming agreement with your organization. Use Authorized GGSNs to only allow authorized GGSNs to send packets through the unit and to block unauthorized GGSNs. Go to Firewall Objects > Address > Address and add the IP addresses of the authorized GGSNs to a firewall address or address group. Then set Authorized GGSNs to this firewall address or address group. You can use Authorized GGSNs to allow packets from SGSNs that have a roaming agreement with your organization.
Handover Group
Authorized SGSNs
Authorized GGSNs
2061
<network_id> is a network identifier or name that identifies the name of a network, for example, example.com or internet. [.mnc<mnc_int>.mcc<mcc_int>.gprs] is the optional operator identifier that uniquely identifies the operators PLMN, for example mnc123.mcc456.gprs.
By default, the unit permits all APNs. However, you can configure APN filtering to restrict roaming subscribers' access to external networks. APN filtering applies only to the GTP create pdp request messages. The unit inspects GTP packets for both APN and selected modes. If both parameters match and APN filter entry, the unit applies the filter to the traffic. Additionally, the unit can filter GTP packets based on the combination of an IMSI prefix and an APN. For more information, see IMSI filtering options on page 2063.
Note: You cannot add an APN when creating a new profile.
APN Filtering section on the New GTP Profile page Enable APN Filter Default APN Action Select to enable APN filtering. Select the default action for APN filtering. If you select Allow, all sessions are allowed except those blocked by individual APN filters. If you select Deny, all sessions are blocked except those allowed by individual APN filters. The APN to be filtered. The type of mode chosen that indicates where the APN originated and whether the Home Location Register (HLR) has verified the user subscription: The type of action that will be taken. Modifies the settings within the filter. When you select Edit, the Edit window appears, which allows you to modify the settings of the APN. Removes the APN from the list within the table, in the APN Filtering section. Adds a new APN filter to the list. When you select Add APN, the New window appears, which allows you to configure the APN settings. Enter an APN to be filtered. You can include wild cards to match multiple APNs. For example, the value internet* would match all APNs that being with internet. Select one or more of the available modes to indicate where the APN originated and whether the Home Location Register (HLR) has verified the user subscription. MS-provided APN, subscription not verified, indicates that the mobile station (MS) provided the APN and that the HLR did not verify the user's subscription to the network. Network-provided APN, subscription not verified, indicates that the network provided a default APN because the MS did not specify one, and that the HLR did not verify the user's subscription to the network. MS or Network-provided APN, subscription verified, indicates that the MS or the network provided the APN and that the HLR verified the user's subscription to the network Select Allow or Deny.
Value Mode
Action Edit
Mode
Subscription Verified
Action
2062
The subscriber's home networkthe public land mobile network (PLMN)is identified by the IMSI prefix, formed by combining the MCC and MNC. By default, the unit allows all IMSIs. You can add IMSI prefixes to deny GTP traffic coming from non-roaming partners. Any GTP packets with IMSI prefixes not matching the prefixes you set will be dropped. GTP Create pdp request messages are filtered and only IMSI prefixes matching the ones you set are permitted. Each GTP profile can have up to 1000 IMSI prefixes set. An IMSI prefix and an APN can be used together to filter GTP packets if you set an IMSI filter entry with a non-empty APN.
Note: You cannot add an IMSI when creating a new profile.
IMSI Filtering section of the New GTP Profile page Enable IMSI Filter Default IMSI Action Select to enable IMSI filtering. Select the default action for IMSI filtering. If you select Allow, all sessions are allowed except those blocked by individual IMSI filters. If you select Deny, all sessions are blocked except those allowed by individual IMSI filters. The APN that is part of the IMSI that will be filtered. The MCC-MNC part of the IMSI that will be filtered. The type of mode that indicates where the APN originated and whether the Home Location Register (HLR) has verified the user subscription. The type of action that will be taken. Modifies settings to an IMSI filter. When you select Edit, the Edit window appears, which allows you to modify the IMSI filters settings. Removes an IMSI filter from within the table, in the IMSI Filtering section. Adds a new IMSI filter to the list. When you select Add IMSI, the New window appears, which allows you to configure IMSI filter settings. Enter the APN part of the IMSI to be filtered. Enter the MCC-MCC part of the IMSI to be filtered. Select one or more of the available modes to indicate where the APN originated and whether the Home Location Register (HLR) has verified the user subscription. MS-provided APN, subscription not verified, indicates that the mobile station (MS) provided the APN and that the HLR did not verify the user's subscription to the network.
Action Edit
2063
Network provided
Network-provided APN, subscription not verified, indicates that the network provided a default APN because the MS did not specify one, and that the HLR did not verify the user's subscription to the network. MS or Network-provided APN, subscription verified, indicates that the MS or the network provided the APN and that the HLR verified the user's subscription to the network Select Allow or Deny.
Advanced Filtering section on New GTP Profile page Enable Default Action Select to enable advanced filtering. Select the default action for advanced filtering. If you select Allow, all sessions are allowed except those blocked by individual advanced filters. If you select Deny, all sessions are blocked except those allowed by individual advanced filters. The messages, for example, Create PDP Context Request. The APN restriction. The RAT types associated with that filter. The ULI pattern. The RAI pattern. The IMEI pattern. The action that will be taken. Modifies the filters settings. When you select Edit, the Edit window appears, which allows you to modify the filters settings. Removes a filter from the list. Adds a filter to the list. When you select Add, the New window appears, which allows you to configure settings for messages, APN, IMSI, MSISDN, RAT type, ULI, RAI, IMEI patterns as well as the type of action. The PDP content messages. FortiOS Carrier for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Messages APN Restriction RAT Type ULI RAI IMEI Action Edit Delete Add
2064
Create PDP Context Request Create PDP Context Response Update PDP Context Request APN APN Mode
Mobile Station MS-provided PAN, subscription not verified, indicates that the mobile station (MS) provided the APN and that the HLR did not verify the users provided subscription to the network. Network provided Subscription verified APN Restriction IMSI MSISDN RAT Type ULI pattern RAI pattern IMEI pattern Action Network-provided APN, subscription not verified, indicates that the network provided a default APN because the MS did not specify one, and that the HLR did no verify the users subscription to the network. MS or Network-provided APN, subscription verified, indicates that the MS or the network provided the APN and that the HLR verified the users subscription to the network. Select the type of restriction that you want. You can choose all of the types, or one of the types. You cannot choose multiple types. Enter the IMSI. Enter the MSISDN. Select the RAT types. Enter the ULI pattern. Enter the RAI pattern. Enter the IMEI pattern. Select either Allow or Deny.
2065
Type Allocation Code (TAC) has a length of 8 digits. Serial Number (SNR) is an individual serial number identifying each equipment within each TAC. SNR has a length of 6 digits. Software Version Number (SVN) identifies the software version number of the mobile equipment. SVN has a length of 2 digits.
Note: You cannot add an advanced filtering rule when creating a new profile.
Source
2066
Destination
Select a destination IP address from the configured firewall IP address or address group lists. Any encapsulated traffic being sent to this IP address will be a match if the destination also matches. The type of action that will be taken. Select to Allow or Deny encapsulated traffic between this source and Destination. Modifies the source, destination or action settings. Adds a new encapsulated IP traffic filter. When you select Add IP Policy, the New window appears which allows you to configure IP policy settings. Select the source firewall address or address group. Select the destination firewall address or address group. Select Allow or Deny.
Action
2067
Select a start and end protocol from the list of protocols in RFC 1700. Allowed range includes 0 to 255 (0x00 to 0xff). Some common protocols includes: 33 (0x0021) Internet Protocol 35 (0x0023) OSI Network Layer 63 (0x003f) NETBIOS Framing 65 (0x0041) Cisco Systems 79 (0x004f) IP6 Header Compression 83 (0x0053) Encryption Select Allow or Deny.
Action
Reserved IE
Miss Mandatory IE
Out of State Message The GTP protocol requires a certain level of state to be kept by both the GGSN and SGSN. As GTP has state, some message types can only be sent when in specific states. Packets that do not make sense in the current state should be filtered or rejected Both versions of GTP allow up to 255 different message types. However, a number of message type values are undefined or reserved. Packets with reserved or undefined values should be filtered. Out of State IE Spoofed Source Address GTP Packets with out of order Information Elements should be discarded. The End User Address Information Element in the PDP Context Create & Response messages contains the address that the mobile station (MS) will use on the remote network. If the MS does not have an address, the SGSN will set the End User Address field to zero when sending the initial PDP Context Create message. The PDP Context Response packet from the GGSN will then contain an address to be assigned to the MS. In environments where static addresses are allowed, the MS will relay its address to the SGSN, which will include it in the PDP Context Create Message. As the MS address is negotiated within the PDP Context creation handshake, any packets originating from the MS that contain a different source address should be detected and dropped.
Anti-overbilling options
You can configure the FortiOS Carrier firewall to prevent overbilling subscribers for traffic over the. To enable anti-overbilling, you must configure both the Gn/Gp firewall and the Gi firewall. Expand Anti-Overbilling in the GTP profile to reveal these settings.
2068
Anti-Overbilling section of the New GTP Profile page Gi Firewall IP Address Port Interface Security Context ID The IP address of the units interface configured as a Gi gateway. The SG security port number. The default port number is 21123. Change this number if your system uses a different SG port. Select the unit interface configured as a Gi gateway. Enter the security context ID. This ID must match the ID entered on the server Gi firewall. The default security context ID is 696.
Log options
All the GTP logs are treated as a subtype of the event logs. To enable GTP logging, you must: configure the GTP log settings in a GTP profile enable GTP logging when you configure log and report settings.
Log section of the New GTP Profile page Log Frequency Enter the number of messages to drop between logged messages. An overflow of log messages can sometimes occur when logging rate-limited GTP packets exceed their defined threshold. To conserve resources on the syslog server and the FortiOS Carrier unit, you can specify that some log messages are dropped. For example, if you want only every twentieth message to be logged, set a logging frequency of 20. This way, 20 messages are skipped and the next logged. Acceptable frequency values range from 0 to 2147483674. When set to 0, no messages are skipped. Select to log forwarded GTP packets. Select to log GTP packets denied or blocked by this GTP profile. Select to log rate-limited GTP packets. Select to log GTP packets that have failed stateful inspection. Select to log packets dropped because the maximum limit of GTP tunnels for the destination GSN is reached. Select to log extended information about GTP packets. When enabled, this additional information will be included in log entries: IMSI MSISDN APN Selection Mode SGSN address for signaling SGSN address for user data GGSN address for signaling GGSN address for user data Select to log the total number of control and user data messages received from and forwarded to the GGSNs and SGSNs that the unit protects. The unit can report the total number of user data and control messages received from and forwarded to the GGSNs and SGSNs it protects. Alternately, the total size of the user data and control messages can be reported in bytes. The unit differentiates between traffic carried by each GTP tunnel, and also between GTP-User and GTP-Control messages.
Forwarded Log Denied Log Rate Limited Log State Invalid Log Tunnel Limit Log Extension Log
2069
The number of messages or the number of bytes of data received from and forwarded to the SGSN or GGSN are totaled and logged if a tunnel is deleted. When a tunnel is deleted, the log entry contains: Timestamp Interface name (if applicable) SGSN IP address GGSN IP address TID Tunnel duration time in seconds Number of messages sent to the SGSN Number of messages sent to the GGSN
2070
Example: COMMWARRIOR
This is a virus for Series 60 type cell phones, such as Nokia, operating Symbian OS version 6 [or higher]. The object of the virus is to spread to other phones using Bluetooth and MMS as transport avenues. The targets are selected from the contact list of the infected phone and also sought via Bluetooth searching for other Bluetooth-enabled devices (phones, printers, gaming devices etc.) in the proximity of the infected phone. This virus is more than a proof of concept - it has proven successfully its ability to migrate from a zoo collection to being in-the-wild. Currently, this virus is being reported in over 18 different countries around Europe, Asia and North America. When the virus first infects a cell phone, a prompt is displayed asking the recipient if they want to install Caribe. Symptoms of an infected phone may include rapid battery power loss due to constant efforts by the virus to spread to other phones via a Bluetooth seekand-connect outreach. The following variants among others are currently scanned by the FortiOS Carrier devices, in addition to more signatures that cover all known threats. SymbOS/COMWAR.V10B!WORM Aliases: SymbOS.Commwarrior.B, SymbOS/Commwar.B, SymbOS/Commwar.B!wm, SymbOS/Commwar.B-net, SymbOS/Commwarrior.b!sis, SymbOS/Comwar.B, SymbOS/Comwar.B!wm, SymbOS/Comwar.B-wm, SYMBOS_COMWAR.B, SymbOS/Comwar.1.0.B!wormSYMBOS/COMWAR.V10B.SP!WORM [spanish version] First Discovered In The Wild: July 04, 2007 Impact Level: 1 Virus Class: Worm Virus Name Size: 23,320
2071
SymbOS/Commwar.A!worm Aliases: Commwarrior-A, SymbOS.Commwarrior.A [NAV], SymbOS/Commwar.A-net, SymbOS/Commwar_ezboot.A-ne, SymbOS/Comwar.A, SymbOS/Comwar.A-wm, SYMBOS_COMWAR.A [Trend] First Discovered In The Wild: May 16 2005 Impact Level: 1 Virus Class: Worm Virus Name Size: 27,936
SymbOS/Commwarriie.C-wm Aliases: None First Discovered In The Wild: Oct 17 2005 Impact Level: 1 Virus Class: File Virus Virus Name Size: None
For the latest list of threats Fortinet devices detect, go to the FortiGuard Center Resource Librarys Mobile index.
2072
2073
2074
To create a carrier endpoint filter list - web-based manager 1 Go to UTM > Carrier > Carrier Endpoint Filter Lists. 2 Select Create New. 3 Enter a descriptive name for the filter list, such as blocked_clients or CountryX_clients, and select OK. 4 Select Create New to add one or more entries to the list. 5 Select OK to return to display the list of filter lists.
Pattern
Action
2075
Note: The only action available is block. You cannot use end point IP filtering to exempt end points from IP filtering or to content archive or quarantine communication sessions.
FortiOS Carrier looks in the current user context list for the end points in the IP filter list and extracts the source IP addresses for these end points. Then any communication session with a source IP address that matches one of these IP addresses is blocked at the IP level, before the communication session is accepted by a security policy. FortiOS Carrier dynamically updates the list of IP addresses to block as the user context list changes. Only these updated IP addresses are blocked by end point IP filtering. For information about the user context list and how entries are added to and removed from this list, see About the user context list on page 45.
2076
To configure an MMS content checksum list 1 Go to UTM > Carrier > MMS Content Checksum. 2 Select Create New. 3 Enter a name for the list of checksums, and select OK. You are taken to the edit screen for that new list. 4 Select Create New to add a checksum. 5 Enter the Name and Checksum, and select OK. The checksum is added to the list. To add more checksums to the list, repeat steps 4 and 5. To to remove a checksum from the list you can either delete the checksum or simply disable it and leave it in the list. To enable MMS content checksums, expand MMS Scanning and select MMS Content Checksum for the selected MMS types. Select the checksum list to match.
Client comforting
In general, client comforting is available for for MM1 and MM7 messaging and provides a visual display of progress for web page loading or HTTP or FTP file downloads. Client comforting does this by sending the first few packets of the file or web page being downloaded to the client at configured time intervals so that the client is not aware that the download has been delayed. The client is the web browser or FTP client. Without client comforting, clients and their users have no indication that the download has started until the FortiOS Carrier unit has completely buffered and scanned the download. During this delay users may cancel or repeatedly retry the transfer, thinking it has failed. The appearance of a client comforting message (for example, a progress bar) is clientdependent. In some instances, there will be no visual client comforting cue. During client comforting, if the file being downloaded is found to be infected, then the FortiOS Carrier unit caches the URL and drops the connection. The client does not receive any notification of what happened because the download to the client had already started. Instead the download stops, and the user is left with a partially downloaded file. If the user tries to download the same file again within a short period of time, then the cached URL is matched and the download is blocked. The client receives the Infection cache message replacement message as a notification that the download has been blocked. The number of URLs in the cache is limited by the size of the cache.
Caution: Client comforting can send unscanned (and therefore potentially infected) content to the client. You should only enable client comforting if you are prepared to accept this risk. Keeping the client comforting interval high and the amount low will reduce the amount of potentially infected data that is downloaded.
2077
Server comforting
Server comforting can be selected for each protocol. Similar to client comforting, you can use server comforting to prevent server connection timeouts that can occur while waiting for FortiOS Carrier to buffer and scan large POST requests from slow clients. The Interval is the time in seconds before client and server comforting starts after the download has begun, and the time between sending subsequent data. The Amount is the number of bytes sent by client or server comforting at each interval.
2078
HTTP proxy
Hypertext Transfer Protocol POST / HTTP/1.1\r\n Request Method: POST Request URI: / Request Version: HTTP/1.1 Host: 10.129.192.190\r\n Accept: */*, application/vnd.wap.sic,application/vnd.wap.mmsmessage,text/x-hdml,image/mng,image/x-mng,video/mng,video/xmng,image/bmp\r\n Accept-Charset: utf-8,*\r\n Accept-Language: en\r\n Content-Length: 25902\r\n Content-Type: application/vnd.wap.mms-message\r\n User-Agent: Nokia7650/1.0 SymbianOS/6.1 Series60/0.9 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/6.2.1\r\n x-up-devcap-charset: utf-8\r\n x-up-devcap-max-pdu: 102400\r\n x-up-uplink: magh-ip.mi.vas.omnitel.it\r\n x-wap-profile: "http://nds.nokia.com/uaprof/N7650r200.xml"\r\n x-up-subno: 1046428312-826\r\n x-up-calling-line-id: 393475171234\r\n x-up-forwarded-for: 10.211.4.12\r\n x-forwarded-for: 10.211.4.12\r\n Via: 1.1 magh-ip.mi.vas.omnitel.it\r\n \r\n
2079
Scan engine
MMS Message Encapsulation, Type: m-send-req X-Mms-Message-Type: m-send-req (0x80) X-Mms-Transaction-ID: 1458481935 X-Mms-MMS-Version: 1.0 From: <insert address> To: 3475171234/TYPE=PLMN X-Mms-Message-Class: Personal (0x80) X-Mms-Expiry: 21600.000000000 seconds X-Mms-Priority: Normal (0x81) X-Mms-Delivery-Report: No (0x81) X-Mms-Read-Report: No (0x81) Content-Type: application/vnd.wap.multipart.related; start=<1822989907>; type=application/smil Start: <1822989907> Type: application/smil Data (Post) Multipart body Part: 1, content-type: text/plain Content-Type: text/plain; charset=iso-10646-ucs-2; name=Ciao.txt Charset: iso-10646-ucs-2 Name: Ciao.txt Headers Content-Location: Ciao.txt Line-based text data: text/plain \377\376C\000i\000a\000o\000 [Unreassembled Packet: MMSE]
2080
Replacement messages
FortiOS Carrier generates replacement messages to notify the sending client that they have sent a virus. FortiOS Carrier can generate an SMS/SMTP replacement message and an MMS/HTTP POST replacement message. In each case the recipient will be the sender of the initial virus message and a configurable MSISDN parameter will be available to determine the sender (From) i.e. the FortiOS Carrier unit. See Configuring MMS address translation on page 111. For SMS/SMTP notification a destination email address is configurable and can contain the marker %%MSISDN%% which will be replaced with the senders MSISDN thereby allowing the message to be routed properly. You need to clarify whether specific headers are required in the SMTP message and whether a predefined format for the message must to be followed. For the MMS message the body will be configurable and this could be specified in WML or SMIL.
2081
To configure MMS content archiving, go to UTM > Carrier > MMS Profile. Select Create New or select the Edit icon beside an existing profile. Expand MMS Bulk AntiSpam Detection > Logging. Complete the fields as described in the following table and select OK. For more a detailed list of options, see Logging on page 2050.
SNMP
A simple SNMP trap will be generated to inform the operators alerting system that a virus has been detected. This SNMP trap could contain the sending and receiving MSISDN however the initial solution would reflect the current behavior, i.e. only the fact that a virus has been detected will be communicated.
For standard operation, you can choose to disable file filter in the protection profile, and enable it temporarily to block specific threats as they occur. The FortiGate unit can take either of these actions toward files that match a configured file pattern or type: Allow: the file is allowed to pass. Block: the file is blocked and a replacement messages will be sent to the user. If both file filter and virus scan are enabled, the FortiOS Carrier unit blocks files that match the enabled file filter and does not scan these files for viruses.
The FortiOS Carrier unit also writes a message to the virus log and sends an alert email message if configured to do so. Files are compared to the enabled file patterns and then the file types from top to bottom. If a file does not match any specified patterns or types, it is passed along to antivirus scanning (if enabled). In effect, files are passed if not explicitly blocked. Using the allow action, this behavior can be reversed with all files being blocked unless explicitly passed. Simply enter all the file patterns or types to be passed with the allow attribute. At the end of the list, add an all-inclusive wildcard (*.*) with a block action. Allowed files continue to antivirus scanning (if enabled) while files not matching any allowed patterns are blocked by the wildcard at the end.
2082
dynamic link libraries (*.dll) HTML application (*.hta) Microsoft Office files (*.doc, *.ppt, *.xl?) Microsoft Works files (*.wps) Visual Basic files (*.vb?) screen saver files (*.scr) program information files (*.pif) control panel files (*.cpl)
The FortiGate unit can take actions against the following file types:
Table 119: Supported file types arj cab hta petite unknown activemime class html prc ignored aspack cod jad rar base64 elf javascript sis bat exe lzh tar binhex fsg mime upx bzip gzip msc uue bzip2 hlp msoffice zip
Note: The unknown type is any file type that is not listed in the table. The ignored type is the traffic the FortiGate unit typically does not scan. This includes primarily streaming audio and video.
2083
2084
To filter files based on file type using file name pattern - web-based manager 1 Go to UTM > AntiVirus > File Filter. 2 Select Create New and name the list blockedFileTypes. 3 Select Create New to add files to the list. 4 Select File name pattern for Filter Type. 5 Enter *.bat for Pattern. 6 Select an Action of Block. 7 Select Enable and OK. 8 At the file filter list, select OK. The file filter is now available to be used in an MMS profile, and will block all .bat files that MMS profile matches. To filter files based on file type using file type - web-based manager 1 Go to UTM > AntiVirus > File Filter. 2 Select Create New and name the list blockedFileTypes. 3 Select Create New to add files to the list. 4 Select File Type for Filter Type. 5 Select Batch File (bat) for File Type. 6 Select an Action of Block. 7 Select Enable and OK. 8 At the file filter list, select OK. The file filter is now available to be used in an MMS profile, and will block all batch files (that use .bat file extension) that the MMS profile matches.
2085
To apply MMS file filtering 1 Go to UTM > Antivirus > File Filter and create a file filter list called MMS_file_filter. 2 Select Create New to add entries to filter specific file types. 3 Select OK. 4 Go to UTM > Carrier > MMS Profile and create a new profile called filtering_profile. 5 Expand MMS Scanning, and select all the MMS message types. 6 Select MMS_file_filter from the Option drop down menu. 7 Set other settings as required in the MMS profile. 8 Select OK. 9 Go to Policy, and select Create New. 10 Within the new policy select UTM > MMS Profile, and select filtering_profile. 11 Configure the security policy as required. 12 Select OK.
MMS notifications
MMS notifications enable you to customize notifications for many different situations and differently for all the supported MMS message protocols MM1, MM3, MM4, and MM7. MMS notification types include: Content Filter File Block Carrier End Point Block Flood Duplicate MMS Content Checksum Virus Scan
2086
Day of Week, Window start time and Window Duration define what days and what time of day alert notifications will be sent. This allows you to control what alerts are sent on weekends. It also lets you control when to start sending notifications each day. This can be useful if system maintenance is performed at the same time each night you might want to start alert notifications after maintenance has completed. Another reason to limit the time alert messages are sent could be to limit message traffic to business hours.
Figure 257: Notifications screen for FortiOS Carrier MMS Profile
For MMS Notification options, see MMS Notification options on page 2047.
Replacement messages
FortiOS Carrier units and FortiGate units alike send replacement messages when messages or content is blocked, quarantined, or otherwise diverted from the receiver. In its place a message is sent to notify the receiver what happened. With FortiOS Carrier MMS replacement messages, send and receive message types are supported separately and receive their own custom replacement messages. This allows the network to potentially notify both the sender and reciever of the problem. For example the replacement message MM1 send-req file block message is sent to the device that sent one or more files that were banned. The default message that is sent is This device has sent %%NUM_MSG%% messages containing banned files in the last %%DURATION%% hours. The two variables are replaced by the appropriate values. Replacement messages are not as detailed or specific as MMS notifications, but they are also not as complicated to configure. They are also useful when content has been removed from an MMS message that was still delivered. For more information on replacement messages, see MMS Replacement messages on page 2113.
2087
Overview
A school computer lab may block age-inappropriate content. A place of business may block unproductive content. A public access internet cafe may block offensive and graphic content. Each installation has its own requirements for what content needs to be blocked, and in what language. FortiOS Carrier provides the ability to create custom local dictionaries, black lists, and white lists in multiple languages enables you to protect your customers from malicious content around the world. Content-based protection includes: Configurable dictionary Black listing White listing
Configurable dictionary
You can add a dictionary of configurable terms and phrases by going to UTM > Web FIlter > Web Content FIlter. The text of MMS messages can be searched for these terms and phrases. Add content filter lists that contain content that you want to match in MMS messages. For every match found, a score is added. If enough matches are found to set the total score above the configured threshold, the MMS message is blocked. You can add words, phrases, wild cards and Perl regular expressions to create content patterns that match content in MMS messages. For more on wildcard and regular expressions, see Using wildcards and Perl regular expressions in the UTM handbook chapter. For each pattern you can select Block or Exempt. Block adds an antispam black list pattern. A match with a block pattern blocks a message depending on the score of the pattern and the content filter threshold. Exempt adds an antispam white list pattern. A match with an exempt pattern allows the message to proceed through the FortiOS Carrier unit, even if other content patterns in the same content filter list would block it.
If a pattern contains a single word, the FortiOS Carrier unit searches for the word in MMS messages. If the pattern contains a phrase, the FortiOS Carrier unit searches for all of the words in the phrase. If the pattern contains a phrase in quotation marks, the FortiOS Carrier unit searches for the whole phrase. You can create patterns with Simplified Chinese, Traditional Chinese, Cyrillic, French, Japanese, Korean, Spanish, Thai, or Western character sets.
Black listing
Black listing is the practice of banning entries on the list. For example if an IP address continuously sends viruses, it may be added to the black list. That means any computers that consult that list will not communicate with that IP address.
2088
Sometimes computers or devices can be added to black lists for a temporary problem, such as a virus that is removed when notified. However, as a rule short of contacting the administrator in person to manually be removed form the black list, users have to wait and they generally will be removed after a period without problem.
White listing
White listing is the practice of adding all critical IP addresses to a list, such as company email and web servers. Then if those servers become infected and start sending spam or viruses, those servers are not blocked. This allows the critical traffic through, even if there might be some malicious traffic as well. Blocking all traffic from your company servers would halt company productivity.
MMS notifications
MMS notifications to senders are configured in UTM > Carrier > MMS profile, under MMS Notifications.
FortiOS Handbook v3: FortiOS Carrier 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2089
In this section you can configure up to four different notification recipients for any combination of MM1/3/4/7 protocol MMS messages. Also for MM7 messages the message type can be submit.REQ or deliver.REQ. Useful settings include: delay in message based on notification type limit on notifications per second to prevent a flood schedules for notifications log in details for MM7 messages.
For more information on MMS notifications, see MMS notifications on page 78 and MMS Notification options on page 2047.
2090
Replacement messages
Replacement messages are features common to both FortiOS and FortiOS Carrier, however FortiOS Carrier has additional messages for the MMS traffic. While each MMS protocol has its own different rec placement messages, the one common to all MMS protocols is the MMS blocked content replacement message. This is the message that the receiver of the message sees when their content is blocked. For more information on replacement messages, see MMS Replacement messages on page 2113.
FortiOS Carrier only allows one sixteenth of its memory for transferring content archive files. For example, for FortiOS Carrier units with 128MB RAM, only 8MB of memory is used when transferring content archive files. It is recommended not to enable full content archiving if antivirus scanning is also configured because of these memory constraints. To configure MMS DLP archiving - web-based manager 1 Go to UTM > Carrier > MMS Profile. 2 Select Create New or select the Edit icon beside an existing profile. 3 Expand MMS Bulk AntiSpam Detection > Content Archive. 4 Complete the fields as described in DLP Archive options on page 2049. 5 Select OK.
2091
The following tabs are available when you are viewing DLP archives for one of these protocols. E-mail to view POP3, IMAP, SMTP, POP3S, IMAPS, SMTPS, and spam email archives. Web to view HTTP and HTTPS archives. FTP to view FTP archives. IM to view AIM, ICQ, MSN, and Yahoo! archives. MMS to view MMS archives. VoIP to view session control (SIP, SIMPLE and SCCP) archives.
If you need to view log archives in Raw format, select Raw beside the Column Settings icon.
2092
MM1 flood
Subscriber
The FortiOS Carrier unit keeps track of the number of messages each subscriber sends for the length of time you specify. If the number of messages a subscriber sends exceeds the threshold, a configured action is taken. Possible actions are logging the flood, blocking or intercepting messages in the flood, archiving the flood messages, and sending an alert message to inform the administrator that the flood is occurring. You can create three different thresholds to take different levels of action at different levels of activity. With this highly configurable system, you can prevent subscribers from sending more messages than you determine is acceptable, or monitor anyone who exceeds the thresholds.
2093
Example
For example, for the first threshold you may determine that any subscriber who sends more than 100 MM1 messages in an hour (60 minutes) will have all messages blocked for half an hour (30 minutes). Using this example, if the subscriber exceeds the flood threshold, they are blocked from sending message for 30 minutes. If the subscriber tries to send any message after 15 minutes, the message will be blocked and the block period will be reset again to 30 minutes. The block period must expire with no attempts to send a message. Only then will the subscriber be allowed to send more messages. To configure MM1 message flood threshold - web-based manager 1 Go to UTM > Carrier > MMS Profile. 2 Select Create New. 3 Enter MM1 flood for Profile Name. 4 Expand MMS Bulk Email Filtering Detection. 5 Enter the following information, and select OK.
MM1 (first column) Enable Message Flood Window Enable 60 minutes
Message Flood Limit 100 Message Flood Block 30 minutes Time Message Flood Action Block
2094
To configure MM1 message flood threshold - CLI config firewall mms-profile edit profile_name config flood mm1 set status1 enable set window1 60 set limit1 100 set action1 block set block-time1 30 end end The threshold values that you set for your network will depend on factors such as how busy your network is and the kinds of problems that your network and your subscribers encounter. For example, if your network is not too busy you may want to set message flood thresholds relatively high so that only an exceptional situation will exceed a flood threshold. Then you can use log messages and archived MMS messages to determine what caused the flood. If your subscribers are experiencing problems with viruses that send excessive amounts of messages, you may want to set thresholds lower and enable blocking to catch problems as quickly as possible and block access to keep the problem from spreading.
Flood actions
When the FortiOS Carrier unit detects a message flood, it can take any combination of the five actions that you can configure for the flood threshold. For detailed options, see Message Flood on page 2054.
2095
Example three flood threshold levels with different actions for each threshold
Example three flood threshold levels with different actions for each threshold
You can set up to three threshold levels to take different actions at different levels of activity. The first example threshold records log messages when a subscribers handset displays erratic behavior by sending multiple messages using MM1 at a relatively low threshold. The erratic behavior could indicate a problem with the subscribers handset. For example, you may have determined for your network that if a subscriber sends more the 45 messages in 30 minutes that you want to record log messages as a possible indication or erratic behavior. From the web-based manager in an MMS profile set message Flood Threshold 1 to:
Enable Message Flood Window Message Flood Limit Message Flood Action Selected 30 minutes 45 Log
From the CLI: config firewall mms-profile edit profile_name config flood mm1 set status1 enable set window1 30 set limit1 45 set action1 log end end Set a second higher threshold to take additional actions when a subscriber sends more that 100 messages in 30 minutes. Set the actions for this threshold to log the flood, archive the message that triggered the second threshold, and block the sender for 15 minutes. From the web-based manager in an MMS profile set message Flood Threshold 2 to:
Enable Message Flood Window Message Flood Limit Message Block Time Message Flood Action Selected 30 minutes 100 15 minutes Log, DLP archive First message only, Block
From the CLI: config firewall mms-profile edit profile_name config flood mm1 set status2 enable set window2 30 set limit2 100 set action2 block log archive-first set block-time2 15 end end
FortiOS Carrier for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2096
Example three flood threshold levels with different actions for each threshold
Set the third and highest threshold to block the subscriber for an extended period and sand an administrator alert if the subscriber sends more than 200 messages in 30 minutes. Set the actions for this threshold to block the sender for four hours (240 minutes), log the flood, archive the message that triggered the third threshold, and send an alert to the administrator. From the web-based manager in an MMS profile set message Flood Threshold 3 to:
Enable Message Flood Window Message Flood Limit Message Block Time Message Flood Action Selected 30 minutes 200 240 minutes Log, Block, Alert Notification
Because you have selected the Alert Notification action you must also configure alert notification settings. For this example, the source MSISDN is 5551234phone number 555-1234. When administrators receive MMS messages from this MSIDSN they can assume a message flood has been detected. In this example, alert notifications are sent by the FortiOS Carrier unit to the MMSC using MM1. The host name of the MMSC is mmscexample, the MMSC URL is /, and the port used by the MMSC is 80. In this example, the alert notification window starts at 8:00am and extends for eight hours on weekdays (Monday-Friday) and the minimum interval between message flood notifications is two hours.
Source MSISDN Message Protocol Hostname URL Port Notifications Per Second Limit Window Start Time Window Duration Day of Week Interval 5551234 MM1 mmscexample / 80 0 8:00 8:00 Mon, Tue, Wed, Thu, Fri, Sat 2 hours
From the CLI: config firewall mms-profile edit profile_name config notification alert-flood-1 set alert-src-msisdn 5551234 set set msg-protocol mm1 set mmsc-hostname mmscexample set mmsc-url / set mmsc-port 80 set rate-limit 0 set tod-window-start 8:00 set tod-window-duration 8:00 set days-allowed monday tuesday wednesday thursday friday set alert-int 2 set alert-int-mode hours end end
FortiOS Handbook v3: FortiOS Carrier 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2097
You must also add the MSISDNs of the administrators to be notified of the message flood. In this example, the administrator flood threshold 3 alert notifications are sent to one administrator with MSISDN 5554321. To add administrators MSISDNs for flood threshold 3 from the web-based manager when configuring a protection profile, select MMS Bulk Email Filtering Detection > Recipient MSISDN > Create New.
MSISDN Flood Level 3 5554321 Select
From the CLI: config firewall mms-profile edit profile_name config notif-msisdn edit 5554321 set threshold flood-thresh-3 end end
2098
For example, the following command sets the submission confirmation response status to Success and changes the message text to Message Sent OK: config system replacemsg mm1 mm1-send-conf-flood set rsp-status ok set rsp-text Message Sent OK end When the FortiOS Carrier unit identifies an MM1 message received by a receiver from an MMSC as a flood message and blocks it, the FortiOS Carrier unit returns a message retrieval confirmation (m-retrieve.conf) to the sender (otherwise the senders handset would keep retrying the message). The m-retrieve.conf message is sent only when the MM1 message flood action is set to Block. For other message flood actions the message is actually delivered to the receiver, so the MMSC sends the m-retrieve.conf message. You can customize the m-retrive.conf message by editing the MM1 retrieve-conf flood message MM1 replacement message (from the CLI the mm1-retr-conf-flood replacement message). You can customize the class, subject, and message text for this message. For example, you could use the following command make the response more generic: config system replacemsg mm1 mm1-retr-conf-flood set subject Message blocked set message Message temporarily blocked by carrier end
2099
2100
Configure the MMS profile - web-based manager 1 Go to Firewall Objects > MMS Profile. 2 If you are editing an MMS profile, select the Edit icon of the MMS profile. If you are create a new MMS profile, select Create New and enter a profile name. 3 Expand MMS Bulk Email Filtering Detection. 4 Expand Message Flood. 5 Expand Flood Threshold 1. 6 Select the Enable check box for MM1 messages, MM4 messages, or both. 7 In the Message Flood Window field, enter the length of time the FortiOS Carrier unit will keep track of the number of messages each subscriber sends. If the FortiOS Carrier unit detects the quantity of messages specified in the Message Flood Limit sent during the number of minutes specified in the Message Flood Window, a message flood is in progress. 8 In the Message Flood Limit field, enter the number of messages required to trigger the flood. 9 In the Message Flood Block Time field, enter the length of time a user will be blocked from sending messages after causing the message flood. 10 Select the message flood actions the FortiOS Carrier unit will take when the message flood is detected. 11 Select OK. Configure the protection profile - web-based manager 1 Go to Firewall Objects > Protection Profile. 2 If you are editing a protection profile, select the Edit icon of the protection profile. If you are create a new protection profile, select Create New and enter a profile name. 3 Expand MMS Profile. 4 Select the MMS profile from the list. 5 Select OK. Configure the security policy - web-based manager 1 Go to Policy. 2 Select the Edit icon of the security policy that controls the traffic in which you want to detect message floods. 3 Select the Protection Profile check box to enable the use of a protection profile. 4 Select the protection profile from the protection profile list. 5 Select OK.
2101
The hostname of the server The URL of the server (usually /) The server port (usually 80) A user name and password to connect to the server The value-added-service-provider (VASP) ID The value-added-service (VAS) ID
2102
To configure administrator alert notifications - web-based manager 1 Go to Firewall Objects > MMS Profile and edit or add a new MMS protection profile. 2 Expand MMS Bulk Email Filtering Detection. There are three message flood thresholds. 3 Expand the threshold that you want to configure alert notification for. 4 For Message Flood Action, select the Alert Notification check box. Alert notification options appear. 5 For the Source MSISDN, enter the MSISDN from which the alert notification message will be sent. 6 Select the Message Protocol the alert notification will use: MM1, MM3, MM4, or MM7. 7 Add the information required by FortiOS Carrier to send messages using the selected message protocol: 8 For Notifications Per Second Limit, enter the number of notifications to send per second. Use this setting to reduce control the number of notifications sent by the FortiOS Carrier unit. If you enter zero (0), the notification rate is not limited. 9 If required, change Window Start Time and Window Duration configure when the FortiOS Carrier unit sends alert notifications. By default, notifications are sent at any time of the day. You can change the Window Start Time if you want to delay sending alert messages. You can also reduce the Window Duration if you want to stop sending alert notifications earlier. For example, you might not want FortiOS Carrier sending notifications except during business hours. In this case the Window Start Time could be 9:00 and the Window Duration could be 8:00 hours. You can set different alert notifications for each message threshold. For example, you could limit the message window for lower thresholds and set it to 24 hours for higher thresholds. This way administrators will only receive alert notifications outside of business hours for higher thresholds. 10 For Day of Week, select the days of the week to send notifications. For example, you may only want to send alert notifications on weekends for higher thresholds. 11 In the Interval field, enter the maximum frequency that alert notification messages will be sent, in minutes or hours. All alerts occurring during the interval will be included in a single alert notification message to reduce the number of alert messages that are sent.
2103
2104
The FortiOS Carrier unit keeps track of the sent messages. If the same message appears more often than the threshold value you configure, then action is taken. Possible actions are logging the duplicates, blocking or intercepting duplicate messages, archiving the duplicate messages, and sending an alert to inform an administrator that duplicates are occurring. With this highly configurable system, you can prevent the transmission of duplicate messages when there are more than you determine is acceptable. For detailed configuration options, see Duplicate Message on page 2055.
2105
2106
Intercept
Block
Alert Notification
2107
You can customize the m-send.conf message by editing the MM1 send-conf duplicate message MM1 replacement message (from the CLI the mm1-send-conf-dupe replacement message). You can customize the response status and message text for this message. The default response status is Content not accepted. To hide the fact that the FortiOS Carrier unit is responding to a duplicate message, you can change the response status to Success. The default message text informs the sender that the message was blocked. You could change this to something more generic. For example, the following command sets the submission confirmation response status to Success and changes the message text to Message Sent OK: config system replacemsg mm1 mm1-send-conf-dupe set rsp-status ok set rsp-text Message Sent OK end When the FortiOS Carrier unit identifies an MM1 message received by a receiver from an MMSC as a duplicate message and blocks it, the FortiOS Carrier unit returns a message retrieval confirmation (m-retrieve.conf) to the sender (otherwise the senders handset would keep retrying). The m-retrieve.conf message is sent only when the MM1duplicate message action is set to Block. For other message flood actions the message is actually received by the receiver, so the MMSC sends the m-retrieve.conf message. You can customize the m-retrive.conf message by editing the MM1 retrieve-conf duplicate message MM1 replacement message (from the CLI the mm1-retr-conf-dupe replacement message). You can customize the class, subject, and message text for this message. For example, you could use the following command make the response more generic: config system replacemsg mm1 mm1-retr-conf-dupe set subject Message blocked set message Message temporarily blocked by carrier end
2108
The modular nature of the profiles allows you great flexibility in how you configure the scanning options. MMS profiles can be used in any number of protection profiles. Similarly, protection profiles can be used in any number of security policies. In a complex configuration, there may be many security policies, each with a different protection profile and MMS profile. For a simpler network, you may have many security policies all using the same protection profile and MMS profile.
FortiOS Handbook v3: FortiOS Carrier 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2109
The hostname of the server The URL of the server (usually /) The server port (usually 80) A user name and password to connect to the server The value-added-service-provider (VASP) ID The value-added-service (VAS) ID
2110
To configure administrator alert notifications - web-based manager 1 Go to Firewall Objects > MMS Profile and edit or add a new MMS protection profile. 2 Expand MMS Bulk Email Filtering Detection. There are three duplicate message thresholds. 3 Expand the threshold that you want to configure alert notification for. 4 For Duplicate Message Action, select the Alert Notification check box. Alert notification options appear. 5 For the Source MSISDN, enter the MSISDN from which the alert notification message will be sent. 6 Select the Message Protocol the alert notification will use: MM1, MM3, MM4, or MM7. 7 Add the information required by FortiOS Carrier to send messages using the selected message protocol: 8 For Notifications Per Second Limit, enter the number of notifications to send per second. Use this setting to reduce control the number of notifications sent by the FortiOS Carrier unit. If you enter zero (0), the notification rate is not limited. 9 If required, change Window Start Time and Window Duration configure when the FortiOS Carrier unit sends alert notifications. By default, notifications are sent at any time of the day. You can change the Window Start Time if you want to delay sending alert messages. You can also reduce the Window Duration if you want to stop sending alert notifications earlier. For example, you might not want FortiOS Carrier sending notifications except during business hours. In this case the Window Start Time could be 9:00 and the Window Duration could be 8:00 hours. You can set different alert notifications for each message threshold. For example, you could limit the message window for lower thresholds and set it to 24 hours for higher thresholds. This way administrators will only receive alert notifications outside of business hours for higher thresholds. 10 For Day of Week, select the days of the week to send notifications. For example, you may only want to send alert notifications on weekends for higher thresholds. 11 In the Interval field, enter the maximum frequency that alert notification messages will be sent, in minutes or hours. All alerts occurring during the interval will be included in a single alert notification message to reduce the number of alert messages that are sent.
2111
2112
This section includes: Changing replacement messages Multimedia content for MMS replacement messages MMS replacement message types Replacement message tags Replacement message groups
Size
Response Status
2113
Priority
Set the priority used by the protocol for sending the message. This priority is not used by FortiOS Carrier it is added to the message. Options include Not Specified, Low, Normal, and High. Select the classification used by the protocol for the message. The classification is not used by FortiOS Carrier but is added to the message. Select Not Specified, Personal, Advertisement, Information, or Automatic. Note that not all MMS replacement messages include this field. Select whether to show or hide the message sender. You can also select Not Specified.
Class
Sender Visibility
Use Sender MSISDN Select to include the senders MSISDN in the replacement message. If the From field is used, the Use Sender MSISDN field is disabled. From Enter the name that should appear as the sender of the replacement message. You cannot include replacement message tags in the From field. If the Use Sender MSISDN field is selected, the From field is disabled. Enter or edit the subject for the replacement message. You cannot include replacement message tags in the subject field. Select the character set to use for the replacement message. You can select UTF-8 or US ASCII. Select to include Synchronized Multimedia Integration Language (SMIL) code in the message. Enter SMIL code into the SMIL Contents part of the replacement message. The Image and SMIL Contents fields are disabled unless Add SMIL Part is selected. Select a replacement message image to include in the replacement message. Use the %%IMAGE_CID%% tag to include the image in the SMIL contents. Any image you select must be 6000 bytes or less in size. Enter SMIL instructions for the replacement message to define multimedia content presentation. The size limit on the SMIL content is limited to 1023 characters. The body or editable text of the replacement message. The message text can include plain text, HTML instructions (if HTML is the allowed format) and replacement message tags. The size limit on this message is 1023 characters.
Image
SMIL Contents
Message Text
2114
To upload an image for a SMIL message - web-based manager 1 Go to System > Config > Replacement Message Image. 2 Select Create New. 3 Enter test_image1 for Name. 4 For Content Type select PNG. 5 Browse to the file location on your local computer using Browse next to Upload. 6 Select OK. At this point, you should be able to see your image displayed with a tag of test_image1.
Note: You can not edit a replacement message image. To change an entry, you must delete it, and create a new entry.
To use an image in an MMS replacement message - web-based manager 1 Go to System > Config > Replacement Messages. 2 Expand MM1. 3 Edit the MM1 send-req virus message replacement message. 4 Enable Add SMIL Part. 5 For Image, select test_image1 from the drop down list. 6 Enter SMIL code to display the image as required. 7 Enter message text including any replacement message tags required. 8 Enter rest of information as required. 9 Select OK.
2115
m-retrieve-conf
m-send-req
%%AUTH_REDIR_URL%% The auth-keepalive page can prompt the user to open a new window which links to this tag. %%CATEGORY%% %%DEST_IP%% The name of the content category of the web site. The IP address of the request destination from which a virus was received. For email this is the IP address of the email server that sent the email containing the virus. For HTTP this is the IP address of web page that sent the virus. The amount of time in the reporting period. This is user defined in the protection profile. The email address of the sender of the message from which the file was removed. The email address of the intended receiver of the message from which the file was removed. The name of a file that has been removed from a content stream. This could be a file that contained a virus or was blocked by antivirus file blocking. %%FILE%% can be used in virus and file block messages. The FortiGuard - Web Filtering logo. The Fortinet logo. The reference name of an image you have uploaded to the FortiOS Carrier unit. Use this to display the image in the message. The message with the image is generated as a MIME multipart message For example if you upload a file called example.jpg, and call it example_logo, then %%IMAGE_CID%% would resolve to example_logo. The link to the FortiClient Host Security installs download for the Endpoint Control feature.
%%FAILED_MESSAGE%% The failed to login message displayed on the auth-login-failed page. %%FILE%%
%%LINK%%
2116
Table 121: Replacement message tags (Continued) Tag %%HTTP_ERR_CODE%% %%HTTP_ERR_DESC%% %%KEEPALIVEURL%% %%MMS_SENDER%% %%MMS_RECIPIENT%% %%MMS_SUBJECT%% Description The HTTP error code. 404 for example. The HTTP error description. auth-keepalive-page automatically connects to this URL every %%TIMEOUT%% seconds to renew the connection policy. Senders MSISDN from message header. Recipients MSISDN from message header. MMS Subject line to help with message identity.
%%MMS_HASH_CHECKSU Value derived from hash calculation - will only be shown on duplicate M%% message alerts. %%MMS_THRESH%% %%NIDSEVENT%% %%NUM_MSG%% %%OVERRIDE%% Mass MMS alert threshold that triggered this alert. The IPS attack message. %%NIDSEVENT%% is added to alert email intrusion messages. The number of times the device tried to send the message with banned content within the reporting period. The link to the FortiGuard Web Filtering override form. This is visible only if the user belongs to a group that is permitted to create FortiGuard web filtering overrides. The FortiGuard web filter block override form. This tag must be present in the FortiGuard Web Filtering override form and should not be used in other replacement messages. The protocol (http, ftp, pop3, imap, or smtp) in which a virus was detected. %%PROTOCOL%% is added to alert email virus messages. The name of a file that has been removed from a content stream and added to the quarantine. This could be a file that contained a virus or was blocked by antivirus file blocking. %%QUARFILENAME%% can be used in virus and file block messages. Quarantining is only available on FortiOS Carrier units with a local disk. Display information about the traffic shaping quota setting that is blocking the user. Used in traffic quota control replacement messages. Authentication challenge question on auth-challenge page. Prompt to enter username and password on auth-login page. The name of the web filtering service. The IP address of the request originator who would have received the blocked file. For email this is the IP address of the users computer that attempted to download the message from which the file was removed. Configured number of seconds between authentication keepalive connections. Used on the auth-keepalive page. The URL of a web page. This can be a web page that is blocked by web filter content or URL blocking. %%URL%% can also be used in http virus and file block messages to be the URL of the web page from which a user attempted to download a file that is blocked. The name of a virus that was found in a file by the antivirus system. %%VIRUS%% can be used in virus messages
%%OVRD_FORM%%
%%PROTOCOL%% %%QUARFILENAME%%
%%TIMEOUT%% %%URL%%
%%VIRUS%%
2117
If you enable virtual domains (VDOMs) on the FortiOS Carrier unit, replacement message groups are configured separately for each virtual domain. Each virtual domain has its own default replacement message group, configured from System > Config > Replacement Message. When you modify a message in a replacement message group, a Reset icon appears beside the message in the group. You can select this Reset icon to reset the message in the replacement message group to the default version. All MM1, MM4, MM7 notification messages (and MM1 retrieve-conf messages) can contain an SMIL layer and all MM4 notification messages can contain an HTML layer in the message. These layers can be used to brand messages by using logos uploaded to the unit via the Manage Images link found on the replacement message group configuration page. See Multimedia content for MMS replacement messages on page 2114.
2118
To create the message group - web-based manager 1 Go to System > Config > Replacement Message Group. 2 Select Create New. 3 Enter example_group for Name. 4 Select OK. 5 Select example_group, and select Edit. 6 Expand MM1. 7 Select MM1 send-req virus message. 8 Enter the following information.
Priority Class Sender Visibility From Subject Add SMIL Part Image Normal Information Show %%MSISDN%% MyCarrier Virus infected message(s) detected Enable example_logo
9 Enter the following SMIL code: <smil><head><meta name=author content=MyCarrier /></head> <body><img src="cid:%%IMAGE_CID%%" longdesc=Example.com logo /></body> </smil> 10 Enter the following replacement message code: This device has sent %%NUM_MSG%% virus infected messages in the last %%DURATION%% hours. Contact MyCarrier customer support for farther instructions.
2119
2120
The FortiOS Carrier unit does more than just forward and route GTP packets over the network. It also performs: Packet sanity checking GTP stateful inspection Protocol anomaly detection and prevention HA
2121
If the packet in question does not confirm to the standards, the FortiOS Carrier firewall drops the packet, so that the malformed or forged traffic will not be processed.
HA
FortiOS Carrier active-passive HA provides failover protection for the GTP tunnels. This means that an active-passive cluster can provide FortiOS Carrier firewall services even when one of the cluster units encounters a problem that would result in complete loss of connectivity for a stand-alone FortiOS Carrier firewall. This failover protection provides a backup mechanism that can be used to reduce the risk of unexpected downtime, especially in a mission-critical environment. FortiOS HA will sync TCP sessions by default but UDP sessions are not synchronized by default. However synchronizing a session is only part of the solution if the goal is to continue to do GTP processing on a synchronized session after a HA switch. For that to work we need to synch the GTP tunnel state. So, once the master completes tunnel setup then the GTP tunnel is synchronized to the slave. For more information on HA in FortiOS, see High Availability on page 1721.
2122
2123
2124
The encoded protocol is determined in the PDP Type Organization and PDP Type Number fields within the End User Address Information Element. The PDP Type Organization is a 4-bit field that determines if the protocol is part of the ETSI or IETF organizations. Values are zero and one, respectively. The PDP Type field is one byte long. Both GTP specifications only list PPP, with a PDP Type value of one, as a valid ETSI protocol. PDP Types for the IETF values are determined in the "Assigned PPP DLL Protocol Numbers" sections of RFC 1700. The PDP types are compressed, meaning that the most significant byte is skipped, limiting the protocols listed from 0x00 to 0xFF. To configure the Encapsulated Non-IP End User Address Filtering, go to UTM > Carrier > GTP Profile, and edit a GTP profile. Expand Encapsulated Non-IP End User Address Filtering to configure settings. See Encapsulated non-IP end user traffic filtering options on page 2067.
By default the FortiOS Carrier firewall detects these problems as well as other protocol anomalies and drops the packets. However, you can change the policy to allow them. All protocol anomaly options are set to Deny by default.
2125
Overbilling can also occur when an available IP address is reassigned to a new mobile station (MS). Subsequent traffic by the previous MS may be forwarded to the new MS. The new MS would then be billed for traffic it did not initiate.
Tunnel Identifier (TID) An identifier for the start and end points of a GTP tunnel. This information uniquely defines all tunnels. It is important for billing Tunnel Endpoint information based on the length of time the tunnel was active and Identifier (TEID how much data passed over the tunnel. Message type Packet status For available message types, see Common message types on carrier networks on page 2129.
What action was performed on the packet. This field matches the logging options while you are configuring GTP logging. See Anti-overbilling with FortiOS Carrier on page 2126. The status can be one of forwarded, prohibited, stateinvalid, rate-limited, or tunnel-limited
2126
A FortiOS Carrier unit can be divided into multiple virtual units, each being a complete and self-contained virtual FortiCarrier unit. This field indicates which virtual domain (VDOM) was responsible for the log entry. If VDOMs are not enabled on your unit, this field will be root.
Reason to be denied If the packet that generated this log entry was denied or blocked, this field will include what part of FortiOS denied or blocked that if applicable packet. Such as firewall, antivirus, webfilter, or spamfilter.
An example of the above log message format is for a Tunnel deleted log entry. When a tunnel is deleted, the log entry contains the following information: Timestamp Interface name (if applicable) SGSN IP address (source IP) GGSN IP address (destination IP) TID Tunnel duration time in seconds Number of messages sent to the SGSN Number of messages sent to the GGSN
2127
2128
GTP-C messages
GTP-C contains the networking layer messages. These address routing, versioning, and other similar low level issues. When a subscriber requests a Packet Data Protocol (PDP) context, the SGSN will send a create PDP context request GTP-C message to the GGSN giving details of the subscriber's request. The GGSN will then respond with a create PDP context response GTP-C message which will either give details of the PDP context actually activated or will indicate a failure and give a reason for that failure. This is a UDP message on port 212 GTP-C message types include Path Management Messages, Location Management Messages, and Mobility Management Messages.
2129
GTP-U messages
GTP-U is focused on user related issues including tunneling, and billing. GTP-U message types include MBMS messages, and GTP-U and Charging Management Messages
MBMS messages
Multimedia Broadcast and Multicast Services (MBMS) have recently begun to be offered over GSM and UMTS networks on UTRAN and GERAN radio access technologies. MBMS is mainly used for mobile TV, using up to four GSM timeslots for one MBMS connection. One MBMS packet flow is replicated by GGSN, SGSN and RNCs. MBMS is split into the MBMS Bearer Service and the MBMS User Service. The MBMS User Service is basically the MBMS Service Layer and offers a Streaming- and a Download Delivery Method. The Streaming Delivery method can be used for continuous transmissions like Mobile TV services. The Download Method is intended for "Download and Play" services.
2130
Version not Supported GTP-C, GTP-U, GTP Support Extension Headers Notification
2131
Update PDP Context Request/ Response Delete PDP Context Request/ Response
GTP-C GTP-C
Create AA PDP Context GTP-C Request/ Response Delete AA PDP Context GTP-C Request/ Response
Error Indication
GTP-U
GTP-C
2132
SGSN context Request/ GTP-C Response/ Acknowledge Forward Relocation Request/ Response/ Complete/ Complete Acknowledge GTP-C
GTP-C
Forward SRNS Context/ GTP-C Context Acknowledge RAN Information Relay GTP-C
MBMS messages
Message Type MBMS Notification Request/ Response/ Reject Request/ Reject Response Create MBMS Context Request/ Response Used By GTP-C Description Nictitation of the radio access devices.
GTP-C
Request to create an active MBMS context. The context will be pending until the response is received. Once active, the MBMS context allows the MS to receive data from a specific MBMS source
Update MBMS Context Request/ Response Delete MBMS Context Request/ Response
GTP-C GTP-C Request to deactivate the MBMS context. When the response is received, the MBMS context will be inactive.
2133
GTP-C, GTP-U
Used to inform rest of network when a node starts service Used to divert the flow of CDRs from the CDFs to another CGF when the sender is being removed, or they are used when the CGF has lost its connection to a downstream system Used to reliably transport CDRs from the point of generation (SGSN/GGSN) to non-volatile storage in the CGF
2134
Mobile Country Code (MCC) (3 digits) Mobile Network Code (MNC) (3 digits) Mobile Station Identification Number (MSIN) (9 digits)
012345678901234
The Home Network Identity (HNI) is made up of the MCC and MNC. The HNI is used to fully identify a users home network. This is important because some large countries have more than one country code for a single carrier. For example a customer with a mobile carrier on the East Coast of the United States would have a different MCC than a customer on the West Coast with the same carrier because even through the MNC would be the same the MCC would be different the United States uses MCCs 310 to 316 due to its size. If an IMSI number is not from the local carriers network, IMSI analysis is performed to resolve the number into a Global Title which is used to access the users information remotely on their home carriers network for things like billing and international roaming. See Configuring IMSI filtering in FortiOS Carrier on page 2139.
2135
2136
High Speed Packet Access (HSPA) includes two other protocols High Speed Downlink and Uplink Packet Access protocols (HSDPA and HSUPA respectively). It improves on the older WCDMA protocols by better using the radio bandwidth between the mobile device and the radio tower. This results in an increased data transfer rate for the user.
RAT type is part of advanced filtering configuration. See Configuring advanced filtering in FortiOS Carrier on page 2140.
RAI is part of advanced filtering configuration. See Configuring advanced filtering in FortiOS Carrier on page 2140.
2137
PDP context, APN, IMSI, MSISDN, When you want to filter based on: RAT type, ULI, RAI, IMEI user phone number (MSISDN) what wireless technology the user employed to get on the network (RAT type) user location (ULI and RAI) handset ID, such as for stolen phones (IMEI)
APN filtering is very specific the only identifying information that is used to filter is the APN itself. This will always be present in GTP tunnel traffic, so all GTP traffic can be filtered using this value. See Configuring APN filtering in FortiOS Carrier on page 2138. IMSI filtering can use a combination of the APN and MCC-MNC numbers. The MCC and MNC are part of the APN, however filtering on MCC-MNC separately allows you to filter based on country and carrier instead of just the destination of the GTP Tunnel. See Configuring IMSI filtering in FortiOS Carrier on page 2139. Advanced filtering can go into much deeper detail covering PDP contexts, MSISDN, IMEI, and more not to mention APN, and IMSI as well. If you cant find the information in APN or IMSI that you need to filter on, then use Advanced filtering. See Configuring advanced filtering in FortiOS Carrier on page 2140.
For more information on APN, see Access Point Number (APN) on page 2136.
Enable APN Filter Default APN Action Value Select to enable filtering based on APN value. Select either Allow or Deny for all APNs that are not found in the list. The default is Allow. Displays the APN value for this entry. Partial matches are allowed using wildcard. For example *.mcc333.mcn111.gprs would match all APNs from country 333 and carrier 111 on the gprs network. Select one or more of the methods used to obtain APN values. Mobile Station provided - The APN comes from the mobile station where the mobile device connected. This is the point of entry into the carrier network for the users connection. Network provided - The APN comes from the carrier network. Subscription Verified - The users subscription has been verified for this APN. This is the most secure option. FortiOS Carrier for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Mode
2138
One of allow or deny to allow or block traffic associated with this APN. Select to remove this APN entry from the list. Select to change the information for this APN entry. Select to add an APN to the list. Not active while creating GTP profile, only when editing an existing GTP profile. You should save all changes before adding APNs. A warning to this effect will be displayed when you select the Add APN button.
The Add APN button is not activated until you save the new GTP profile. When you edit that GTP profile, you will be able to add new APNs.
APN MCC-MNC
Mode
2139
APN Restriction
RAT Type
ULI
RAI
IMEI
2140
Troubleshooting
This section highlights troubleshooting for Carrier related issues. This section includes: FortiOS Carrier diagnose commands Applying Intrusion and Prevention System (IPS) signatures to IP packets within GTP-U tunnels GTP packets are not moving along your network
invalid-sgsns-to-long list List of SGSNs that do not match the filter criteria. These SGSNs will be logged. <gtp_profile> ip-policy list <gtp_profile> List the IP policies including message count for each policy, the action to take, the source and destination IP addresses or ranges, and masks.
noip-policy <gtp_profile> List the non-IP policies including the message count, which mode, the action to take, and the start and end protocols to be used by decimal number. path {list | flush} Select list or flush. List the GTP related paths in FortiOS Carrier memory. Flush the GTP related paths from memory.
2141
Applying Intrusion and Prevention System (IPS) signatures to IP packets within GTP-U tunnels
Troubleshooting
The GTP advanced filter policy information for this GTP profile. The information displayed for each entry includes a count for messages matching this filter, a hexidecimal mask of which message types to match, the associated flags, action to take on a match, APN selection mode, MSISDN, RAT types, RAI, ULI, and IMEI. Displays Select to flush the runtime statistics from memory. Display the runtime statistics. This information includes how many tunnels are active, how many GTP profiles exist, how many IMSI filter entries, how many APN filter entries, advanced policy filter entries, IE remove policy filter entries, IP policy filter entries, and number of dropped packets. Select one of list or flush. List lists all the GTP tunnels currently active. Flush clears the list of active GTP tunnels.
Applying Intrusion and Prevention System (IPS) signatures to IP packets within GTP-U tunnels
GTP-U (GTP user data tunnelling) tunnels carry user data packets, signalling messages and error information. GTP-U uses UDP port 2152. FortiOS Carrier units can apply IPS intrusion protection and detection to GTP-U user data sessions. To apply IPS to GTP-U user data sessions, add an IPS Sensor to a profile and add the profile to a security policy that accepts GTP-U tunnels. The security policy Service must be set to GTP or ANY to accept GTP-U packets. The FortiOS Carrier unit intercepts packets with destination port 2152, removes the GTP header and handles the packets as regular IP packets. Applying an IPS sensor to the IP packets, the FortiOS Carrier unit can log attacks and pass or drop packets depending on the configuration of the sensor. To apply an IPS sensor to GTP-U tunnels 1 Go to UTM > Intrusion Protection > IPS Sensor and select Create New to add an IPS Sensor. 2 Configure the IPS Sensor to detect attacks and log, drop, or pass attack packets. See the Intrusion Protection section of the UTM Guide. 3 Go to Policy > Policy and apply the IPS sensor to the security policy. 4 Go to Policy > Policy and select Create New to add a security policy or select a security policy. 5 Configure the security policy to accept GTP traffic. In the security policy configure the source and destination settings to match the GTP traffic. Service to GTP or ANY so that the security policy accepts GTP traffic. 6 Select the GTP profile within the security policy. 7 Configure any other required security policy settings. 8 Select OK to save the security policy.
2142
Troubleshooting
2143
Troubleshooting
However, if more detail is required you can change settings such as: Lower the Log Frequency number in GTP Profiles so fewer or no log messages are dropped. This will allow a more accurate picture of everything happening on the network, where you may have had only a partial picture before. Ensure all the GTP log events are enabled to provide you with a complete picture. Increase the minimum log level to Information or Debug to ensure you are seeing all possible log entries. This is found if you go to Log&Report > Log Config > Log Setting > Local Logging & Archiving > Minimum log level. Ensure that all relevant event types are enabled under Log&Report > Log Config > Event Log.
For more information on GTP related logging, see Logging events on the FortiOS Carrier unit on page 2126. See the log and report chapters of Logging and Reporting Guide and FortiOS CLI Reference. General information you should be looking for in the logs includes: Are all packets having problems or just certain types? Are all devices on the network having problem, or just certain devices? Is it just GTP traffic that is having problems or are all types of traffic having the same problem?
2144
Troubleshooting
To check the routing table using the CLI # get router info routing-table all Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default S* S S C B C 0.0.0.0/0 [10/0] via 192.168.183.254, port2 1.0.0.0/8 [10/0] via 192.168.183.254, port2 2.0.0.0/8 [10/0] via 192.168.183.254, port2 10.142.0.0/23 is directly connected, port3 10.160.0.0/23 [20/0] via 10.142.0.74, port3, 2d18h02m 192.168.182.0/23 is directly connected, port2
Examining an entry from the routing table above: B 10.160.0.0/23 [20/0] via 10.142.0.74, port3, 2d18h02m
B 10.160.0.0/23 [20/0] BGP. The routing protocol used. The destination of this route including netmask. 20 indicates and administrative distance of 20 out of a range of 0 to 255. 0 is an additional metric associated with this route, such as in OSPF The gateway, or next hop. The interface used by this route. How old this route is, in this case almost three days old.
2145
Troubleshooting
Sniffing packets can also tell you if the FortiOS Carrier unit is silently dropping packets for reasons such as RPF (Reverse Path Forwarding), also called Anti Spoofing. This prevents an IP packet from being forwarded if its source IP address either does not belong to a locally attached subnet (local interface), or be a hop on the routing between the FortiOS Carrier and another source (static route, RIP, OSPF, BGP). Note that RPF can be disabled by turning on asymmetric routing in the CLI (config system setting, set asymmetric enable), however this will disable stateful inspection on the FortiOS Carrier unit and consequently cause many features to be turned off.
Caution: If you configure virtual IP addresses on your FortiOS Carrier unit, the unit will use those addresses in preference to the physical IP addresses. If not configured properly, secondary IP addresses can cause a broadcast storm. You will notice the secondary address being preferred when you are sniffing packets because all the traffic will be using the virtual IP addresses. This is due to the ARP update that is sent out when the VIP address is configured.
<verbose>
<count>
For a simple sniffing example, enter the CLI command diag sniffer packet port1 none 1 3. This will display the next 3 packets on the port1 interface using no filtering, and using verbose level 1. At this verbosity level you can see the source IP and port, the destination IP and port, action (such as ack), and sequence numbers. In the output below, port 443 indicates these are HTTPS packets, and 172.20.120.17 is both sending and receiving traffic. Head_Office_620b # diag sniffer packet port1 none 1 3 interfaces=[port1] filters=[none] 0.545306 172.20.120.17.52989 -> 172.20.120.141.443: psh 3177924955 ack 1854307757 0.545963 172.20.120.141.443 -> 172.20.120.17.52989: psh 1854307757 ack 3177925808 0.562409 172.20.120.17.52988 -> 172.20.120.141.443: psh 4225311614 ack 3314279933
FortiOS Carrier for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2146
Troubleshooting
2147
Troubleshooting
2148
2149
2150
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Wireless concepts
Wireless networking is radio technology, subject to the same characteristics and limitations as the familiar audio and video radio communications. Various techniques are used to modulate the radio signal with a data stream.
Note that the width of these channels exceeds the spacing between the channels. This means that there is some overlap, creating the possibility of interference from adjacent channels, although less severe than interference on the same channel. Truly nonoverlapping operation requires the use of every fourth or fifth channel, for example ISM channels 1, 6 and 11. The capabilities of your wireless clients is the deciding factor in your choice of wireless protocol. If your clients support it, 5GHz protocols have some advantages. The 5GHz band is less used than 2.4GHz and its shorter wavelengths have a shorter range and penetrate obstacles less. All of these factors mean less interference from other access points, including your own. When configuring your WAP, be sure to correctly select the Geography setting to ensure that you have access only to the channels permitted for WiFi use in your part of the world. For detailed information about the channel assignments for wireless networks for each supported wireless protocol, see Wireless radio channels on page 2213.
2151
Security
Power
Wireless LANs operate on frequencies that require no license but are limited by regulations to low power. As with other unlicensed radio operations, the regulations provide no protection against interference from other users who are in compliance with the regulations. Power is often quoted in dBm. This is the power level in decibels compared to one milliwatt. 0dBm is one milliwatt, 10dBm is 10 milliwatts, 27dBm, the maximum power on Fortinet FortiAP equipment, is 500 milliwatts. The FortiGate unit limits the actual power available to the maximum permitted in your region as selected by the WiFi controller country setting. Received signal strength is almost always quoted in dBm because the received power is very small. The numbers are negative because they are less than the one milliwatt reference. A received signal strength of -60dBm is one millionth of a milliwatt or one nanowatt.
Antennas
Transmitted signal strength is a function of transmitter power and antenna gain. Directional antennas concentrate the signal in one direction, providing a stronger signal in that direction than would an omnidirectional antenna. FortiWiFi units have detachable antennas. However, these units receive regulatory approvals based on the supplied antenna. Changing the antenna might cause your unit to violate radio regulations.
Security
There are several security issues to consider when setting up a wireless network.
Encryption
Wireless networking supports the following security modes for protecting wireless communication, listed in order of increasing security. None Open system. Any wireless user can connect to the wireless network. WEP64 64-bit Web Equivalent Privacy (WEP). This encryption requires a key containing 10 hexadecimal digits. WEP128 128-bit WEP. This encryption requires a key containing 26 hexadecimal digits. WPA 256-bit Wi-Fi Protected Access (WPA) security. This encryption can use either the TKIP or AES encryption algorithm and requires a key of either 64 hexadecimal digits or a text phrase of 8 to 63 characters. It is also possible to use a RADIUS server to store a separate key for each user.
2152
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Security
WPA2 WPA with security improvements fully meeting the requirements of the IEEE 802.11i standard. Configuration requirements are the same as for WPA. For best security use the WPA2 with AES encryption and a RADIUS server to verify individual credentials for each user. WEP, while better than no security at all, is an older algorithm that is easily compromised. With either WEP or WAP, changing encryption passphrases on a regular basis further enhances security.
Captive portal
As part of authenticating your users, you might want them to view a web page containing your acceptable use policy or other information. This is called a captive portal. No matter what URL the user initially requested, the portal page is returned. Only after authenticating and agreeing to usage terms can the user access other web resources. For information about setting up a captive portal, see Captive Portal security on page 2168.
Power
Reducing power reduces unwanted coverage and potential interference to other WLANs. Areas of unwanted coverage are a potential security risk. There are people who look for wireless networks and attempt to access them. If your office WLAN is receivable out on the public street, you have created an opportunity for this sort of activity.
2153
Authentication
Authentication
Wireless networks usually require authenticated access. FortiOS authentication methods apply to wireless networks the same as they do to wired networks because authentication is applied in the firewall policy. The types of authentication that you might consider include: user accounts stored on the FortiGate unit user accounts managed and verified on an external RADIUS, LDAP or TACACS+ server Windows Active Directory authentication, in which users logged on to a Windows network are transparently authenticated to use the wireless network.
This Wireless chapter of the FortiOS Handbook will provide some information about each type of authentication, but more detailed information is available in the Authentication chapter. What all of these types of authentication have in common is the use of user groups to specify who is authorized. For each wireless LAN, you will create a user group and add to it the users who can use the WLAN. In the identity-based firewall policies that you create for your wireless LAN, you will specify this user group. Some access points, including FortiWiFi units, support MAC address filtering. You should not rely on this alone for authentication. MAC addresses can be sniffed from wireless traffic and used to impersonate legitimate clients.
FortiWiFi units
FortiWiFi units support the following wireless network standards: IEEE 802.11a (5-GHz Band) (except FortiWiFi models 30B and 50B) IEEE 802.11b (2.4-GHz Band) IEEE 802.11g (2.4-GHz Band) IEEE 802.11n (5-GHz and 2.4-GHz Band) (except FortiWiFi models 30B, 50B) WEP64 and WEP128 Wired Equivalent Privacy (WEP)
2154
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Wi-Fi Protected Access (WPA), WPA2 and WPA2 Auto using pre-shared keys or individual keys stored on a RADIUS server
FortiWiFi models 30B and 50B do not operate on the 5GHz band and do not support 802.11n, even in the 2.4GHz band. FortiWiFi units support up to four wireless interfaces with four different SSIDs. Each wireless interface can have different security settings. FortiAP units support two wireless interfaces. You can configure the FortiWiFi unit to: Provide an access point that clients with wireless network cards can connect to. This is called Access Point mode, which is the default mode. All FortiWiFi units can have up to 4 wireless interfaces. Connect the FortiWiFi unit to another wireless network. This is called Client mode. A FortiWiFi unit operating in client mode can only have one wireless interface. Monitor access points within radio range. This is called Monitoring mode. You can designate the detected access points as Accepted or Rogue for tracking purposes. No access point or client operation is possible in this mode. But, you can enable monitoring as a background activity while the unit is in Access Point mode.
or or
The wireless functionality of a FortiWiFi unit in wireless terminal mode cannot be controlled from the unit itself. If there are firewall devices between the WiFi controller FortiGate unit and the managed FortiWiFi units, make sure that ports 5246 and 5247 are open. These ports carry, respectively, the encrypted control channel data and the wireless network data. If needed, you can change these ports in the CLI: config system global set wireless-controller-port <port_int> end This command sets the control channel port. The data channel port is always the control port plus one. The port setting must match on the access controller and all access points.
FortiAP units
FortiAP series wireless access points are controlled by a FortiGate unit over Ethernet. Capabilities differ by model as follows:
2155
Deployment considerations
Table 122: FortiAP model capabilities Model 210B (indoor) 220A (indoor) 220B (indoor) Radio 1 802.11 b/g/n 2.4GHz 802.11 a/n 5GHz 802.11 b/g/n 2.4GHz 802.11 b/g/n 2.4GHz 802.11 a/n 5GHz Radio 2 N/A 802.11 a/n 5GHz Simultaneous SSIDs 7 for AP, 1 for monitoring 14 for AP, 2 for monitoring 14 for AP, 2 for monitoring 14 for AP, 2 for monitoring
Dual-band radios can function as an AP on either band or as a dual-band monitor. The monitoring function is also available during AP operation if Background Scan is enabled in the custom AP profile for the device.
Third-party WAPs
FortiOS implements the CAPWAP standard.
Deployment considerations
Several factors need to be considered when planning a wireless deployment.
Deployment methodology
1 Evaluate the coverage area environment. 2 Position access point(s). 3 Select access point hardware. 4 Install and configure the equipment. 5 Test and tune the network.
2156
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Deployment considerations
Client wireless capabilities The 802.11n protocol provides the highest data rates and has channels in the less interference-prone 5GHz band, but it is supported only on the latest consumer devices. The 802.11g protocol is more common but offers lower bandwidth. Some older wireless client equipment supports only 802.11b with a maximum data rate of 11Mb/s. WAP radios support the protocol that you select with backward compatibility to older modes. For example, if you select 802.11n, clients can also connect using 802.11g or 802.11b.
The most important conclusion from these considerations is whether more than one WAP is required.
If you cannot avoid some of these impediments due to the shape of the office or building materials used, you may need to use multiple access points to help distribute the radio signal around the room. Figure 262 shows how positioning two FortiAP-220A units within a uniquely shaped office space helps to distribute signals around the area.
Figure 262: Using multiple APs to provide a constant strong signal.
Stairs
Elevator
Washrooms
2157
Deployment considerations
This sample office has washrooms, a stairwell and an elevator shaft in the center of the building, making it impossible to use a single access point effectively. The elevator shaft and multiple metal stalls in the washrooms can cause signal degradation. However, placing access points in diagonally opposite areas of the office provides maximum coverage. When using multiple access points, set each access point to a different channel to avoid interference in areas where signals from both access points can be received.
Fast Roaming
Users in a multi-AP network, especially with mobile devices, can move from one AP coverage area to another. But, the process of re-authentication can often take seconds to complete and this can impair wireless voice traffic and time sensitive applications. The FortiAP fast roaming feature solves this problem and is available only when moving between FortiAP units managed by the same FortiGate unit. Fast roaming uses two standards-based techniques: Pairwise Master Key (PMK) Caching enables a RADIUS-authenticated user to roam away from an AP and then roam back without having to re-authenticate. To accomplish this, the FortiGate unit stores in a cache a master key negotiated with the first AP. This enables the 802.11i-specified method of fast roam-back.
2158
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Pre-authentication or fast-associate in advance enables an 802.11 AP associated to a client to bridge to other APs over the wired network and pre-authenticate the client to the next AP to which the client might roam. This enables the PMK to be derived in advance of a roam and cached. When the client does roam, it will already have negotiated authentication in advance and will use its cached PMK to quickly associate to the next AP. This capability will ensure that wireless clients that support Preauthentication to continue the data transfer without noticeable connection issues.
2159
2160
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2161
Security settings
SSID 1
SSID 2
Radio settings
AP Profile 1
Physical AP units
AP 1
AP 2
AP 3
AP 4
You can select which SSIDs (wireless networks) will be available through the access point and adjust the wireless power level of the AP.
2162
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2163
To configure an AP Profile - web-based manager 1 Go to WiFi Controller > Managed Access Points > Custom AP Profile and select Create New. 2 Enter a Name for the AP Profile. 3 In Platform, select the FortiWiFi or FortiAP model to which this profile applies. 4 In Mode, select Access Point. 5 Optionally, enable Background Scan to support the Rogue AP feature. For more information see Wireless network monitoring on page 2185. 6 Optionally, select Radio Resource Provision to enable the ARRP feature. For more information see Automatic Radio Resource Provisioning on page 2159. 7 In Band, select the 802.11 wireless protocol that you want to support. Note that there are two choices for 802.11n. Select 802.11n for 2.4GHz operation or 802.11n-5G for 5GHz operation. The available choices depend on the radios capabilities. 8 In Channel, select the channels that the AP is permitted to use. By default, all channels are selected. 9 Leave the TX Power at its default setting. You can adjust this later. 10 In SSID, use the arrow buttons to move the SSIDs (wireless LANs) to which these settings apply into the Selected list. 11 Repeat steps 4 though 10 for Radio 2, if required. Note that on the FortiAP-220 unit Radio 1 is 2.4GHz and Radio 2 is 5GHz. Radio 2 also supports 40MHz wide channels on the 5GHz band on 802.11n. 12 Select OK. To configure an AP Profile - CLI This example configures a FortiAP-220A to use only Radio 1 for 802.11g operation applied to SSID example_wlan. config wireless-controller wtp-profile edit guest_prof config platform set type 220A end config radio-1 set mode ap set band 802.11g set vaps example_wlan end
end
2164
To configure an SSID - web-based manager 1 Go to WiFi Controller > WiFi Network > SSID and select Create New. 2 Enter the Interface Name that will identify the wireless interface. 3 In the Addressing Mode section, enter the IP/Netmask for the interface. If IPv6 is enabled, you can also enter an IPv6 Address. 4 In Administrative Access, select Ping. Ping is useful for testing. For security it is better not to enable administrative access on wireless interfaces. 5 Enter the SSID for your WLAN and choose whether to enable SSID Broadcast or not. For more information, see Whether to broadcast SSID on page 2152. 6 If you want to provide DHCP service to your clients, select Enable DHCP and enter the range of IP addresses to assign. For more information, see Configuring DHCP for WiFi clients on page 2165. 7 Select the Security Mode and enter the required settings. For more information, see Configuring security on page 2166. 8 If you want to prevent direct communication between your wireless clients, enable Block Intra-SSID Traffic. 9 Optionally, set the Maximum Clients limit. The default of 0 sets no limit on the number of clients. 10 If you want to restrict access to the wireless network by MAC address, select Enable MAC Filter. For more information, see Adding a MAC filter on page 2169. 11 Select OK. Each Virtual AP that you create is a wireless interface that establishes a wireless LAN. Go to System > Network > Interface to configure its IP address. To configure a virtual access point - CLI This example creates an access point with SSID example and WPA2-Personal security. The wireless interface is named example_wlan. config wireless-controller vap edit example_wlan set ssid "example" set broadcast-ssid enable set security wpa2-only-personal set passphrase "hardtoguess set vdom root end
config system interface
edit example_wlan
set ip 10.10.120.1 255.255.255.0
end
2165
To configure a DHCP server for WiFi clients - web-based manager 1 Go to WiFi Controller > WiFi Network > SSID and edit your SSID entry. 2 In the WiFi Settings section, select Enable DHCP. 3 In the Address Start and Address End fields, enter the IP address range to assign. The address range needs to be in the same subnet as the wireless interface IP address, but not include that address. 4 Set the Default Gateway to the wireless interface IP address. 5 Set the Netmask to an appropriate value, such as 255.255.255.0. 6 Enter the IP address of the DNS Server that your users will access. 7 Select OK. The DHCP server automatically configures itself to serve only FortiAP units. You can also configure DHCP through System > Network > DHCP Server, but that page offers additional options that might not be suitable for a wireless network. To configure a DHCP server for WiFi clients - CLI In this example, WiFi clients on the example_wlan interface are assigned addresses in the 10.10.120.2-9 range to connect with the WiFi access point on 10.10.120.1. config system dhcp server edit 0 set default-gateway 10.10.120.1 set dns-service default set interface example_wlan set netmask 255.255.255.0 config ip-range edit 1 set end-ip 10.10.120.9 set start-ip 10.10.120.2 end end
Note: You cannot delete an SSID (wireless interface) that has DHCP enabled on it.
Configuring security
The FortiGate WiFi controller supports both Wireless Equivalent Privacy (WEP) and Wi-Fi Protected Access (WPA) security. WPA support includes WPA2, which has additional security improvements. WEP security uses an encryption key between the wireless device and the access point. WEP64 uses a key of ten hexadecimal digits. WEP128 keys are 26 digits long. WEP security is relatively easy to break. Wherever possible, use WPA security. WEP can be enabled only through the CLI. WPA security offers more robust encryption that is much more difficult to break. WPA provides two methods of authentication: through RADIUS (802.1X) authentication or by pre-shared key. WPA security with a preshared key for authentication is called WPA-Personal. This can work well for one person a small group of trusted people.But, as the number of users increases, it is difficult to distribute new keys securely and there is increased risk that the key could fall into the wrong hands.
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2166
A more secure form of WPA security is WPA-Enterprise. Users each have their own authentication credentials, verified through an authentication server, usually RADIUS. FortiOS can also authenticate WPA-Enterprise users through its built-in user group functionality. FortiGate user groups can include RADIUS servers and can select users by RADIUS user group. This makes possible Role-Based Access Control (RBAC). WPA security can encrypt communication with either Temporal Key Integrity Protocol (TKIP) or Advanced Encryption Standard (AES). AES is the preferred encryption, but some older wireless clients do not support it. You can select the encryption during setup. Captive Portal security connects users to an open web portal defined in replacement messages. To navigate to any location beyond the web portal, the user must pass FortiGate user authentication.
WPA-Personal security
WPA-Personal security setup requires only the preshared key that you will provide to your clients. To configure WPA-Personal security - web-based manager 1 Go to WiFi Controller > WiFi Network > SSID and edit your SSID entry. 2 In Security Mode, select WPA/WPA2-Personal. 3 In Data Encryption, select AES. If some of your wireless clients do not support AES, select TKIP. 4 In Pre-shared Key, enter a key between 8 and 63 characters long. 5 Select OK. To configure WPA-Personal security - CLI config wireless-controller vap edit example_wlan set security wpa-personal set passphrase "hardtoguess" set encrypt AES end
WPA-Enterprise security
If you will use FortiOS user groups for authentication, go to User > User Group and create those groups first. The groups should be Firewall groups. If you will use a RADIUS server to authenticate wireless clients, you must first configure the FortiGate unit to access the RADIUS server. To configure FortiGate unit access to the RADIUS server - web-based manager 1 Go to User > Remote > RADIUS and select Create New. 2 Enter a Name for the server. 3 In Primary Server Name/IP, enter the network name or IP address for the server. 4 In Primary Server Secret, enter the shared secret used to access the server. 5 Optionally, enter the information for a secondary or backup RADIUS server. 6 Select OK. To configure the FortiGate unit to access the RADIUS server - CLI config user radius
FortiOS Handbook v3: Deploying Wireless Networks 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2167
edit exampleRADIUS set auth-type auto set server 10.11.102.100 set secret aoewmntiasf
end
To configure WPA-Enterprise security - web-based manager 1 Go to WiFi Controller > WiFi Network > SSID and edit your SSID entry. 2 In Security Mode, select WPA/WPA2-Enterprise. 3 In Data Encryption, select AES. If some of your wireless clients do not support AES, select TKIP. 4 In Authentication, do one of the following: If you will use a RADIUS server for authentication, select RADIUS Server and then select the RADIUS server. If you will use a local user group for authentication, select Usergroup and then select the user group that is permitted to use the wireless network. 5 Select OK. To configure WPA-Enterprise security - CLI config wireless-controller vap edit example_wlan set security wpa-enterprise set encrypt AES set auth radius set radius-server exampleRADIUS end
These pages are defined in replacement messages. Defaults are provided. In the webbased manager, you can modify the default messages in the SSID configuration by selecting Customize Portal Messages. Each SSID can have its own unique portal content.
2168
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
To configure Captive Portal security - web-based manager 1 Configure user groups as needed in User > User Group. 2 Go to WiFi Controller > WiFi Network > SSID and edit your SSID entry. 3 In Security Mode, select Captive Portal. 4 Optionally, select Customize Portal Messages and modify the portal pages that users of this SSID will see. 5 In User Groups, select the group(s) that are allowed to use the wireless network and move them to the Selected list. 6 Select OK.
2169
WPA-Enterprise authentication
If your WiFi network uses WPA-Enterprise authentication verified by a RADIUS server, you need to configure the FortiGate unit to connect to that RADIUS server. Configuring connection to a RADIUS server - web-based manager 1 Go to User > Remote > RADIUS and select Create New. 2 Enter a Name for the server. This name is used in FortiGate configurations. It is not the actual name of the server. 3 In Primary Server Name/IP, enter the network name or IP address for the server. 4 In Primary Server Secret, enter the shared secret used to access the server. 5 Optionally, enter the information for a secondary or backup RADIUS server. 6 Select OK. To configure the FortiGate unit to access the RADIUS server - CLI config user radius edit exampleRADIUS set auth-type auto set server 10.11.102.100 set secret aoewmntiasf
end
To implement WPA-Enterprise security, you select this server in the SSID security settings. See Configuring security on page 2166. To use the RADIUS server for authentication, you can create individual FortiGate user accounts that specify the authentication server instead of a password, and you then add those accounts to a user group. Or, you can add the authentication server to a FortiGate user group, making all accounts on that server members of the user group.
2170
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
To create a firewall address for WiFi users - CLI config firewall address edit "wifi_net" set associated-interface "example_wifi" set subnet 10.10.110.0 255.255.255.0 end To create a firewall policy - web-based manager 1 Go to Policy > Policy and select Create New. 2 In Source Interface/Zone, select the wireless interface. 3 In Source Address, select the address of your WiFi network, wifi_net for example. 4 In Destination Interface/Zone, select the Internet interface, for example, port1. 5 In Destination Address, select All. 6 In Service, select ANY, or select the particular services that you want to allow, and then select the right arrow button to move the service to the Selected Services list. 7 In Schedule, select Always, unless you want to define a schedule for limited hours. 8 In Action, select ACCEPT. 9 Select Enable NAT. 10 Optionally, select UTM and set up UTM features for wireless users. 11 Select OK. To create a firewall policy - CLI config firewall policy edit 0 set srcintf "example_wifi" set dstintf "port1" set srcaddr "wifi_net" set dstaddr "all" set action accept set schedule "always" set service "ANY" set nat enable end
FortiOS Handbook v3: Deploying Wireless Networks 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2171
These pages are defined in replacement messages. Defaults are provided. In the webbased manager, you can modify the default messages in the SSID configuration by selecting Customize Portal Messages. Each SSID can have its own unique portal content.
Note: Only the Login page and Login failed page are available in FortiOS 4.3.0. If you require a disclaimer, consider using the User Authentication disclaimer that can enabled in the firewall policy.
2172
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
3 Enter a Name for the logo and select the appropriate Content Type. The file must not exceed 6000 bytes. 4 Select Browse, find your logo file and then select Open. 5 Select OK. To specify the new logo in the replacement message 1 Go to WiFi Controller > WiFi Network > SSID and edit your SSID. The SSID Security Mode must be Captive Portal. 2 Make sure that Customize Portal Messages is selected and then select the adjacent Edit icon. 3 In the Edit Message window, select the Login page message. 4 In the Message HTML, find the %%IMAGE tag. By default it specifies the Fortinet logo:%%IMAGE:logo_fw_auth%% 5 Change the image name to the one you provided for your logo. The tag should now read, for example, %%IMAGE:mylogo%% 6 Select OK.
Modifying text
You can change any text that is not part of the HTML code nor a special tag enclosed in double percent (%) characters. There are two exceptions to this rule: The line Please enter your username and password to continue is provided by the %%QUESTION%% tag. You can replace this tag with text of your choice. The line SSID ... Authentication Required includes the name of the SSID, provided by the %%CPAUTH_SSID%% tag. You can remove or change the position of this tag.
Except for these items, you should not remove any tags because they may carry information that the FortiGate unit needs. To modify login page text 1 Go to WiFi Controller > WiFi Network > SSID and edit your SSID. The SSID Security Mode must be Captive Portal. 2 Make sure that Customize Portal Messages is selected and then select the adjacent Edit icon. 3 In the Edit Message window, select the Login page message. 4 In the Message HTML box, edit the text, then select OK. 5 Select OK.
2173
Except for these items, you should not remove any tags because they may carry information that the FortiGate unit needs.
Figure 265: Default login failed page
2174
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Overview
FortiAP units discover WiFi controllers. The administrator of the WiFi controller authorizes the FortiAP units that the controller will manage. In most cases, FortiAP units can find WiFi controllers through the wired Ethernet without any special configuration. Review the following section, Network topology for managed APs, to make sure that your method of connecting the FortiAP unit to the WiFi controller is valid. Then, you are ready to follow the procedures in Discovering and authorizing APs on page 2176. If your FortiAP units are unable to find the WiFi controller, refer to Advanced WiFi controller discovery on page 2181 for detailed information about the FortiAP units controller discovery methods and how you can configure them.
2175
2176
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Enabling a discovered AP
Within two minutes of connecting the AP unit to the FortiGate unit, the discovered unit should be listed on WiFi Controller > Managed Access Points > Managed FortiAP page.
Figure 268: Discovered access point unit
To add the discovered AP unit - web-based manager 1 Go to WiFi Controller > Managed Access Points > Managed FortiAP. 2 Select the FortiAP unit from the list and edit it. 3 Optionally, enter a Name. Otherwise, the unit will be identified by serial number. 4 Select Authorize.
FortiOS Handbook v3: Deploying Wireless Networks 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2177
5 Select OK. The physical access point is now added to the system. If the rest of the configuration is complete, it should be possible to connect to the wireless network through the AP. To add the discovered AP unit - CLI First get a list of the discovered access point unit serial numbers: get wireless-controller wtp Add a discovered unit and associate it with AP-profile1, for example: config wireless-controller wtp edit FAP22A3U10600118 set admin enable set wtp-profile AP-profile1 end To use the automatic profile, leave the wtp-profile field unset. To view the status of the added AP unit config wireless-controller wtp edit FAP22A3U10600118 get The join-time field should show a time, not N/A. See the preceding web-based manager procedure for more information.
Configuring a managed AP
When you add a FortiAP unit, it is configured by default to use the Automatic profile operate at the maximum radio power permitted in your region carry all SSIDs
You can change the radio power and selection of SSIDs or assign the unit to a custom AP profile which defines the entire configuration for the AP. To modify settings within Automatic profile - web-based manager 1 Go to WiFi Controller > Managed Access Points > Managed FortiAP. 2 Select the FortiAP unit from the list and edit it. AP Profile should be Automatic. 3 Make sure that Enable WiFi Radio is selected. 4 In SSID, if you do not want this AP to carry all SSIDs, select Select SSIDs and then select the required SSIDs. 5 Optionally, adjust the TX Power slider. If you have selected your location correctly (see Setting your geographic location on page 2163), the 100% setting corresponds to the maximum power allowed in your region. 6 Select OK. To modify settings within Automatic profile - CLI When wtp-profile is unset (null value), the Automatic profile is in use and some of its settings can be adjusted. This example sets the AP to carry only the employee and guest SSIDs and operate at 80% of maximum power.
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2178
config wireless-controller wtp edit FAP22A3U10600118 set radio-enable enable set vap-all disable set vaps employee guest set power-level 80 end To select a custom AP profile - web-based manager 1 Go to WiFi Controller > Managed Access Points > Managed FortiAP. 2 Select the FortiAP unit from the list and edit it. 3 In AP Profile, select the custom AP Profile to use, and then select Apply. Only AP Profiles that are appropriate for this AP unit are available. 4 Select OK. To select a custom AP profile - CLI config wireless-controller wtp edit FAP22A3U10600118 set wtp-profile AP-profile1 end To select automatic AP profile - CLI config wireless-controller wtp edit FAP22A3U10600118 unset wtp-profile end
2179
execute wireless-controller upload-wtp-image tftp FAP_22A_v4.3.0_b0212_fortinet.out 192.168.0.100 If your server is FTP, change tftp to ftp, and if necessary add your user name and password at the end of the command. 2 Verify that the image is uploaded: execute wireless-controller list-wtp-image 3 Upgrade the FortiAP units: exec wireless-controller reset-wtp all If you want to upgrade only one FortiAP unit, enter its serial number instead of all.
2180
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Static IP configuration
If FortiAP and the controller are not in the same subnet, broadcast and multicast packets cannot reach the controller. The admin can specify the controllers static IP on the AP unit. The AP unit sends a discovery request message in unicast to the controller. Routing must be properly configured in both directions. To specify the controllers IP address on a FortiAP unit cfg a AC_IPADDR_1="192.168.0.1" By default, the FortiAP unit receives its IP address by DHCP. If you prefer, you can assign the AP unit a static IP address. To assign a static IP address to the FortiAP unit cfg -a ADDR_MODE=STATIC cfg a AP_IPADDR="192.168.0.100" cfg -a AP_NETMASK="255.255.255.0" For information about connecting to the FortiAP CLI, see Connecting to the FortiAP CLI on page 2182.
Broadcast request
The AP unit broadcasts a discovery request message to the network and the controller replies. The AP and the controller must be in the same broadcast domain. No configuration adjustments are required.
Multicast request
The AP unit sends a multicast discovery request and the controller replies with a unicast discovery response message. The AP and the controller do not need to be in the same broadcast domain if multicast routing is properly configured. The default multicast destination address is 224.0.1.140. It can be changed through the CLI. The address must be same on the controller and AP. For information about connecting to the FortiAP CLI, see Connecting to the FortiAP CLI on page 2182. To change the multicast address on the controller config wireless-controller global
2181
set discovery-mc-addr 224.0.1.250 end To change the multicast address on a FortiAP unit cfg a AC_DISCOVERY_MC_ADDR="224.0.1.250" For information about connecting to the FortiAP CLI, see Connecting to the FortiAP CLI on page 2182.
DHCP
If you use DHCP to assign an IP address to your FortiAP unit, you can also provide the WiFi controller IP address at the same time. This is useful if the AP is located remotely from the WiFi controller and other discovery techniques will not work. When you configure the DHCP server, configure Option 138 to specify the WiFi controller IP address. You need to convert the address into hexadecimal. Convert each octet value separately from left to right and concatenate them. For example, 192.168.0.1 converts to C0A80001. If Option 138 is used for some other purpose on your network, you can use a different option number if you configure the AP units to match. To change the FortiAP DHCP option code To use option code 139 for example, enter cfg a AC_DISCOVERY_DHCP_OPTION_CODE=139 For information about connecting to the FortiAP CLI, see Connecting to the FortiAP CLI below.
2182
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Completing configuration
The rest of the configuration is located in config wireless-controller and is similar to the FortiGate WiFi controller configuration.
2183
2184
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2185
2186
3 Select Do not participate in Rogue AP Scanning and then select OK. To exempt an AP from rogue scanning - CLI This example shows how to exempt access point AP1 from rogue scanning. config wireless-controller wtp edit AP1 set ap-scan disable end
channel signal strength MAC address on-wire status time last seen
The status of newly detected APs is Unclassified. You can manually change the status using the Mark menu.
Rogue AP. Use this status for unauthorized APs attached to your wired networks. The On-wire detection technique determines which unknown APs are rogues. Accepted AP. Use this status for APs that are an authorized part of your network or are neighboring APs that are not a security threat. Unclassified AP. This is the initial status of a discovered AP. You can change an AP back to unclassified if you have mistakenly marked it as Rogue or Accepted.
2187
To deactivate AP suppression 1 Go to WiFi Controller > Monitor > Rogue AP Monitor. 2 Select the suppressed rogue AP and then select Suppress AP > Unsuppress AP.
2188
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Windows XP client
To configure the WPA-Enterprise network connection 1 In the Windows Start menu, go to Control Panel > Network Connections > Wireless Network Connection or select the wireless network icon in the Notification area of the Taskbar. A list of available networks is displayed.
If you are already connected to another wireless network, the Connection Status window displays. Select View Wireless Networks on the General tab to view the list. If the network broadcasts its SSID, it is listed. But do not try to connect until you have completed the configuration step below. Because the network doesnt use the Windows XP default security configuration, configure the clients network settings manually before trying to connect.
2189
Windows XP client
2 You can configure the WPA-Enterprise network to be accessible from the View Wireless Networks window even if it does not broadcast its SSID. 3 Select Change Advanced Settings and then select the Wireless Networks tab.
Any existing networks that you have already configured are listed in the Preferred Networks list. 4 Select Add and enter the following information:
2190
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Windows XP client
5 If this wireless network does not broadcast its SSID, select Connect even if this network is not broadcasting so that the network will appear in the View Wireless Networks list. 6 Select the Authentication tab.
7 In EAP Type, select Protected EAP (PEAP). 8 Make sure that the other two authentication options are not selected. 9 Select Properties.
10 Make sure that Validate server_certificate is selected. 11 Select the server certificate UTN-USERFirst-Hardware.
2191
Windows XP client
12 In Select Authentication Method, select Secured Password (EAP-MSCHAPv2). 13 Ensure that the remaining options are not selected. 14 Select Configure.
15 If your wireless network credentials are the same as your Windows logon credentials, select Automatically use my Windows logon name and password. Otherwise, make sure that this option is not selected. 16 Select OK. Repeat until you have closed all of the Wireless Network Connection Properties windows. To connect to the WPA-Enterprise wireless network 1 Select the wireless network icon in the Notification area of the Taskbar. 2 In the View Wireless Networks list, select the network you just added and then select Connect. You might need to log off of your current wireless network and refresh the list. 3 When the following popup displays, click on it.
4 In the Enter Credentials window, enter your wireless network User name, Password, and Logon domain (if applicable). Then, select OK.
In future, Windows will automatically send your credentials when you log on to this network.
2192
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Windows 7 client
Windows 7 client
1 In the Windows Start menu, go to Control Panel > Network and Sharing Center > Manage Wireless Networks or select the wireless network icon in the Notification area of the Taskbar. A list of available networks is displayed.
2 Do one of the following: If the wireless network is listed (it broadcasts its SSID), select it from the list. Select Add > Manually create a network profile. 3 Enter the following information and select Next.
Network name Security type Encryption type Connect even if the network is not broadcasting.
Enter the SSID of the wireless network. (Required only if you selected Add.) WPA2-Enterprise AES Select
The Wireless Network icon will display a popup requesting that you click to enter credentials for the network. Click on the popup notification. 4 In the Enter Credentials window, enter your wireless network User name, Password, and Logon domain (if applicable). Then, select OK. 5 Select Change connection settings.
2193
Mac OS client
6 On the Connection tab, select Connect automatically when this network is in range. 7 On the Security tab, select the Microsoft PEAP authentication method and then select Settings. 8 Make sure that Validate server_certificate is selected. 9 Select the server certificate UTN-USERFirst-Hardware. 10 In Select Authentication Method, select Secured Password (EAP-MSCHAPv2). 11 Select Configure.
12 If your wireless network credentials are the same as your Windows logon credentials, select Automatically use my Windows logon name and password. Otherwise, make sure that this option is not selected. 13 Ensure that the remaining options are not selected. 14 Select OK. Repeat until you have closed all of the Wireless Network Properties windows.
Mac OS client
To configure the WPA-Enterprise network connection 1 Select the AirPort icon in the toolbar. 2 Do one of the following: If the network is listed, select the network from the list. Select Connect to Other Network. One of the following windows opens, depending on your selection.
2194
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Linux client
Linux client
This example is based on the Ubuntu 10.04 Linux wireless client. To connect to a WPA-Enterprise network 1 Select the Network Manager icon to view the Wireless Networks menu.
Wireless networks that broadcast their SSID are listed in the Available section of the menu. If the list is long, it is continued in the More Networks submenu.
2195
Linux client
2 Do one of the following: Select the network from the list (also check More Networks). Select Connect to Hidden Wireless Network. One of the following windows opens, depending on your selection.
4 If you did not select a CA Certificate above, you are asked to do so. Select Ignore.
2196
Troubleshooting
To connect to a WPA-Enterprise network 1 Select the Network Manager icon to view the Wireless Networks menu. 2 Select the network from the list (also check More Networks). If your network is not listed (but was configured), select Connect to Hidden Wireless Network, select your network from the Connection drop-down list, and then select Connect.
Troubleshooting
Using tools provided in your operating system, you can find the source of common wireless networking problems.
Checking that the client has received IP address and DNS server information Windows XP
1 Double-click the network icon in the taskbar to display the Wireless Network Connection Status window. Check that the correct network is listed in the Connection section. 2 Select the Support tab. Check that the Address Type is Assigned by DHCP. Check that the IP Address, Subnet Mask, and Default Gateway values are valid. 3 Select Details to view the DNS server addresses. The listed address should be the DNS serves that were assigned to the WAP. Usually a wireless network that provides access to the private LAN is assigned the same DNS servers as the wired private LAN. A wireless network that provides guest or customer users access to the Internet is usually assigned public DNS servers. 4 If any of the addresses are missing, select Repair. If the repair procedure doesnt correct the problem, check your network settings.
Mac OS
1 From the Apple menu, open System Preferences > Network. 2 Select AirPort and then select Configure. 3 On the Network page, select the TCP/IP tab.
2197
Troubleshooting
4 If there is no IP address or the IP address starts with 169, select Renew DHCP Lease. 5 To check DNS server addresses, open a terminal window and enter the following command: cat /etc/resolv.conf Check the listed nameserver addresses. A network for employees should us the wired private LAN DNS server. A network for guests should specify a public DNS server.
Linux
This example is based on the Ubuntu 10.04 Linux wireless client. 1 Right-click the Network Manager icon and select Connection Information.
2 Check the IP address, and DNS settings. If they are incorrect, check your network settings.
2198
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
wlan_users
Firewall Not selected.
To configure a WiFi user and the WiFi user group - CLI config user user edit "user01" set type password set passwd "asdf12ghjk" end config user group edit "wlan_users" set member "user01" end
FortiOS Handbook v3: Deploying Wireless Networks 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2199
To configure the SSID - CLI config wireless-controller vap edit example_wifi set ssid "example_wifi" set broadcast-ssid enable set security wpa-enterprise set auth usergroup set usergroup wlan_users end
config system interface
edit example_wifi
set ip 10.10.110.1 255.255.255.0
end config system dhcp server edit 0 set default-gateway 10.10.110.1 set dns-service default set interface "example_wifi" config ip-range edit 1 set end-ip 10.10.110.199 set start-ip 10.10.110.2 end set netmask 255.255.255.0 end
2200
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
To create a firewall address for WiFi users - CLI config firewall address edit "wlan_user_net" set associated-interface "example_wifi" set subnet 10.10.110.0 255.255.255.0 end To create a firewall policy for WiFi users - web-based manager 1 Go to Firewall Objects > Policy and select Create New. 2 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Action NAT example_wifi wlan_user_net port1 All ACCEPT Enable NAT. Select Use Destination Interface Address (default).
To create a firewall policy for WiFi users - CLI config firewall policy edit 0 set srcintf "example_wifi" set dstintf "port1" set srcaddr "wlan_user_net" set dstaddr "all" set action accept set nat enable end
2201
2202
7 In SSID, select Automatically Inherit all SSIDs. 8 Select OK. 9 Repeat Steps 2 through 8 for each FortiAP unit. To connect a FortiAP unit - CLI 1 Connect the FortiAP unit to port 3. 2 Enter config wireless-controller wtp 3 Wait 30 seconds, then enter get. Retry the get command every 15 seconds or so until the unit is listed, like this: == [ FAP22A3U10600118 ] wtp-id: FAP22A3U10600118 4 Edit the discovered FortiAP unit like this: edit FAP22A3U10600118 set admin enable end 5 Repeat Steps 2 through 4 for each FortiAP unit.
2203
Scenario
In this example, Example Co. provides two wireless networks, one for its employees and the other for customers or other guests of its business. Guest users have access only to the Internet, not to the companys private network. The equipment for these WiFi networks consists of FortiAP-220A units controlled by a FortiGate unit. The employee network operates in 802.11n mode on both the 2.4GHz and 5GHz bands. Client IP addresses are in the 10.10.120.0/24 subnet, with 10.10.120.1 the IP address of the WAP. The guest network also operates in 802.11n mode, but only on the 2.4GHz band. Client IP addresses are on the 10.10.115.0/24 subnet, with 10.10.115.1 the IP address of the WAP. On FortiAP-220A units, the 802.11n mode also supports 802.11g and 802.11b clients on the 2.4GHz band and 802.11a clients on the 5GHz band. The guest network WAP broadcasts its SSID, the employee network WAP does not. The employees network uses WPA-Enterprise authentication through a FortiGate user group. The guest network features a captive portal. When a guest first tries to connect to the Internet, a login page requests logon credentials. Guests use numbered guest accounts authenticated by RADIUS. The captive portal for the guests includes a disclaimer page. In this example, the FortiAP units connect to port 3 and are assigned addresses on the 192.168.8.0/24 subnet.
Configuration
To configure these wireless networks, you must: Configure authentication for wireless users Configure the SSIDs (network interfaces) Configure the AP profile Configure the WiFi LAN interface and a DHCP server Configure firewall policies
employee-group
Firewall Disabled Move appropriate user accounts to the Members list.
2204
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
To configure the user group for employee access - CLI config user group edit "employee-group" set member "user01" end The user authentication setup will be complete when you select the employee-group in the SSID configuration.
10.11.102.100 grikfwpfdfg
Optional Optional Use default, unless server requires otherwise.
To configure the FortiGate unit to access the guest RADIUS server - CLI config user radius edit guestRADIUS set auth-type auto set server 10.11.102.100 set secret grikfwpfdfg
end
To configure the user group for guest access - web-based manager 1 Go to User > User Group and select Create New. 2 Enter the following information and then select OK:
Name Type Allow SSL-VPN Access
guest-group
Firewall Disabled
Available Users/Groups / Move guestRADIUS to the Members list. Members Match one of these group Select Add and fill in the following fields: names Remote Server Group Name Select guestRADIUS. Enter wireless
2205
To configure the user group for guest access - CLI config user group edit "guest-group" set member "guestRADIUS" config match edit 0 set server-name "guestRADIUS" set group-name "wireless" end end The user authentication setup will be complete when you select the guest-group user group in the SSID configuration.
To configure the employee SSID - CLI config wireless-controller vap edit example_inc set ssid "example_inc" set security wpa-enterprise set auth usergroup set usergroup employee-group end config system interface edit example_inc set ip 10.10.120.1 255.255.255.0 end
2206
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
config system dhcp server edit 0 set default-gateway 10.10.120.1 set dns-service default set interface example_inc config ip-range edit 1 set end-ip 10.10.120.199 set start-ip 10.10.120.2 end set lease-time 7200 set netmask 255.255.255.0 end To configure the example_guest SSID - web-based manager 1 Go to WiFi Controller > WiFi Network > SSID and select Create New. 2 Enter the following information and select OK:
Name IP/Netmask Administrative Access SSID Enable DHCP Address Range Netmask Default Gateway DNS Server Security Mode Customize Portal Messages User Groups example_guest 10.10.115.1/24 Ping (to assist with testing) example_guest Enable 10.10.115.2 - 10.10.115.50 255.255.255.0 Same as Interface IP Same as System DNS Captive Portal Select Select guest-group
To configure the example_guest SSID - CLI config wireless-controller vap edit example_guest set ssid "example_guest" set security captive-portal set selected-usergroups guest-group end
config system interface
edit example_guest set ip 10.10.115.1 255.255.255.0 end config system dhcp server edit 0 set default-gateway 10.10.115.1 set dns-service default set interface "example_guest" config ip-range edit 1
FortiOS Handbook v3: Deploying Wireless Networks 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2207
set end-ip 10.10.115.50 set start-ip 10.10.115.2 end set lease-time 7200 set netmask 255.255.255.0 end
To configure the AP Profile - CLI config wireless-controller wtp-profile edit "example_AP" config platform set type 220A end
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2208
config radio-1 set ap-bgscan enable set band 802.11n set channel "1" "6" "11" set rogue-scan enable set vaps "example_inc" "example_guest" end config radio-2 set ap-bgscan enable set band 802.11n-5G set channel "36" "40" "44" "48" "149" "153" "157" "161" "165" set rogue-scan enable set vaps "example_inc" end
3 Select Create New, enter the following information and select OK.
Address Name Type Subnet / IP Range Interface guest-wifi-net Subnet / IP Range 10.10.115.0/24 example_guest
To create firewall policies for employee WiFi users - web-based manager 1 Go to Policy > Policy and select Create New. 2 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action NAT example_inc employee-wifi-net port1 All always Any ACCEPT Enable NAT
2209
3 Optionally, select UTM and set up UTM features for wireless users. 4 Select OK. 5 Repeat steps 1 through 4 but select Internal as the Destination Interface/Zone to provides access to the ExampleCo private network. To create firewall policies for employee WiFi users - CLI config firewall policy edit 0 set srcintf "employee_inc" set dstintf "port1" set srcaddr "employee-wifi-net" set dstaddr "all" set action accept set schedule "always" set service "ANY" set nat enable set schedule "always" set service "ANY" next edit 0 set srcintf "employee_inc" set dstintf "internal" set srcaddr "employee-wifi-net" set dstaddr "all" set action accept set schedule "always" set service "ANY" set nat enable set schedule "always" set service "ANY" end To create a firewall policy for guest WiFi users - web-based manager 1 Go to Policy > Policy and select Create New. 2 Enter the following information and select OK:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action NAT example_guest guest-wifi-net port1 All always Any ACCEPT Enable NAT
3 Optionally, select UTM and set up UTM features for wireless users. 4 Select OK.
2210
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
To create a firewall policy for guest WiFi users - CLI config firewall policy edit 0 set srcintf "example_guest" set dstintf "port1" set srcaddr "guest-wifi-net" set dstaddr "all" set action accept set schedule "always" set service "ANY" set nat enable end
2211
To connect a FortiAP-220A unit - web-based manager 1 Go to WiFi Controller > Managed Access Points > Managed FortiAP. 2 Connect the FortiAP unit to port 3. 3 Periodically select Refresh while waiting for the FortiAP unit to be listed. Recognition of the FortiAP unit can take up to two minutes. If there is persistent difficulty recognizing FortiAP units, try disabling VCI-Match in the DHCP server settings. 4 When the FortiAP unit is listed, select the entry to edit it. The Edit Managed Access Point window opens. 5 In State, select Authorize. 6 In the AP Profile, select [Change] and then select the example_AP profile. 7 Select OK. 8 Repeat Steps 2 through 8 for each FortiAP unit. To connect a FortiAP-220A unit - CLI 1 Connect the FortiAP unit to port 3. 2 Enter config wireless-controller wtp 3 Wait 30 seconds, then enter get. Retry the get command every 15 seconds or so until the unit is listed, like this: == [ FAP22A3U10600118 ] wtp-id: FAP22A3U10600118 4 Edit the discovered FortiAP unit like this: edit FAP22A3U10600118 set admin enable set wtp-profile example_AP end 5 Repeat Steps 2 through 4 for each FortiAP unit.
2212
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Reference
This chapter provides some reference information pertaining to wireless networks. The following topics are included in this section: Wireless radio channels
2213
Reference
2214
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Reference
2215
Reference
2216
Deploying Wireless Networks for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2217
2218
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
SIP overview
The Session Initiation Protocol (SIP) is an IETF application layer signaling protocol used for establishing, conducting, and terminating multiuser multimedia sessions over TCP/IP networks using any media. SIP is often used for Voice over IP (VoIP) calls but can be used for establishing streaming communication between end points. SIP employs a request and response transaction model similar to HTTP for communicating between endpoints. SIP sessions being with a SIP client sending a SIP request message to another client to initiate a multimedia session. The other client responds with a SIP response message. Using these request and response messages, the clients engage in a SIP dialog to negotiate how to communicate and then start, maintain, and end the communication session. SIP commonly uses TCP or UDP port 5060 and/or 5061. Port 5060 is used for nonencrypted SIP signaling sessions and port 5061 is typically used for SIP sessions encrypted with Transport Layer Security (TLS). Devices involved in SIP communications are called SIP User Agents (UAs) (also sometimes called a User Element (UE)). UAs include User Agent Clients (UACs) that communicate with each other and User Agent Servers (UASs) that facilitate communication between UACs. For a VoIP application, an example of a UAC would be a SIP phone and an example of a UAS would be a SIP proxy server.
2219
A SIP message contain headers that include client and server names and addresses required for the communication sessions. The body of a SIP message contains Session Description Protocol (SDP) statements that establish the media communication (port numbers, protocols and codecs) that the SIP UAs use. SIP VoIP most commonly uses the Real Time Protocol (RTP) and the Real Time Control Protocol (RTCP) for voice communication. Once the SIP dialog establishes the SIP call the VoIP stream can run independently, although SIP messages can affect the VoIP stream by changing port numbers or addresses and by ending it. Once SIP communication and media settings are established, the UAs communicate with each using the established media settings. When the communication session is completed, one of the UAs ends the session by sending a final SIP request message and the other UA sends a SIP response message and both UAs end the SIP call and stop the media stream. FortiGate units provide security for SIP communications using the SIP session helper and the SIP ALG: The SIP session-helper provides basic high-performance support for SIP calls passing through the FortiGate unit by opening SIP and RTP pinholes and performing source and destination IP address and port translation for SIP and RTP packets and for the IP addresses and port numbers in the SIP headers and the SDP body of the SIP messages. For more about the SIP session helper, see The SIP session helper on page 2234. The SIP Application Layer Gateway (ALG) provides the same features as the session helper plus additional advanced features such as deep SIP message inspection, SIP logging, SIP IPv6 support, SIP message checking, HA failover of SIP sessions, and SIP rate limiting. For more about the SIP ALG, see The SIP ALG on page 2239.
There are a large number of SIP-related Internet Engineering Task Force (IETF) documents (Request for Comments) that define behavior of SIP and related applications. FortiGate units provide complete support of RFC 3261 for SIP and RFC 4566 for SDP. FortiGate units also provide support for other SIP and SIP-related RFCs and performs Deep SIP message inspection on page 2283 for SIP statements defined in other SIP RFCs.
SIP Phone A
(PhoneA@10.31.101.20)
SIP Phone B
(PhoneB@10.31.101.30)
2220
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Peer to peer configurations are not very common because they require the SIP phones to keep track of the names and addresses of all of the other SIP phones that they can communicate with. In most cases a SIP proxy or re-direct server maintains addresses of a large number of SIP phones and a SIP phone starts a call by contacting the SIP proxy server.
3. The proxy server looks up the SIP address of Phone B and forwards the INVITE request to Phone B
2. Phone A dials Phone B by sending an INVITE request to the SIP proxy server
SIP Phone A
(PhoneA@10.31.101.20)
SIP Phone B P Ph
(PhoneB@10.31.101.30)
A common SIP configuration would include multiple networks of SIP phones. Each of the networks would have its own SIP server. Each SIP server would proxy the communication between phones on its own network and between phones in different networks.
2221
3. The redirect server looks up the SIP address of Phone B and sends Phone Bs address back to Phone A
4. Phone A sends the INVITE request to Phone B 6. RTP Media session opens when Phone B answers
SIP P Phone h A
(PhoneA@10.31.101.20)
h B SIP Ph Phone
(PhoneB@10.31.101.30)
2. Phone A dials Phone B by sending an INVITE request to the SIP proxy server
3. The SIP proxy server looks up Phone A and Phone B on the registrar
SIP Phone A
(PhoneA@10.31.101.20)
SIP Phone B
(PhoneB@10.31.101.30)
SIP Registrar
2222
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
The phones and server use the same SIP dialogs as they would if the FortiGate unit was not present. However, the FortiGate unit can be configured to control which devices on the network can connect to the SIP proxy server and can also protect the SIP proxy server from SIP vulnerabilities. Figure 274 shows a FortiGate unit operating in NAT/Route mode and installed between a private network and the Internet. Some SIP phones and the SIP proxy server are connected to the private network and some SIP phones are connected to the Internet. The SIP phones on the Internet can connect to the SIP proxy server through the FortiGate unit and communication between SIP phones on the private network and SIP phones on the Internet must pass through the FortiGate unit.
2223
1. SIP phone A registers with SIP proxy server 2. Phone A dials Phone B by sending an INVITE request to the SIP proxy server
3. The proxy server looks up the SIP address of Phone B and forwards the INVITE request to Phone B 5. RTP Media session opens when
The phones and server use the same SIP dialog as they would if the FortiGate unit was not present. However, the FortiGate unit can be configured to control which devices on the network can connect to the SIP proxy server and can also protect the SIP proxy server from SIP vulnerabilities. In addition, the FortiGate unit has a firewall virtual IP that forwards packets sent to the SIP proxy server Internet IP address (172.20.120.50) to the SIP proxy server internal network IP address (10.31.101.30). Since the FortiGate unit is operating in NAT/Route mode it must translate packet source and destination IP addresses (and optionally ports) as the sessions pass through the FortiGate unit. Also, the FortiGate unit must translate the addresses contained in the SIP headers and SDP body of the SIP messages. As well the FortiGate unit must open SIP and RTP pinholes through the FortiGate unit. SIP pinholes allow SIP signalling sessions to pass through the FortiGate between phones and between phones and SIP servers. RTP pinholes allow direct RTP communication between the SIP phones once the SIP dialog has established the SIP call. Pinholes are opened automatically by the FortiGate unit. Administrators do not add security policies for pinholes or for RTP sessions. All that is required is a security policy that accepts SIP traffic. Opening an RTP pinhole means opening a port on a FortiGate interface to allow RTP traffic to use that port to pass through the FortiGate unit between the SIP phones on the Internet and SIP phones on the internal network. A pinhole only accepts packets from one RTP session. Since a SIP call involves at least two media streams (one from Phone A to Phone B and one from Phone B to Phone A) the FortiGate unit opens two RTP pinholes. Phone A sends RTP packets through a pinhole in port2 and Phone B sends RTP packets through a pinhole in port1. The FortiGate unit opens the pinholes when required by the SIP dialog and closes the pinholes when the SIP call is completed. The FortiGate unit opens new pinholes for each SIP call. Each RTP pinhole actually includes two port numbers. The RTP port number as defined in the SIP message and an RTCP port number, which is the RTP port number plus 1. For example, if the SIP call used RTP port 3346 the FortiGate unit would create a pinhole for ports 3346 and 3347.
2224
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
1. INVITE (SIP request message to invite SIP Phone B to start a SIP session) 2. 180 Ringing (SIP ringing response to the INVITE request) 3. 200 OK (SIP response to the INVITE request to inform SIP Phone A that the request is accepted) 4. ACK (SIP request message to confirm that SIP Phone A received the response from SIP Phone B)
5. RTP Media session between Phone A and Phone B. 6. BYE (SIP request message from SIP Phone B to end the SIP session) 7. 200 OK (SIP response to the BYE request to end the SIP session)
If a UAS in the form of a SIP proxy server is involved, similar messages are sent and received, but the proxy server participates as an intermediary in the initial call setup. In the example in Figure 276 the SIP proxy server receives the INVITE request from Phone A and forwards it to Phone B. The proxy server then sends a 100 Trying response to Phone A. Phone B receives the INVITE request and responds with a 180 Ringing and then a 200 OK SIP response message. These messages are received by the proxy server and
FortiOS Handbook v3: VoIP Solutions: SIP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2225
forwarded to Phone A to notify Phone A that Phone B received and accepted the request. Phone A then sends an ACK message to notify Phone B that the SIP response was received. This response is received by the proxy server and forwarded to Phone B. Phone A and Phone B can then participate in the media session independently of the proxy server. When the phone call is complete Phone B hangs up sending a BYE request message to Phone A. Phone A then sends a 200 OK response to Phone B acknowledging that the session has ended.
Figure 276: Basic SIP dialog between UACs with a SIP proxy server UAS
1. INVITE (SIP request message to invite SIP Phone B to start a SIP session) 2. INVITE (Forwarded by the UAS to Phone B) 3. 100 Trying (UAS informs Phone A of trying to contact Phone B) 4. 180 Ringing (SIP ringing response to the INVITE request) 5. 180 Ringing (Forwarded by the UAS to Phone A) 6. 200 OK (SIP response to the INVITE request to inform SIP Phone A that the request is accepted) 7. 200 OK (Forwarded by the UAS to Phone A)
8. ACK (SIP request message to confirm that SIP Phone A received the response from SIP Phone B) 9. RTP Media session between Phone A and Phone B. 10. BYE (SIP request message from SIP Phone B to end the SIP session) 11. 200 OK (SIP response to the BYE request to end the SIP session)
The SIP messages include SIP headers that contain names and addresses of Phone A, Phone B and the proxy server. This addressing information is used by the UACs and the proxy server during the call set up. The SIP message body includes Session Description Protocol (SDP) statements that Phone A and Phone B use to establish the media session. The SDP statements specify the type of media stream to use for the session (for example, audio for SIP phone calls) and the protocol to use for the media stream (usually the Real Time Protocol (RTP) media streaming protocol). Phone A includes the media session settings that it would like to use for the session in the INVITE message. Phone B includes its response to these media settings in the 200 OK response. Phone As ACK response confirms the settings that Phone A and Phone B then use for the media session.
2226
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
ACK
PRACK
OPTIONS
BYE CANCEL
REGISTER
Indicates the status of a transaction. For example: 200 OK, 202 Accepted, or 400 Response Bad Request. codes (1xx, 202, 2xx, 3xx, 4xx, 5xx, 6xx)
2227
There are also two types of SIP response messages, provisional and final. Final response messages convey the result of the request processing, and are sent reliably. Provisional responses provide information on the progress of the request processing, but may not be sent reliably. Provisional response messages start with 1xx and are also called informational response messages.
Success
Success responses indicate that a request message was received, understood, and accepted. Success responses can contain the following reason codes and reason phrases: 200 OK 202 Accepted
Redirection
Redirection responses indicate that more information is required for the endpoint to respond to a request message. Redirection responses can contain the following reason codes and reason phrases: 300 Multiple choices 301 Moved permanently 302 Moved temporarily 305 Use proxy 380 Alternative service
Client error
Client error responses indicate that a request message was received by a server that contains syntax that the server cannot understand (i.e. contains a syntax error) or cannot comply with. Client error responses include the following reason codes and reason phrases: 400 Bad request 401 Unauthorized 402 Payment required 403 Forbidden 404 Not found 405 Method not allowed 406 Not acceptable 407 Proxy authentication required 408 Request time-out 409 Conflict 410 Gone 411 Length required 413 Request entity too large 414 Request-URL too large 415 Unsupported media type 420 Bad extension 480 Temporarily not available
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2228
Call leg/transaction does not exist Loop detected 483 Too many hops Address incomplete 485 Ambiguous Busy here 487 Request canceled Not acceptable here
Server error
Server error responses indicate that a server was unable to respond to a valid request message. Server error responses include the following reason codes and reason phrases: 500 Server internal error 501 Not implemented 502 Bad gateway 502 Service unavailable 504 Gateway time-out 505 SIP version not supported
Global failure
Global failure responses indicate that there are no servers available that can respond to a request message. Global failure responses include the following reason codes and reason phrases: 600 Busy everywhere 603 Decline 604 Does not exist anywhere 606 Not acceptable
Status-line
SIP headers
Following the start line, SIP messages contain SIP headers (also called SIP fields) that convey message attributes and to modify message meaning. SIP headers are similar to HTTP header fields and always have the following format: <header_name>:<value> SIP messages can include the SIP headers listed in Table 128:
2229
Table 128: SIP headers SIP Header Allow Description Lists the set of SIP methods supported by the UA generating the message. All methods, including ACK and CANCEL, understood by the UA MUST be included in the list of methods in the Allow header field, when present. For example: Allow: INVITE, ACK, OPTIONS, CANCEL, BYE A globally unique identifier for the call, generated by the combination of a random string and the senders host name or IP address. The combination of the To, From, and Call-ID headers completely defines a peer-to-peer SIP relationship between the sender and the receiver. This relationship is called a SIP dialog. Call-ID: ddeg45e793@10.31.101.30 Included in SIP request messages, the Contact header contains the SIP URI of the sender of the SIP request message. The receiver uses this URI to contact the sender. For example: Contact: Sender <sip:sender@10.31.100.20>t The number of bytes in the message body (in bytes). Content-Length: 126 In addition to SIP headers, SIP messages include a message body that contains information about the content or communication being managed by the SIP session. The Content-Type header specifies what the content of the SIP message is. For example, if you are using SIP with SDP, the content of the SIP message is SDP code. Content-Type: application/sdp The command sequence header contains a sequence integer that is increased for each new SIP request message (but is not incremented in the response message). This header also incudes the request name found in the request message request-line. For example: CSeq: 1 INVITE Gives the relative time after which the message (or content) expires. The actual time and how the header is used depends on the SIP method. For example: Expires: 5 Identifies the sender of the message. Responses to a message are sent to the address of the sender. The following example includes the senders name (Sender) and the senders SIP address (sender@10.31.101.20.): From: Sender <sip:sender@10.31.101.20> An integer in the range 0-255 that limits the number of proxies or gateways that can forward the request message to the next downstream server. Also called the number of hops, this value is decreased every time the message is forwarded. This can also be useful when the client is attempting to trace a request chain that appears to be failing or looping in mid-chain. For example: Max-Forwards: 30 The P-Asserted-Identity header is used among trusted SIP entities to carry the identity of the user sending a SIP message as it was verified by authentication. See RFC 3325. The header contains a SIP URI and an optional display-name, for example: P-Asserted-Identity: "Example Person" <sip:10.31.101.50> Sent in a PRACK request to support reliability of information or provisional response messages. It contains two numbers and a method tag. For example: RAck: 776656 1 INVITE Inserted into request messages by a SIP proxy to force future requests to be routed through the proxy. In the following example, the host at IP address 10.31.101.50 is a SIP proxy. The lr parameter indicates the URI of a SIP proxy in Record-Route headers. Record-Route: <sip:10.31.101.50;lr> VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Call-ID
Contact
Content-Length Content-Type
CSeq
Expires
From
Max-forwards
P-AssertedIdentity
RAck
Record-Route
2230
Table 128: SIP headers (Continued) SIP Header Route Description Forces routing for a request message through one or more SIP proxies. The following example includes two SIP proxies: Route: <sip:172.20.120.10;lr>, <sip:10.31.101.50;lr> The RSeq header is used in information or provisional response messages to support reliability of informational response messages. The header contains a single numeric value. For example: RSeq: 33456 Identifies the receiver of the message. The address in this field is used to send the message to the receiver. The following example includes the receivers name (Receiver) and the receivers SIP address (receiver@10.31.101.30.): To: Receiver <sip:receiver@10.31.101.30> Indicates the SIP version and protocol to be used for the SIP session and the address to which to send the response to the message that contains the Via field. The following example Via field indicates to use SIP version 2, UDP for media communications, and to send the response to 10.31.101.20 using port 5060. Via: SIP/2.0/UDP 10.31.101.20:5060
RSeq
To
Via
SDP is most often used for VoIP and FortiGate units support SDP content in SIP message bodies. SDP is a text-based protocol used by SIP to control media sessions. SDP does not deliver media but provides a session profile that contains media details, transport addresses, parameter negotiation, and other session description metadata for the participants in a media session. The participants use the information in the session profile to negotiate how to communicate and to manage the media session. SDP is described by RFC 4566. An SDP session profile always contains session information and may contain media information. Session information appears at the start of the session profile and media information (using the m= attribute) follows. SDP session profiles can include the attributes listed in Table 129.
Table 129: SDP session profile attributes Attribute a= b= c= Description Attributes to extend SDP in the form a=<attribute> or a=<attribute>:<value>. Contains information about the bandwidth required for the session or media in the form b=<bandwidth_type>:<bandwidth>. Connection data about the session including the network type (usually IN for Internet), address type (IPv4 or IPv6), the connection source address, and other optional information. For example: c=IN IPv4 10.31.101.20
2231
Table 129: SDP session profile attributes (Continued) Attribute i= k= Description A text string that contains information about the session. For example: i=A audio presentation about SIP Can be used to convey encryption keys over a secure and trusted channel. For example: k=clear:444gdduudjffdee Media information, consisting of one or more lines all starting with m= and containing details about the media including the media type, the destination port or ports used by the media, the protocol used by the media, and a media format description. m=audio 49170 RTP 0 3 m-video 3345/2 udp 34 m-video 2910/2 RTP/AVP 3 56 Multiple media lines are needed if SIP is managing multiple types of media in one session (for example, separate audio and video streams). Multiple ports for a media stream are indicated using a slash. 3345/2 udp means UDP ports 3345 and 3346. Usually RTP uses even-numbered ports for data with the corresponding one-higher odd ports used for the RTCP session belonging to the RTP session. So 2910/2 RTP/AVP means ports 2910 and 2912 are used for RTP and 2911 and 2913 are used for RTCP. Media types include udp for an unspecified protocol that uses UDP, RTP or RTP/AVP for standard RTP and RTP/SAVP for secure RTP. The senders username, a session identifier, a session version number, the network type (usually IN for Internet), the address type (for example, IPv4 or IPv6), and the sending devices IP address. The o= field becomes a universal identifier for this version of this session description. For example: o=PhoneA 5462346 332134 IN IP4 10.31.101.20 Repeat times for a session. Used if a session will be repeated at one or more timed intervals. Not normally used for VoIP calls. The times can be in different formats. For example. r=7d 1h 0 25h r=604800 3600 0 90000 Any text that describes the session or s= followed by a space. For example: s=Call from inviter The start and stop time of the session. Sessions with no time restrictions (most VoIP calls) have a start and stop time of 0. t=0 0 SDP protocol version. The current SDP version is 0 so the v= field is always: v=0 Time zone adjustments. Used for scheduling repeated sessions that span the time between changing from standard to daylight savings time. z=2882844526 -1h 2898848070 0
m=
o=
r=
s= t=
v= z=
2232
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Content-Length: 124 v=0 o=PhoneA 5462346 332134 IN IP4 10.31.101.20 s=Let's Talk t=0 0 c=IN IP4 10.31.101.20 m=audio 49170 RTP 0 3 The following example shows a possible 200 OK SIP response message in response to the previous INVITE request message. The response includes 200 OK which indicates success, followed by an echo of the original SIP INVITE request followed by PhoneBs SDP profile. SIP/2.0 200 OK Via: SIP/2.0/UDP 10.31.101.50:5060 From: PhoneA <sip:PhoneA@10.31.101.20> To: PhoneB <sip:PhoneB@172.20.120.30> Call-ID: 314159@10.31.101.20 CSeq: 1 INVITE Contact: sip:PhoneB@10.31.101.30 Content-Type: application/sdp Content-Length: 107 v=0 o=PhoneB 124333 67895 IN IP4 172.20.120.30 s=Hello! t=0 0 c=IN IP4 172.20.120.30 m=audio 3456 RTP 0 SIP can support multiple media streams for a single SIP session. Each media steam will have its own c= and m= lines in the body of the message. For example, the following message includes three media streams: INVITE sip:PhoneB@172.20.120.30 SIP/2.0 Via: SIP/2.0/UDP 10.31.101.20:5060 From: PhoneA <sip:PhoneA@10.31.101.20> To: PhoneB <sip:PhoneB@172.20.120.30> Call-ID: 314159@10.31.101.20 CSeq: 1 INVITE Contact: sip:PhoneA@10.31.101.20 Content-Type: application/sdp Content-Length: 124 v=0 o=PhoneA 5462346 332134 IN IP4 10.31.101.20 s=Let's Talk t=0 0 c=IN IP4 10.31.101.20 m=audio 49170 RTP 0 3 c=IN IP4 10.31.101.20 m=audio 49172 RTP 0 3 c=IN IP4 10.31.101.20 m=audio 49174 RTP 0 3
2233
2234
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
If the SIP session helper has been disable by being removed from the session-helper list you can use the following command to enable the SIP session helper by adding it back to the session helper list: config system session-helper edit 0 set name sip set port 5060 set protocol 17 end
2235
Changing the port numbers that the SIP session helper listens on
You can use the following command to change the port number that the SIP session helper listens on for SIP traffic to 5061. The SIP session helper listens on the same port number for UDP and TCP SIP sessions. In this example, the SIP session helper is session helper 13: config system session-helper edit 13 set port 5061 end
Note: The config system settings options sip-tcp-port and sip-udp-port control the ports that the SIP ALG listens on for SIP sessions. See Changing the port numbers that the SIP ALG listens on on page 2243.
Your FortiGate unit may use a different session helper number for SIP. Enter the following command to view the session helpers: show system session-helper . . . edit 13 set name sip set port 5060 set protocol 17 end . . .
Port1 1
Port2 Po
2236
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
To add security policies to accept SIP sessions 1 Go to Policy > Policy > Policy. 2 Select Create New to add a security policy. 3 Add a security policy to allow Phone A to send SIP request messages to Phone B:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action port1 Phone_A port2 Phone_B always SIP ACCEPT
4 Select OK. 5 Add a security policy to allow Phone B to send SIP request messages to Phone A:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule port2 Phone_B port1 Phone_A always
2237
Service Action
SIP ACCEPT
6 Select OK.
2238
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2239
Figure 278: The SIP ALG works at the application level after ingress packets are accepted by a security policy
SIP
Egress Router IP Routing and forwarding IPsec VPN encryption, decryption Rate limiting and message blocking Stateful SIP tracking Message, header, and SDP syntax checking Network surveillance NAT and IP topology Hiding Logging and debugging Intrusion Detection and Prevention Defined by Fortinet and Enterprise signatures SIP decoder identifies SIP sessions Security Policy IPsec VPN encryption, decryption Access control
SIP ALG
IPS Signatures
Opt.
Firewall
DoS Sensor
SIP
Message fragment assembly (TCP) If SIP messages are fragmented across multiple packets, the FortiGate unit assembles the fragments, does inspection and pass the message in its entirety to the SIP server as one packet. This offloads the server from doing all the TCP processing of fragments.
L4 Protocol Translation Message Flood Protection Protects a SIP server from intentional or unintentional DoS of flooding INVITE, REGISTER, and other SIP methods by allowing control of the rate that these massages pass through the FortiGate unit.
SIP message type filtering The FortiGate unit can prevent specified SIP message types from passing through the FortiGate unit to a SIP server. For example In a voice only SIP implementation, there may be no need to permit a SUBSCRIBE message to ever make its way to the SIP call processor. Also, if a SIP server cannot process some SIP message types you can use SIP message type filtering to block them. For example, a SIP server could have a bug that prevents it from processing certain SIP messages. In this case you can temporarily block these message types until problem with the SIP server has been fixed.
SIP statistics and logging SIP over IPv6 Deep SIP message syntax checking (also called deep SIP header inspection or SIP fuzzing protection). Prevents attacks that use malformed SIP messages. Can check many SIP headers and SDP statements. Configurable bypass and modification options.
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2240
Hosted NAT traversal, Resolves IP address issue in SIP and SDP lines due to NAT-PT in far end firewall. Important feature for VoIP access networks. SIP High Availability (HA), including active-passive clustering and session pickup (session failover) for SIP sessions. Geographical Redundancy. In an HA configuration, if the active SIP server fails (missing SIP heartbeat messages or SIP traffic) SIP sessions can be redirected to a secondary SIP server in another location. SIP per request method message rate limitation with configurable threshold for SIP message rates per request method. Protects SIP servers from SIP overload and DoS attacks. RTP Bypass, Supports configurations with and without RTP pinholing. May inspect and protect SIP signaling only. SIP NAT with IP address conservation. Performs SIP and RTP aware IP Network Address translation. Preserves the lost IP address information in the SDP profile i= line for later processing/debugging in the SIP server. See NAT with IP address conservation on page 2270. IP topology hiding The IP topology of a network can be hidden through NAT and NAPT manipulation of IP and SIP level addressing. For example, see SIP NAT configuration example: destination address translation (destination NAT) on page 2264.
SIP inspection without address translation The SIP ALG inspects SIP messages but addresses in the messages are not translated. This feature can be applied to a FortiGate unit operating in Transparent mode or in NAT/Route mode. In Transparent mode you add normal Transparent mode security policies that enable the SIP ALG and include a VoIP profile that causes the SIP ALG to inspect SIP traffic as required. For an example configuration, see Configuration example: SIP in Transparent Mode on page 2248. For a FortiGate unit operating in NAT/Route mode, if SIP traffic can pass between different networks without requiring NAT because is supported by the routing configuration, you can add security policies that accept SIP traffic without enabling NAT. In the VoIP profile you can configure the SIP ALG to inspect SIP traffic as required.
2241
VoIP profiles
To add a new VoIP profile from the web-based manager go to UTM Profiles > VoIP > Profile and select Create New. For SIP, from the web-based manager you can configure the VoIP profile to limit the number of SIP REGISTER and INVITE requests and enable logging of SIP sessions and SIP violations. Many additional options for configuring how the ALG processes SIP sessions are available from the CLI. Use the following command to add a VoIP profile named VoIP_Pro_1 from the CLI: config voip profile edit VoIP_Pro_1 end FortiGate units include two pre-defined VoIP profiles. On the web-based manager these profiles look identical. However, the CLI-only settings result in the following functionality.
default The most commonly used VoIP profile. This profile enables both SIP and SCCP and places the minimum restrictions on what calls will be allowed to negotiate. This profile allows normal SCCP, SIP and RTP sessions and enables the following security settings: block-long-lines to block SIP messages with lines that exceed maximum line lengths. block-unknown to block unrecognized SIP request messages. log-call-summary to write log messages that record SIP call progress (similar to DLP archiving). nat-trace (see NAT with IP address conservation on page 2270). contact-fixup perform NAT on the IP addresses and port numbers in SIP headers in SIP CONTACT messages even if they dont match the sessions IP address and port numbers. This profile is available for users who want to validate SIP messages and to only allow SIP sessions that are compliant with RFC 3261. In addition to the settings in the default VoIP profile, the strict profile sets all SIP deep message inspection header checking to block and drop SIP messages that contain malformed SIP or SDP lines that can be detected by the ALG. For more information about SIP deep header inspection, see Deep SIP message inspection on page 2283.
strict
Neither of the default profiles applies SIP rate limiting or message blocking. To apply more ALG features to SIP sessions you can clone (copy) the pre-defined VoIP profiles and make your own modifications to them. For example, to clone the default profile and configure the limit for SIP NOTIFY request messages to 1000 messages per second per security policy and block SIP INFO request messages. config voip profile clone default to my_voip_pro edit my_voip_pro config sip set notify-rate 1000 set block-info enable end end
2242
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2243
diagnose sys sip status dialogs: max=32768, used=0 mappings: used=0 dialog hash by ID: size=2048, used=0, depth=0 dialog hash by RTP: size=2048, used=0, depth=0 mapping hash: size=2048, used=0, depth=0 count0: 0 count1: 0 count2: 0 count3: 0 count4: 0 This command output shows that the session helper is not processing SIP sessions because all of the used and count fields are 0. If any of these fields contains non-zero values then the SIP session helper may be processing SIP sessions. Also, you can check to see if some ALG-only features are not being applied to all SIP sessions. For example, the VoIP usage widget on the FortiGate dashboard displays statistics for SIP and SCCP calls processed by the ALG but not for calls processed by the session helper. So if you see fewer calls than expected the session helper may be processing some of them.
2244
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Other logging and monitoring features such as log messages and DLP archiving are only supported by the ALG. Finally, you can check the policy usage and session information dashboard widgets to see if SIP sessions are being accepted by the wrong security policies.
Any phone or server in a SIP call can cancel the call by sending a CANCEL message. When a CANCEL message is received by the FortiGate unit, the SIP ALG closes open pinholes. Before terminating the call, the ALG waits for the final 200 OK message. The SIP ALG can be configured to terminate SIP calls if the SIP dialog message flow or the call RTP (media) stream is interrupted and does not recover. You can use the following commands to configure terminating inactive SIP sessions and to set timers or counters to control when the call is terminated by the SIP ALG.
2245
You can adjust this setting between 1 and 10,080 seconds. The default call keepalive setting of 0 disables terminating a call if the media stream is interrupted. Set call keepalive higher if your network has latency problems that could temporarily interrupt media streams. If you have configured call keepalive and the FortiGate unit terminates calls unexpectedly you can increase the call keepalive time to resolve the problem.
Caution: Call keep alive should be used with caution because enabling this feature results in extra FortiGate CPU overhead and can cause delay/jitter for the VoIP call. Also, the FortiGate unit terminates the call without sending SIP messages to end the call. And if the SIP endpoints send SIP messages to terminate the call they will be blocked by the FortiGate unit if they are sent after the FortiGate unit terminates the call.
2246
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
The SIP ALG keeps RTP pinholes open as long as the SIP session is alive. When the associated SIP session is terminated by the SIP ALG or the SIP phones or servers participating in the call, the RTP pinhole is closed. Figure 279 shows a simplified call setup sequence that shows how the SIP ALG opens pinholes. Phone A and Phone B are installed on either side of a FortiGate unit operating in Transparent mode. Phone A and Phone B are on the same subnet. The FortiGate unit includes a security policy that accepts SIP sessions from port1 to port2 and from port2 to port1. The FortiGate unit does not require an RTP security policy, just the SIP policy. You can see from this diagram that the SDP profile in the INVITE request from Phone A indicates that Phone A is expecting to receive a media stream sent to its IP address using port 4000 for RTP and port 4001 for RTCP. The SIP ALG creates pinhole 1 to allow this media traffic to pass through the FortiGate unit. Pinhole 1 is opened on the Port2 interface and will accept media traffic sent from Phone B to Phone A. When Phone B receives the INVITE request from Phone A, Phone B will know to send media streams to Phone A using destination IP address 10.31.101.20 and ports 4000 and 4001. The 200 OK response sent from Phone B indicates that Phone B is expecting to receive a media stream sent to its IP address using ports 8000 and 8001. The SIP ALG creates pinhole 2 to allow this media traffic to pass through the FortiGate unit. Pinhole 2 is opened on the Port1 interface and will accept media traffic sent from Phone A to Phone B.
2247
Figure 279: SIP call setup with a FortiGate unit in Transparent mode
Port1 rt1
Port2 P Po
1. Phone A sends an INVITE request to Phone B (SDP 10.31.101.20:4000) 2. SIP ALG creates Pinhole 1. Accepts traffic on Port2 with destination address:port numbers 10.31.101.20:4000 and 4001 3. The SIP ALG forwards the INVITE request Phone B. 4. Phone B sends a 200 OK response to Phone A (SDP: 10.31.101.30:8000) 5. SIP ALG creates Pinhole 2. Accepts traffic on Port1 with destination address:port numbers 10.31.101.30:8000 and 8001 6. Phone B sends RTP and RTCP media sessions to Phone A through pinhole 1. Destination address:port number 172.20.120.20:4000 and 4001 Pinhole 1 7. Phone A sends RTP and RTCP media sessions to Phone B through pinhole 2. Destination address:port number 172.20.120.30:8000 and 8001 Pinhole 2
2248
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Port1 1
Port2 Po
To add firewall addresses for the SIP phones 1 Go to Firewall Objects > Address. 2 Add the following addresses for Phone A and Phone B:
Address Name Type Subnet / IP Range Interface Address Name Type Subnet / IP Range Interface Phone_A Subnet / IP Range 10.31.101.20/255.255.255.255 port1 Phone_B Subnet / IP Range 10.31.101.30/255.255.255.255 port2
To add security policies to apply the SIP ALG to SIP sessions 1 Go to Policy > Policy > Policy. 2 Select Create New to add a security policy. 3 Add a security policy to allow Phone A to send SIP request messages to Phone B:
2249
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action UTM Protocol Options Enable VoIP
port1 Phone_A port2 Phone_B always SIP ACCEPT Select default Select and select the default VoIP profile.
4 Select OK. 5 Add a security policy to allow Phone B to send SIP request messages to Phone A:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action UTM Protocol Options Enable VoIP port2 Phone_B port1 Phone_A always SIP ACCEPT Select default Select (And select the default VoIP profile)
6 Select OK.
2250
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
set srcintf port1 set dstintf port2 set srcaddr Phone_A set dstaddr Phone_B set action accept set schedule always set service SIP set utm-status enable set profile-protocol-options default set voip-profile default next edit 0 set srcintf port2 set dstintf port1 set srcaddr Phone_B set dstaddr Phone_A set action accept set schedule always set service SIP set utm-status enable set profile-protocol-options default set voip-profile default end
2251
Usually you would want to open these pinholes. Keeping them closed may prevent SIP from functioning properly through the FortiGate unit. They can be disabled, however, for interconnect scenarios (where all SIP traffic is between proxies and traveling over a single session). In some cases these settings can also be disabled in access scenarios if it is known that all users will be registering regularly so that their contact information can be learned from the register request. You might want to prevent pinholes from being opened to avoid creating a pinhole for every register or non-register request. Each pinhole uses additional system memory, which can affect system performance if there are hundreds or thousands of users, and requires refreshing which can take a relatively long amount of time if there are thousands of active calls. To configure a VoIP profile to prevent opening register and non-register pinholes: config voip profile edit VoIP_Pro_1 config sip set open-register-pinhole disable set open-contact-pinhole disable end end In some cases you may not want to open pinholes for the port numbers specified in SIP Contact headers. For example, in an interconnect scenario when a FortiGate unit is installed between two SIP servers and the only SIP traffic through the FortiGate unit is between these SIP servers pinholes may not need to be opened for the port numbers specified in the Contact header lines. If you disable open-register-pinhole then pinholes are not opened for ports in Contact header lines in SIP Register messages. If you disable open-contact-pinhole then pinholes are not opened for ports in Contact header lines in all SIP messages except SIP Register messages.
2252
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2253
The VoIP phone or server in the Internet sends responses to these SIP messages to the external interface of the FortiGate unit. The addresses in the response messages are translated back into private network addresses and the response is forwarded to the originator of the request. For the RTP communication between the SIP phones, the SIP ALG opens pinholes to allow media through the FortiGate unit on the dynamically assigned ports negotiated based on information in the SDP and the Via:, Contact:, and Record-Route: header fields. The pinholes also allow incoming packets to reach the Contact:, Via:, and Record-Route: IP addresses and ports. When processing return traffic, the SIP ALG inserts the original Contact:, Via:, Route:, and Record-Route: SIP fields back into the packets.
2254
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Response messages from phones or servers on the Internet are sent to the FortiGate unit interface connected to the Internet where the destination addresses are translated back to addresses on the private network before forwarding the SIP response message to the private network.
Table 131: Source NAT translation of IP addresses in SIP response messages SIP header To: From: Call-ID: Via: Request-URI: Contact: Record-Route: Route: NAT action None Replace IP address of FortiGate unit interface connected to the Internet with private network address. Replace IP address of FortiGate unit interface connected to the Internet with private network address. Replace IP address of FortiGate unit interface connected to the Internet with private network address. N/A None Replace IP address of FortiGate unit interface connected to the Internet with private network address. Replace IP address of FortiGate unit interface connected to the Internet with private network address.
2255
SIP response messages sent in response to the destination NAT translated messages are sent from a server or a phone on the private network back to the originator of the request messages on the Internet. These reply messages are accepted by the same security policy that accepted the initial request messages, The firewall VIP in the original security policy contains the information that the SIP ALG uses to translate the private network source addresses in the SIP headers into the firewall virtual IP address.
Table 133: Destination NAT translation of IP addresses in SIP response messages SIP header To: From: Call-ID: Via: Request-URI: Contact: Record-Route: Route: NAT action None Replace private network address with firewall VIP address. None None N/A Replace private network address with firewall VIP address. Replace private network address with firewall VIP address. None
2256
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
The syntax of the media attribute is: m=audio <port_number> RTP <format_list> Where audio is the media type. FortiGate units support the audio media type. <port_number> is the destination port number used by the media stream. RTP is the application layer transport protocol used for the media stream. FortiGate units support the Real Time Protocol (RTP) transport protocol. <format_list> is the format list that provides information about the application layer protocol that the media uses.
2257
2. SIP ALG creates Pinhole 1. Accepts traffic on WAN1 with destination address:port numbers 172.20.120.122:49170 and 49171 3. The SIP ALG performs source NAT on the INVITE request and forwards it to Phone B.
INVITE sip:PhoneB@172.20.120.30 SIP/2.0 Via: SIP/2.0/UDP 172.20.120.122:5060 From: PhoneA <sip:PhoneA@172.20.120.122> To: PhoneB <sip:PhoneB@172.20.120.30> Call-ID: 314159@172.20.120.122 CSeq: 1 INVITE Contact: sip:PhoneA@172.20.120.122 v=0 o=PhoneA 5462346 332134 IN IP4 172.20.120.122 c=IN IP4 172.20.120.122 m=audio 49170 RTP 0 3
For the replies to SIP packets sent by Phone A to be routable on Phone Bs network, the FortiGate unit uses source NAT to change their source address to the address of the WAN1 interface. The SIP ALG makes similar changes the source addresses in the SIP headers and SDP profile. For example, the original INVITE request from Phone A includes the address of Phone A (10.31.101.20) in the from header line. After the INVITE request passes through the FortiGate unit, the address of Phone A in the From SIP header line is translated to 172.20.120.122, the address of the FortiGate unit WAN1 interface. As a result, Phone B will reply to SIP messages from Phone A using the WAN1 interface IP address. The FortiGate unit also opens a pinhole so that it can accept media sessions sent to the WAN1 IP address using the port number in the m= line of the INVITE request and forward them to Phone A after translating the destination address to the IP address of Phone A.
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2258
Phone B sends the 200 OK response to the INVITE message to the WAN1 interface. The SDP profile includes the port number that Phone B wants to use for its media stream. The FortiGate unit forwards 200 OK response to Phone A after translating the addresses in the SIP and SDP lines back to the IP address of Phone A. The SIP ALG also opens a pinhole on the Internal interface that accepts media stream sessions from Phone A with destination address set to the IP address of Phone B and using the port that Phone B added to the SDP m= line.
Figure 282: SIP source NAT scenario part 2: 200 OK returned and media streams established
Internal 10.31.101.100 WAN1 172.20.120.122
5. SIP ALG creates Pinhole 2. Accepts traffic on Internal with destination address:port numbers 172.20.120.30: 3456 and 3457.. 6. The SIP ALG performs source NAT on the 200 OK response and forwards it to Phone A.
SIP/2.0 200 OK Via: SIP/2.0/UDP 10.31.101.20:5060 From: PhoneA <sip:PhoneA@10.31.101.20> To: PhoneB <sip:PhoneB@172.20.120.30> Call-ID: 314159@10.31.101.20 CSeq: 1 INVITE Contact: sip:PhoneB@172.20.120.30 v=0 o=PhoneB 124333 67895 IN IP4 172.20.120.30 c=IN IP4 172.20.120.30 m=audio 3456 RTP 0
7. Phone B sends RTP and RTCP media sessions to Phone A through pinhole 1. Destination address:port number 172.20.120.122:49170 and 49171. Pinhole 1
8. Phone A sends RTP and RTCP media sessions to Phone B through pinhole 2. Destination address:port number 172.20.120.30:3456 and 3457. Pinhole 2
2259
To simplify the diagrams, some SIP messages are not included (for example, the Ringing and ACK response messages) and some SIP header lines and SDP profile lines have been removed from the SIP messages. The SIP ALG also translates the destination addresses in the SIP message from the virtual IP address (172.20.120.50) to the SIP proxy server address (10.31.101.50). For this configuration to work, the SIP proxy server must be able to change the destination addresses for Phone A in the SIP message from the address of the SIP proxy server to the actual address of Phone A. The SIP ALG also opens a pinhole on the Port2 interface that accepts media sessions from the private network to SIP Phone B using ports 4900 and 4901.
Figure 283: SIP destination NAT scenario part 1: INVITE request sent from Phone B to Phone A
FortiGate-620B Cluster In NAT/Route mode
2. SIP ALG creates Pinhole 1. Accepts traffic on Port2 with destination address:port numbers 172.20.120.30:4900 and 4901 3. The SIP ALG performs destination NAT on the INVITE request and forwards it to the SIP proxy server.
INVITE sip:PhoneA@10.31.101.50 SIP/2.0 Via: SIP/2.0/UDP 10.31.101.50:5060 From: PhoneB <sip:PhoneB@172.20.120.30> To: PhoneA <sip:PhoneA@10.31.101.50> Call-ID: 314134@172.20.120.30 CSeq: 1 INVITE Contact: sip:PhoneB@172.20.120.30 v=0 4. The SIP proxy server forwards o=PhoneB 2346 134 IN IP4 172.20.120.30 the INVITE request to Phone A c=IN IP4 172.20.120.30 m=audio 4900 RTP 0 3
(SDP: 172.20.120.30:4900)
Phone A sends a 200 OK response back to the SIP proxy server. The SIP proxy server forwards the response to Phone B. The FortiGate unit accepts the 100 OK response. The SIP ALG translates the Phone A addresses back to the SIP proxy server virtual IP address before forwarding the response back to Phone B. The SIP ALG also opens a pinhole using the SIP proxy server virtual IP which is the address in the o= line of the SDP profile and the port number in the m= line of the SDP code.
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2260
Figure 284: SIP destination NAT scenario part 2: 200 OK returned to Phone B and media streams established
FortiGate-620B Cluster In NAT/Route mode
5. Phone A sends a 200 OK response to the SIP proxy server (SDP: 10.31.101.20:8888)
6. The SIP proxy server forwards the response to Phone B (SDP: 10.31.101.20:8888)
SIP/2.0 200 OK Via: SIP/2.0/UDP 10.31.101.50:5060 From: PhoneB <sip:PhoneB@172.20.120.30> To: PhoneA <sip:PhoneA@10.31.101.50> Call-ID: 314134@172.20.120.30 CSeq: 1 INVITE Contact: sip:PhoneB@172.20.120.30 v=0 o=PhoneB 2346 134 IN IP4 172.20.120.30 c=IN IP4 10.31.101.20 m=audio 5500 RTP 0
7. The SIP ALG NATs the SDP address to the Virtual IP address before forwarding the response to Phone B (SDP: 172.20.120.50:5500)
SIP/2.0 200 OK Via: SIP/2.0/UDP 172.20.120.50:5060 From: PhoneB <sip:PhoneB@172.20.120.30> To: PhoneA <sip:PhoneA@172.20.120.50> Call-ID: 314134@172.20.120.30 CSeq: 1 INVITE Contact: sip:PhoneB@172.20.120.30 v=0 o=PhoneB 2346 134 IN IP4 172.20.120.30 c=IN IP4 172.20.120.50 m=audio 5500 RTP 0
9. Phone A sends RTP and RTCP media sessions to Phone B through pinhole 1. Destination address:port number 172.20.120.30:4900 and 4901
8. Pinhole 2 created. Accepts traffic on Port1 with destination address:port numbers 172.20.120.50:5500 and 5501 Pinhole 1 10. Phone B sends RTP and RTCP media sessions to Phone A through 11. The SIP ALG NATs the pinhole 2. Destination address:port destination address to number 172.20.120.50:5500 and 5501. 10.31.101.20. Pinhole 2
The media stream from Phone A is accepted by pinhole one and forwarded to Phone B. The source address of this media stream is changed to the SIP proxy server virtual IP address. The media stream from Phone B is accepted by pinhole 2 and forwarded to Phone B. The destination address of this media stream is changed to the IP address of Phone A.
2261
WAN1 172.20.120.122 1 2 17
To add security policies to apply the SIP ALG to SIP sessions 1 Go to Policy > Policy > Policy.
2262
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2 Select Create New to add a security policy. 3 Add a security policy to allow Phone A to send SIP request messages to Phone B:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action Enable NAT UTM Protocol Options Enable VoIP internal Phone_A wan1 Phone_B always SIP ACCEPT Select Select default Select and select the default VoIP profile.
4 Select OK. 5 Add a security policy to allow Phone B to send SIP request messages to Phone A:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action Enable NAT UTM Protocol Options Enable VoIP wan1 Phone_B internal Phone_A always SIP ACCEPT Select Select default Select (And select the default VoIP profile)
6 Select OK.
2263
2 Enter the following command to add security policies to allow Phone A to send SIP request messages to Phone B and Phone B to send SIP request messages to Phone A. config firewall policy edit 0 set srcintf internal set dstintf wan1 set srcaddr Phone_A set dstaddr Phone_B set action accept set schedule always set service SIP set nat enable set utm-status enable set profile-protocol-options default set voip-profile default next edit 0 set srcintf wan1 set dstintf internal set srcaddr Phone_B set dstaddr Phone_A set action accept set schedule always set service SIP set nat enable set utm-status enable set profile-protocol-options default set voip-profile default end
2264
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Figure 286: SIP destination NAT scenario part two: 200 OK returned to Phone B and media streams established
FortiGate-620B Cluster In NAT/Route mode
To add a firewall address for the SIP proxy server 1 Go to Firewall Objects > Address. 2 Add the following for the SIP proxy server:
Address Name Type Subnet / IP Range Interface SIP_Proxy_Server Subnet / IP Range 10.31.101.50/255.255.255.255 port2
2265
To add the security policies 1 Go to Policy > Policy > Policy. 2 Add a destination NAT security policy that includes the SIP proxy server virtual IP that allows Phone B (and other SIP phones on the Internet) to send SIP request messages to the SIP proxy server.
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action Enable NAT UTM Protocol Options Enable VoIP port1 all port2 SIP_Proxy_VIP always SIP ACCEPT Select Select default Select and select the default VoIP profile.
3 Select OK. 4 Add a source NAT security policy to allow the SIP proxy server to send SIP request messages to Phone B and the Internet:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action Enable NAT UTM Protocol Options Enable VoIP port2 SIP_Proxy_Server port1 all always SIP ACCEPT Select Select default Select (And select the default VoIP profile)
5 Select OK.
2266
config firewall address edit SIP_Proxy_Server set associated interface port2 set type ipmask set subnet 10.31.101.50 255.255.255.255 end To add security policies 1 Enter the following command to add a destination NAT security policy that includes the SIP proxy server virtual IP that allows Phone B (and other SIP phones on the Internet) to send SIP request messages to the SIP proxy server. config firewall policy edit 0 set srcintf port1 set dstintf port2 set srcaddr all set dstaddr SIP_Proxy_VIP set action accept set schedule always set service SIP set nat enable set utm-status enable set profile-protocol-options default set voip-profile default end 2 Enter the following command to add a source NAT security policy to allow the SIP proxy server to send SIP request messages to Phone B and the Internet: config firewall policy edit 0 set srcintf port2 set dstintf port1 set srcaddr SIP_Proxy_Server set dstaddr all set action accept set schedule always set service SIP set nat enable set utm-status enable set profile-protocol-options default set voip-profile default end
2267
SIP service provider has a SIP server and a separate RTP server
217.233.122.132
10.72.0.57
FortiGate Unit
SIP service provider has a SIP server and a separate RTP server
10.72.0.60 72.0.60
217.233.122.132 217.23
In the scenario, shown in Figure 288, the SIP phone connects to a VIP (10.72.0.60). The SIP ALG translates the SIP contact header to 217.10.79.9, opens RTP pinholes, and manages NAT. The FortiGate unit also supports a variation of this scenario where the RTP media servers IP address is hidden on a private network or DMZ.
2268
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
10.0.0.60 217.233.90.60
In the scenario shown in Figure 289, a SIP phone connects to the Internet. The VoIP service provider only publishes a single public IP. The FortiGate unit is configured with a firewall VIP. The SIP phone connects to the FortiGate unit (217.233.90.60) and using the VIP the FortiGate unit translates the SIP contact header to the SIP proxy server IP address (10.0.0.60). The SIP proxy server changes the SIP/SDP connection information (which tells the SIP phone which RTP media server IP it should contact) also to 217.233.90.60.
2269
Figure 290: Different source and destination NAT for SIP and RTP
RTP Servers 192.168.0.21 - 192.168.0.23 219.29.81.10 219.29.81.20
RTP Server
In this scenario, shown in Figure 290, assume there is a SIP server and a separate media gateway. The SIP server is configured so that the SIP phone (219.29.81.20) will connect to 217.233.90.60. The media gateway (RTP server: 219.29.81.10) will connect to 217.233.90.65. What happens is as follows: 1 The SIP phone connects to the SIP VIP. The FortiGate ALG translates the SIP contact header to the SIP server: 219.29.81.20 > 217.233.90.60 (> 10.0.0.60). 2 The SIP server carries out RTP to 217.233.90.65. 3 The FortiGate ALG opens pinholes, assuming that it knows the ports to be opened. 4 RTP is sent to the RTP-VIP (217.233.90.65.) The FortiGate ALG translates the SIP contact header to 192.168.0.21.
2270
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Controlling how the SIP ALG NATs SIP contact header line addresses
You can enable contact-fixup so that the SIP ALG performs normal SIP NAT translation to SIP contact headers as SIP messages pass through the FortiGate unit. Disable contact-fixup if you do not want the SIP ALG to perform normal NAT translation of the SIP contact header if a Record-Route header is also available. If contact-fixup is disabled, the FortiGate ALG does the following with contact headers: For Contact in Requests, if a Record-Route header is present and the request comes from the external network, the SIP Contact header is not translated. For Contact in Responses, if a Record-Route header is present and the response comes from the external network, the SIP Contact header is not translated.
2271
If contact-fixup is disabled, the SIP ALG must be able to identify the external network. To identify the external network, you must use the config system interface command to set the external keyword to enable for the interface that is connected to the external network. Enter the following command to perform normal NAT translation of the SIP contact header: config voip profile edit VoIP_Pro_1 config sip set contact-fixup enable end end
2272
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
IP: 192.168.10.20
IP Phone
port2
172.20.120.1
To translate SIP sessions to a different destination port 1 Add the static NAT virtual IP. This virtual IP forwards traffic received at the port1 interface for IP address 172.20.120.20 and destination port 5060 to the SIP server at IP address 192.168.10.20 with destination port 5061. config firewall vip edit "sip_port_trans_vip" set type static-nat set portforward enable set protocol tcp set extip 172.20.120.20 set extport 5060 set extintf "port1" set mappedip 192.168.10.20 set mappedport 50601 set comment "Translate SIP destination port" end 2 Add a security policy that includes the virtual IP and the default VoIP profile. config firewall policy edit 1 set srcintf "port1" set dstintf "port2" set srcaddr "all" set dstaddr "sip_port_trans_vip" set action accept set schedule "always" set service "ANY" set utm-status enable set profile-protocol-options default set voip-profile default set comments "Translate SIP destination port" end
FortiOS Handbook v3: VoIP Solutions: SIP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2273
IP: 192.168.10.20
TCP Ports: 50601 50602 50603 Virtual Server IP Address 172.20.120.20 TCP Port 5060 port1 t1 1 172.20.120.1 p port2
IP Phone
To translated SIP sessions to multiple destination ports 1 Add the load balance virtual IP. This virtual IP forwards traffic received at the port1 interface for IP address 172.20.120.20 and destination port 5060 to the SIP server at IP address 192.168.10.20 with destination port 5061. config firewall vip edit "sip_port_ldbl_vip" set type load-balance set portforward enable set protocol tcp set extip 172.20.120.20 set extport 5060 set extintf "port1" set mappedip 192.168.10.20 set mappedport 50601-50603 set comment "Translate SIP destination port range" end
2274
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2 Add a security policy that includes the virtual IP and VoIP profile. config firewall policy edit 1 set srcintf "port1" set dstintf "port2" set srcaddr "all" set dstaddr "sip_port_ldbl_vip" set action accept set schedule "always" set service "ANY" set utm-status enable set profile-protocol-options default set voip-profile default set comments "Translate SIP destination port" end
2. The FortiGate unit forwards the REGSTER message to the SIP Server
Client IP: 172.20.120.20 Server IP: 10.11.101.50 Port: UDP (x,5060) REGISTER Contact: 172.20.120.20:y
5. The FortiGate unit accepts the session from the SIP server and forwards the INVITE request to Phone A
2275
In the example, a client (SIP Phone A) sends a REGISTER request to the SIP server with the following information: Client IP: 10.31.101.20 Server IP: 10.21.101.50 Port: UDP (x,5060) REGISTER Contact: 10.31.101.20:y Where x and y are ports chosen by Phone A. As soon as the server sends the 200 OK reply it can forward INVITE requests from other SIP phones to SIP Phone A. If the SIP proxy server uses the information in the REGISTER message received from SIP Phone A the INVITE messages sent to Phone A f will only get through the FortiGate unit if an policy has been added to allow the server to send traffic from the private network to the Internet. Or the SIP ALG must open a pinhole to allow traffic from the server to the Internet. In most cases the FortiGate unit is protecting the SIP server so there is no reason not to add a security policy to all the SIP server to send outbound traffic to the Internet. In a typical SOHO scenario shown in Figure 294, SIP Phone A is being protected from the Internet by a FortiGate unit. In most cases the FortiGate unit would not allow incoming traffic from the Internet to reach the private network. So the only way that an INVITE request from the SIP server can reach SIP Phone A is if the SIP ALG creates an incoming pinhole. All pinholes have three attributes: (source address, destination address, destination port)
Figure 294: SOHO configuration, FortiGate unit protecting a network with SIP phones
FortiGate unit In NAT/Route mode
Port1 172.20.120.141
Port2 10.11.101.100
2. The FortiGate unit forwards the REGSTER message to the SIP Proxy Server
3. The FortiGate unit opens a pinhole to accept sessions from the SIP server. If strict-register is enabled the pinhole is (172.20.120.50, 172.20.120.141,y) If strict-register is disabled the pinhole is (ANY, x,y)
4. The SIP Proxy server sends a 200 OK response to Phone A 5. The FortiGate unit accepts the response through the open pinhole and forwards the response to Phone A
2276
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
The more specific a pinhole is the more secure it is because it will accept less traffic. In this situation, the pinhole would be more secure if it only accepted traffic from the SIP server. This is what happens if strict-register is enabled in the VoIP profile that accepts the REGISTER request from Phone A. (SIP server IP address, client IP address, destination port) If strict-register is disabled (the default configuration) the pinhole is set up with the following attributes (ANY IP address, client IP address, destination port) This pinhole allows connections through the FortiGate unit from ANY source address which is a much bigger and less secure pinhole. In most similar network configurations you should enable strict-register to improve pinhole security. Enabling strict-register can cause problems when the SIP registrar and SIP proxy server are separate entities with separate IP addresses. Enter the following command to enable strict-register in a VoIP profile. config voip profile edit Profile_name config SIP set strict-register enable end
2277
FortiGate unit with SIP ALG ed d Configured for Hosted NAT Traversal
10.21.101.1 10 21.101.1 10 10.2 SIP + RTP SIP Server VIP 10.21.101.10
172.20.120.30
SIP + RTP
SIP + RTP
10.11.101.10
10.11.101.20
Configuration example: Hosted NAT traversal for calls between SIP Phone A and SIP Phone B
The following address translation takes place to allow a SIP call from SIP Phone A to SIP Phone B in Figure 295. 1 SIP Phone A sends a SIP Invite message to the SIP server. Packet source IP address: 192.168.10.1, destination IP address: 10.21.101.10. 2 The SIP packets are received by the NAT device which translates the source address of the SIP packets from 192.168.10.1 to 10.11.101.20. 3 The SIP packets are received by the FortiGate unit which translates the packet destination IP address to 10.30 120.20. The SIP ALG also translates the IP address of the SIP phone in the SIP header and SDP lines from 192.168.10.1 to 10.11.101.20. 4 The SIP server accepts the Invite message and forwards it to SIP Phone B at IP address10.11.101.20. The SIP server has this address for SIP Phone B because SIP packets from SIP Phone B have also been translated using the hosted NAT traversal configuration of the SIP ALG. 5 When the SIP call is established, the RTP session is between 10.11.101.10 and 10.11.101.20 and does not pass through the FortiGate unit. The NAT devices translated the destination address of the RTP packets to the private IP addresses of the SIP phones.
2278
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
To add a firewall address for the SIP proxy server 1 Go to Firewall Objects > Address. 2 Add the following for the SIP proxy server:
Address Name Type Subnet / IP Range Interface SIP_Proxy_Server Subnet / IP Range 10.31.101.50/255.255.255.255 port2
To add the security policies 1 Go to Policy > Policy > Policy. 2 Add a destination NAT security policy that includes the SIP proxy server virtual IP that allows Phone B (and other SIP phones on the Internet) to send SIP request messages to the SIP proxy server.
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action Enable NAT port1 all port2 SIP_Proxy_VIP always SIP ACCEPT Select
2279
3 Select OK. 4 Add a source NAT security policy to allow the SIP proxy server to send SIP request messages to Phone B and the Internet:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action Enable NAT UTM Protocol Options Enable VoIP port2 SIP_Proxy_Server port1 all always SIP ACCEPT Select Select default Select (And select the default VoIP profile)
5 Select OK.
2280
To add security policies 1 Enter the following command to add a destination NAT security policy that includes the SIP proxy server virtual IP that allows Phone A to send SIP request messages to the SIP proxy server. config firewall policy edit 0 set srcintf port1 set dstintf port2 set srcaddr all set dstaddr SIP_Proxy_VIP set action accept set schedule always set service SIP set nat enable set utm-status enable set profile-protocol-options default set voip-profile HNT end 2 Enter the following command to add a source NAT security policy to allow the SIP proxy server to send SIP request messages to Phone B: config firewall policy edit 0 set srcintf port2 set dstintf port1 set srcaddr SIP_Proxy_Server set dstaddr all set action accept set schedule always set service SIP set nat enable set utm-status enable set profile-protocol-options default set voip-profile default end
Hosted NAT traversal for calls between SIP Phone A and SIP Phone C
The following address translation takes place to allow a SIP call from SIP Phone A to SIP Phone C in Figure 295 on page 2278. 1 SIP Phone A sends a SIP Invite message to the SIP server. Packet source IP address: 192.168.10.1 and destination IP address: 10.21.101.10. 2 The SIP packets are received by the NAT device which translates the source address of the SIP packets from 192.168.10.1 to 10.11.101.20. 3 The SIP packets are received by the FortiGate unit which translates the packet destination IP address to 10.30 120.20. The SIP ALG also translates the IP address of the SIP phone in the SIP header and SDP lines from 192.168.10.1 to 10.11.101.20. 4 The SIP server accepts the Invite message and forwards it to SIP Phone C at IP address 172.20.120.30. The SIP server has this address for SIP Phone C because SIP packets from SIP Phone C have also been translated using the hosted NAT traversal configuration of the SIP ALG.
2281
5 When the SIP call is established, the RTP session is between 10.11.101.10 and 172.20.120.30. The packets pass through the FortiGate unit which performs NAT as required.
SIP Server
RTP Server
IPv6 address
To enable SIP support for IPv6 add an IPv6 security policy that accepts SIP packets and includes a VoIP profile.
2282
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
SIP message
Message compliant
Checks the SIP request message Request-line Checks the following SIP header fields:
Allow, Call-id, Contact, Contentlength, Content-type, CSeq, Expires, From, Max-Forwards, P-asserted-identity, Rack, Record-Route, Route, Rseq, To, Via
Blade
Malformed SIP header field detected Yes: Check next header field
Configured: Pass ?
Yes: Return SIP client error Response message 400 Bad Request or 413 Request entity too large
No
Configured: Respond ? If no
Discard message
Deep SIP message inspection checks the syntax of each SIP header and SDP profile line to make sure they conform to the syntax defined in the relevant RFC and IETF standard. You can also configure the SIP ALG to inspect for: Unknown SIP message types (message types not defined in a SIP RFC) this option is enabled by default and can be disabled. When enabled unknown message types are discarded. Configured using the block-unknown option. Unknown line types (message line types that are not defined in any SIP or SDP RFC). Configured using the unknown-header option. Messages that are longer than a configured maximum size. Configured using the max-body-length option. Messages that contain one or more lines that are longer that a set maximum line length (default 998 characters). Configured using the max-line-length option.
2283
If a message line is incorrect or in an unknown message line is found, the SIP ALG sends the following message: SIP/2.0 400 Bad Request, <optional_info> The <optional_info> provides more information about why the message was rejected. For example, if the SIP ALG finds a malformed Via header line, the response message may be: SIP/2.0 400 Bad Request, malformed Via header If the SIP ALG finds a malformed message line, and the action for this message line type is discard, the message is discarded with no further checking or responses. If the action is pass, the SIP ALG continues parsing the SIP message for more malformed message lines. If the action is respond, the SIP ALG sends the SIP response message and discards the message containing the malformed line with no further checking or response. If only malformed message line types with action set to pass are found, the SIP ALG extracts as much information as possible from the message (for example for NAT and opening pinholes, and forwards the message to its destination). If a SIP message containing a malformed line is discarded the SIP ALG will not use the information in the message for call processing. This could result in the call being terminated. If a malformed line in a SIP message includes information required for the SIP call that the SIP ALG cannot interpret (for example, if an IP address required for SIP NAT is corrupted) the SIP ALG may not be able to continue processing the call and it could be terminated. Discarded messages are counted by SIP ALG static message counters.
Recommended configurations
Because of the risks imposed by SIP header attacks or incorrect data being allowed and because selecting drop or respond does not require more CPU overhead that pass you would want to set all tests to drop or respond. However, in some cases malformed lines may be less of a threat or risk. For example, the SDP i= does not usually contain information that is parsed by any SIP device so a malformed i= line may not pose a threat. You can also used the pre-defined VoIP profiles to apply different levels of deep message inspection. The default VoIP profile sets all deep message inspection options to pass and the strict VoIP profile sets all deep message inspection options to discard. From the CLI you can use the clone command to copy these pre-defined VoIP profiles and then customize them for your requirements.
2284
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Table 134 lists the SIP header lines that the SIP ALG can inspect and the CLI command for configuring the action for each line type. The table also lists the RFC that the header line is defined in.
Table 134: SIP header lines that the SIP ALG can inspect for syntax errors SIP Header line Allow Call-ID Contact Content-Length Content-Type CSeq Expires From Max-forwards P-Asserted-Identity RAck Record-Route Route RSeq To Via VoIP profile option malformed-header-allow malformed-header-call-id malformed-header-contact malformed-header-content-length malformed-header-content-type malformed-header-cseq malformed-header-expires malformed-header-from malformed-header-max-forwards malformed-header-p-asserted-identity malformed-header-rack malformed-header-record-route malformed-header-route malformed-header-rseq malformed-header-to malformed-header-via RFC RFC 3261 RFC 3261 RFC 3261 RFC 3261 RFC 3261 RFC 3261 RFC 3261 RFC 3261 RFC 3261 RFC 3325 RFC 3262 RFC 3261 RFC 3261 RFC 3262 RFC 3261 RFC 3261
Table 135 lists the SDP profile lines that the SIP ALG inspects and the CLI command for configuring the action for each line type. SDP profile lines are defined by RFC 4566 and RFC 2327.
Table 135: SDP profile lines that the SIP ALG can inspect for syntax errors Attribute a= b= c= VoIP profile option malformed-header-sdb-a malformed-header-sdp-b malformed-header-sdp-c
2285
Table 135: SDP profile lines that the SIP ALG can inspect for syntax errors (Continued) Attribute i= k= m= o= r= s= t= v= z= VoIP profile option malformed-header-sdp-i malformed-header-sdp-k malformed-header-sdp-m malformed-header-sdp-o malformed-header-sdp-r malformed-header-sdp-s malformed-header-sdp-t malformed-header-sdp-v malformed-header-sdp-z
Discarding SIP messages with some malformed header and body lines
Enter the following command to configure deep SIP message inspection to discard SIP messages with a malformed Via line, a malformed route line or a malformed m= line but to pass messages with a malformed i= line or a malformed Max-Forwards line config voip profile edit VoIP_Pro_Name config sip set malformed-header-via discard set malformed-header-route discard set malformed-header-sdp-m discard set malformed-header-sdp-i pass set malformed-header-max-forwards pass end end
2286
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
The max-body-length option checks the value in the SIP Content-Length header line to determine body length. The Content-Length can be larger than the actual size of a SIP message if the SIP message content is split over more than one packet. SIP message sizes vary widely. The size of a SIP message can also change with the addition of Via and Record-Route headers as the message is transmitted between users and SIP servers.
When you enable message blocking for a message type in a VoIP profile, whenever a security policy containing the VoIP profile accepts a SIP message of this type, the SIP ALG silently discards the message and records a log message about the action. Use the following command to configure a VoIP profile to block SIP CANCEL and Update request messages: config voip profile edit VoIP_Pro_Name config sip set block-cancel enable set block-update enable end end SIP uses a variety of text-based messages or requests to communicate information about SIP clients and servers to the various components of the SIP network. Since SIP requests are simple text messages and since the requests or their replies can contain information about network components on either side of the FortiGate unit, it may be a security risk to allow these messages to pass through. Table 136 lists all of the VoIP profile SIP request message blocking options. All of these options are disabled by default.
Table 136: Options for blocking SIP request messages SIP request message ACK BYE SIP message blocking CLI Option block-ack block-bye
2287
Table 136: Options for blocking SIP request messages SIP request message Cancel INFO INVITE Message Notify Options PRACK Publish Refer Register Subscribe Update SIP message blocking CLI Option block-cancel block-info block-invite block-message block-notify block-options block-prack block-publish block-refer block-register block-subscribe block-update
INVITE
REGISTER
SUBSCRIBE
NOTIFY
SIP
REFER
SIP
UPDATE
OPTIONS
SIP message rate limitation Individually configurable per SIP method When threshold is hit additional messages with this method will be discarded Prevents SIP server from getting overloaded by flash crowds or Denial-of-Service attacks. May block some methods at all (with extra block option) Can be disabled (unlimited rate)
MESSAGE
ACK
PRACK
INFO
FortiGate units support rate limiting for the following types of VoIP traffic: Session Initiation Protocol (SIP) Skinny Call Control Protocol (SCCP) (most versions) Session Initiation Protocol for Instant Messaging and Presence Leveraging Extensions (SIMPLE).
2288
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
You can use rate limiting of these VoIP protocols to protect the FortiGate unit and your network from SIP and SCCP Denial of Service (DoS) attacks. Rate limiting protects against SIP DoS attacks by limiting the number of SIP REGISTER and INVITE requests that the FortiGate unit receives per second. Rate limiting protects against SCCP DoS attacks by limiting the number of SCCP call setup messages that the FortiGate unit receives per minute. You configure rate limiting for a message type by specifying a limit for the number of messages that can be received per second. The rate is limited per security policy. When VoIP rate limiting is enabled for a message type, if the a single security policy accepts more messages per second than the configured rate, the extra messages are dropped and log messages are written when the messages are dropped. Use the following command to configure a VoIP profile to limit the number of INVITE messages accepted by each security policy that the VoIP profile is added to 100 INVITE messages a second: config voip profile edit VoIP_Pro_Name config sip set invite-rate 100 end end If you are experiencing denial of service attacks from traffic using these VoIP protocols, you can enable VoIP rate limiting and limit the rates for your network. Limit the rates depending on the amount of SIP and SCCP traffic that you expect the FortiGate unit to be handling. You can adjust the settings if some calls are lost or if the amount of SIP or SCCP traffic is affecting FortiGate unit performance. Table 137 lists all of the VoIP profile SIP rate limiting options. All of these options are set to 0 so are disabled by default.
Table 137: Options for SIP rate limiting SIP request message ACK BYE Cancel INFO INVITE Message Notify Options PRACK Publish Refer Register Subscribe Update Rate Limiting CLI Option ack-rate bye-rate cancel-rate info-rate invite-rate message-rate notify-rate options-rate prack-rate publish-rate refer-rate register-rate subscribe-rate update-rate
2289
2290
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
primary
GE
FortiCarri FortiOS er
Active Active Blade Blade
GE
ENET/VPL Ethernet / S VPLS Switch Switch (1) (1) SIP SIP Server Server ENET/VP Ethernet / VPLS LS Switch Switch (2) (2)
SIP Interconnect
Floating Mac/IP
Heart
Floating Mac/IP
secondary (optional)
GE
GE
SIP Server
SIP
SIP
SIP is forwarded to primary SIP Server, as long as its successfully sending heartbeats
SIP
SIP
2291
However, you can work around this problem by enabling the block-geo-red-options application control list option. This option causes the FortiGate unit to refresh the local SIP server status when it receives an OPTIONS message before dropping the message. The end result is the heartbeat signals between geographically redundant SIP servers are maintained but OPTIONS messages do not pass through the FortiGate unit. Use the following command to block OPTIONS messages while still supporting geographic redundancy: config voip profile edit VoIP_Pro_Name config sip set block-options disable set block-geo-red-options enable end end
Note: The block-options option setting overrides the block-geo-red-options option. If block-options is enabled the FortiGate unit only blocks SIP OPTIONS messages and does not refresh local SIP server status.
2292
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
SIP debugging
SIP debugging
SIP debug log format
Assuming that diagnose debug console timestamp is enabled then the following shows the debug that is generated for an INVITE if diag debug appl sip -1 is enabled:
2010-01-04 21:39:59 sip port 26 locate session for 192.168.2.134:5061 -> 172.16.67.192:5060 2010-01-04 21:39:59 sip sess 0x979df38 found for 192.168.2.134:5061 -> 172.16.67.192:5060 2010-01-04 21:39:59 sip port 26 192.168.2.134:5061 -> 172.16.67.192:5060 2010-01-04 21:39:59 sip port 26 read [(0,515) (494e56495445207369703a73657276696365403139322e3136382e322e3130303a35303630205349502f322e300d0 a5669613a205349502f322e302f554450203132372e302e312e313a353036313b6272616e63683d7a39684734624b2 d363832372d3632302d300d0a46726f6d3a2073697070203c7369703a73697070403132372e302e312e313a3530363 13e3b7461673d363832375349507054616730303632300d0a546f3a20737574203c7369703a7365727669636540313 9322e3136382e322e3130303a353036303e0d0a43616c6c2d49443a203632302d36383237403132372e302e312e310 d0a435365713a203120494e564954450d0a436f6e746163743a207369703a73697070403132372e302e312e313a353 036310d0a4d61782d466f7277617264733a2037300d0a5375626a6563743a20506572666f726d616e6365205465737 40d0a436f6e74656e742d547970653a206170706c69636174696f6e2f7364700d0a436f6e74656e742d4c656e67746 83a20203132390d0a0d0a763d300d0a6f3d7573657231203533363535373635203233353336383736333720494e204 95034203132372e302e312e310d0a733d2d0d0a633d494e20495034203132372e302e312e310d0a743d3020300d0a6 d3d617564696f2036303031205254502f41565020300d0a613d7274706d61703a302050434d552f383030300d0a)(I NVITE sip:service@192.168.2.100:5060 SIP/2.0..Via: SIP/2.0/UDP 127.0.1.1:5061;branch=z9hG4bK-6827-620-0..From: sipp %lt;sip:sipp@127.0.1.1:5061>;tag=6827SIPpTag00620..To: sut %lt;sip:service@192.168.2.100:5060>..Call-ID: 620-6827@127.0.1.1..CSeq: 1 INVITE..Contact: sip:sipp@127.0.1.1:5061..Max-Forwards: 70..Subject: Performance Test..Content-Type: application/sdp..Content-Length: 129....v=0..o=user1 53655765 2353687637 IN IP4 127.0.1.1..s=-..c=IN IP4 127.0.1.1..t=0 0..m=audio 6001 RTP/AVP 0..a=rtpmap:0 PCMU/8000..)] 2010-01-04 21:39:59 sip port 26 len 515 2010-01-04 21:39:59 sip port 26 INVITE '192.168.2.100:5060' addr 192.168.2.100:5060 2010-01-04 21:39:59 sip port 26 CSeq: 1 INVITE 2010-01-04 21:39:59 sip port 26 Via: UDP 127.0.1.1:5061 len 14 received 0 rport 0 0 branch 'z9hG4bK-6827-620-0' 2010-01-04 21:39:59 sip port 26 From: 'sipp ;tag=6827SIPpTag00620' URI 'sip:sipp@127.0.1.1:5061' tag '6827SIPpTag00620' 2010-01-04 21:39:59 sip port 26 To: 'sut ' URI 'sip:service@192.168.2.100:5060' tag '' 2010-01-04 21:39:59 sip port 26 Call-ID: '620-6827@127.0.1.1' 2010-01-04 21:39:59 sip port 26 Contact: '127.0.1.1:5061' addr 127.0.1.1:5061 expires 0 2010-01-04 21:39:59 sip port 26 Content-Length: 129 len 3 2010-01-04 21:39:59 sip port 26 sdp o=127.0.1.1 len=9 2010-01-04 21:39:59 sip port 26 sdp c=127.0.1.1 len=9 2010-01-04 21:39:59 sip port 26 sdp m=6001 len=4 2010-01-04 21:39:59 sip port 26 find call 0 '620-6827@127.0.1.1' 2010-01-04 21:39:59 sip port 26 not found 2010-01-04 21:39:59 sip port 26 call 0x97a47c0 open (collision (nil)) 2010-01-04 21:39:59 sip port 26 call 0x97a47c0 open txn 0x979f7f8 INVITE dir 0 2010-01-04 21:39:59 sip port 26 sdp i: 127.0.1.1:6001 2010-01-04 21:39:59 sip port 26 policy id 1 is_client_vs_policy 1 policy_dir_rev 0 2010-01-04 21:39:59 sip port 26 policy 1 not RTP policy 2010-01-04 21:39:59 sip port 26 learn sdp from stream address 2010-01-04 21:39:59 sip port 26 call 0x97a47c0 sdp 172.16.67.198:43722 2010-01-04 21:39:59 sip port 26 call 0x97a47c0 txn 0x979f7f8 127.0.1.1:5061 find new address and port 2010-01-04 21:39:59 sip port 26 call 0x97a47c0 txn 0x979f7f8 127.0.1.1:5061 find new address and port 2010-01-04 21:39:59 sip port 26 call 0x97a47c0 txn 0x979f7f8 127.0.1.1:5061 find new address and port 2010-01-04 21:39:59 sip port 30 write 192.168.2.134:5061 -> 172.16.67.192:5060 (13,539) 2010-01-04 21:39:59 sip port 30 write [(13,539) (494e56495445207369703a73657276696365403137322e31362e36372e3139323a35303630205349502f322e300d0 a5669613a205349502f322e302f554450203137322e31362e36372e3139383a35323036353b6272616e63683d7a396 84734624b2d363832372d3632302d300d0a46726f6d3a2073697070203c7369703a73697070403137322e31362e363 72e3139383a34333732343e3b7461673d363832375349507054616730303632300d0a546f3a20737574203c7369703 a73657276696365403137322e31362e36372e3139323a353036303e0d0a43616c6c2d49443a203632302d363832374 03132372e302e312e310d0a435365713a203120494e564954450d0a436f6e746163743a207369703a7369707040313 7322e31362e36372e3139383a34333732350d0a4d61782d466f7277617264733a2037300d0a5375626a6563743a205 06572666f726d616e636520546573740d0a436f6e74656e742d547970653a206170706c69636174696f6e2f7364700 d0a436f6e74656e742d4c656e6774683a20203133380d0a0d0a763d300d0a6f3d75736572312035333635353736352 03233353336383736333720494e20495034203137322e31362e36372e3139380d0a733d2d0d0a633d494e204950342 03137322e31362e36372e3139380d0a743d3020300d0a6d3d617564696f203433373232205254502f41565020300d0 a613d7274706d61703a302050434d552f383030300d0a)(INVITE sip:service@172.16.67.192:5060 SIP/2.0..Via: SIP/2.0/UDP 172.16.67.198:52065;branch=z9hG4bK-6827-620-0..From: sipp
2293
SIP debugging
;tag=6827SIPpTag00620..To: sut ..Call-ID: 620-6827@127.0.1.1..CSeq: 1 INVITE..Contact: sip:sipp@172.16.67.198:43725..Max-Forwards: 70..Subject: Performance Test..Content-Type: application/sdp..Content-Length: 138....v=0..o=user1 53655765 2353687637 IN IP4 172.16.67.198..s=-..c=IN IP4 172.16.67.198..t=0 0..m=audio 43722 RTP/AVP 0..a=rtpmap:0 PCMU/8000..)]
You can clear, view and negate/invert the sense of a filter using these commands: diag sys sip-proxy log-filter clear
2294
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
SIP debugging
diag sys sip-proxy log-filter list diag sys sip-proxy log-filter negate
2295
SIP debugging
2296
VoIP Solutions: SIP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2297
WAN optimization, web cache, explicit proxy and WCCP get and diagnose commands: describes get and diagnose commands available for troubleshooting WAN optimization, web cache, and WCCP.
2298
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2299
Pri
va
te
As shown in Figure 301, the FortiGate units can be deployed as security devices that protect private networks connected to the WAN and also perform WAN optimization. In this configuration, the FortiGate units are configured as typical security devices for the private networks and are also configured for WAN optimization. The WAN optimization configuration intercepts traffic to be optimized as it passes through the FortiGate unit and uses a WAN optimization tunnel with another FortiGate unit to optimize the traffic that crosses the WAN.
2300
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
WAN
Pri
va
e eN
two
rk
As shown in Figure 302, you can also deploy WAN optimization on single-purpose FortiGate units that only perform WAN optimization. In Figure 302, the WAN optimization FortiGate units are located on the WAN outside of the private networks. You can also install the WAN optimization FortiGate units behind the security devices on the private networks. The WAN optimization configuration is the same for FortiGate units deployed as security devices and for single-purpose WAN optimization FortiGate units. The only differences would result from the different network topologies.
Out-of-path topology
In an out-of-path topology, one or both of the FortiGate units configured for WAN optimization are not directly in the main data path. Instead, the out-of-path FortiGate unit is connected to a device on the data path, and the device is configured to redirect sessions to be optimized to the out-of-path FortiGate unit.
Figure 302: Single-purpose WAN optimization topology
Ne two rk
Pri
ate
Figure 303 shows out-of-path FortiGate units configured for WAN optimization and connected directly to FortiGate units in the data path. The FortiGate units in the data path use a method such as policy routing to redirect traffic to be optimized to the out-of-path FortiGate units. The out-of-path FortiGate units establish a WAN optimization tunnel between each other and optimize the redirected traffic.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
WAN
op
2301
Pri
va
ur ec S ity
WAN
ur ec S ity
One of the benefits of out-of-path WAN optimization is that out-of-path FortiGate units only perform WAN optimization and do not have to process other traffic. An in-path FortiGate unit configured for WAN optimization also has to process other non-optimized traffic on the data path. The out-of-path FortiGate units can operate in NAT/Route or Transparent mode. Other out-of-path topologies are also possible. For example, you can install the out-ofpath FortiGate units on the private networks instead of on the WAN. Also, the out-of-path FortiGate units can have one connection to the network instead of two. In a one-arm configuration such as this, security policies and routing have to be configured to send the WAN optimization tunnel out the same interface as the one that received the traffic.
A W at iz tim el op nn N tu io n
Pri
va
e eN
two
rk
2302
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Pri
N ate
Se
cu
rity
op
You can also configure WAN optimization between FortiGate units with different roles on the WAN. FortiGate units configured as security devices and for WAN optimization can perform WAN optimization as if they are single-purpose FortiGate units just configured for WAN optimization.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
d n an atio i ty i z ur tim ec p S o N A W
WAN
i ty ur ec S
e eN
two
rk
2303
Pri
va
The topology in Figure 305 is the same as that of Figure 301 on page 2300 with the addition of web caching to the FortiGate unit in front of the private network that includes the web servers. In a similar way, you can add web caching to all of the topologies shown in WAN optimization topologies on page 2300.
2304
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
WAN
If the FortiGate unit supports web caching, you can also add web caching to the security policy that accepts explicit web proxy sessions The FortiGate unit then caches Internet web pages on a hard disk to improve web browsing performance.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
R em lie tiC or F s e er ot us nt
A W N op tim iz at io n
Pri va te tw Ne ork
it lic xy xp ro E p eb w
Pri
va
e eN
two
rk
2305
Pri
va
it lic xy ng xp ro E p er hi eb rv ac w e c s eb w
ith
You can also configure reverse explicit FTP proxy (Figure 310). In this configuration, users on the Internet connect to the explicit web proxy before connecting to an FTP server installed behind a FortiGate unit.
2306
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
et rn es te it In b s e w
it lic xy xp ro E p P T F
Pri
va
e eN
two
rk
Int
ern
u et
se
rs
ty ic pl ex xy o se pr er P ev T R F
FT e Ps rve r
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2307
Pr
iva
You can also configure reverse proxy web-caching (Figure 312). In this configuration, users on the Internet browse to a web server installed behind a FortiGate unit. The FortiGate unit intercepts the web traffic (HTTP and HTTPS) and caches pages from the web server. Reverse proxy web caching on the FortiGate unit reduces the number of requests that the web server must handle, leaving it free to process new requests that it has not serviced before.
Figure 312: Reverse proxy web caching topology us ers
eb W ca ch e
rve se k b r We two ne
Int
t rne
2308
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
y ox pr e h se c er ca ev b R we
er erv s b rk We two ne
WCCP topologies
WCCP topologies
You can operate a FortiGate unit as a Web Cache Communication Protocol (WCCP) router or cache engine. As a router, the FortiGate unit intercepts web browsing requests from client web browsers and forwards them to a WCCP cache engine. The cache engine returns the required cached content to the client web browser. If the cache server does not have the required content it accesses the content, caches it and returns the content to the client web browser.
Figure 313: WCCP topology
FortiGate units can also operate as WCCP cache servers, communicating with WCCP routers, caching web content and providing it to client web browsers as required. WCCP is transparent to client web browsers. The web browsers do not have to be configured to use a web proxy.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
When a client-side FortiGate unit matches a session with a WAN optimization rule, it uses the information in the rule to attempt to start a WAN optimization tunnel with a server-side FortiGate unit installed in front of the server network. The client-side and server side FortiGate units must be able to identify each other. To do this the client-side FortiGate unit configuration must include the IP address and peer host ID of the server-side FortiGate unit and the configuration of the server-side FortiGate unit must include the IP address and peer host ID of the client-side FortiGate unit. With this information available, when the client-side FortiGate unit attempts to contact the server-side FortiGate unit, the two units share their IP addresses and peer host IDs and confirm that they can create a WAN optimization tunnel between each other. Security policies are not required for WAN optimization on the server-side FortiGate unit. Sessions from the client-side to the server-side FortiGate unit are WAN optimization tunnel requests. As long as the client-side and server-side FortiGate units can identify each other according to peer host ID and IP address the server-side FortiGate unit will accept WAN optimization tunnel requests from the client-side FortiGate unit. In addition to basic identification by peer host ID and IP address you can configure authentication options to impose authentication using certificates and pre-shared keys. In addition to you can configure FortiGate units involved in WAN optimization to accept connections from any identified peer or restrict connections to specific peers.
n lie C on tc ne s ct
ide r-s nit e u v r Se Gate i t r Fo
to r se r ve
WAN
S er ve e nn co t es en iv cli ce re m r fro
2310
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
ct io n
Se rve r
Cli
en
To identify all of the WAN optimization peers that a FortiGate unit can perform WAN optimization with, you add host IDs and IP addresses of all of the peers to the FortiGate unit configuration. The peer IP address is actually the IP address of the peer unit interface that communicates with the FortiGate unit.
2311
Together, the WAN optimization peers apply the WAN optimization features to optimize the traffic flow over the WAN between the clients and servers. WAN optimization reduces bandwidth requirements, increases throughput, reduces latency, offloads SSL encryption/decryption and improves privacy for traffic on the WAN.
2312
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Cl
t ien
WAN
k ac P s et
3 2 1
de it si n r- u ve te er a S tiG
or
P ac ke ts
3 2 1
Se
rve
e rn
tw
ork
Tunnel sharing
You can use the tunnel-sharing WAN optimization rule CLI keyword to configure tunnel sharing for WAN optimization rules with auto-detect set to off. Tunnel sharing means multiple WAN optimization sessions share the same WAN optimization tunnel. Tunnel sharing can improve WAN performance by reducing the number of WAN optimization tunnels between FortiGate units. Having fewer tunnels means less data to manage. Also, tunnel setup requires more than one exchange of information between the ends of the tunnel. Once the tunnel is set up, each new session that shares the tunnel avoids tunnel setup delays. Tunnel sharing also uses bandwidth more efficiently by reducing the chances that small packets will be sent down the tunnel. Processing small packets reduces network throughput, so reducing the number of small packets improves performance. A shared tunnel can combine all the data from the sessions being processed by the tunnel and send the data together. For example, suppose a FortiGate unit is processing five WAN optimization sessions and each session has 100 bytes to send. If these sessions use a shared tunnel, WAN optimization combines the packets from all five sessions into one 500-byte packet. If each session uses its own private tunnel, five 100-byte packets will be sent instead. Each packet also requires a TCP ACK reply. The combined packet in the shared tunnel requires one TCP ACK packet. The separate packets in the private tunnels require five.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2313
Protocol optimization
Tunnel sharing is not always recommended. Aggressive and non-aggressive protocols should not share the same tunnel. An aggressive protocol can be defined as a protocol that is able to get more bandwidth than a non-aggressive protocol. (The aggressive protocols can starve the non-aggressive protocols.) HTTP and FTP are considered aggressive protocols. If aggressive and non-aggressive protocols share the same tunnel, the aggressive protocols may take all of the available bandwidth. As a result, the performance of less aggressive protocols could be reduced. To avoid this problem, rules for HTTP and FTP traffic should have their own tunnel. To do this, set tunnel-sharing to private for WAN optimization rules that accept HTTP or FTP traffic. It is also useful to set tunnel-sharing to express-sharing for applications, such as Telnet, that are very interactive but not aggressive. Express sharing optimizes tunnel sharing for Telnet and other interactive applications where latency or delays would seriously affect the users experience with the protocol. Set tunnel-sharing to sharing for applications that are not aggressive and are not sensitive to latency or delays. WAN optimization rules set to sharing and expresssharing can share the same tunnel.
Protocol optimization
Protocol optimization techniques optimize bandwidth use across the WAN. These techniques can improve the efficiency of communication across the WAN optimization tunnel by reducing the amount of traffic required by communication protocols. You can apply protocol optimization to Common Internet File System (CIFS), FTP, HTTP, and general TCP sessions. You can apply general TCP optimization to MAPI sessions. For example, CIFS provides file access, record locking, read/write privileges, change notification, server name resolution, request batching, and server authentication. CIFS is a fairly chatty protocol, requiring many background transactions to successfully transfer a single file. This is usually not a problem across a LAN. However, across a WAN, latency and bandwidth reduction can slow down CIFS performance. When you set Protocol to CIFS in a WAN optimization rule, the FortiGate units at both ends of the WAN optimization tunnel use a number of techniques to reduce the number of background transactions that occur over the WAN for CIFS traffic. You can select only one protocol in a WAN optimization rule. For best performance, you should separate the traffic by protocol by creating different WAN optimization rules for each protocol. For example, to optimize HTTP traffic, you should set Port to 80 so that only HTTP traffic is accepted by this WAN optimization rule. For an example configuration that uses multiple rules for different protocols, see Example: Active-passive WAN optimization on page 2345. If the WAN optimization accepts a range of different types of traffic, you can set Protocol to TCP to apply general optimization techniques to TCP traffic. However, applying this TCP optimization to a range of different types of traffic is not as effective as applying more protocol-specific optimization to specific types of traffic. TCP protocol optimization uses techniques such as TCP SACK support, TCP window scaling and window size adjustment, and TCP connection pooling to remove TCP bottlenecks.
2314
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Byte caching
Byte caching
Byte caching breaks large units of application data (for example, a file being downloaded from a web page) into small chunks of data, labelling each chunk of data with a hash of the chunk and storing those chunks and their hashes in a database. The database is stored on a WAN optimization storage device. Then, instead of sending the actual data over the WAN tunnel, the FortiGate unit sends the hashes. The FortiGate unit at the other end of the tunnel receives the hashes and compares them with the hashes in its local byte caching database. If any hashes match, that data does not have to be transmitted over the WAN optimization tunnel. The data for any hashes that does not match is transferred over the tunnel and added to that byte caching database. Then the unit of application data (the file being downloaded) is reassembled and sent to its destination. The stored byte caches are not application specific. Byte caches from a file in an email can be used to optimize downloading that same file or a similar file from a web page. The result is less data transmitted over the WAN. Initially, byte caching may reduce performance until a large enough byte caching database is built up. To enable byte caching, you select Enable Byte Cache in a WAN optimization rule. The Protocol setting does not affect byte caching. Data is byte cached when it is processed by a WAN optimization rule that includes byte caching. Byte caching cannot determine whether or not a file is compressed (for example a zip file), and caches compressed and non-compressed versions of the same file separately.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2315
In addition to using the system dashboard to see the current memory usage you can use the get test wad 1 command to see how much memory is currently being used by WAN optimization and web caching. See get test {wa_cs | wa_dbd | wad | wad_diskd | wccpd} <test_level> on page 2477 for more information.
Refresh icon
2316
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Period
Select a time period to show traffic summary for. You can select: Last 10 Minutes Last 1 Hour Last 1 Day Last 1 Week Last 1 Month The name of the protocol for which sessions are optimized.
Protocol
Reduction Rate Displays each applications optimization rate. For example, a rate of 80% means the amount of data processed by that application has been reduced by 20%. LAN WAN The amount of data in MB received from the LAN for each application. The amount of data in MB sent across the WAN for each application. The greater the difference between the LAN and WAN data, the greater the amount of data reduced by WAN optimization byte caching, web caching, and protocol optimization. This section shows network bandwidth optimization per time period. A line or column chart compares an applications pre-optimized (LAN data) size with its optimized size (WAN data). Select to refresh the Bandwidth Optimization display. Select a time frame to show bandwidth optimization. You can select: Last 10 Minutes Last 1 Hour Last 1 Day Last 1 Week Last 1 Month Select All to display bandwidth optimization for all applications. Select an individual protocol to display bandwidth optimization for that individual protocol. Select to display bandwidth optimization with a line chart or a column chart.
Protocol
Chart Type
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2317
2318
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
You can use the following command to reformat the hard disk. Use this command if for some reason the disk is not formatted correctly. The command includes the device partition reference number (256) so formats the entire disk and not just the partition. execute disk format 256
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2319
You can use the following command to reformat the partition. The command includes the partition reference number so formats the partition, removing add data from it. You can use this command to delete all data from the partition and to fix partition errors. execute disk format 257
Changing the amount of space allocated for WAN optimization and Web cache storage
From the web-based manager you can go to System > Maintenance > Disk to edit the WAN optimization & Web Cache storage and change the allocation size to limit the amount of storage available for WAN optimization byte caching and web caching. The size is in Mbytes. You can use the following command to change the size of any WAN optimization storage location. For example, in the FortiGate-51B the default WAN optimization storage is Internal. Use the following command to limit the amount of space allocated for WAN optimization to 20 Gbytes config wanopt storage edit Internal set size 20000 end
Adjusting the relative amount of disk space available for byte caching and web caching
By default the config wanopt storage command allocates the same amount disk for byte caching and for web caching. In some cases you may want to adjust the relative amounts of disk space available for these two uses. For example, if you have not implemented web caching you may want to reduce the amount of disk space used for web caching and increase the amount of space used for byte caching. You can adjust the relative amount of disk space used for byte caching using the webcache-storage-percentage option of the config wanopt storage command. This option adjusts the percentage in the range of 0 to 100. The default percentage is 50. To reduce the percentage of space allocated on the Internal disk for web caching to 10% (resulting in the amount of space for byte caching increasing to 90%) enter:
2320
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
config wanopt storage edit Internal set webcache-storage-percentage 10 end You can enter this command at any time without disrupting web caching or byte caching performance. Data may be lost from the cache that is reduced in size.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2321
2322
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2323
For information about configuring the local host ID, peers and authentication groups, see Configuring peers on page 2325 and Configuring authentication groups on page 2326. The authentication group is optional unless the tunnel is a secure tunnel. For more information, see Secure tunneling on page 2328. If the tunnel request includes an authentication group, the authentication will be based on the settings of this group as follows: The server-side FortiGate unit searches its own configuration for the name of the authentication group in the tunnel request. If no match is found, the authentication fails. If a match is found, the server-side FortiGate unit compares the authentication method in the client and server authentication groups. If the methods do not match, the authentication fails. If the authentication methods match, the server-side FortiGate unit tests the peer acceptance settings in its copy of the authentication group. If the setting is Accept Any Peer, the authentication is successful. If the setting is Specify Peer, the server-side FortiGate unit compares the client-side local host ID in the tunnel request with the peer name in the server-side authentication group. If the names match, authentication is successful. If a match is not found, authentication fails. If the setting is Accept Defined Peers, the server-side FortiGate unit compares the client-side local host ID in the tunnel request with the server-side peer list. If a match is found, authentication is successful. If a match is not found, authentication fails.
If the tunnel request does not include an authentication group, authentication will be based on the client-side local host ID in the tunnel request. The server-side FortiGate unit searches its peer list to match the client-side local host ID in the tunnel request. If a match is found, authentication is successful. If a match is not found, authentication fails. If the server-side FortiGate unit successfully authenticates the tunnel request, the serverside FortiGate unit sends back a tunnel setup response message. This message includes the server-side local host ID and the authentication group that matches the one in the tunnel request. The client-side FortiGate unit then performs the same authentication procedure as the server-side FortiGate unit did. If both sides succeed, tunnel setup continues.
2324
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Configuring peers
Configuring peers
When you configure peers, you first need to add the local host ID that identifies the FortiGate unit for WAN optimization and then add the peer host ID and IP address of each FortiGate unit with which a FortiGate unit can create WAN optimization tunnels. To configure WAN optimization peers - web-based manager 1 Go to Wan Opt. & Cache > Peer > Peer. 2 For Local Host ID, enter the local host ID of this FortiGate unit and select Apply. If you add this FortiGate unit as a peer to another FortiGate unit, use this ID as its peer host ID. The local or host ID can contain up to 25 characters and can include spaces. 3 Select Create New to add a new peer. 4 For Peer Host ID, enter the peer host ID of the peer FortiGate unit. This is the local host ID added to the peer FortiGate unit. 5 For IP Address, add the IP address of the peer FortiGate unit. This is the source IP address of tunnel requests sent by the peer, usually the IP address of the FortiGate interface connected to the WAN. 6 Select OK. To configure WAN optimization peers - CLI In this example, the local host ID is named HQ_Peer and has an IP address of 172.20.120.100. Three peers are added, but you can add any number of peers that are on the WAN. 1 Enter the following command to set the local host ID to HQ_Peer. config wanopt settings set host-id HQ_peer end 2 Enter the following commands to add three peers. config wanopt peer edit Wan_opt_peer_1 set ip 172.20.120.100 next edit Wan_opt_peer_2 set ip 172.30.120.100 next edit Wan_opt_peer_3 set ip 172.40.120.100 end
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2325
2326
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
5 Configure Peer Acceptance for the authentication group. Select Accept Any Peer if you do not know the peer host IDs or IP addresses of the peers that will use this authentication group. This setting is most often used for WAN optimization with the FortiClient application or with FortiGate units that do not have static IP addresses, for example units that use DHCP. Select Accept Defined Peers if you want to authenticate with peers added to the peer list only. Select Specify Peer and select one of the peers added to the peer list to authenticate with the selected peer only. For more information, see Configuring peers on page 2325. 6 Select OK. 7 Add the authentication group to a WAN optimization rule to apply the authentication settings in the authentication group to the rule. For more information, see Configuring WAN optimization rules on page 2334. To add an authentication group that uses a certificate- CLI Enter the following command to add an authentication group that uses a certificate and can authenticate all peers added to the FortiGate unit configuration. In this example, the authentication group is named auth_grp_1 and uses a certificate named Example_Cert. config wanopt auth-group edit auth_grp_1 set auth-method cert set cert Example_Cert set peer-accept defined end To add an authentication group that uses a pre-shared key - CLI Enter the following command to add an authentication group that uses a pre-shared key and can authenticate only the peer added to the authentication group. In this example, the authentication group is named auth_peer, the peer that the group can authenticate is named Server_net, and the authentication group uses 123456 as the pre-shared key. In practice you should use a more secure pre-shared key. config wanopt auth-group edit auth_peer set auth-method psk set psk 123456 set peer-accept one set peer Server_net end To add an authentication group that accepts WAN optimization connections from any peer - web-based manager Add an authentication group that accepts any peer for situations where you do not have the Peer Host IDs or IP Addresses of the peers that you want to perform WAN optimization with. This setting is most often used for WAN optimization with the FortiClient application or with FortiGate units that do not have static IP addresses, for example units that use DHCP. An authentication group that accepts any peer is less secure than an authentication group that accepts defined peers or a single peer.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2327
Secure tunneling
The example below sets the authentication method to Pre-shared key. You must add the same password to all FortiGate units using this authentication group. 1 Go to Wan Opt. & Cache > Peer > Authentication Group. 2 Select Create New to add a new authentication group. 3 Configure the authentication group:
Name Authentication Method Password Peer Acceptance Specify any name. Pre-shared key Enter a pre-shared key. Accept Any Peer
To add an authentication group that accepts WAN optimization connections from any peer - CLI In this example, the authentication group is named auth_grp_1. It uses a certificate named WAN_Cert and accepts any peer. config wanopt auth-group edit auth_grp_1 set auth-method cert set cert WAN_Cert set peer-accept any end
Secure tunneling
You can configure WAN optimization rules to use AES-128bit-CBC SSL to encrypt the traffic in the WAN optimization tunnel. WAN optimization uses FortiASIC acceleration to accelerate SSL decryption and encryption of the secure tunnel. Peer-to-peer secure tunnels use the same TCP port as non-secure peer-to-peer tunnels (TCP port 7810). To use secure tunneling, you must select Enable Secure Tunnel in a WAN optimization rule and add an authentication group. The authentication group specifies the certificate or pre-shared key used to set up the secure tunnel. The Peer Acceptance setting of the authentication group does not affect secure tunneling. The FortiGate units at each end of the secure tunnel must have the same authentication group with the same name and the same configuration, including the same pre-shared key or certificate. To use certificates you must install the same certificate on both FortiGate units. For active-passive WAN optimization you can select Enable Secure Tunnel only in the active rule. In peer-to-peer WAN optimization you select Enable Secure Tunnel in the WAN optimization rule on both FortiGate units. For information about active-passive and peer-to-peer WAN optimization, see Configuring WAN optimization rules on page 2329. For a secure tunneling configuration example, see Example: Adding secure tunneling to an active-passive WAN optimization configuration on page 2353. Secure tunneling is also used in the configuration example: Example: SSL offloading for a WAN optimization tunnel on page 2408.
2328
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2329
WAN optimization does not apply source and destination NAT settings included in security policies. This means that selecting NAT or adding virtual IPs in a security policy does not affect WAN optimized traffic. WAN optimization is also not compatible with firewall load balancing. However, traffic accepted by these policies that is not WAN optimized is processed as expected. WAN optimization is compatible with identity-based security policies. If a session is allowed after authentication and if the identity-based policy that allows the session does not include UTM features, the session can be processed by matching WAN optimization rules. traffic shaping is compatible with client/server (active-passive) transparent mode WAN optimization rules. Traffic shaping is ignored for peer-to-peer WAN optimization and for client/server WAN optimization not operating in transparent mode.
If transparent mode is not selected, the source address of the packets received by servers is changed to the address of the server-side FortiGate unit interface that sends the packets to the servers. So servers appear to receive packets from the server FortiGate unit. Routing on the server network is simpler in this case because client addresses are not involved. All traffic appears to come from the server FortiGate unit and not from individual clients.
Note: Do not confuse WAN optimization transparent mode with FortiGate transparent mode. WAN optimization transparent mode is configured in individual WAN optimization rules. FortiGate Transparent mode is a system setting that controls how the FortiGate unit (or a VDOM) processes traffic.
2330
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
match WAN traffic to be optimized that is accepted by a security policy according to source and destination addresses and destination port of the traffic add the WAN optimization techniques to be applied to the traffic.
To view the WAN optimization rule list, go to WAN Opt. & Cache > Rule > Rule.
Figure 318: WAN optimization rule list
Edit Delete
Mode SSL Secure Tunnel Delete icon Edit icon Insert WAN Optimization Rule Before icon Move To icon Move the corresponding rule before or after another rule in the list. For more information, see How list order affects rule matching on page 2332 and Moving a rule to a different position in the rule list on page 2333.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2331
Exception
General
FTP sessions (using port 21) would immediately match the secure tunnel rule. Other kinds of services would not match the FTP rule, so rule evaluation would continue until the search reaches the matching general rule. This rule order has the intended effect. But if you reversed the order of the two rules, positioning the general rule before the FTP rule, all session, including FTP, would immediately match the general rule, and the rule to secure FTP would never be applied. This rule order would not have the intended effect.
Figure 320:Example: secure tunneling for FTP incorrect rule order
General
Exception
Similarly, if specific traffic requires exceptional WAN optimization rule settings, you would position those rules above other potential matches in the rule list. Otherwise, the other matching rules would take precedence, and the required exceptional settings might never be used.
2332
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
The netmask corresponds to the subnet class of the address being added, and can be represented in either dotted decimal or CIDR format. The FortiGate unit automatically converts CIDR-formatted netmasks to dotted decimal format. Example formats: netmask for a single computer: 255.255.255.255, or /32 netmask for a class A subnet: 255.0.0.0, or /8 netmask for a class B subnet: 255.255.0.0, or /16 netmask for a class C subnet: 255.255.255.0, or /24 netmask including all IP addresses: 0.0.0.0
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2333
Valid IP address and netmask formats include: x.x.x.x/x.x.x.x, such as 192.168.1.0/255.255.255.0 x.x.x.x/x, such as 192.168.1.0/24
Note: An IP address 0.0.0.0 with netmask 255.255.255.255 is not a valid source or destination address.
When representing hosts by an IP range, the range indicates hosts with continuous IP addresses in a subnet, such as 192.168.1.[2-10], or 192.168.1.* to indicate the complete range of hosts on that subnet. You can also indicate the complete range of hosts on a subnet by entering 192.168.1.[0-255] or 192.168.1.0-192.168.1.255. Valid IP range formats include: x.x.x.x-x.x.x.x, for example, 192.168.110.100-192.168.110.120 x.x.x.[x-x], for example, 192.168.110.[100-120] x.x.x.*, for a complete subnet, for example: 192.168.110.* x.x.x.[0-255] for a complete subnet, such as 192.168.110.[0-255] x.x.x.0 -x.x.x.255 for a complete subnet, such as 192.168.110.0 192.168.110.255
Note: You cannot use square brackets [ ] or asterisks * when adding addresses to the CLI. Instead you must enter the start and end addresses of the subnet range separated by a dash -. For example, 192.168.20.0-192.168.20.255 for a complete subnet and 192.168.10.10-192.168.10.100 for a range of addresses.
Source
2334
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Destination
Enter an IP address, followed by a forward slash (/), then subnet mask, or enter an IP address range separated by a hyphen. For more information, see WAN optimization address formats on page 2333. Only a packet whose destination address header contains an IP address matching this IP address or address range will be accepted by and subject to this rule. Tip: For a Web Cache Only rule, if you set Destination to 0.0.0.0, the rule caches web pages on the Internet or any network. For a passive rule, the server (passive) destination address range should be compatible with the destination addresses of the matching client (active) rule. To match one passive rule with many active rules, the passive rule destination address range should include the destination addresses of all of the active rules.
Port
Enter a single port number or port number range. Only packets whose destination port number matches this port number or port number range will be accepted by and subject to this rule. For a passive rule, the server (passive) port range should be compatible with the port range of the matching client (active) rule. To match one passive rule with many active rules, the passive rule port range should include the port ranges of all of the active rules. Available only if Mode is set to Full Optimization. Specify whether the rule is Active (client), Passive (server) or if Auto-Detect is Off. If Auto-Detect is Off, the rule is a peer-to-peer rule. For an Active (client) rule, you must select all of the WAN optimization features to be applied by the rule. You can select the protocol to optimize, transparent mode, byte caching, SSL offloading, secure tunneling, and an authentication group. A Passive (server) rule uses the settings in the active rule on the client FortiGate unit to apply WAN optimization settings. You can also select web caching for a passive rule. If Auto-Detect is Off, the rule must include all required WAN optimization features and you must select a Peer for the rule. Select this option to configure peer-to-peer WAN optimization where this rule can start a WAN optimization tunnel with this peer only. Available only if Mode is set to Full Optimization, and Auto-Detect is set to Off or Active. Select CIFS, FTP, or HTTP to apply protocol optimization for one of these protocols. Select MAPI to apply general TCP optimization for the MAPI protocol. For information about protocol optimization, see Protocol optimization on page 2314. Select TCP if the WAN optimization tunnel accepts sessions that use more than one protocol or that do not use the CIFS, FTP, HTTP, or MAPI protocol. Available only if Mode is set to Full Optimization, and Auto-Detect is set to Off. Select the peer host ID of the peer that this peer-to-peer WAN optimization rule will start a WAN optimization tunnel with. You can also select [Create New...] from the list to add a new peer. Available only if Mode is set to Full Optimization, and Auto-Detect is set to Off or Passive. If Auto-Detect is set to Off, then Protocol must be set to HTTP. Select to apply WAN optimization web caching to the sessions accepted by this rule. For more information, see Web caching on page 2359. Available only if Mode is set to Full Optimization and Auto-Detect is set to Active or Off, or if Mode is set to Web Cache Only. Servers receiving packets after WAN optimization see different source addresses depending on whether or not you select Transparent Mode. For more information, see WAN optimization transparent mode on page 2330. Available only if Mode is set to Full Optimization, and Auto-Detect is set to Off or Active. Select to apply WAN optimization byte caching to the sessions accepted by this rule. For more information, see Byte caching on page 2315.
Auto-Detect
Protocol
Peer
Transparent Mode
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2335
Enable SSL
Available only if Auto-Detect is set to Active or Off. Select to apply SSL offloading for HTTPS traffic. You can use SSL offloading to offload SSL encryption and decryption from one or more HTTP servers to the FortiGate unit. If you enable this option, you must configure the rule to accept SSL-encrypted traffic. For example, you can configure the rule to accept HTTPS traffic by setting Port to 443. If you enable SSL offloading, you must also use the CLI command config wanopt ssl-server to add an SSL server for each HTTP server that you want to offload SSL encryption/decryption for. For more information, see SSL offloading for WAN optimization and web caching on page 2403.
Enable Secure Available only if Mode is set to Full Optimization, and Auto-Detect is set to Active or Off. Tunnel If you select Enable Secure Tunnel, the WAN optimization tunnel is encrypted using SSL encryption. You must also add an authentication group to the rule. For more information, see Secure tunneling on page 2328. Authentication Available only if Mode is set to Full Optimization, and Auto-Detect is set to Active or Off. Group Select this option and select an authentication group from the list if you want groups of FortiGate units to authenticate with each other before starting the WAN optimization tunnel. You must also select an authentication group if you select Enable Secure Tunnel. You must add identical authentication groups to both of the FortiGate units that will participate in the WAN optimization tunnel started by the rule. For more information, see Configuring authentication groups on page 2326.
To add a WAN optimization rule - CLI Using the guidance in the previous table, enter the following commands. For more information, see the wanopt and rules listings in the FortiGate CLI Reference. config wanopt rule edit <index_int> set auth-group <auth_group_name> set auto-detect {active | off | passive} set byte-caching {disable | enable} set dst-ip <address_ipv4>[-<address-ipv4>] set mode {full | webcache-only} set peer <peer_name> set port <port_int>[-<port-int>] set proto {cifs | ftp | http | mapi | tcp} set secure-tunnel {disable | enable} set src-ip <address_ipv4>[-<address-ipv4>] set ssl {disable | enable} set status {disable | enable} set transparent {disable | enable} set tunnel-non-http {disable | enable} set tunnel-sharing {express-shared | private | shared} set unknown-http-version {best-effort | reject | tunnel} set webcache {disable | enable} end
2336
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
To drop non-HTTP sessions accepted by the rule set tunnel-non-http to disable, or set it to enable to pass non-HTTP sessions through the tunnel without applying protocol optimization, byte-caching, or web caching. In this case, the FortiGate unit applies TCP protocol optimization to non-HTTP sessions.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2337
2338
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
In a peer-to-peer WAN optimization configuration you create a peer-to-peer WAN optimization rule on the client-side FortiGate unit with Auto-Detect to Off and include the peer host ID of the server-side FortiGate unit. Using this rule, the client-side FortiGate unit can create a WAN optimization tunnel only with the peer that is added to the rule. You do not have to add a rule to the server-side FortiGate unit. But the server-side FortiGate unit peer list must include the Peer Host ID and IP address of the client FortiGate unit. The server-side FortiGate unit uses the WAN optimization settings in the client-side rule.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2339
IP 17 A 2. dd 2 0 re . 3 ss 4. 12
WAN
IP 19 A 2. dd 1 6 re 8 . ss 30 .1 2 A W (L oc n io _2 at gt iz _F tim r er e op rv Pe N e : s D tI os al H
2 Select Apply to save your setting. 3 Select Create New and add a Peer Host ID and the IP Address for the server-side FortiGate unit:
Peer Host ID IP Address Peer_Fgt_2 192.168.30.12
4 Select OK.
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
) n io _1 at gt iz _F tim t er op en Pe i N cl : D A tI W os H al oc (L
rk
2340
5 Go to Policy > Policy > Policy and add a security policy to the client-side FortiGate unit that accepts traffic to be optimized:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action port1 all port2 all always ANY ACCEPT
6 Go to WAN Opt. & Cache > Rule > Rule and select Create New. 7 Configure the rule:
Mode Source Destination Port Auto-Detect Protocol Peer Transparent Mode Enable Byte Caching Full Optimization 172.20.120.* 192.168.10.* 1-65535 Off MAPI Peer_Fgt_2 Select Select
8 Select OK. The rule is added to the bottom of the WAN optimization list. 9 If required, move the rule to a different position in the list so that the rule accepts the required MAPI sessions. Depending on your rule list configuration, this may involve moving the rule above more general rules that would also match MAPI traffic. For more information, see How list order affects rule matching on page 2332 and Moving a rule to a different position in the rule list on page 2333. To configure the server-side FortiGate unit 1 Go to WAN Opt. & Cache > Peer > Peer and enter a Local Host ID for the server-side FortiGate unit:
Local Host ID Peer_Fgt_2
2 Select Apply to save your setting. 3 Select Create New and add a Peer Host ID and the IP Address for the peer side FortiGate unit:
Peer Host ID IP Address Peer_Fgt_1 172.20.34.12
4 Select OK.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2341
2342
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
To configure the server-side FortiGate unit 1 Add the Local Host ID to the server-side FortiGate configuration: config wanopt settings set host-id Peer_Fgt_2 end 2 Add the client-side Local Host ID to the server-side peer list: config wanopt peer edit Peer_Fgt_1 set ip 192.168.30.12 end
You can use the following get and diagnose commands to display information about how WAN optimization is operating Enter the following command on the client-side FortiGate unit to display WAN optimization tunnel protocol statistics. The http tunnel and tcp tunnel parts of the command output below shows that WAN optimization has been processing HTTP and TCP packets. get test wad 11 wad tunnel protocol stats: http tunnel bytes_in=1751767 bytes_out=325468 ftp tunnel bytes_in=0 bytes_out=0 cifs tunnel bytes_in=0 bytes_out=0 mapi tunnel bytes_in=0 bytes_out=0 tcp tunnel bytes_in=3182253 bytes_out=200702 maintenance tunnel bytes_in=11800 bytes_out=15052
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2343
Enter the following command to display the current WAN optimization peers. You can use this command to make sure all peers are configured correctly. The command output for the client side FortiGate unit shows one peer with IP address 192.168.20.1, peer name Web_servers, and with 10 active tunnels. get test wad 26 peer name=Web_servers ip=192.168.20.1 vd=0 version=1 tunnels(active/connecting/failover)=10/0/0 sessions=0 n_retries=0 version_valid=true Enter the following command to list all of the running WAN optimization tunnels and display information about each one. The command output for the client-side FortiGate unit shows 10 tunnels all created by peer-to-peer WAN optimization rules (auto-detect set to off). diagnose wad tunnel list Tunnel: id=100 type=manual vd=0 shared=no uses=0 state=3 peer name=Web_servers id=100 ip=192.168.30.12 SSL-secured-tunnel=no auth-grp= bytes_in=348 bytes_out=384 Tunnel: id=99 type=manual vd=0 shared=no uses=0 state=3 peer name=Web_servers id=99 ip=192.168.30.12 SSL-secured-tunnel=no auth-grp= bytes_in=348 bytes_out=384 Tunnel: id=98 type=manual vd=0 shared=no uses=0 state=3 peer name=Web_servers id=98 ip=192.168.30.12 SSL-secured-tunnel=no auth-grp= bytes_in=348 bytes_out=384 Tunnel: id=39 type=manual vd=0 shared=no uses=0 state=3 peer name=Web_servers id=39 ip=192.168.30.12 SSL-secured-tunnel=no auth-grp= bytes_in=1068 bytes_out=1104 Tunnel: id=7 type=manual vd=0 shared=no uses=0 state=3 peer name=Web_servers id=7 ip=192.168.30.12 SSL-secured-tunnel=no auth-grp= bytes_in=1228 bytes_out=1264 Tunnel: id=8 type=manual vd=0 shared=no uses=0 state=3 peer name=Web_servers id=8 ip=192.168.30.12 SSL-secured-tunnel=no auth-grp= bytes_in=1228 bytes_out=1264 Tunnel: id=5 type=manual vd=0 shared=no uses=0 state=3 peer name=Web_servers id=5 ip=192.168.30.12
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2344
SSL-secured-tunnel=no auth-grp= bytes_in=1228 bytes_out=1264 Tunnel: id=4 type=manual vd=0 shared=no uses=0 state=3 peer name=Web_servers id=4 ip=192.168.30.12 SSL-secured-tunnel=no auth-grp= bytes_in=1228 bytes_out=1264 Tunnel: id=1 type=manual vd=0 shared=no uses=0 state=3 peer name=Web_servers id=1 ip=192.168.30.12 SSL-secured-tunnel=no auth-grp= bytes_in=1228 bytes_out=1264 Tunnel: id=2 type=manual vd=0 shared=no uses=0 state=3 peer name=Web_servers id=2 ip=192.168.30.12 SSL-secured-tunnel=no auth-grp= bytes_in=1228 bytes_out=1264 Tunnels total=10 manual=10 auto=0
You can do this by adding three active WAN optimization rules to the client-side FortiGate unit, one for each protocolwith port set to 80 for the HTTP rule, 21 for the FTP rule and 1-65535 for the CIFS rule. Then you arrange the rules in the WAN optimization rule list with the CIFS rule last because the HTTP and FTP rules include single port numbers.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2345
IP 17 A 2. dd 30 re .1 ss 20 .1
WAN
IP 19 A 2. dd 16 re 8. ss 20 .1 Lo ca e ve id ) r S le e r- ru _s ve e eb er iv W S ss : a ID (p st o lH
2 Select Apply to save your setting. 3 Select Create New and add a Peer Host ID and the IP Address for the server-side FortiGate unit:
Peer Host ID IP Address Web_servers 192.168.20.1 WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Lo
ca
ork
rs
2346
4 Select OK. 5 Go to Policy > Policy > Policy and select Create New to add a security policy to the client-side FortiGate unit to accept the traffic to be optimized:
Source Interface/Zone Source Address Destination Interface/Zone Schedule Service Action port1 all port2
To add the active rules to the client-side FortiGate unit 1 Go to WAN Opt. & Cache > Rule > Rule. 2 Select Create New to add the active rule to optimize CIFS traffic from IP addresses 172.20.120.100 to 172.20.120.200:
Mode Source Destination Port Auto-Detect Protocol Transparent Mode Full Optimization 172.20.120.[100-200] 192.168.10.* 1 - 65535 Active CIFS Select
3 Select OK. 4 Select Create New to add the active rule to optimize HTTP traffic for IP addresses 172.20.120.100 to 172.20.120.150:
Mode Source Destination Port Auto-Detect Protocol Transparent Mode Full Optimization 172.20.120.[100-150] 192.168.10.* 80 Active HTTP Select
5 Select OK. 6 Select Create New to add the active rule to optimize FTP traffic from IP addresses 172.20.120.151 172.20.120.200:
Mode Source Destination Full Optimization 172.20.120.[151-200] 192.168.10.*
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2347
7 Select OK. 8 If required, use the Move To icon to change the order of the rules in the list so that the HTTP and FTP rules are above the CIFS rule in the list. You may need to do this if you have other WAN optimization rules in the list. For more information, see How list order affects rule matching on page 2332 and Moving a rule to a different position in the rule list on page 2333. To configure the server-side FortiGate unit 1 Go to WAN Opt. & Cache > Peer > Peer and enter a Local Host ID for the server-side FortiGate unit:
Local Host ID Web_servers
2 Select Apply to save your setting. 3 Select Create New and add a Peer Host ID and the IP Address for the client-side FortiGate unit:
Peer Host ID IP Address User_net 172.30.120.1
4 Select OK. 5 Go to WAN Opt. & Cache > Rule > Rule and select Create New. 6 Add the passive rule. The source address matches the 172.20.120.100 to 172.20.120.200 IP address range and the 1-65535 port range. You can also enable web caching for the HTTP traffic:
Mode Source Destination Port Auto-Detect Enable Web Cache Full Optimization 172.20.120.[100-200] 192.168.10.* 1-65535 Passive Select
7 Select OK. The rule is added to the bottom of the rule list. 8 If required, move the rule to a different position in the list so that the tunnel request from the client-side FortiGate unit matches with this rule. For more information, see Moving a rule to a different position in the rule list on page 2333.
2348
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2349
2 Add the following active rule to optimize HTTP traffic for IP addresses 172.20.120.100 to 172.20.120.150: config wanopt rule edit 3 set auto-detect active set src-ip 172.20.120.100-172.20.120.150 set dst-ip 192.168.10.0-192.168.10.255 set port 80 end Accept default settings for transparent (enable), proto (http), status (enable), mode (full), byte-caching (enable), ssl (disable), securetunnel (disable), auth-group (null), unknown-http-version (tunnel), and tunnel-non-http (disable). 3 Add the following active rule to optimize FTP traffic from IP addresses 172.20.120.151 172.20.120.200: config wanopt rule edit 4 set auto-detect active set src-ip 172.20.120.151-172.20.120.200 set dst-ip 192.168.10.0-192.168.10.255 set port 21 set proto ftp end Accept default settings for transparent (enable), status (enable), mode (full), byte-caching (enable), ssl (disable), secure-tunnel (disable), authgroup (null), unknown-http-version (tunnel), and tunnel-non-http (disable). 4 If required, use the move command to change the order of the rules in the list so that the HTTP and FTP rules are above the CIFS rule in the list. You may need to do this if you have other WAN optimization rules in the list. For more information, see How list order affects rule matching on page 2332 and Moving a rule to a different position in the rule list on page 2333. To configure the server-side FortiGate unit 1 Add the Local Host ID to the server-side FortiGate configuration: config wanopt settings set host-id Web_servers end 2 Add the client-side Local Host ID to the server-side peer list: config wanopt peer edit User_net set ip 172.20.120.1 end
2350
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
3 Add the following passive rule to the server-side FortiGate unit: config wanopt rule edit 5 set auto-detect passive set src-ip 172.20.120.[100-200] set dst-ip 192.168.10.0-192.168.10.255 set port 1-65535 set webcache enable end Accept default settings for status (enable) and mode (full). 4 If required, use the move command to move the rule to a different position in the list so that the tunnel request from the client-side FortiGate unit matches with this rule. For more information, see Moving a rule to a different position in the rule list on page 2333.
You can use the following get and diagnose commands to display information about how WAN optimization is operating Enter the following command to display WAN optimization tunnel protocol statistics. The http tunnel and tcp tunnel parts of the command output below shows that WAN optimization has been processing HTTP and TCP packets. get test wad 11 wad tunnel protocol stats: http tunnel bytes_in=1751767 bytes_out=325468 ftp tunnel bytes_in=0 bytes_out=0 cifs tunnel bytes_in=0 bytes_out=0
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2351
mapi tunnel bytes_in=0 bytes_out=0 tcp tunnel bytes_in=3182253 bytes_out=200702 maintenance tunnel bytes_in=11800 bytes_out=15052 Enter the following command to display the current WAN optimization peers. You can use this command to make sure all peers are configured correctly. The command output for the client side FortiGate unit shows one peer with IP address 192.168.20.1, peer name Web_servers, and with 10 active tunnels. get test wad 26 peer name=Web_servers ip=192.168.20.1 vd=0 version=1 tunnels(active/connecting/failover)=10/0/0 sessions=0 n_retries=0 version_valid=true Enter the following command to list all of the running WAN optimization tunnels and display information about each one. The command output shows 3 tunnels all created by peer-to-peer WAN optimization rules (auto-detect set to on). diagnose wad tunnel list Tunnel: id=139 type=auto vd=0 shared=no uses=0 state=1 peer name= id=0 ip=unknown SSL-secured-tunnel=no auth-grp=test bytes_in=744 bytes_out=76 Tunnel: id=141 type=auto vd=0 shared=no uses=0 state=1 peer name= id=0 ip=unknown SSL-secured-tunnel=no auth-grp=test bytes_in=727 bytes_out=76 Tunnel: id=142 type=auto vd=0 shared=no uses=0 state=1 peer name= id=0 ip=unknown SSL-secured-tunnel=no auth-grp=test bytes_in=727 bytes_out=76 Tunnels total=3 manual=0 auto=3
2352
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
WAN optimization configuration examples Example: Adding secure tunneling to an active-passive WAN optimization configuration
IP 17 A 2. dd 30 re .1 ss 20 .1
WAN
IP 19 A 2 . dd 16 re 8. ss 20 .1 c Lo e ve id ) r S le e r- ru _s ve e eb er iv W S s : as ID (p st o H al
Lo
ca
rk
rs
2353
Example: Adding secure tunneling to an active-passive WAN optimization configuration WAN optimization configuration examples
2 Add an authentication group and WAN optimization rule to the client-side FortiGate unit. 3 Configure peers on the server-side FortiGate unit. 4 Add the same authentication group and add a WAN optimization rule to the server-side FortiGate unit. Also note that if you perform any additional actions between procedures, your configuration may have different results.
2 Select Apply to save your setting. 3 Select Create New and add a Peer Host ID and the IP Address for the server-side FortiGate unit:
Peer Host ID IP Address Web_servers 192.168.20.1
4 Select OK. 5 Go to Policy > Policy > Policy and select Create New to add a security policy to the client-side FortiGate unit to accept the traffic to be optimized:
Source Interface/Zone Source Address Destination Interface/Zone Schedule Service Action port1 all port2
To add the authentication group and WAN optimization rule to the client-side FortiGate unit 1 Go to Wan Opt. & Cache > Peer > Authentication Group. 2 Select Create New to add a new authentication group to be used for secure tunneling:
Name Authentication Method Password Peer Acceptance Auth_Secure_Tunnel Pre-shared key 2345678 Accept Any Peer
3 Select OK.
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2354
WAN optimization configuration examples Example: Adding secure tunneling to an active-passive WAN optimization configuration
4 Go to Wan Opt. & Cache > Rule > Rule. 5 Select Create New to add an active rule that enables secure tunneling and includes the authentication group:
Mode Source Destination Port Auto-Detect Protocol Transparent Mode Enable Byte Caching Enable Secure Tunnel Authentication Group Full Optimization 172.20.120.[100-200] 192.168.10.* 80 Active HTTP Select Select Select Auth_Secure_Tunnel
6 Select OK. To configure peers on the server-side FortiGate unit 1 Go to WAN Opt. & Cache > Peer > Peer and enter a Local Host ID for the server-side FortiGate unit:
Local Host ID Web_servers
2 Select Apply to save your setting. 3 Select Create New and add a Peer Host ID and the IP Address for the client-side FortiGate unit:
Peer Host ID IP Address User_net 172.30.120.1
4 Select OK. To add the authentication group and WAN optimization rule to the server-side FortiGate unit 1 Go to Wan Opt. & Cache > Peer > Authentication Group. 2 Select Create New and add a new authentication group to be used for secure tunneling:
Name Authentication Method Password Peer Acceptance Auth_Secure_Tunnel Pre-shared key 2345678 Accept Any Peer
3 Go to WAN Opt. & Cache > Rule and select Create New. 4 Add the passive rule. The source address matches the 172.20.120.100 to 172.20.120.200 IP address range and the 1-65535 port range. You can also enable web caching for HTTP traffic:
Mode Source Destination Full Optimization 172.20.120.[100-200] 192.168.10.*
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2355
Example: Adding secure tunneling to an active-passive WAN optimization configuration WAN optimization configuration examples
5 Select OK.
2356
WAN optimization configuration examples Example: Adding secure tunneling to an active-passive WAN optimization configuration
set proto http set secure-tunnel enable set auth-group Auth_Secure_Tunnel end Leave the rest of the settings at their default values. To configure peers on the server-side FortiGate unit 1 Add the Local Host ID to the server-side FortiGate configuration: config wanopt settings set host-id Web_servers end 2 Add the client-side Local Host ID to the server-side peer list: config wanopt peer edit User_net set ip 172.20.120.1 end To add the authentication group and WAN optimization rule to the server-side FortiGate unit 1 Add a new authentication group to be used for secure tunneling: config wanopt auth-group edit Auth_Secure_Tunnel set auth-method psk set psk 2345678 end Leave peer-accept at its default value. 2 Add the following passive rule to the server-side FortiGate unit: config wanopt rule edit 5 set auto-detect passive set src-ip 172.20.120.[100-200] set dst-ip 192.168.10.0-192.168.10.255 set port 1-65535 set webcache enable end Leave status (enable) and mode (full) at their default values.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2357
Example: Adding secure tunneling to an active-passive WAN optimization configuration WAN optimization configuration examples
2358
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Web caching
FortiGate web caching is a form of object caching that accelerates web applications and web servers by reducing bandwidth usage, server load, and perceived latency. Web caching supports caching of HTTP 1.0 and HTTP 1.1 web sites. Web caching can also support caching HTTPS sessions provided that you import the correct certificate. See RFC 2616 for information about web caching for HTTP 1.1. Web caching does not cache audio and video streams including Flash videos and streaming content. Web caching involves storing HTML pages, images, servlet responses and other webbased objects for later retrieval. These objects are stored in the web cache storage location defined by the config wanopt storage command. You can also go to System > Maintenance > Disk to view the storage locations on the FortiGate unit hard disks. There are three significant advantages to using web caching to improve HTTP and WAN performance: reduced bandwidth consumption because fewer requests and responses go over the WAN or Internet. reduced web server load because there are fewer requests for web servers to handle. reduced latency because responses for cached requests are available from a local FortiGate unit instead of from across the WAN or Internet.
You can use web caching to cache any web traffic that passes through the FortiGate unit, including web pages from web servers on a LAN, WAN or on the Internet. You apply web caching by enabling the web caching option in any security policy and WAN optimization rule. When enabled in a security policy, web caching is applied to all HTTP sessions accepted by the security policy. If the security policy is an explicit web proxy security policy, the FortiGate unit caches explicit web proxy sessions. When enabled in a WAN optimization rule, the FortiGate unit caches HTTP traffic processed by that WAN optimization rule. You can add WAN optimization rules that only apply web caching. You can also add web caching to WAN optimization rules for HTTP traffic that also include byte caching, protocol optimization, and other WAN optimization features. Web caching caches compressed and non-compressed versions of the same file separately. If the HTTP protocol considers the compressed and uncompressed versions of a file the same object, only the compressed or uncompressed file will be cached. This section contains the following topics: Web caching in security policies Web Caching only WAN optimization Web caching for active-passive WAN optimization Web caching for peer-to-peer WAN optimization Exempting web sites from web caching Changing web cache settings Web Cache monitoring
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2359
Web caching
2360
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Web caching
2 Select OK to save the security policy. 3 If required, adjust the position of the security policy in the internal > wan1 policy list to make sure all outgoing connections to the Internet use this policy
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
e at he tiG ac or C F b e W
2361
Web caching
To cache HTTP traffic on port 80 and 8080 1 Go to Policy > Policy > Protocol Options and either add a new a new protocol options profile or edit the default profile. 2 Change the HTTP settings of the protocol options profile to look for HTTP traffic on ports 80 and 8080:
Port 80, 8080
Adjust other settings as required or leave them as the defaults. 3 Edit the security policy created in the previous procedure. Select UTM and set Protocol Options to the protocol options profile you added or changed.
2362
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Web caching
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2363
Web caching
0 11 0 11 10 10 10
eb W ca ch e
2364
Web caching
3 Go to Policy > Policy > Policy and select Create New to add a security policy that accepts traffic to be web cached:
Source Interface/Zone Source Address Destination Interface/Zone Schedule Service Action port1 Client_Net port2
To add a Web Cache Only WAN optimization rule 1 Go to WAN Opt. & Cache > Rule > Rule and select Create New. 2 Select Web Cache Only. 3 Configure the Web Cache Only rule:
Mode Source Destination Port Web Cache Only 172.20.120.* 192.168.10.* 80 Tip: Usually you would set the port to 80 to cache normal HTTP traffic. But you can change the Port to a different number (for example 8080) or to a port number range so that the FortiGate unit provides web caching for HTTP traffic using other ports. Transparent Mode Enable SSL Select Transparent Mode Do not select Enable SSL. Tip: In this example SSL offloading is disabled. For an example of a reverse proxy Web Cache Only configuration that also includes SSL offloading, see Example: SSL offloading for a WAN optimization tunnel on page 2408.
4 Select OK. The rule is added to the bottom of the WAN optimization list. 5 If required, use the Move To icon to move the rule to a different position in the list. The order of the rules in the list significantly affects how the rules are applied. For more information, see How list order affects rule matching on page 2332 and Moving a rule to a different position in the rule list on page 2333.
2365
Web caching
set start-ip 172.20.120.0 set end-ip 172.20.120.255 end 2 Add the firewall address for the web server network: config firewall address edit Web_Server_Net set type iprange set start-ip 192.168.10.0 set end-ip 192.168.10.255 end 3 Add a security policy that accepts traffic to be web cached: config firewall policy edit 2 set srcintf port1 set dstintf port2 set srcaddr Client_Net set dstaddr Web_Server_Net set action accept set service HTTP set schedule always end end To add a Web Cache Only WAN optimization rule 1 Add the following Web Cache Only rule: config wanopt rule edit 2 set mode webcache-only set src-ip 172.20.120.0-172.20.120.255 set dst-ip 192.168.10.0-192.168.10.255 set port 80 set peer Peer_Fgt_2 end Accept default settings for transparent (enable), status (enable), ssl (disable), unknown-http-version (tunnel), and tunnel-non-http (disable).
Tip: In this example, SSL offloading is disabled. For an example of a reverse proxy Web Cache Only configuration that also includes SSL offloading, see Example: SSL offloading for a WAN optimization tunnel on page 2408.
2 If required, use the move command to move the rule to a different position in the list. The order of the rules in the list significantly affects how the rules are applied. For more information, see How list order affects rule matching on page 2332 and Moving a rule to a different position in the rule list on page 2333.
2366
Web caching
If you can connect, check WAN optimization monitoring in WAN Opt. & Cache > Monitor > Monitor. If WAN optimization has been forwarding the traffic, the WAN optimization monitor should show the HTTP protocol that has been optimized and the reduction rate in WAN bandwidth usage. If you cannot connect, try the following to diagnose the problem: Review your configuration and make sure all details, such as address ranges, peer names and IP addresses, are correct. Confirm that the security policy on the Client-Side FortiGate unit is accepting traffic for the 192.168.10.0 network and that this security policy does not include UTM options. You can do this by checking the FortiGate session table from the dashboard. Look for sessions that use the policy ID of this policy Check routing on the FortiGate units and on the user and web server networks to make sure packets can be forwarded as required. The FortiGate units must be able to communicate with each other, routing on the user network must allow packets destined for the web server network to be received by the client side FortiGate unit, and packets from the server side FortiGate unit must be able to reach the web servers etc.
You can use the following get and diagnose commands to display information about how WAN optimization is operating Enter the following command on the client-side FortiGate unit to display WAN optimization tunnel protocol statistics. The http tunnel and tcp tunnel parts of the command output below shows that WAN optimization has been processing HTTP packets. If the http bytes in and bytes out fields are zero, then WAN optimization is not accepting HTTP packets. get test wad 11 wad tunnel protocol stats: http tunnel bytes_in=1749865 bytes_out=25926 ftp tunnel bytes_in=0 bytes_out=0 cifs tunnel bytes_in=0 bytes_out=0 mapi tunnel bytes_in=0 bytes_out=0 tcp tunnel bytes_in=0 bytes_out=0 maintenance tunnel bytes_in=0 bytes_out=0 You can use the following command to display information about the WAN optimization web cache daemon. The command will only display information if the web cache daemon is running and the statistics displayed show the number of open connections and other indications of activity: diagnose wacs stats Disk 0 /Internal-2B6375792136C707/wa_cs Current number of open connections: 2 Number of terminated connections: 7 Number of requests -- Adds: 206 (0 repetitive keys), Lookups: 860, Conflict incidents: 0 Percentage of missed lookups: 88.49 Communication is blocked for 0 client(s) Disk usage: 5196 KB (11%)
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2367
Web caching
IP 17 A 2. dd 10 re .1 ss 0. 1
WAN
eb W ca ch e
IP 17 A 2. dd 20 re .2 ss 0. 1
Lo
ca
0 11 0 11 10 10 10
e id ) e de S le h i r- ru ac r_S ve e C e er iv b rv S s e e as W S (p le ID: b t na s E Ho l ca
Lo
rk
2368
Web caching
2 Configure the server-side FortiGate unit by adding peers and a passive WAN optimization rule that includes web caching. If you perform any additional actions between procedures, your configuration may have different results.
2 Select Apply to save your setting. 3 Select Create New and add a Peer Host ID and the IP Address for the server-side FortiGate unit:
Peer Host ID IP Address Server_Side 172.20.20.1
4 Select OK. 5 Go to Policy > Policy > Policy and add a security policy that accepts traffic to be web cached:
Source Interface/Zone Source Address Destination Interface/Zone Schedule Service Action port1 all port2
6 Go to WAN Opt. & Cache > Rule > Rule and select Create New. 7 Configure the rule:
Mode Source Destination Port Auto-Detect Protocol Transparent Mode Enable Byte Caching Full Optimization 172.20.120.* 192.168.10.* 1-65535 Active HTTP Select Transparent Mode Select Enable Byte Caching
8 Select OK. The rule is added to the bottom of the WAN optimization list.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2369
Web caching
9 If required, use the Move To icon to move the rule to a different position in the list. The order of the rules in the list significantly affects how the rules are applied. For more information, see How list order affects rule matching on page 2332 and Moving a rule to a different position in the rule list on page 2333.
2370
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Web caching
To configure the server-side FortiGate unit 1 Go to WAN Opt. & Cache > Peer > Peer and enter a Local Host ID for the server-side FortiGate unit:
Local Host ID Server_Side
2 Select Apply to save your setting. 3 Select Create New and add a Peer Host ID and the IP Address for the client-side FortiGate unit:
Peer Host ID IP Address Client_Side 172.10.10.1
4 Go to WAN Opt. & Cache > Rule > Rule and select Create New. 5 Configure the passive web cache rule:
Mode Source Destination Port Auto-Detect Enable Web Cache Full Optimization 172.20.120.* 192.168.10.* 1-65535 Passive Select
6 Select OK. The rule is added to the bottom of the WAN optimization rule list. 7 If required, use the Move To icon to move the rule to a different position in the list. For more information, see Moving a rule to a different position in the rule list on page 2333.
2371
Web caching
4 Configure the following active rule: config wanopt rule edit 2 set auto-detect active set src-ip 172.20.120.0-172.20.120.255 set dst-ip 192.168.10.0-192.168.10.255 set port 1-65535 set proto http end Accept default settings for transparent (enable), status (enable), mode (full), byte-caching (enable), ssl (disable), secure-tunnel (disable), authgroup (null), unknown-http-version (tunnel), and tunnel-non-http (disable). 5 If required, use the move command to move the rule to a different position in the list. The order of the rules in the list significantly affects how the rules are applied. For more information, see How list order affects rule matching on page 2332 and Moving a rule to a different position in the rule list on page 2333. To configure the server-side FortiGate unit 1 Add the Local Host ID to the server-side FortiGate configuration: config wanopt settings set host-id Server_Side end 2 Add the client-side Local Host ID to the server-side peer list: config wanopt peer edit Client_Side set ip 172.10.10.1 end 3 Add the following passive web cache rule: config wanopt rule edit 5 set auto-detect passive set src-ip 172.20.120.0-172.20.120.255 set dst-ip 192.168.10.0-192.168.10.255 set port 1-65535 set webcache enable end Accept default settings for status (enable) and mode (full). 4 If required, use the move command to move the rule to a different position in the list so that the tunnel request from the client-side FortiGate unit matches with this rule. For more information, see Moving a rule to a different position in the rule list on page 2333.
2372
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Web caching
IP 17 A 2. dd 2 0 re .3 ss 4. 12
WAN
eb W ca ch e
IP 19 A 2. dd 16 re 8. ss 30 .1 2
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Lo
0 11 0 11 10 10 10
Lo
e ) id id d S S ire r_ r- qu ve ve re er S er S ule D: r I o t (n os lH ca e
rk
2373
Web caching
2 Select Apply to save your setting. 3 Select Create New and add a Peer Host ID and the IP Address for the server-side FortiGate unit:
Peer Host ID IP Address Server_Side 192.168.30.12
4 Select OK. 5 Go to Policy > Policy > Policy and add a security policy that accepts traffic to be web cached:
Source Interface/Zone Source Address Destination Interface/Zone Schedule Service Action port1 all port2
6 Go to WAN Opt. & Cache > Rule > Rule and select Create New. 7 Configure the rule:
Mode Source Destination Port Auto-Detect Full Optimization 172.20.120.* 192.168.10.* 80 Off
2374
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Web caching
Protocol Peer Enable Web Cache Transparent Mode Enable Byte Caching
8 Select OK. The rule is added to the bottom of the WAN optimization list. 9 If required, use the Move To icon to move the rule to a different position in the list. The order of the rules in the list significantly affects how the rules are applied. For more information, see How list order affects rule matching on page 2332 and Moving a rule to a different position in the rule list on page 2333. To configure the server-side FortiGate unit 1 Go to WAN Opt. & Cache > Peer > Peer and enter a Local Host ID for the server FortiGate unit:
Local Host ID Server_Side
2 Select Apply to save your setting. 3 Select Create New and add a Peer Host ID and the IP Address for the client-side FortiGate unit:
Peer Host ID IP Address Client_Side 172.20.34.12
4 Select OK.
2375
Web caching
set service ANY set schedule always end end 4 Configure the following active rule: config wanopt rule edit 5 set auto-detect off set src-ip 172.20.120.* set dst-ip 192.168.10.* set port 80 set proto http set peer Server_Side set web cache enable end Accept default settings for transparent (enable), status (enable), mode (full), byte-caching (enable), ssl (disable), secure-tunnel (disable), authgroup (null), unknown-http-version (tunnel), and tunnel-non-http (disable). 5 If required, use the move command to the rule to a different position in the list. The order of the rules in the list significantly affects how the rules are applied. For more information, see How list order affects rule matching on page 2332 and Moving a rule to a different position in the rule list on page 2333. To configure the server-side FortiGate unit 1 Add the Local Host ID to the server-side FortiGate configuration: config wanopt settings set host-id Server_Side end 2 Add the client-side Local Host ID to the server-side peer list: config wanopt peer edit Client_Side set ip 172.20.34.12 end
2376
Web caching
set status enable end end Enter the following command to enable the web cache exempt list and add two IP address URLs and a web page URL to the list. config wanopt webcache set explicit enable set cache-exemption enable config cache-exemption-list edit 1 set url-pattern "192.168.1.121" next edit 2 set url-pattern "google.com/test123/321" next edit 3 set url-pattern "1.1.1.1" next end end You can also add URLs to the web cache exempt list by going to WAN Opt. & Cache > Cache > Exempt List. However, the web cache exempt feature must be enabled from the CLI.
Always revalidate
Select to always revalidate requested cached objects with content on the server before serving them to the client.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2377
Web caching
Fresh factor
Set the fresh factor as a percentage. The default is 100, and the range is 1 to 100%. For cached objects that do not have an expiry time, the web cache periodically checks the server to see if the objects have expired. The higher the Fresh Factor the less often the checks occur. For example, if you set the Max TTL value and Default TTL to 7200 minutes (5 days) and set the Fresh Factor to 20, the web cache check the cached objects 5 times before they expire, but if you set the Fresh Factor to 100, the web cache will check once.
Max TTL
The maximum amount of time (Time to Live) an object can stay in the web cache without the cache checking to see if it has expired on the server. The default is 7200 minutes (120 hours or 5 days) and the range is 1 to 5256000 minutes (5256000 minutes in a year).
Min TTL
The minimum amount of time an object can stay in the web cache before the web cache checks to see if it has expired on the server. The default is 5 minutes and the range is 1 to 5256000 minutes (5256000 minutes in a year).
Default TTL
The default expiry time for objects that do not have an expiry time set by the web server. The default expiry time is 1440 minutes (24 hours) and the range is 1 to 5256000 minutes (5256000 minutes in a year).
Proxy FQDN
The fully qualified domain name (FQDN) for the proxy server. This is the domain name to enter into browsers to access the proxy server. This field is for information only can be changed from the explicit web proxy configuration.
2378
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Web caching
Ignore
Select the following options to ignore some web caching features. If-modified-since By default, if the time specified by the if-modified-since (IMS) header in the client's conditional request is greater than the last modified time of the object in the cache, it is a strong indication that the copy in the cache is stale. If so, HTTP does a conditional GET to the Overlay Caching Scheme (OCS), based on the last modified time of the cached object. Enable ignoring if-modified-since to override this behavior. HTTP 1.1 conditionals HTTP 1.1 provides additional controls to the client over the behavior of caches toward stale objects. Depending on various cache-control headers, the FortiGate unit can be forced to consult the OCS before serving the object from the cache. For more information about the behavior of cache-control header values, see RFC 2616. Enable ignoring HTTP 1.1 Conditionals to override this behavior. Pragma-no-cache Typically, if a client sends an HTTP GET request with a pragma no-cache (PNC) or cache-control no-cache header, a cache must consult the OCS before serving the content. This means that the FortiGate unit always re-fetches the entire object from the OCS, even if the cached copy of the object is fresh. Because of this behavior, PNC requests can degrade performance and increase server-side bandwidth utilization. However, if you enable ignoring Pragma-no-cache, then the PNC header from the client request is ignored. The FortiGate unit treats the request as if the PNC header is not present. IE Reload Some versions of Internet Explorer issue Accept / header instead of Pragma no-cache header when you select Refresh. When an Accept header has only the / value, the FortiGate unit treats it as a PNC header if it is a type-N object. Enable ignoring IE reload to cause the FortiGate unit to ignore the PNC interpretation of the Accept / header.
Revalidated Pragma-no-cache
The pragma-no-cache (PNC) header in a client's request can affect how efficiently the FortiGate unit uses bandwidth. If you do not want to completely ignore PNC in client requests (which you can do by selecting to ignore Pragma-no-cache, above), you can nonetheless lower the impact on bandwidth usage by selecting Revalidate Pragma-nocache. When you select Revalidate Pragma-no-cache, a client's non-conditional PNC-GET request results in a conditional GET request sent to the OCS if the object is already in the cache. This gives the OCS a chance to return the 304 Not Modified response, which consumes less server-side bandwidth, because the OCS has not been forced to otherwise return full content. By default, Revalidate Pragma-no-cache is disabled and is not affected by changes in the top-level profile.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2379
Web caching
Most download managers make byte-range requests with a PNC header. To serve such requests from the cache, you should also configure byte-range support when you configure the Revalidate pragma-no-cache option.
Web Cache monitoring is viewed from WAN Opt. & Cache > Monitor > Cache Monitor.
Refresh Reset Period Refresh the information displayed on the web cache monitor. Reset web cache statistics displayed by the web cache monitor. Select a time period to show traffic summary for. You can select: Last 10 Minutes Last 1 Hour Last 1 Day Last 1 Week Last 1 Month A pie chart that shows the number of web sessions that were cached and the number that were not. A line graph that shows the amount of HTTP traffic in kbytes on the LAN and WAN over time. The differences in LAN and WAN traffic is the amount of traffic cached.
2380
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
The client-side FortiGate-300A unit uses policy routing to offload WAN optimization of HTTP and FTP sessions by re-directing all HTTP and FTP sessions to the FortiGate-311B unit. The FortiGate-311B and 620B units work together to apply web caching, byte caching, and HTTP and FTP protocol optimization to HTTP and FTP sessions. The WAN optimization tunnel between the 311B and the 620B operates in Transparent mode. The FortiGate-311B unit also web caches all Internet HTTP traffic from the client network. The client-side FortiGate-311B unit also applies virus scanning (and optionally other UTM features) to the HTTP and FTP traffic. To do this, the FortiGate-311B unit is configured for multiple VDOM operation. A new VDOM named Wanopt is added to the FortiGate-311B. HTTP and FTP sessions are received by the root VDOM. Security policies in the root VDOM accept HTTP and FTP sessions and apply virus scanning (and optionally other UTM features) to them. To preserve the source addresses of the HTTP and FTP sessions, NAT is not enabled for these policies. The sessions are then routed through an inter-VDOM link to the Wanopt VDOM. The Wanopt VDOM includes security policies that accept the HTTP and FTP sessions and WAN optimization rules that apply WAN optimization and web caching to the sessions.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2381
WAN
1 0. 4 .1 rt 1 0 2 po 2 . 0. 17 1 .1 rt 1 0 po 2 . 17
.1 po 0. r t 1 10 0 .2
10
po 10 rt2 .2 0. 20 .
po
rt 5 rt po 0.1 .2
1 20
The server-side FortiGate-620B unit includes a passive WAN optimization rule that accepts WAN optimization tunnel requests from the FortiGate-311B unit. Only one passive rule is required on the FortiGate-620B unit. The FortiGate-620B unit also forwards sessions to the server-side FortiGate-1000A cluster which forwards them to the server network. WAN optimization is operating in Transparent mode, so the packets from the client network include their client network source IP addresses. To preserve these source IP addresses, the security policies on the FortiGate-1000A cluster that accept the sessions from the FortiGate- 620B unit should not apply NAT. If the security policies were to apply NAT, the client network addresses would be replaced with the port1 IP address of the FortiGate-1000A cluster and the client network source IP addresses would be lost. The optimizing FortiGate units operate in NAT/Route mode and are directly connected to the Internet. This configuration requires two Internet connections and two Internet IP addresses for each network. (Reminder: All of the example IP addresses shown in Figure are private IP addresses because all Fortinet documentation examples use only private IP addresses.) If these extra Internet IP addresses are not available, you can install a router between the WAN and the FortiGate units or install the optimizing FortiGate units out of path on the private networks and configure routing on the private networks to route HTTP and FTP sessions to the optimizing FortiGate units.
Configuration steps
This example is divided into client-side and the server-side steps, as configured through the web-based manager and the CLI. Use either method, but for best results, follow the procedures in the order given. Also, note that if you perform any additional actions between procedures, your configuration may have different results. This example includes the following sections: Client-side configuration steps - web-based manager on page 2383 Server-side configuration steps - web-based manager on page 2390
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
Lo
F 1B t_ 31 en e- li at : C tiG ID or t F os lH ca gt
F A 00 10 e- r at s t e tiG lu or c
19 2. 19 2. 20 1 rt po 0.2
10 Lo ca
16 rt .2 po 20 0.
.2
.2
F 0B er_ 62 rv e- e at : S tiG ID or t F os lH gt
2382
Client-side configuration steps - CLI on page 2393 Server-side configuration steps - CLI on page 2400
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2383
3 Select Create New to add a security policy that allows all port5 to port4 FTP sessions:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action NAT port5 all port4 all always FTP ACCEPT Select
Configure other policy settings that you may require. 4 Select OK. 5 If required, use the Move To icon to change the order of the security policies. Follow the normal rules for ordering security policies in the policy list. For example, move specific rules above general rules. 6 Go to Router > Static > Policy Route and select Create New to add a policy route to redirect HTTP traffic received at port5 to exit the FortiGate unit using port4. Set the gateway address of the route to 172.10.10.2 so that the HTTP sessions are directed to the FortiGate-311B port1 interface. For HTTP traffic, the protocol is 6 (TCP) and the destination port is 80:
Protocol Incoming interface Source address / mask Destination Ports Type of Service Outgoing interface Gateway Address 6 port5 0.0.0.0/0.0.0.0 From 80 to 80 bit pattern: 00 (hex) bit mask: 00 (hex) port4 172.10.10.2
7 Select OK. 8 Select Create New to add a policy route to redirect FTP traffic received at port5 to exit the FortiGate unit using port4. Set the gateway address of the route to 172.10.10.2 so that the HTTP sessions are directed to the FortiGate-311B port1 interface. For FTP traffic, the protocol is 6 (TCP) and the destination port is 21:
Protocol Incoming interface Source address / mask Destination Ports Type of Service Outgoing interface Gateway Address 6 port5 0.0.0.0/0.0.0.0 From 21 to 21 bit pattern: 00 (hex) bit mask: 00 (hex) port4 172.10.10.2
9 Select OK.
2384
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
To configure the FortiGate-311B unit for multiple VDOM operation and add an interVDOM link 1 Go to System > Status > Dashboard. 2 In the System Information widget, select Enable beside Virtual Domain to enable multiple VDOM operation and log back in to the web-based manager. 3 Go to System > VDOM and select Create New to add a new virtual domain named Wanopt. 4 Select OK twice to add the Wanopt VDOM with default resource limits. 5 Go to System > Network, edit the port10 interface, and configure the following settings to add the port10 interface to the Wanopt VDOM:
Virtual Domain Addressing Mode IP/Netmask Wanopt Manual 10.10.10.2/24
Configure other settings that you may require. 6 Select OK. 7 Select Create New > VDOM Link and add an inter-VDOM link with the following settings:
Name Interface #0 Virtual Domain IP/Netmask Interface #1 Virtual Domain IP/Netmask Wanopt 172.1.1.2/24 root 172.1.1.1/24 Vlink
8 Select OK. To configure routing for the FortiGate-311B root VDOM 1 Log in to the root VDOM. 2 Go to Router > Static and select Create New to add a default route. The destination of the default route is the inter-VDOM link interface in the root VDOM. The gateway of the default route is the IP address of the inter-VDOM link interface in the Wanopt VDOM. The result is the default route sends all traffic out the inter-VDOM link and into the Wanopt VDOM:
Destination IP/Mask Device Gateway Distance 0.0.0.0/0.0.0.0 Vlink0 172.1.1.2 10
3 Select OK.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2385
4 Select Create New to add a route to send return traffic from the server network destined for the client network out the port1 interface to the port4 interface of the FortiGate-300A which has IP address 172.10.10.1:
Destination IP/Mask Device Gateway Distance 172.20.120.0/24 port1 172.10.10.1 10
5 Select OK. To add security policies to the FortiGate-311B root VDOM to accept HTTP and FTP sessions received at port1 destined for Vlink0 and apply virus scanning (and optionally other UTM features) 1 Log in to the root VDOM. 2 Go to Policy > Policy > Policy and select Create New to add a security policy that accepts HTTP sessions received at port1 destined for Vlink0 and applies virus scanning and other UTM features:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action NAT port1 all Vlink0 all always HTTP ACCEPT Do not select. Tip: To preserve the source addresses of the HTTP sessions, NAT should not be enabled for this policy. UTM Select UTM, select a protocol options profile and select an antivirus profile. Optionally select other UTM profiles.
Configure other policy settings that you may require. You can also use more specific security addresses or add one security policy that accepts both FTP and HTTP traffic. 3 Select OK.
2386
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
4 Go to Policy > Policy > Policy and select Create New to add a security policy that accepts FTP sessions received at port1 and destined for Vlink0 and applies virus scanning and other UTM features to them:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action NAT port1 all Vlink0 all always FTP ACCEPT Do not select. Tip: To preserve the source addresses of the FTP sessions, NAT should not be enabled for this policy. UTM Select UTM, select a protocol options profile and select an antivirus profile. Optionally select other UTM profiles.
Configure other policy settings that you may require. You can also use more specific security addresses or add one security policy that accepts both FTP and HTTP traffic. 5 Select OK. To configure routing for the FortiGate-311B Wanopt VDOM 1 Log in to the Wanopt VDOM. 2 Go to Router > Static and select Create New to add a default route. The destination of the default route is the port10 interface. The gateway of the default route is the next hop router that the port10 interface connects with:
Destination IP/Mask Device Gateway Distance 0.0.0.0/0.0.0.0 port10 (next hop router IP address) 10
3 Select OK. 4 Select Create New to add a route to send return traffic from the server network destined for the client network out the Vlink1 interface to the Vlink0 interface in the root VDOM, which has the IP address 172.1.1.2:
Destination IP/Mask Device Gateway Distance 172.20.120.0/24 Vlink1 172.1.1.2 10
5 Select OK.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2387
To add security policies to the FortiGate-311B Wanopt VDOM to accept HTTP and FTP sessions received at the Vlink1 interface of the inter-VDOM link and destined for port10 1 Log in to the Wanopt VDOM. 2 Go to Policy > Policy > Policy and select Create New to add a security policy that accepts HTTP sessions received at Vlink1 and destined for port10:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action NAT Vlink1 all port10 all always HTTP ACCEPT Select Tip: NAT is ignored for all HTTP sessions for the server network because these sessions are intercepted by a full optimization WAN optimization rule. However, HTTP sessions for the Internet are intercepted by the Web Cache Only rule, so source NAT is required for replies. UTM Do not select. Tip: Do not select UTM because you cannot apply UTM and WAN optimization to the same session in the same VDOM. UTM was applied to the session in the root VDOM.
Configure other settings that you may require. 3 Select OK. 4 Go to Policy > Policy > Policy and select Create New to add a security policy that accepts FTP sessions received at Vlink1 and destined for port10:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action NAT Vlink1 all port10 all always FTP ACCEPT Select Tip: NAT is ignored for all FTP sessions for the server network because these sessions are intercepted by a full optimization WAN optimization rule. However, FTP sessions for the Internet are allowed to reach their destination, so source NAT is required for replies. UTM Do not select. Tip: Do not select UTM because you cannot apply UTM and WAN optimization to the same session in the same VDOM. UTM was applied to the session in the root VDOM.
2388
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
5 Select OK. To configure peers for the FortiGate-311B Wanopt VDOM 1 Log in to the Wanopt VDOM. 2 Go to WAN Opt. & Cache > Peer and enter a Local Host ID for the client-side FortiGate-311B unit:
Local Host ID Client_Fgt
3 Select Apply to save your setting. 4 Select Create New and add a Peer Host ID and the IP Address for the server-side FortiGate-620B unit:
Peer Host ID IP Address Server_Fgt 10.20.20.2
5 Select OK. To add WAN optimization rules for HTTP and FTP to the FortiGate-311B Wanopt VDOM 1 Log in to the Wanopt VDOM. 2 Go to WAN Opt. & Cache > Rule. 3 Select Create New to add an active rule to optimize HTTP traffic from IP addresses on the Client network (172.20.120.0) with a destination address on the server network (192.168.10.0):
Mode Source Destination Port Auto-Detect Protocol Transparent Mode Enable Byte Caching Enable SSL Enable Secure Tunnel Full Optimization 172.20.120.* 192.168.10.* 80 Active HTTP Select Select Do not select. Do not select. Tip: For improved privacy you can select this option and add an authentication group to both optimizing FortiGate units. Authentication Group Do not select.
4 Select OK. 5 Select Create New to add an active rule to optimize FTP traffic from IP addresses on the Client network (172.20.120.0) with a destination address on the server network (192.168.10.0):
Mode Source Destination Port Auto-Detect Full Optimization 172.20.120.* 192.168.10.* 21 Active
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2389
Protocol Transparent Mode Enable Byte Caching Enable SSL Enable Secure Tunnel
FTP Select Select Do not select. Do not select. Tip: For improved privacy you can select this option and add an authentication group to both optimizing FortiGate units.
Authentication Group
Do not select.
6 Select OK. 7 Select Create New to add a rule to web cache HTTP traffic from IP addresses on the Client network (172.20.120.0) with any destination address:
Mode Source Destination Port Transparent Mode Enable SSL Web Cache Only 172.20.120.* 0.0.0.0 80 Select Do not select.
8 Select OK. 9 If required, use the Move To icon to move the Web Cache Only rule below the full optimization HTTP and FTP rules in the list. The Web Cache Only rule should be below the full optimization rules because it will match all HTTP traffic and you need HTTP sessions with destination address 192.168.10.0 to match the full optimization HTTP rule.
2390
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
To configure routing for the FortiGate-620B unit 1 Go to Router > Static and select Create New to add a default route. The destination of the default route is the port16 interface. The gateway of the default route is the next hop router that the port16 interface connects with:
Destination IP/Mask Device Gateway Distance 0.0.0.0/0.0.0.0 port16 (next hop router IP address) 10
2 Select OK. 3 Select Create New to add a route to send traffic for the server network out port1 to the port5 interface of the FortiGate-1000A cluster, which has the IP address 192.20.20.1:
Destination IP/Mask Device Gateway Distance 192.168.10.0/24 port1 192.20.20.1 10
4 Select OK. To configure peers for the server-side FortiGate-620B unit 1 Go to WAN Opt. & Cache > Peer and enter a Local Host ID for the server-side FortiGate-620B unit:
Local Host ID Server_Fgt
2 Select Apply to save your setting. 3 Select Create New and add a Peer Host ID and the IP Address for the client-side FortiGate-311B unit:
Peer Host ID IP Address Client_Fgt 10.10.10.2
4 Select OK. To add a passive WAN optimization rule to the server-side FortiGate-620B unit You can add one passive WAN optimization rule to the server-side FortiGate-620B unit for both active rules on the FortiGate-311B unit. This rule can also allow the FortiGate-620B to perform WAN optimization with other client-side devices as long as the required Peer Host IDs are added to the FortiGate-620B configuration and to the client-side configurations. 1 Go to WAN Opt. & Cache > Rule and select Create New to add a passive rule that accepts any WAN optimization tunnel request:
Mode Source Destination Port Full Optimization 0.0.0.0 192.168.10.* 1-65535 Tip: You can also use a narrower port range such as 21-80 or add two rules, one with port set to 80 and one with port set to 21.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2391
Passive Select
2 Select OK. 3 If required, use the Move To icon to move the rule to a different position in the list so that the tunnel request from the client-side FortiGate unit matches with this rule. For more information, see Moving a rule to a different position in the rule list on page 2333. To configure the FortiGate-1000A cluster to accept HTTP and FTP connections at port5 and forward them out port1 to the server network 1 Go to Firewall Objects > Address and select Create New to add an address for the server network:
Address Name Type Subnet / IP Range Interface Server_Net Subnet / IP Range 192.168.10.* Any
2 Select OK. 3 Go to Firewall Objects > Address and select Create New to add an address for the client network:
Address Name Type Subnet / IP Range Interface Client_Net Subnet / IP Range 172.20.120.* Any
4 Select OK. 5 Go to Policy > Policy > Policy and select Create New to add a security policy that accepts HTTP sessions at port5 destined for port1 and the server network:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action NAT port5 Client_Net port1 Server_Net always HTTP ACCEPT Do not select. Tip: WAN optimization is operating in Transparent mode so the packets from the client network include their client network source IP addresses. To preserve these source IP addresses the security policies on the FortiGate-1000A cluster that accept the sessions from the FortiGate- 620B unit should not apply NAT. If the policies were to apply NAT, the client network addresses would be replaced with the port1 IP address of the FortiGate-1000A cluster and the client network source IP addresses would be lost.
6 Select OK.
2392
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
7 Go to Policy > Policy > Policy and select Create New to add a security policy that accepts FTP sessions at port5 destined for port1 and the server network:
Source Interface/Zone Source Address Destination Interface/Zone Destination Address Schedule Service Action NAT port5 Client_Net port1 Server_Net always FTP ACCEPT Do not select Tip: As described above, selecting NAT would cause the loss of client network source IP addresses.
8 Select OK.
2393
2 Add a security policy that allows all port5 to port4 HTTP sessions: config firewall policy edit 1 set srcintf port5 set dstintf port4 set srcaddr all set dstaddr all set action accept set service HTTP set schedule always set nat enable end end Configure other policy settings that you may require. For example, you could add virus scanning (and optionally other UTM features). 3 Add a security policy that allows all port5 to port4 FTP sessions: config firewall policy edit 2 set srcintf port5 set dstintf port4 set srcaddr all set dstaddr all set action accept set service FTP set schedule always set nat enable end end Configure other policy settings that you may require. 4 If required, use the move command to change the order of the policies in the policy list. Follow the normal rules for ordering security policies in the policy list. For example, move specific rules above general rules. 5 Add a policy route to redirect HTTP traffic received at port5 to exit the FortiGate unit using port4. Set the gateway address of the route to 172.10.10.2 so that the HTTP sessions are directed to the FortiGate-311B port1 interface. For HTTP traffic, the protocol is 6 (TCP) and the destination port is 80: config router policy edit 1 set protocol 6 set input-device port5 set output-device port4 set src 0.0.0.0/0.0.0.0 set dst 0.0.0.0/0.0.0.0 set start-port 80 set end port 80 set gateway 172.10.10.2 end end Accept default settings for tos (0x00) and tos-mask (0x00).
2394
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
6 Add a policy route to redirect FTP traffic received at port5 to exit the FortiGate unit using port4. Set the gateway address of the route to 172.10.10.2 so that the FTP sessions are directed to the FortiGate-311B port1 interface. For FTP traffic, the protocol is 6 (TCP) and the destination port is 21: config router policy edit 1 set protocol 6 set input-device port5 set output-device port4 set src 0.0.0.0/0.0.0.0 set dst 0.0.0.0/0.0.0.0 set start-port 21 set end port 21 set gateway 172.10.10.2 end end Accept default settings for tos (0x00) and tos-mask (0x00). To configure the FortiGate-311B unit for multiple VDOM operation and add an interVDOM link 1 Enable multiple VDOM operation and log back in to the web-based manager: config system global set vdom-admin enable end 2 Log back in to the CLI. 3 Add a new virtual domain named Wanopt. config vdom edit Wanopt end 4 Add the port10 interface to the Wanopt VDOM: config global config system interface edit port10 set vdom Wanopt set IP 10.10.10.2/24 end end 5 Add an inter-VDOM named Vlink and configure the Vlink0 and Vlink1 interfaces: config global config system vdom-link edit Vlink end config system interface edit Vlink0 set vdom root set ip 172.1.1.1/24 next edit Vlink1 set vdom Wanopt set ip 172.1.1.2/24 end
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2395
end To configure routing for the FortiGate-311B root VDOM 1 Log in to the root VDOM from the CLI. 2 Add a default route. The destination of the default route is the inter-VDOM link interface in the root VDOM. The gateway of the default route is the IP address of the inter-VDOM link interface in the Wanopt VDOM. The result is the default route sends all traffic out the inter-VDOM link and into the Wanopt VDOM: config router static edit 1 set dst 0.0.0.0/0.0.0.0 set device Vlink0 set gateway 172.1.1.2 set distance 10 end 3 Add a route to send return traffic from the server network destined for the client network out the port1 interface to the port4 interface of the FortiGate-300A which has IP address 172.10.10.1: config router static edit 2 set dst 172.20.120.0/24 set device port1 set gateway 172.10.10.1 set distance 10 end To add security policies to the FortiGate-311B root VDOM to accept HTTP and FTP sessions received at port1 and destined for Vlink0 and apply virus scanning and optionally other UTM features) 1 Log in to the root VDOM from the CLI. 2 Add a security policy that accepts HTTP sessions received at port1 and applies virus scanning to them: config firewall policy edit 20 set srcintf port1 set dstintf Vlink0 set srcaddr all set dstaddr all set action accept set service HTTP set schedule always set utm-status enable set profile-protocol-options default set av-profile scan end
Tip: To preserve the source addresses of the HTTP sessions, NAT should not be enabled for this policy.
Configure other policy settings that you may require. You can also use more specific firewall addresses or add one security policy that accepts both FTP and HTTP traffic.
2396
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
3 Add a security policy that accepts FTP sessions received at port1 and applies virus scanning to them: config firewall policy edit 20 set srcintf port1 set dstintf Vlink0 set srcaddr all set dstaddr all set action accept set service FTP set schedule always set utm-status enable set profile-protocol-options default set av-profile scan end
Tip: To preserve the source addresses of the HTTP sessions, NAT should not be enabled for this policy.
Configure other policy settings that you may require. You can also use more specific firewall addresses or add one security policy that accepts both FTP and HTTP traffic. To configure routing for the FortiGate-311B Wanopt VDOM 1 Log in to the Wanopt VDOM from the CLI. 2 Add a default route. The destination of the default route is the port10 interface. The gateway of the default route is the next hop router that the port10 interface connects with: config router static edit 1 set dst 0.0.0.0/0.0.0.0 set device port10 set gateway (next hop router IP address) set distance 10 end 3 Add a route to send return traffic from the server network destined for the client network out the Vlink1 interface to the Vlink0 interface in the root VDOM, which has the IP address 172.1.1.2: config router static edit 2 set dst 172.20.120.0/24 set device Vlink1 set gateway 172.1.1.2 set distance 10 end To add security policies to the FortiGate-311B Wanopt VDOM to accept HTTP and FTP sessions received at the Vlink1 interface of the inter-VDOM link destined for port10 1 Log in to the Wanopt VDOM from the CLI. 2 Add a security policy that accepts HTTP sessions received at Vlink1 and destined for port10:
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2397
config firewall policy edit 20 set srcintf Vlink1 set dstintf port10 set srcaddr all set dstaddr all set action accept set service HTTP set schedule always set nat enable end
Tip: NAT is ignored for all HTTP sessions for the server network because these sessions are intercepted by a full optimization WAN optimization rule. However, HTTP sessions for the Internet are intercepted by the Web Cache Only rule, so source NAT is required for replies. Tip: Do not enable UTM because you cannot apply UTM features and WAN optimization to the same session in the same VDOM. Virus scanning was applied to the session in the root VDOM.
Configure other settings that you may require. 3 Go to Policy > Policy > Policy and select Create New to add a security policy that accepts FTP sessions received at Vlink1 and destined for port10: config firewall policy edit 20 set srcintf Vlink1 set dstintf port10 set srcaddr all set dstaddr all set action accept set service FTP set schedule always set nat enable end
Tip: NAT is ignored for all HTTP sessions for the server network because these sessions are intercepted by a full optimization WAN optimization rule. However, HTTP sessions for the Internet are intercepted by the Web Cache Only rule, so source NAT is required for replies. Tip: Do not enable UTM because you cannot apply UTM features and WAN optimization to the same session in the same VDOM. Virus scanning was applied to the session in the root VDOM.
Configure other settings that you may require. To configure peers for the FortiGate-311B Wanopt VDOM 1 Log in to the Wanopt VDOM from the CLI. 2 Add the Local Host ID for the client-side FortiGate-311B unit: config wanopt settings set host-id Client_Fgt end
2398
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
3 Add a Peer Host ID and the IP Address for the server-side FortiGate-620B unit. config wanopt peer edit Server_Fgt set ip 10.20.20.2 end To add WAN optimization rules for HTTP and FTP to the FortiGate-311B Wanopt VDOM 1 Log in to the Wanopt VDOM from the CLI. 2 Add an active rule to optimize HTTP traffic from IP addresses on the Client network (172.20.120.0) with a destination address on the server network (192.168.10.0): config wanopt rule edit 4 set auto-detect active set src-ip 172.20.120.0-172.20.120.255 set dst-ip 192.168.10.0-192.168.10.255 set port 80 set proto http end Accept default settings for transparent (enable), status (enable), mode (full), byte-caching (enable), ssl (disable), secure-tunnel (disable), authgroup (null), unknown-http-version (tunnel), and tunnel-non-http (disable).
Tip: For improved privacy you can enable secure-tunnel and add an authentication group to both optimizing FortiGate units.
3 Add an active rule to optimize FTP traffic from IP addresses on the Client network (172.20.120.0) with a destination address on the server network (192.168.10.0): config wanopt rule edit 5 set auto-detect active set src-ip 172.20.120.0-172.20.120.255 set dst-ip 192.168.10.0-192.168.10.255 set port 21 set proto ftp end Accept default settings for transparent (enable), status (enable), mode (full), byte-caching (enable), ssl (disable), secure-tunnel (disable), authgroup (null), unknown-http-version (tunnel), and tunnel-non-http (disable).
Tip: For improved privacy you can enable secure-tunnel and add an authentication group to both optimizing FortiGate units.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2399
4 Add a rule to web cache HTTP traffic from IP addresses on the Client network (172.20.120.0) with any destination address: config wanopt rule edit 6 set mode webcache-only set src-ip 172.20.120.0-172.20.120.255 set dst-ip 0.0.0.0 set port 80 set proto http end Accept default settings for transparent (enable), status (enable), ssl (disable), unknown-http-version (tunnel), and tunnel-non-http (disable). 5 If required, use the move command to move the Web Cache Only rule below the full optimization HTTP and FTP rules in the list. The Web Cache Only rule should be below the full optimization rules because it will match all HTTP traffic and you need HTTP sessions with destination address 192.168.10.0 to match the full optimization HTTP rule For more information, see Moving a rule to a different position in the rule list on page 2333.
2400
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2 Add a route to send traffic for the server network out port1 to the port5 interface of the FortiGate-1000A cluster, which has the IP address 192.20.20.1: config router static edit 2 set dst 192.168.10.0/24 set device port1 set gateway 192.20.20.1 set distance 10 end To configure peers for the server-side FortiGate-620B unit 1 Add the Local Host ID for the server-side FortiGate-620B unit: config wanopt settings set host-id Server_Fgt end 2 Add a Peer Host ID and the IP Address for the client-side FortiGate-311B unit: config wanopt peer edit Client_Fgt set ip 10.10.10.2 end To add a passive WAN optimization rule to the server-side FortiGate-620B unit You can add one passive WAN optimization rule to the server-side FortiGate-620B unit for both active rules on the FortiGate-311B unit. This rule can also allow the FortiGate-620B to perform WAN optimization with other client-side devices as long as the required Peer Host IDs are added to the FortiGate-620B configuration and to the client-side configurations. 1 Go to WAN Opt. & Cache > Rule and select Create New to add a passive rule that accepts any WAN optimization tunnel request: config wanopt rule edit 5 set auto-detect passive set src-ip 0.0.0.0 set dst-ip 192.168.10.0-192.168.10.255 set port 1-65535 set webcache enable end Accept default settings for status (enable) and mode (full).
Tip: You can also use a narrower port range such as 21-80 or add two rules, one with port set to 80 and one with port set to 21.
2 If required, use the move command to move the rule to a different position in the list so that the tunnel request from the client-side FortiGate unit matches with this rule. For more information, see Moving a rule to a different position in the rule list on page 2333.
FortiOS Handbook v3: WAN Optimization, Web Cache, Explicit Proxy, and WCCP 01-431-99686-20110629 http://docs.fortinet.com/ Feedback
2401
To configure the FortiGate-1000A cluster to accept HTTP and FTP connections at port5 and forward them out port1 to the server network 1 Add a firewall address for the server network: config firewall address edit Server_Net set type iprange set start-ip 192.168.10.0 set end-ip 192.168.10.255 end 2 Add a firewall address for the client network: config firewall address edit Client_Net set type iprange set start-ip 172.20.120.0 set end-ip 172.20.120.255 end 3 Go to Policy > Policy > Policy and select Create New to add an security policy that accepts HTTP sessions at port5 destined for port1 and the server network: config firewall policy edit 10 set srcintf port5 set dstintf port1 set srcaddr Client_Net set dstaddr Server_Net set action accept set service HTTP set schedule always end end
Tip: WAN optimization is operating in Transparent mode so the packets from the client network include their client network source IP addresses. To preserve these source IP addresses, the security policies on the FortiGate-1000A cluster that accept the sessions from the FortiGate- 620B unit should not apply NAT. If the policies were to apply NAT, the client network addresses would be replaced with the port1 IP address of the FortiGate1000A cluster and the client network source IP addresses would be lost.
4 Go to Policy > Policy > Policy and select Create New to add an security policy that accepts FTP sessions at port5 destined for port1 and the server network: config firewall policy edit 11 set srcintf port5 set dstintf port1 set srcaddr Client_Net set dstaddr Server_Net set action accept set service FTP set schedule always end end
Tip: As described above, selecting NAT would cause the loss of the client network source IP addresses.
2402
WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 4.0 MR3 01-431-99686-20110629 http://docs.fortinet.com/ Feedback