Quantcast
Channel: troubleshooting – Fortinet Cookbook
Viewing all 47 articles
Browse latest View live

Troubleshooting your FortiGate installation

$
0
0

If your FortiGate does not function as desired after completing the installation, try the following troubleshooting methods.

Most methods can be used for FortiGates in both NAT/Route and Transparent mode. Any exceptions are marked.

1. Use FortiExplorer if you can’t connect to the FortiGate over Ethernet.

If you can’t connect to the FortiGate GUI or CLI, you may be able to connect using FortiExplorer. See your FortiGate unit’s QuickStart Guide for details.

2. Check for equipment issues.

Verify that all network equipment is powered on and operating as expected. Refer to the QuickStart Guide for information about connecting your FortiGate to the network. You will also find detailed information about the FortiGate unit LED indicators.

3. Check the physical network connections.

Check the cables used for all physical connections to ensure that they are fully connected and do not appear damaged. Make sure that each cable connects to the correct device and the correct Ethernet port on that device. Also, check the Unit Operation widget in the Dashboard to make sure the connected interfaces are shown in green.

4. Verify that you can connect to the internal IP address of the FortiGate unit (NAT/Route mode).

Connect to the web-based manager from the FortiGate’s internal interface by browsing to its IP address. From the PC, try to ping the internal interface IP address; for example, ping 192.168.1.99.

If you cannot connect to the internal interface, verify the IP configuration of the PC. If you can ping the interface but can’t connect to the web-based manager, check the settings for administrative access on that interface.

5. Verify that you can connect to the management IP address of the FortiGate unit (Transparent mode).

From the internal network, attempt to ping the management IP address. If you cannot connect to the internal interface, verify the IP configuration of the PC and make sure the cables are connected and all switches and other devices on the network are powered on and operating. Go to the next step when you can connect to the internal interface.

6. Check the FortiGate interface configurations (NAT/Route mode).

Check the configuration of the FortiGate interface connected to the internal network, and check the configuration of the FortiGate interface that connects to the Internet to make sure Addressing Mode is set to the correct mode.

7. Verify the security policy configuration.

Verify that the internal interface to Internet-facing interface security policy has been added and is located near the top of the policy list. Check the Sessions column to ensure that traffic has been processed (if this column does not appear, right-click on the title row, select Sessions, and select Apply).

If you are using NAT/Route mode, check the configuration of the policy to make sure that NAT is turned on and that Use Destination Interface Address is selected.

8. Verify that you can connect to the Internet-facing interface’s IP address (NAT/Route mode).

Ping the IP address of the FortiGate’s Internet-facing interface. If you cannot connect to the interface, the FortiGate unit is not allowing sessions from the internal interface to the Internet-facing interface.

9. Verify the static routing configuration (NAT/Route mode).

Verify that the default route is correct. View the Routing Monitor and verify that the default route appears in the list as a static route. Along with the default route, you should see two routes shown as Connected, one for each connected FortiGate interface.

10. Verify that you can connect to the gateway provided by your ISP.

Ping the default gateway IP address from a PC on the internal network. If you cannot reach the gateway, contact your ISP to verify that you are using the correct gateway.

11. Verify that you can communicate from the FortiGate unit to the Internet.

Access the FortiGate CLI and use the command execute ping 8.8.8.8. You can also use the execute traceroute 8.8.8.8 command to troubleshoot connectivity to the Internet.

12. Verify the DNS configurations of the FortiGate unit and the PCs.

Check for DNS errors by pinging or using traceroute to connect to a domain name; for example: ping www.fortinet.com. If the name cannot be resolved, the FortiGate unit or PC cannot connect to a DNS server and you should confirm that the DNS server IP addresses are present and correct.

13. Confirm that the FortiGate unit can connect to the FortiGuard network.

Once registered, the FortiGate unit obtains antivirus and application control and other updates from the FortiGuard network. Once the FortiGate unit is on your network, confirm that it can reach FortiGuard.

First, check the License Information widget to make sure that the status of all FortiGuard services matches the services that you have purchased. Go to your FortiGuard settings and expand Web Filtering and Email Filtering Options. Select Test Availability. After a minute, the GUI should show a successful connection.

14. Consider changing the MAC address of your external interface (NAT/Route mode).

Some ISPs do not want the MAC address of the device connecting to their network cable to change and so you may have to change the MAC address of the Internet-facing interface using the following CLI command:

config system interface
  edit
    set macaddr
  end
end

15. Check the FortiGate bridge table (Transparent mode).

When the FortiGate is in Transparent mode, the unit acts like a bridge sending all incoming traffic out on the other interfaces. The bridge is between interfaces on the FortiGate unit. Each bridge listed is a link between interfaces. Where traffic is flowing between interfaces, you expect to find bridges listed. If you are having connectivity issues and there are no bridges listed, that is a likely cause. Check for the MAC address of the interface or device in question.

To list the existing bridge instances on the FortiGate unit, use the following CLI command:

  diagnose netlink brctl name host root.b
  show bridge control interface root.b host.
  fdb: size=2048, used=25, num=25, depth=1
  Bridge root.b host table
  port no device devname mac addr ttl attributes
  3 4 wan1 00:09:0f:cb:c2:77 88
  3 4 wan1 00:26:2d:24:b7:d3 0
  3 4 wan1 00:13:72:38:72:21 98
  4 3 internal 00:1a:a0:2f:bc:c6 6
  1 6 dmz 00:09:0f:dc:90:69 0 Local Static
  3 4 wan1 c4:2c:03:0d:3a:38 81
  3 4 wan1 00:09:0f:15:05:46 89
  3 4 wan1 c4:2c:03:1d:1b:10 0
  2 5 wan2 00:09:0f:dc:90:68 0 Local Static

If your device’s MAC address is not listed, the FortiGate unit cannot find the device on the network. Check the device’s network connections and make sure they are connected and operational.

16. Either reset the FortiGate unit to factory defaults or contact the technical assistance center.

If all else fails, reset the FortiGate unit to factory defaults using the CLI command execute factoryreset. When prompted, type y to confirm the reset.

You can also contact the technical assistance center. For contact information, go to support.fortinet.com.

Resetting the FortiGate unit to factory defaults puts the unit back into NAT/Route mode.

The post Troubleshooting your FortiGate installation appeared first on Fortinet Cookbook.


FortiGuard troubleshooting

$
0
0

This section contains tips to help you with some common challenges of using FortiGuard.

FortiGuard services appear as expired/unreachable.

Verify that you have registered your FortiGate unit, purchased FortiGuard services and that the services have not expired at support.fortinet.com.

Services are active but still appear as expired/unreachable.

Verify that the FortiGate unit can communicate with the Internet by accessing FortiGate CLI and using the command execute ping 8.8.8.8. You can also use the execute traceroute 8.8.8.8 command to troubleshoot connectivity to the Internet.

The FortiGate is connected to the Internet but can’t communicate with FortiGuard.

If you have not done so already, verify your DNS settings and ensure that an unblocked port is being used for FortiGuard traffic.

If the FortiGate interface connected to the Internet gets its IP address using DHCP, go to System > Network > Interfaces and edit the Internet-facing interface. Ensure that
Override internal DNS is selected.

Communication errors remain.

FortiGate units contact the FortiGuard Network by sending UDP packets with typical source ports of 1027 or 1031, and destination ports of 53 or 8888. The FDN reply packets would then 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.

To avoid port blocking, you can configure your FortiGate unit to use higher-numbered ports, such as 2048-20000, using the following CLI command:

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.

The post FortiGuard troubleshooting appeared first on Fortinet Cookbook.

Choosing your FortiGate’s switch mode

$
0
0

This section contains information to help you determine which internal switch mode your FortiGate should use, a decision that should be made before the FortiGate is installed.

What is the internal switch mode?

The internal switch mode determines how the FortiGate’s physical ports are managed by the FortiGate. The two main modes are Switch mode and Interface mode.

What are Switch mode and Interface mode and why are they used?

In Switch mode, all the internal interfaces are part of the same subnet and treated as a single interface, called either lan or internal by default, depending on the FortiGate model. Switch mode is used when the network layout is basic, with most users being on the same subnet.

In Interface mode, the physical interfaces of the FortiGate unit are handled individually, with each interface having its own IP address. Interfaces can also be combined by configuring them as part of either hardware or software switches, which allow multiple interfaces to be treated as a single interface. This mode is ideal for complex networks that use different subnets to compartmentalize the network traffic.

Which mode is your FortiGate in by default?

The default mode that a FortiGate starts in varies depending on the model. To determine which mode your FortiGate unit is in, go to System > Network > Interfaces. Locate the
lan or internal interface. If the interface is listed as a Physical Interface in the Type column, then your FortiGate is in Switch mode. If the interface is a Hardware Switch, then your FortiGate is in Interface mode.

How do you change the mode?

If you need to change the mode your FortiGate unit is in, first make sure none of the physical ports that make up the lan or internal interface are referenced in the FortiGate configuration (for example, in a policy or DHCP server). If you FortiGate model has a Switch Controller, you may need to disable it before you can change the internal switch mode.

Go to System > Dashboard > Status and enter either of the following commands into the CLI Console:

  1. Command to change the FortiGate to switch mode:
    config system global
         set internal-switch-mode switch
    exit
  2. Command to change the FortiGate to interface mode:
    config system global
         set internal-switch-mode interface
    exit

The post Choosing your FortiGate’s switch mode appeared first on Fortinet Cookbook.

Troubleshooting FortiGate logging

$
0
0

This section contains tips to help you with some common challenges of FortiGate logging.

No log messages appear in the GUI.

Ensure that logging is enabled in both the Log Settings and the policy used for the traffic you wish to log, as logging will not function unless it is enabled in both places.

If logging is enabled in both places, check that the policy in which logging is enabled is the policy being used for your traffic. Also make sure that the policy is getting traffic by going to the policy list and adding the Sessions column to the list.

Logs from a FortiAnalyzer, FortiManager, or from FortiCloud do not appear in the GUI.

Ensure that the correct log source has been selected in the Log Settings, under GUI Preferences.

If logs still do not appear, use the following CLI command:

config system global
  set gui-lines-per-page 20
end

The FortiGate unit’s performance level has decreased since enabling disk logging.

If enabling disk logging has impacted overall performance, change the log settings to either send logs to a FortiAnalyzer unit, a FortiManager unit, or to FortiCloud.

Logging to a FortiAnalyzer unit is not working as expected.

The firmware for the FortiGate and FortiAnalyzer units may not be compatible. Check the firmware release notes, found at support.fortinet.com, to see if this is the case.

The post Troubleshooting FortiGate logging appeared first on Fortinet Cookbook.

Troubleshooting web filtering

$
0
0

This section contains tips to help you with some common challenges of FortiGate web filtering.

The Web Filter option does not appear in the GUI.

Go to Feature Select and enable Web Filter.

New Web Filter profiles cannot be created.

Go to Feature Select and enable Multiple Security Profiles.

Web Filtering has been configured but is not working.

Make sure that web filtering is enabled in a policy. If it is enabled, check that the policy is the policy being used for the correct traffic. Also check that the policy is getting traffic by going to the policy list and adding the Sessions column to the list.

An active FortiGuard Web Filtering license displays as expired/unreachable.

If this occurs, make sure web filtering is enabled in one of your security policies. The FortiGuard service will sometimes show as expired when it is not being used, to save CPU cycles.

If web filtering is enabled in a policy, go to your FortiGuard settings and expand Web Filtering. Under Port Selection, select Use Alternate Port (8888). Select Apply to save the changes. Check whether the license is shown as active. If it is still inactive/expired, switch back to the default port and check again.

The post Troubleshooting web filtering appeared first on Fortinet Cookbook.

HQIP test documentation

$
0
0

There are certain pieces of documentation that you hope you will never have to find because it means that if you need to find them, then something has gone seriously wrong. One of those documents is the instructions for using the HQIP test.

If you haven’t heard of it, HQIP stands for Hardware Quick Inspection Package and its a firmware image that a Fortinet customer can use to run diagnostic tests on your hardware. HQIP firmware images are available for most of our products.

If your looking to use the HQIP test then chances are that your Fortinet device is having serious problems and you want to verify that the issue is hardware based rather than something that can be fixed with a configuration change or some new firmware. The last think you need at this point is a difficult time tracking down the instructions for finding and using this test, so it was decided that a post directing people to its location was worth while.

Location

The HQIP test documentation is located on the Fortinet Diagnose Wiki.

There are a few reasons for its choice of location.

  1. Diagnostics is the purpose of the site. The site is devoted to the explanation of diagnostic commands so instructions on a diagnostic tool fit right in.
  2. Easy collaborative editing of wiki content. There are a large number of Fortinet product lines and models within those lines. There are a number of variations in wiring configurations and new ones being discovered so a wiki page that makes adding additions and changes easy is a big plus. In fact, if you want to contribute all it takes is to create an account on the site and get your privileges elevated to include editing pages.

The HQIP page is likely to be one of those documents that is in a constant state of evolution so feedback and contributions from users will make for better content for the next people that find they need to use this document.

Looking for help with HQIP wiring diagrams

One of the pieces of information that users will most likely appreciate is the submission of wiring diagrams for the network interfaces loop-back test. A section has been created on the HQIP page for these diagrams. It includes the FortiGate 60C diagram as a basic template. Using the ASCII diagrams that are put out by the HQIP test, such as the one below, we can then make a more visually appealing image.

   [1]+-+ [3]+-+ [WAN1]+-+ [DMZ] [WAN2]
   [2]  | [4]  | [5]     |   |      |
    +   |  +   |  +      |   |      |
    +---+  +---+  +------+   +------+ 

 We are still working on the graphic template but we’re think about something along these lines.

 

The post HQIP test documentation appeared first on Fortinet Cookbook.

IPsec VPN troubleshooting

$
0
0

This section contains tips to help you with some common challenges of IPsec VPNs.

A VPN connection has multiple stages that can be confirmed to ensure the connection is working properly. It is easiest to see if the final stage is successful first since if it is successful the other stages will be working properly. Otherwise, you will need to work back through the stages to see where the problem is located.

When a VPN connection is properly established, traffic will flow from one end to the other as if both ends were physically in the same place. If you can determine the connection is working properly then any problems are likely problems with your applications.

On some FortiGate units, such as the FortiGate 94D, you cannot ping over the IPsec tunnel without first setting a source-IP. In this scenario, you must assign an IP address to the virtual IPSEC VPN interface. Anything sourced from the FortiGate going over the VPN will use this IP address.

If the egress/outgoing interface (determined by kernel route) has an IP address, then use the IP address of the egress/outgoing interface. Otherwise, use the IP address of the first interface from the interface list (that has an IP address).

The first diagnostic command worth running, in any IPsec VPN troubleshooting situation, is the following:

diagnose vpn tunnel list

This command is very useful for gathering statistical data such as the number of packets encrypted versus decrypted, the number of bytes sent versus received, the SPI identifier, etc. This kind of information in the resulting output can make all the difference in determining the issue with the VPN.

Another appropriate diagnostic command worth trying is:

diagnose debug flow

This command will inform you of any lack of firewall policy, lack of forwarding route, and of policy ordering issues.

The following is a list of such potential issues. Bear in mind that the troubleshooting suggestions below are not exhaustive, and may not reflect your network topology.

The options to configure policy-based IPsec VPN are unavailable.

Go to System > Feature Select. Select Show More and turn on Policy-based IPsec VPN.

If your VPN fails to connect, check the following:

  • Ensure that the pre-shared keys match exactly (see The pre-shared key does not match (PSK mismatch error) below).
  • Ensure that both ends use the same P1 and P2 proposal settings (see The SA proposals do not match (SA proposal mismatch) below).
  • Ensure that you have allowed inbound and outbound traffic for all necessary network services, especially if services such as DNS or DHCP are having problems.
  • Check that a static route has been configured properly to allow routing of VPN traffic.
  • Ensure that your FortiGate unit is in NAT/Route mode, rather than Transparent.
  • Check your NAT settings, enabling NAT traversal in the Phase 1 configuration while disabling NAT in the security policy. You might need to pin the PAT/NAT session table, or use some of kind of NAT-T keepalive to avoid the expiration of your PAT/NAT translation.
  • Ensure that both ends of the VPN tunnel are using Main mode, unless multiple dial-up tunnels are being used.
  • If you have multiple dial-up IPsec VPNs, ensure that the Peer ID is configured properly on the
  • FortiGate and that clients have specified the correct Local ID.
  • If you are using FortiClient, ensure that your version is compatible with the FortiGate firmware by reading the FortiOS Release Notes.
  • If you are using Perfect Forward Secrecy (PFS), ensure that it is used on both peers. You can use the diagnose vpn tunnel list command to troubleshoot this.
  • Ensure that the Quick Mode selectors are correctly configured. If part of the setup currently uses firewall addresses or address groups, try changing it to either specify the IP addresses or use an expanded address range. This is especially useful if the remote endpoint is not a FortiGate device.
  • If XAUTH is enabled, ensure that the settings are the same for both ends, and that the FortiGate unit is set to Enable as Server.
  • Check IPsec VPN Maximum Transmission Unit (MTU) size. A 1500 byte MTU is going to exceed the overhead of the ESP-header, including the additional ip_header,etc. You can use the diagnose vpn tunnel list command to troubleshoot this.
  • If your FortiGate unit is behind a NAT device, such as a router, configure port forwarding for UDP ports 500 and 4500.
  • Remove any Phase 1 or Phase 2 configurations that are not in use. If a duplicate instance of the VPN tunnel appears on the IPsec Monitor, reboot your FortiGate unit to try and clear the entry.

If you are still unable to connect to the VPN tunnel, run the following diagnostic command in the CLI:

diagnose debug application ike -1
diagnose debug enable

The resulting output may indicate where the problem is occurring. When you are finished, disable the diagnostics by using the following command:

diagnose debug reset
diagnose debug disable

The VPN tunnel goes down frequently.

If your VPN tunnel goes down often, check the Phase 2 settings and either increase the Keylife value or enable Autokey Keep Alive.

The pre-shared key does not match (PSK mismatch error).

It is possible to identify a PSK mismatch using the following combination of CLI commands:

diag vpn ike log filter name <phase1-name> 
diag debug app ike -1
diag debug enable

This will provide you with clues as to any PSK or other proposal issues. If it is a PSK mismatch, you should see something similar to the following output:

ike 0:TRX:322: PSK auth failed: probable pre-shared key mismatch
ike Negotiate SA Error:

The SA proposals do not match (SA proposal mismatch).

The most common problem with IPsec VPN tunnels is a mismatch between the proposals offered between each party. Without a match and proposal agreement, Phase 1 can never establish. Use the following command to show the proposals presented by both parties.

diag debug app ike -1
diag debug enable

The resulting output should include something similar to the following, where blue represents the remote VPN device, and green represents the local FortiGate.

responder received SA_INIT msg
incoming proposal:
proposal id = 1:
   protocol = IKEv2:
      encapsulation = IKEv2/none
      type=ENCR, val=AES_CBC (key_len = 256)
      type=INTEGR, val=AUTH_HMAC_SHA_96
      type=PRF, val=PRF_HMAC_SHA
      type=DH_GROUP, val=1536.
proposal id = 2:
   protocol = IKEv2:
      encapsulation = IKEv2/none
      type=ENCR, val=3DES_CBC
      type=INTEGR, val=AUTH_HMAC_SHA_2_256_128
      type=PRF, val=PRF_HMAC_SHA2_256
      type=DH_GROUP, val=1536.
proposal id = 1:
   protocol = IKEv2:
      encapsulation = IKEv2/none
      type=ENCR, val=AES_CBC (key_len = 128)
      type=INTEGR, val=AUTH_HMAC_SHA_96
      type=PRF, val=PRF_HMAC_SHA
      type=DH_GROUP, val=1536.

Pre-existing IPsec VPN tunnels need to be cleared.

Should you need to clear an IKE gateway, use the following commands:

diagnose vpn ike restart
diagnose vpn ike gateway clear

LAN interface connection

To confirm whether a VPN connection over LAN interfaces has been configured correctly, issue a ping or traceroute command on the network behind the FortiGate unit to test the connection to a computer on the remote network. If the connection is properly configured, a VPN tunnel will be established automatically when the first data packet destined for the remote network is intercepted by the FortiGate unit.

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. You can confirm this by going to Monitor > IPsec Monitor where you will be able to see your connection. A green arrow means the tunnel is up and currently processing traffic. A red arrow means the tunnel is not processing traffic, and this VPN connection has a problem.

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 Monitor > IPsec Monitor.

Troubleshooting VPN connections

If you have determined that your VPN connection is not working properly through troubleshooting, the next step is to verify that you have a Phase2 connection.

If traffic is not passing through the FortiGate unit as you expect, ensure the traffic does not contain IPcomp packets (IP protocol 108, RFC 3173). FortiGate units do not allow IPcomp packets, they compress packet payload, preventing it from being scanned.

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 begin troubleshooting, you must:

  • 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.11.101.10 and the names of the phases are Phase 1 and Phase 2
  • 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 diagnose debug sessions that are currently running with the CLI command
diagnose debug disable
  1. Clear any existing log-filters by running
diagnose vpn ike log-filter clear
  1. 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
diagnose vpn ike log-filter dst-addr4 10.11.101.10.
  1. Set up the commands to output the VPN handshaking. The commands are:
diagnose debug app ike 255
diagnose debug enable
  1. Have the remote FortiGate initiate the VPN connection in the web-based manager by going to VPN > IPsec Tunnels 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.
  1. Watch the screen for output, and after roughly 15 seconds enter the following CLI command to stop the output.
diagnose debug disable
  1. 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, and is useful for comparisons.

To troubleshoot a phase1 VPN connection

Using the output from To get diagnose information for the VPN connection – CLI, 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 Diffie-Hellman Groups 1 and 5, that would be at least 2 proposals set.

A successful negotiation proposal will look similar to:

IPsec SA connect 26 10.12.101.10->10.11.101.10:500
config found
created connection: 0x2f55860 26 10.12.101.10->10.11.101.10:500
IPsec SA connect 26 10.12.101.10->10.11.101.10:500 negotiating
no suitable ISAKMP SA, queuing quick-mode request and initiating ISAKMP SA negotiation
initiator: main mode is sending 1st message...
cookie 3db6afe559e3df0f/0000000000000000
out [encryption]
sent IKE msg (ident-i1send): 10.12.101.10:500->10.11.101.10:500, len=264, id=3db6afe559e3df0f/0000000000000000
diaike 0: comes 10.12.101.1:500->10.11.101.1:500,ifindex=26....

Note the phrase “initiator: main mode is sending 1st message...” which shows you the handshake between the ends of the tunnel is in progress. Initiator shows the remote unit is sending the first message.

VPN troubleshooting tips

Attempting hardware offloading beyond SHA1

If you are trying to off-load VPN processing to a network processing unit (NPU), remember that only SHA1 authentication is supported. For high levels of authentication such as SHA256, SHA384, and SHA512 hardware offloading is not an option — all VPN processing must be done in software.

Enable/disable IPsec ASIC-offloading

Much like NPU-offload in IKE phase1 configuration, you can enable or disable the usage of ASIC hardware for IPsec Diffie-Hellman key exchange and IPsec ESP traffic. By default hardware offloading is used. For debugging purposes, sometimes it is best for all the traffic to be processed by software.

config sys global
   set ipsec-asic-offload [enable|disable]
end

Check Phase 1 proposal settings

Ensure that both sides have at least one Phase 1 proposal in common. Otherwise they will not connect. If there are many proposals in the list, this will slow down the negotiating of Phase 1. If its too slow, the connection may timeout before completing. If this happens, try removing some of the unused proposals.

NPU offloading is supported when the local gateway is a loopback interface.

Check your routing

If routing is not properly configured with an entry for the remote end of the VPN tunnel, traffic will not flow properly. You may need static routes on both ends of the tunnel. If routing is the problem, the proposal will likely setup properly but no traffic will flow.

Try enabling XAuth

If one end of an attempted VPN tunnel is using XAuth and the other end is not, the connection attempt will fail. The log messages for the attempted connection will not mention XAuth is the reason, but when connections are failing it is a good idea to ensure both ends have the same XAuth settings. If you do not know the other end’s settings enable or disable XAuth on your end to see if that is the problem.

General troubleshooting tips

Most connection failures are due to a configuration mismatch between the FortiGate unit and the remote peer. In general, begin troubleshooting an IPsec VPN connection failure as follows:

  1. Ping the remote network or client to verify whether the connection is up.
  2. Traceroute the remote network or client. If DNS is working, you can use domain names. Otherwise use IP addresses.
  3. Check the routing behind the dialup client. Routing problems may be affecting DHCP. If this appears to be the case, configure a DHCP relay service to enable DHCP requests to be relayed to a DHCP server on or behind the FortiGate server.
  4. Verify the configuration of the FortiGate unit and the remote peer. Check the following IPsec parameters:
  • The mode setting for ID protection (main or aggressive) on both VPN peers must be identical.
  • The authentication method (preshared keys or certificates) used by the client must be supported on the FortiGate unit and configured properly.
  • If preshared keys are being used for authentication purposes, both VPN peers must have identical preshared keys.
  • The remote client must have at least one set of Phase 1 encryption, authentication, and Diffie-Hellman settings that match corresponding settings on the FortiGate unit.
  • Both VPN peers must have the same NAT traversal setting (enabled or disabled).
  • The remote client must have at least one set of Phase 2 encryption and authentication algorithm settings that match the corresponding settings on the FortiGate unit.
  • If you are using manual keys to establish a tunnel, the Remote SPI setting on the FortiGate unit must be identical to the Local SPI setting on the remote peer, and vise versa.
  1. To correct the problem, see the following table.

VPN troubleshooting tips

Configuration problem

Correction
Mode settings do not match. Select complementary mode settings.
Peer ID or certificate name of the remote peer or dialup client is not recognized by FortiGate VPN server. 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.

If you are configuring authentication parameters for FortiClient dialup clients, refer to the Authenticating FortiClient Dialup Clients Technical Note.

Preshared keys do not match. Reenter the preshared key.
Phase 1 or Phase 2 key exchange proposals are mismatched. Make sure that both VPN peers have at least one set of proposals in common for each phase.
NAT traversal settings are mismatched. Select or clear both options as required.

A word about NAT devices

When a device with NAT capabilities is located between two VPN peers or a VPN peer and a dialup client, that device must be NAT traversal (NAT-T) compatible for encrypted traffic to pass through the NAT device.

The post IPsec VPN troubleshooting appeared first on Fortinet Cookbook.

SSL VPN troubleshooting

$
0
0

This page contains tips to help you with some common challenges for SSL VPN.

  • Enter the following to display debug messages for SSL VPN:
diagnose debug application sslvpn -1

This command enables debugging of SSL VPN with a debug level of -1. The -1 debug level produces detailed results.

  • Enter the following command to verify the debug configuration:
diagnose debug info
debug output: disable
console timestamp: disable
console no user log message: disable
sslvpn debug level: -1 (0xffffffff)
CLI debug level: 3

This output verifies that SSL VPN debugging is enabled with a debug level of -1, and shows what filters are in place. The output above indicates that debug output is disabled, so debug messages are not displayed. The output also indicates that debugging has not been enabled for any software systems.

  • Enter the following to enable displaying debug messages:
diagnose debug enable

To view the debug messages, log into the SSL VPN portal. The CLI displays debug output similar to the following:

FGT60C3G10002814 # [282:root]SSL state:before/accept initialization (172.20.120.12)
[282:root]SSL state:SSLv3 read client hello A (172.20.120.12)
[282:root]SSL state:SSLv3 write server hello A (172.20.120.12)
[282:root]SSL state:SSLv3 write change cipher spec A (172.20.120.12)
[282:root]SSL state:SSLv3 write finished B (172.20.120.12)
[282:root]SSL state:SSLv3 flush data (172.20.120.12)
[282:root]SSL state:SSLv3 read finished A:system lib(172.20.120.12)
[282:root]SSL state:SSLv3 read finished A (172.20.120.12)
[282:root]SSL state:SSL negotiation finished successfully (172.20.120.12)
[282:root]SSL established: DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1
  • Enter the following to stop displaying debug messages:
diagnose debug disable

 

The following is a list of potential issues. The suggestions below are not exhaustive, and may not reflect your network topology.

There is no response from the SSL VPN URL.

  • Go to VPN > SSL-VPN Settings and check the SSL VPN port assignment. Also, verify that the SSL VPN policy is configured correctly.
  • Check the URL you are attempting to connect to. It should follow this pattern:
https://<FortiGate IP>:<Port>/remote/login
  • Ensure that you are using the correct port number in the URL.

FortiClient cannot connect.

Read the Release Notes to ensure that the version of FortiClient you are using is compatible with your version of FortiOS.

Tunnel-mode connection shuts down after a few seconds.

This issue can occur when there are multiple interfaces connected to the Internet (for example, a dual WAN). Upgrade to the latest firmware then use the following CLI command:

config vpn ssl settings
   set route-source-interface enable
end

When you attempt to connect using FortiClient or in Web mode, you are returned to the login page, or you receive the following error message: “Unable to logon to the server. Your user name or password may not be configured properly for this connection. (-12).

  • Ensure that cookies are enabled in your browser.
  • If you are using a remote authentication server, ensure that the FortiGate is able to communicate with it.
  • 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, and that use personally identifiable information without your explicit consent.

You receive an error message stating: “Destination address of Split Tunneling policy is invalid.

The SSL VPN security policy uses the ALL address as its destination. Change the address to that of the protected network instead.

The tunnel connects but there is no communication.

Go to Network > Static Routes and ensure that there is a static route to direct packets destined for the tunnel users to the SSL VPN interface.

You can connect remotely to the VPN tunnel but are unable to access the network resources.

Go to Policy & Objects > IPv4 Policy and examine the policy allowing VPN access to the local network. If the destination address is set to all, create a firewall address for the internal network. Change the destination address and attempt to connect remotely again.

Users are unable to download the SSL VPN plugin.

Go to VPN > SSL-VPN Portals to make sure that the option to Limit Users to One SSL-VPN Connection at a Time is disabled. This allows users to connect to the resources on the portal page while also connecting to the VPN through FortiClient.

Users are being assigned to the wrong IP range.

Ensure that the same IP Pool is used in VPN Portal and VPN Settings to avoid conflicts. If there is a conflict, the portal settings will be used.

Sending tunnel statistics to FortiAnalyzer

By default, logged events include tunnel-up and tunnel-down status events. Other events, by default, will appear in the FortiAnalyzer report as “No Data Available”. More accurate results require logs with action=tunnel-stats, which is used in generating reports on the FortiAnalyzer (rather than the tunnel-up and tunnel-down event logs). The FortiGate does not, by default, send tunnel-stats information.

To allow VPN tunnel-stats to be sent to FortiAnalyzer, configure the FortiGate unit as follows using the CLI:

config system settings
   set vpn-stats-log ipsec ssl
   set vpn-stats-period 300
end

 

The post SSL VPN troubleshooting appeared first on Fortinet Cookbook.


Setting up FortiGuard services

$
0
0

If you have purchased FortiGuard services and registered your FortiGate, it should automatically connect to FortiGuard and display license information about your services. In this example, you will verify whether the FortiGate unit is communicating with FortiGuard. If the FortiGate cannot connect, you will troubleshoot the connection.

Find this recipe for other FortiOS versions
5.2 | 5.4

1. Verifying the connection

Go to the Dashboard and find the License Information widget.

An icon appears beside each FortiGuard service, indicating its current status:

  •  : the service is active and the FortiGate is connected to FortiGuard network.
  • : the FortiGate unit cannot connect to FortiGuard network or the FortiGate unit is not registered.
  • : the subscription has not been activated or is expired. To add/renew a subscription, go to Fortinet Support.
 
You can also view FortiGuard license information by going to System > FortiGuard.  

2. Troubleshooting communication errors

If a service that you subscribe to is shown as unavailable, there are several things you can do to troubleshoot the connection.

Go to Network > DNS and ensure that the primary and secondary DNS servers are correct and the FortiGate is Connected to FortiGuard.  

To test if your DNS can reach FortiGuard, go to the Dashboard and enter the following command into the CLI Console:

execute ping guard.fortinet.net

If the connection is successful, the CLI Console should display a similar output as the example below:

PING guard.fortinet.net (208.91.112.198): 56 data bytes
64 bytes from 208.91.112.198: icmp_seq=0 ttl=59 time=60.0 ms
64 bytes from 208.91.112.198: icmp_seq=1 ttl=59 time=50.0 ms
64 bytes from 208.91.112.198: icmp_seq=2 ttl=59 time=50.0 ms
64 bytes from 208.91.112.198: icmp_seq=3 ttl=59 time=50.0 ms
64 bytes from 208.91.112.198: icmp_seq=4 ttl=59 time=50.0 ms

--- guard.fortinet.net ping statistics ---

5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 50.0/52.0/60.0 ms

To test if the FortiGuard services are reachable, go to System > FortiGuard.

Under Filtering, check Filtering Services Availability. If you don’t see a , select Check Again.

 

If FortiGuard services can still not be reached, your ISP may be blocking access to port 53 (used for DNS). Change the FortiGuard Filtering Port to the alternate port (8888). Select Apply and see if the services become available.

If your FortiGate is still unable to connect to FortiGuard, you can find more troubleshooting methods and other information in the FortiGuard section of the FortiOS 5.4 Handbook.

3. Results

Go to the Dashboard and view the License Information widget. Any subscribed services should have a beside it.  
Go to System > FortiGuard. Features and services you are subscribed to should have a beside it.  

For further reading, check out FortiGuard in the FortiOS 5.4 Handbook.

Only services that have been enabled in Feature Select will appear in the widget. To enable more services, go to System > Feature Select.
For information about registering your FortiGate, see the recipe FortiGate registration and basic settings.
If you are updating FortiGuard using a FortiManager, the FortiGuard Filtering Port can also be 80.

The post Setting up FortiGuard services appeared first on Fortinet Cookbook.

FortiMail Troubleshooting: Access Difficulty

$
0
0

The Troubleshooting recipes are here to assist you in diagnosing and remedying any problems you experience when using your FortiMail unit.

This recipe guides you through the process of troubleshooting access problems, such as an administrator account that can’t connect to the basic web UI or problems logging in as an administrator.

 

Problem #1: Inaccessible Basic UI

An administrator account can’t connect to the basic mode of the web interface or the CLI, despite being able to connect to the advanced mode of the web UI.

The Solution

Set the administrator account’s Domain to System. Domain administers, also known as tiered administrators, cannot access the CLI or the basic mode of the GUI. For more information, see FortiMail operation modes on page 23 of the Administrator Guide.

Problem #2: Log in Issues

Administrators cannot log in to the web UI or the CLI.

The Solution

First, make sure you’re using the correct admin name and password.

Each FortiMail interface has a set of administrator access protocols. These are the methods an administrator uses to connect to FortiMail. Any or all of these protocols can be disabled on any interface.

IMPORTANT: For security purposes, you should only enable access that is required. If you open access for troubleshooting, remember to disable it when you’re done. Failure to disable access may result in a security breach.

To enable administrator access on the dmz interface

  1. Log in as administrator.
  2. Go to System > Network > Interface.
  3. Select the interface and select
  4. Select the protocols you wish to use to acess the interface in the Access
  5. Select

Repeat for each interface where administrative access is required.

Problem #3: Trusted Host Issues

The trusted hosts for the admin account will not allow the current IP.

The Solution

If an external administrator login is required, a secure VPN tunnel can be established with a set IP address or range of addresses that are entered as a trusted address.

Trusted host login issues occur when an administrator attempts to log in from an IP address that is not included in the trusted host list.

To verify trusted host login issues

  1. Record the IP address where the administrator is attempting to log in to the FortiMail unit.
  2. Log in to the web UI and go to System > Administrator > Administrator.
  3. Select the administrator account in question and click the Edit icon.
  4. Compare the list of trusted hosts to the problem IP address. If there is a match, the problem is not due to trusted hosts.
  5. If there is no match and the new address is valid (secure), add it to the list of trusted hosts.
  6. Select OK.

If the problem was due to trusted hosts, the administrator can now log in.

The post FortiMail Troubleshooting: Access Difficulty appeared first on Fortinet Cookbook.

IPsec VPN Troubleshooting (Video)

$
0
0

In this video, you will learn how to troubleshoot a site-to-site IPsec VPN that provides transparent communication between a Headquarters FortiGate and Branch office FortiGate. This video will show you how to diagnose common problems when your tunnel connection fails, and how to adjust your settings when the tunnel drops on and off. This video includes common Preshared Secret Key issues, Security Association or “SA” proposal errors, quick mode selector issues, and more. By the end of this tutorial you should have a better understanding of how to use these debug commands for basic troubleshooting.This video is recorded on FortiOS 5.2.6, and although the GUI options may vary, the troubleshooting tips and CLI commands are relevant for most recent builds.

The recipe for this video is available here.

Watch more videos

The post IPsec VPN Troubleshooting (Video) appeared first on Fortinet Cookbook.

FortiMail Troubleshooting: Defining the Problem

$
0
0

The troubleshooting collection of recipes seeks to assist you in determining why your FortiMail unit is behaving unexpectedly.

It includes general troubleshooting methods and specific troubleshooting tips to help you understand and rectify any problems you may have with your unit. 

This recipe covers everything you need to understand your current problem. Before beginning any actual troubleshooting, you first have to identify the problem.

 

Identifying the Problem

The easiest way to identify the problem is to answer the following questions:

  1. Where and when did the problem occur?
  2. Did the unit work properly in the past?
  3. Is your FortiMail unit communicating with your network? Is there a connection to a DNS server? 
  4. Is there more than one thing that is not working?
  5. Can you reproduce the problem at any time or is it intermittent?
  6. Are the servers covered by the policy working? Has a policy been disabled? Check the status of the protected servers.
  7. Is your system overloaded? View the System Resource on the dashboard.
  8. Has anything changed recently? Use the FortiMail event log to see if something has changed in the configuration. If something did change, see what the effect is when you roll back the change.
  9. After determining the scope of the problem and isolating it, what servers does it affects?

Once you have determined the problem, you can begin searching for a solution.

The post FortiMail Troubleshooting: Defining the Problem appeared first on Fortinet Cookbook.

FortiMail Troubleshooting: Bootup Issues

$
0
0

The Troubleshooting recipes are here to assist you in diagnosing and remedying any problems you experience when using your FortiMail unit.

This recipe guides you through the process of troubleshooting problems you may experience in rare cases when powering up your FortiMail unit.

If the following suggestions do not remedy the issue, please be sure to contact customer support.

When you cannot connect to the FortiMail unit through the network using CLI or the web UI, connect a PC directly to the FortiMail unit’s management console using a serial connection. (The cable varies with the FortiMail model. See the model’s quickstart guide for details.)

Open a terminal emulation interface, such as HyperTerminal, to act as the console. The issues covered in this section all refer to various potential bootup issues.

Once you have a direct console connection to the FortiMail unit, work through the following questions and keep a copy of the console’s output messages.

Boot Options Menu

Do you see the boot options menu?

NO: ensure that your serial communication parameters are set to no flow control and check that the correct baud rate is correctly set (usually 9600, data bits 8, parity none, stop bits 1) and reboot the FortiMail unit.

Yes: Proceed to the next section.

Console Text

  1. Do you see a console message?

    NO: Go to the next section.
    YES: Ensure your console communication settings are correct. Check the FortiMail QuickStart Guide for settings specific to your model.

  2. Are the console messages incoherent?

    NO: Your problem should be fixed. If not, contact customer support.
    YES: Ensure your console communication settings are correct for your unit. Check the FortiMail QuickStart Guide for system specific settings.

  3. Do the console messages stop before the prompt: Press Any Key to Download Boot Image?

    NO: Follow the console instruction Press any key to download Boot Image and go to the next step.
    YES: Proceed to the Defective FortiMail Unit section.

  4. Do you see one of the following messages when pressing a key?

    [G] Get Firmware image from TFTP server
    [F] Format boot device
    [B] Boot with backup firmware and act as default
    [Q] Quit menu and continue to boot with default firmware
    [H] Display this list of options

    NO: Ensure your serial communication parameters are set to no flow control, check that the correct baud rate is set. Change settings if needed and reboot the unit.
    YES: Proceed to the Defective FortiMail Unit section.

  5. Did the reboot fix the problem?

    NO: Proceed to the Defective FortiMail Unit section 

Visible Power Problems

Do you have a visible power problem?

  1. Is the LED light on the FortiMail unit on?

    NO: Ensure the power is on.
    YES: Continue

  2. Are you using an external power adapter?

    NO: Proceed to the Defective FortiMail Unit section.
    YES: Replace the power adapter.

  3. Is the power supply defective?

    NO: Proceed to the Defective FortiMail Unit section.
    YES: Replace the power supply and test again.

Defective FortiMail Unit

If you have followed the previous steps and have determined that there is a good chance your unit is defective, be sure to contact Fortinet customer support.

The post FortiMail Troubleshooting: Bootup Issues appeared first on Fortinet Cookbook.

FortiMail Troubleshooting: Slow Performance

$
0
0

The Troubleshooting recipes are here to assist you in diagnosing and remedying any problems you experience when using your FortiMail unit.

This recipe guides you through the process of troubleshooting resource issues, such as slow performance.

 

Problem: Slow Performance

The FortiMail unit is suffering from slow or stalled performance.

The Solution

Use the CLI to view a list of the most system-intensive processes. From the CLI you will be able to see what processes are using the most resources. For example: 
diagnose system top 10
The above command generates a report of processes every ten seconds. The report provides the process names, their process ID (pid), status, CPU usage, and memory usage. 

The report continues to refresh and display in the CLI window until you enter q (quit).

The post FortiMail Troubleshooting: Slow Performance appeared first on Fortinet Cookbook.

FortiMail Troubleshooting: HA Issues

$
0
0

The Troubleshooting recipes are here to assist you in diagnosing and remedying any problems you experience when using your FortiMail unit.

This recipe guides you through the process of troubleshooting HA issues, such as a active-passive HA cluster failure and unviewable mail queues.

 

Problem #1: Not Switching After Failure

Active-passive HA cluster does not switch to the backup unit after a failure.

The Solution

If an individual service has failed that does not disrupt the HA heartbeat, an active-passive HA cluster may not fail over. For example, one or more services (such as SMTP, IMAP, POP3, web access, or a hard drive or network interface) could fail on the primary unit (master) without affecting the HA heartbeat. To cause failover when an individual service fails, configure service monitoring on both the primary unit and backup unit. See Configuring Service Based Failover in the Administrator Guide.

Problem #2: Cannot See Mail Queues

Mail queues do not appear on the HA backup unit.

The Solution

In order to display queue content in the backup unit, mail data must be synchronized from the primary unit. If the Backup MTA queue directories option is disabled, mail queues will not be synchronized. You can enable MTA spool synchronization to view the mail queues from either the backup unit or the primary unit.

Important: Synchronization of MTA spool directories can result in a decrease in performance and may not allow you to view all email in the mail queues, as mail queue content can change more rapidly than synchronization occurs.

The post FortiMail Troubleshooting: HA Issues appeared first on Fortinet Cookbook.


FortiMail Troubleshooting: Server Connection Issues

$
0
0

The Troubleshooting recipes are here to assist you in diagnosing and remedying any problems you experience when using your FortiMail unit.

This recipe guides you through the process of troubleshooting connection issues.

 

Problem #1: FDN Server Connection Problems

The FortiMail unit cannot connect to the FDN servers to use FortiGuard AntiVirtus and/or FotiGuard Antispam services.

The Solution

FortiGuard Antivirus and FortiGuard Antispam subscription services use multiple types of connections with the FortiGuard Distribution Network (FDN). For details on verifying FDN connection, see “Verifying connectivity with FortiGuard services” on page 218.

For all FortiGuard connection types, you must satisfy the following requirements

  1. Register your FortiMail unit with the Fortinet Technical Support web site, https://support.fortinet.com/.
  2. Obtain a trial or purchased service contract for FortiGuard Antispam and/or FortiGuard Antivirus and apply it to your FortiMail unit.

    If you have multiple FortiMail units, including those operating in high availability (HA), you must obtain separate contracts for each FortiMail unit.

  3. Configure your FortiMail unit to connect with a DNS server that can resolve the domain names of FortiGuard servers. For more information, see “Configuring DNS” in the FortiMail Administrator Guide.
  4. Verify that you have satisifed DNS and routing requirments by typing the following commands in the CLI:
    execute nslookup name service.fortiguard.net
    execute nslookup name fdsl.fortinet.com
    execute traceroute <address_ipv4>
    (where address_ip4 is one of the FortiGuard servers)

If you have satisfied these requirements, verify that you have satisfied the requirements specific tot he type of connection that is failing. Consult the following table:

Scheduled Updates
  1. Configure the system time of the FortiMail unit, including its time zone.
  2. Make sure intermediary firewall devices allow the FortiMail unit to use HTTPS on TCP port 443 to connect to the FDN.
  3. Use the CLI command set system autoupdate tunneling to enable the FortiMail unit to connect to the FDN through the proxy.
  4. Override the FortiGuard server to which the FortiMail unit is connecting and connect to a non-default server for your time zone.
Push Updates
  1. Satisfy all the requirments for scheduled updates listed above.
  2. If there is a NAT device installed between the FortiMail unit and the FDN, configure it to forward push traffic (UDP port 9443) to the FortiMail unit. You will also need to configure “Use override push IP”. For more information, see “Configuring push updates” in the FortiMail Administrator Guide.
Ratting Queries Intermediary firewall devices must allow the FortiMail unit to use UDP port 53 to connect to the FDN.

The post FortiMail Troubleshooting: Server Connection Issues appeared first on Fortinet Cookbook.

FortiMail Troubleshooting: UI Connection Problems

$
0
0

The Troubleshooting recipes are here to assist you in diagnosing and remedying any problems you experience when using your FortiMail unit.

This recipe guides you through the process of troubleshooting connection issues, such as an administrator account unable to connect to the basic mode of the web interface.

 

Problem #1: Inaccessible Basic UI

An administrator account can’t connect to the basic mode of the web interface or the CLI, despite being able to connect to the advanced mode of the web UI.

The Solution

Set the administrator account’s Domain to System. Domain administers, also known as tiered administrators, cannot access the CLI or the basic mode of the GUI. For more information, see FortiMail operation modes on page 23 of the Administrator Guide.

Problem #2: Log in Issues

Administrators cannot log in to the web UI or the CLI.

The Solution

First, make sure you’re using the correct admin name and password.

Each FortiMail interface has a set of administrator access protocols. These are the methods an administrator uses to connect to FortiMail. Any or all of these protocols can be disabled on any interface.

IMPORTANT: For security purposes, you should only enable access that is required. If you open access for troubleshooting, remember to disable it when you’re done. Failure to disable access may result in a security breach.

To enable administrator access on the dmz interface

  1. Log in as administrator.
  2. Go to System > Network > Interface.
  3. Select the interface and select
  4. Select the protocols you wish to use to acess the interface in the Access
  5. Select

Repeat for each interface where administrative access is required.

Problem #3: Trusted Host Issues

The trusted hosts for the admin account will not allow the current IP.

The Solution

If an external administrator login is required, a secure VPN tunnel can be established with a set IP address or range of addresses that are entered as a trusted address.

Trusted host login issues occur when an administrator attempts to log in from an IP address that is not included in the trusted host list.

To verify trusted host login issues

  1. Record the IP address where the administrator is attempting to log in to the FortiMail unit.
  2. Log in to the web UI and go to System > Administrator > Administrator.
  3. Select the administrator account in question and click the Edit icon.
  4. Compare the list of trusted hosts to the problem IP address. If there is a match, the problem is not due to trusted hosts.
  5. If there is no match and the new address is valid (secure), add it to the list of trusted hosts.
  6. Select OK.

If the problem was due to trusted hosts, the administrator can now log in.

The post FortiMail Troubleshooting: UI Connection Problems appeared first on Fortinet Cookbook.

FGCP High Availability Troubleshooting

$
0
0

This post is intended to help you find and fix some common and not so common FortiGate Clustering Protocol (FGCP) HA problems.

1. Before you set up a cluster

Before you set up an FortiGate FGCP cluster ask yourself these questions:

  • Do all the FortiGates have the same hardware version and the same hardware configuration?
  • Do all the FortiGates have the same firmware build?
  • Are all the FortiGates set to the same operating mode (NAT or Transparent)?
  • Are all the FortiGates operating in single VDOM mode?
  • If the FortiGates are operating in multiple VDOM mode do they all have the same VDOM configuration?

In some cases you may be able to form a cluster if your FortiGates have different firmware builds, different VDOM configurations, and are in different operating modes. However, if you encounter problems when forming a cluster you may be able to resolve them by installing the same firmware build on each unit and giving them the same VDOM configuration and operating mode. If possible you could also reset them all to factory defaults and start over.

2. Troubleshooting hardware revisions

Many FortiGate platforms have gone through multiple hardware versions and in some cases the hardware changes may prevent cluster formation. If you run into this problem you can use the following command on each FortiGate in the cluster to cause the cluster to ignore different hardware versions:

execute ha ignore-hardware-revision enable

This command is only available on FortiGates that have had multiple hardware revisions. So if the command isn’t present then hardware version issues should not prevent cluster formation.

By default the command is set to prevent cluster formation between FortiGates with different hardware revisions. You can enter the following command to view its status:

execute ha ignore-hardware-revision status

Usually the incompatibility is caused by different hardware versions having different hard disks and enabling this command disables each FortiGate’s hard disks. As a result of disabling hard disks the cluster will not support logging to the hard disk or WAN Optimization.

If the FortiGates do have compatible hardware versions or if you want to run a FortiGate in standalone mode you can enter the following command to disable ignoring the hardware revision and enable the hard disks:

execute ha ignore-hardware-revision disable

Affected models include but are not limited to:

  • FortiGate-100D
  • FortiGate-300C
  • FortiGate-600C
  • FortiGate-800C
  • FortiGate-80C and FortiWiFi-80C
  • FortiGate-60C

3. Troubleshooting the initial cluster configuration

This step describes how to check a cluster when it first starts up to make sure that it is configured and operating correctly. This section assumes you have already configured your HA cluster and it appears to be up and running normally.

To verify that a cluster can process traffic and react to a failure:

  1. Add a basic security policy configuration and send network traffic through the cluster to confirm connectivity. For example, if the cluster is installed between the Internet and an internal network, set up a basic internal to external security policy that accepts all traffic. Then from a PC on the internal network, browse to a website on the Internet or ping a server on the Internet to confirm connectivity.
  2. From your management PC, set ping to continuously ping through the cluster, and then start a large download, or in some other way establish ongoing traffic through the cluster.
  3. While traffic is going through the cluster, disconnect the power from one of the cluster units. You could also shut down or restart a cluster unit. Traffic should continue with minimal interruption.
  4. Start up or reconnect the cluster unit that you disconnected. The FortiGate should re-join the cluster with little or no affect on traffic.
  5. Disconnect a cable from 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.
  

4. Verifying the cluster configuration from the GUI

If a cluster is formed you can do the following to verify its status and configuration.

 

Log into the cluster GUI. Verify that the System Information widget lists all of the cluster units.

 1-trbl-system-information
Check the Unit Operation widget to verify that the correct cluster unit interfaces are connected.  2-trbl-unit-operation
Go to System > HA or on the System Information dashboard widget select HA Status > Configure and verify that all of the cluster units are displayed on the  HA Cluster list.  3-trbl-cluster-list
From the cluster members list, edit the primary unit (master) and verify the cluster configuration.  4-trbl-ha-config

5. Troubleshooting the cluster configuration from the GUI

Try this if the FortiGates don’t successfully form a cluster:

Connect to each cluster unit GUI and verify that the HA configurations are the same. The HA configurations of all cluster units must be identical. Even though the HA configuration is very simple you can easily make a small mistake that prevents a FortiGate from joining a cluster. (I speak form personal experience here.)

If the configurations are the same, try re-entering the HA password on each cluster unit in case you made an error typing the password when configuring one of the cluster units.

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 a link is down re-verify the physical connection. Try replacing network cables or switches as required.

  

6. Verifying the cluster configuration from the CLI

If a cluster is formed you can do the following to verify its status and configuration.

Log into each cluster unit CLI. You can use the GUI CLI console, SSH, or a direct console port connection.

Enter the command get system status. Look for the current HA mode in the command output. If the cluster is operating correctly and you have connected to the primary unit you should see something like this:

Current HA mode: a-a, master

You can connect to the backup or subordinate unit using a console port or by connecting to the console CLI and using the execute ha manage command to connect to the backup unit. If the cluster is operating correctly you will see something like this:

Current HA mode: a-a, backup

If the FortiGate is not operating in HA mode the get system status command output is something like this:

Current HA mode: standalone

Verify that the get system ha status command displays all of the cluster units. For example, for a cluster of three FortiGate units, the command output should contain something like this:

Master: 5001d-slot3     , FG-5KD3914800344
Slave : 5001d-slot5     , FG-5KD3914800353
Slave : 5001d-slot4     , FG-5KD3914800284

Enter the get system ha command to verify that the HA configuration is correct and the same for each cluster unit.

get system ha
group-id : 0
group-name : External-HA-cluster
mode : a-p
password : *
hbdev : "port3" 50 "port4" 50
.
.
.

7. Troubleshooting the cluster configuration from the CLI

If the FortiGates don’t successfully form a cluster, try using the following command to re-enter the cluster password.  Do this for 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

Check that the correct interfaces of each cluster unit are connected. Check the cables and interface LEDs. Use the 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 the link is down, re-verify the physical connection. Try replacing network cables or switches as required.

More troubleshooting information

Much of the information in the  HA guide can be useful for troubleshooting HA clusters. Here are some links to sections with more information.

  • If sessions are lost after a failover you may need to change route-ttl to keep synchronized routes active longer. See Synchronizing kernel routing tables.
  • In rare cases, sometimes after a cluster unit has been replaced it is possible that a cluster will not form because the disk partition sizes of the cluster units are different. You can use the following command to check the disk storage checksum of each cluster unit. If the checksums are different then contact Fortinet support for help in setting up compatible storage partitions.
diagnose sys ha showcsum 1 system | grep storage
  • To control which cluster unit becomes the primary unit, you can change the device priority and enable override. See Controlling primary unit selection using device priority and override.
  • Changes made to a cluster can be lost if override is enabled. See Configuration changes can be lost if override is enabled.
  • When override is enabled, after a failover traffic may be disrupted if the primary unit rejoins the cluster before the session tables are synchronized or for other reasons such as if the primary unit is configured for DHCP or PPPoE. See Delaying how quickly the primary unit rejoins the cluster when override is enabled.
  • In some cases, age differences among cluster units result in the wrong cluster unit becoming the primary unit. For example, if a cluster unit set to a high priority reboots, that unit will have a lower age than other cluster units. You can resolve this problem by resetting the age of one or more cluster units. See Primary unit selection and age. You can also adjust how sensitive the cluster is to age differences. This can be useful if large age differences cause problems. See Cluster age difference margin (grace period) and Changing the cluster age difference margin.
  • If one of the cluster units needs to be serviced or removed from the cluster for other reasons, you can do so without affecting the operation of the cluster. See Disconnecting a cluster unit from a cluster.
  • The web-based manager and CLI will not allow you to configure HA if you have enabled FGSP HA. See FortiGate Session Life Support Protocol (FGSP).
  • The GUI and CLI will not allow you to configure HA if one or more FortiGate unit interfaces is configured as a PPTP or L2TP client.
  • The FGCP is compatible with DHCP and PPPoE but care should be taken when configuring a cluster that includes a FortiGate interface configured to get its IP address with DHCP or PPPoE. Fortinet recommends that you turn on DHCP or PPPoE addressing for an interface after the cluster has been configured. See FortiGate HA compatibility with DHCP and PPPoE.
  • 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.
  • 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.
  • 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.
  • 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 1.
  • You can also improve failover times by configuring the cluster for subsecond failover. See Subsecond failover and Failover performance on page 1.
  • 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 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.
  • 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.
  • 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 and Synchronizing kernel routing tables.
  • 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.
  • 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.
  • 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.

The post FGCP High Availability Troubleshooting appeared first on Fortinet Cookbook.

FortiMail Troubleshooting: Antispam Issues

$
0
0

The Troubleshooting recipes are here to assist you in diagnosing and remedying any problems you experience when using your FortiMail unit.

This recipe guides you through the process of troubleshooting a wide variety of antispam issues you may encounter when using FortiMail, such as low spam detection, email users being spammed by DSN, and SMTP failure.

 

Problem #1: Low Spam Detection Rate

The spam detection rate is low.

The Solution

Make sure no SMTP traffic is bypassing the FortiMail unit due to an incorrect routing
policy. Configure routers and firewalls to direct all SMTP traffic to or through the FortiMail unit to be scanned. If the FortiMail unit is operating in gateway mode, for each protected domain, modify public DNS records to keep only a single MX record entry that points to the FortiMail unit.

Do not whitelist protected domains. White lists bypass antispam scan, email with spoofed sender addresses in the protected domains could bypass antispam features. Also, use white lists with caution, a white list entry *.edu would allow all email from all domains in the .edu top level domain to bypass antispam scans.

Make sure all protected domains have matching policies and proper protection profiles.

Enable adaptive antispam features such as greylisting and sender reputation.

Important: Enable additional antispam features gradually. Excessive antispam scans could decrease the performance of your FortiMail unit.

Problem #2: Faulty Send Spam

Email users are spammed by DSN for email they did not actually send.

The Solution

Spammers sometimes use the delivery status notification (DSN) mechanism to bypass
antispam measures. In this attack, sometimes called “backscatter”, the spammer spoofs the email address of a legitimate sender and intentionally sends spam to an undeliverable recipient, expecting that the recipient’s email server will send a DSN back to the sender to notify him/her of the delivery failure. Because this attack utilizes innocent email servers and a standard notification mechanism, many antispam mechanisms may be unable to detect the difference between legitimate and spoofed DSN.

To detect backscatter

1. Enable bounce address tagging and configure an active key (see “Configuring  bounce verification and tagging” on page 598).
2. Next, disable both the Bypass bounce verification option (see “Configuring protected domains” on page 355) and the Bypass bounce verification check option (see “Configuring session profiles” on page 453).
3. In addition, verify that all outgoing and incoming email passes through the FortiMail unit. The FortiMail unit cannot tag email, or recognize legitimate DSN for previously sent email, if all email does not pass through it. For details, see “Configuring bounce verification and tagging” on page 598.

Problem #3: Temporary Failure SMTP reply Code

Email users cannot release and delete quarantined messages by email.

The Solution

Two common reasons are:

• The domain name portion of the recipient email address (for example, fortimail.example.com
in release-ctrl@fortimail.example.com) could not be resolved by the DNS server into the FortiMail unit’s IP address.
• The sender’s email address in the release message was not the same as the intended
recipient of the email that was quarantined. If you have configured your mail client to handle multiple email accounts, verify that the release/delete message is being sent by the email address corresponding to that per-recipient quarantine. For example, if an email for user@example.com is quarantined, to release that email, you must send a release message from user@example.com.

Problem #4: Attachment Issues

Your attachment is less than the 10 MB configured limit and your message is not deliverable.

The Solution

The message limit is a total maximum for the entire transmitted email: the message body, message headers, all attachments, and encoding, which in some cases can expand the size of the email. For example, depending on the encoding and the content of the email, an email with an 8 MB attachment could easily exceed the transmitted message size limit of 10 MB.

Therefore, attachments should be smaller than the configured limit.

Problem #5: Email Archive Issues

The exported email archive is an empty file.

The Solution

Make sure you select the check boxes of archived email (see “Configuring email archiving accounts” on page 618) that you want to export. Only email whose Status column contains a check mark will be exported.

 

The post FortiMail Troubleshooting: Antispam Issues appeared first on Fortinet Cookbook.

FortiMail Troubleshooting: SMTP Failure

$
0
0

The Troubleshooting recipes are here to assist you in diagnosing and remedying any problems you experience when using your FortiMail unit.

This recipe guides you through the process of troubleshooting SMTP problems, such as recipient verification failure and 451 error messages.

 

Problem #1: Recipient Verification Failure

Recipient verification through SMTP fails.

The Solution

If recipient verification fails despite enabling Recipient Address Verification there are some possible causes:

  1. The SMTP server may not be available
  2. The network connection between the FortiMail and the SMTP server is not reliable.
  3. The SMTP server does not support ESMTP.EHLO, as defined in ESMTP, is a part of the SMTP verification process. If the SMTP server does not support ESMTP, the recipient verification will fail.
  4. The server is a Microsoft Exchange server and SMTP recipient verification is not enabled and configured.

When the SMTP server is unavailable for recipient verification, the FortiMail unit returns the 451 SMTP reply code. The email would remain in the sending queue of the sending MTA for the next retry.

Problem #2: 451 Error Message

SMTP clients receive the message 451 Try again later.

The Solution

The two primary reasons you may be experiencing a 451 error message is:

  • The greylist routine encountered an unknown sender or the greylist entry expired for the existing sender and recipient pair.This behavior is normal and will typically resolve itself when the SMTP client retries its delivery later during the greylist window.
  • Recipient verification is enabled and the FortiMail unit is unable to connect to the recipient
    verification server. There should be some related entries in the antispam log, such as Verify <user@example.com> Failed, return TEMPFAIL. If this occurs, verify that the server is correctly configured to support recipient verification and that connectivity with the recipient verification server has not been interrupted.

Problem #3: Temporary Failure SMTP reply Code

The FortiMail unit replies with a temporary failure SMTP reply code and the even log shows Milter (fas_milter): timeout before data read

The Solution

The timeout is caused by the FortiMail unit not responding within 4 minutes.

Slow or unresponsive DNS server response for DNSBL and SURBL scans can cause the FortiMail unit’s antispam scans to be unable to complete before the timeout. When this occurs, the FortiMail unit will report a temporary failure. In most cases, the sending MTA will retry delivery later. If this problem is persistent, verify connectivity  with your DNSBL and SURBL servers, and consider providing private DNSBL/SURBL servers on your local network.

 

The post FortiMail Troubleshooting: SMTP Failure appeared first on Fortinet Cookbook.

Viewing all 47 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>