Configuring FTP Proxy on FortiGate for Optimized Traffic Management
How to Configure an FTP Proxy on FortiGate
FTP proxies are a crucial component in managing FTP traffic efficiently through your FortiGate firewall. By configuring an FTP proxy, you can ensure seamless transmission of FTP requests and optimize overall traffic flow within your network. This guide provides step-by-step instructions on setting up and configuring an FTP proxy using both the GUI and CLI on FortiGate.
Understanding FTP Proxy Configuration
When configured as an FTP proxy, the FortiGate receives FTP requests from client applications. These requests are then proxied, facilitating control over FTP traffic. The process is straightforward, and can be executed through the FortiGate interface or command line.
Configuring Explicit FTP Proxy in the GUI
Steps:- Go to Network > Explicit Proxy.
- Enable Explicit FTP Proxy.
- Select port2 as the Listen on Interfaces and set the HTTP Port to 21.
- Configure the Default Firewall Policy Action as required.
- Click Apply.
- Navigate to Policy & Objects > Proxy Policy.
- Click Create New.
- Set Proxy Type to FTP and Outgoing Interface to port1.
- Set Source and Destination to all, Schedule to always, and Action to ACCEPT.
- Click OK to create the policy.
Note: Security profiles can be enabled if needed. Also, ensure FTP client applications use the FortiGate IP address.
Configuring Explicit FTP Proxy in the CLI
The CLI method allows a more nuanced control over FTP proxy settings.
Enable and configure explicit FTP proxy:- config ftp-proxy explicit
- set status enable
- set incoming-port 21
- end
- config system interface
- edit "port2"
- set vdom "vdom1"
- set ip 10.1.100.1 255.255.255.0
- set allowaccess ping https ssh snmp http telnet
- set type physical
- set explicit-ftp-proxy enable
- set snmp-index 12
- next
- end
- config firewall proxy-policy
- edit 4
- set name "proxy-policy-ftp"
- set proxy ftp
- set dstintf "port1"
- set srcaddr "all"
- set dstaddr "all"
- set action accept
- set schedule "always"
- next
- end
Changing the FTP Mode from Active to Passive for Explicit Proxy
In some cases, you may need to convert active FTP connections to passive ones. This is particularly useful if the FTP client only supports active mode. The explicit FTP proxy can handle this conversion effortlessly.
Steps to Configure Passive Mode:- Configure the FTP proxy to passive mode:
- config ftp-proxy explicit
- set status enable
- set incoming-port 21
- set server-data-mode passive
- end
- config system interface
- edit "port1"
- set ip 10.1.100.2 255.255.255.0
- set explicit-ftp-proxy enable
- next
- end
- config firewall proxy-policy
- edit 1
- set proxy ftp
- set dstintf "port3"
- set srcaddr "all"
- set dstaddr "all"
- set action accept
- set schedule "always"
- next
- end
You can verify the FTP proxy's conversion from active to passive mode by checking the log files on the FTP server. This ensures that all commands are dispatched to utilize passive mode effectively.
By following these detailed configurations, your network can benefit from enhanced FTP traffic management, ensuring data integrity and transmission efficiency across your FortiGate firewall.