IP, TCP, and UDP load balancing

CLI configuration

Use the following procedure to configure this load balancing setup from the CLI.

To configure HTTP load balancing

  1. Use the following command to add an HTTP health check monitor that sends get requests to http://<real_server_ IP_address>/index.html and searches the returned web page for the phrase “Fortinet products”.

config firewall ldb-monitor edit HTTP_health_chk_1 set type http set port 80 set http-get /index.html set http-match “Fortinet products” set interval 10

CLI

set timeout 2

set retry 3 end

  1. Use the following command to add an HTTP virtual server that allows users on the Internet to connect to the real servers on the internal network. In this example, the FortiGate wan1 interface is connected to the Internet.

config firewall vip edit Load-Bal_VS1 set type server-load-balance set server-type http set ldb-method first-alive set http-multiplex enable set http-ip-header enable set extip 192.168.37.4 set extintf wan1 set extport 80 set persistence http-cookie set monitor HTTP_health_chk_1 config realservers edit 1 set ip 10.10.10.42

set port 80 next edit 2 set ip 10.10.10.43

set port 80 next edit 3 set ip 10.10.10.44

set port 80

end

end

  1. Use the following command to add a security policy that includes the load balance virtual server as the destination address.

config firewall policy edit 0 set name <policy-name> set srcintf wan1 set srcaddr all set dstintf dmz1 set dstaddr Load-Bal_VS1 set action accept set schedule always set service ALL set nat enable

end

Configure other security policy settings as required.

Basic IP load balancing configuration


Having trouble configuring your Fortinet hardware or have some questions you need answered? Check Out The Fortinet Guru Youtube Channel! Want someone else to deal with it for you? Get some consulting from Fortinet GURU!

This entry was posted in Administration Guides, FortiGate, FortiOS 6 on by .

About Mike

Michael Pruett, CISSP has a wide range of cyber-security and network engineering expertise. The plethora of vendors that resell hardware but have zero engineering knowledge resulting in the wrong hardware or configuration being deployed is a major pet peeve of Michael's. This site was started in an effort to spread information while providing the option of quality consulting services at a much lower price than Fortinet Professional Services. Owns PacketLlama.Com (Fortinet Hardware Sales) and Office Of The CISO, LLC (Cybersecurity consulting firm).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.