Editing
Pfsense HAPROXY Loadbalancer
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== HAproxy Loadbalancer +SSL === ---- ''' This does not do SSL offloading. All your webservers must have SSL working. ''' '''I am using this IP as an example, please use your own''' * External Web IP: 8.8.8.8 * Load Balanced IP 1: 4.4.4.4 * Load Balanced IP 2: 5.5.5.5 '''This will LOAD balanced requests''' * 8.8.8.8:80 (HAproxy) -> External: [ 4.4.4.4:80 , 5.5.5.5:80 ] * 8.8.8.8:443 (HAproxy) -> Extneral: [ 4.4.4.4:443 , 5.5.5.5:443 ] ==== Details ==== ---- '''HTTP''' # HAproxy is listens on 10.200.200.200:80 and will Loadbalance the connection between 4.4.4.4:80 and 5.5.5.5:80 '''HTTPS''' ''all real web servers handle SSL'' # HAproxy is listens on 10.200.200.200:443 and will Loadbalance the connection between 4.4.4.4:443 and 5.5.5.5:443 :*''' Make sure to use SOURCE load balancing for sticky sessions''' :*''' DO NOT enable any cookies - only HTTP mode ''' ==== Virtual IP Addresses (VIPS) ==== ---- # Firewall -> Virtual IPs # ''Add 8.8.8.8'' ## IP Alias (or carp if failover is enable) ## Interface WAN ## Type: Network ## Address: 8.8.8.8/32 ## Description: External LB ==== HAproxy ==== ---- # System -> packages -> Available Packages: HAproxy # Services -> HAproxy ===== Settings ===== # Check Enable HAproxy # Maximum Connections: 1000 (or whatever you want) # ''optional'': Enable Sync if you have CARP enabled (only on primary) ## Password same as Admin Interface ## Host #1: IP address of Failover ===== Frontends ===== * This is for the normal HTTP # Name: WEB_8.8.8.8_80 # Description: Public HTTP to 8.8.8.8:80 # Type: HTTP # Balance: Least Connections # Port: 80 # External IP: 8.8.8.8 (External LB) # Check use forwardfor # check httpclose # Advanced Pass thru: cookie SERVERID insert nocache indirect * This is for the HTTPS # Name: SSL_8.8.8.8_443 # Description: Public SSL to 8.8.8.8:443 # Type: HTTPS # Balance: '''SOURCE''' -- must be used for sticky sessions # Port: 443 # External IP: 8.8.8.8 (Exernal LB) # Check use forwardfor # check httpclose # Advanced Pass thru: cookie SERVERID insert nocache indirect ===== Servers ===== * add real server 4.4.4.4:80 # Name: 4.4.4.4-80 # Frontends: Add HTTP frontend we just created ( WEB_8.8.8.8_80 ) # IP Address: 4.4.4.4 # Cookie: server_4.4.4.4_80 # Weight: 1 * add real server 5.5.5.5:80 # Name: 5.5.5.5-80 # Frontends: Add HTTP frontend we just created ( WEB_8.8.8.8_80 ) # IP Address: 5.5.5.5 # Cookie: server_5.5.5.5_443 # Weight: 1 * add real server 4.4.4.4 # Name: 4.4.4.4-443 # Frontends: Add HTTPS frontend we just created ( WEB_8.8.8.8_443 ) # IP Address: 4.4.4.4 # Cookie: server_4.4.4.4_443 # Weight: 1 * add real server 5.5.5.5 # Name: 5.5.5.5-443 # Frontends: Add HTTPS frontend we just created ( WEB_8.8.8.8_443 ) # IP Address: 5.5.5.5 # Cookie: server_5.5.5.5_443 # Weight: 1
Summary:
Please note that all contributions to RARForge may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
RARForge:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Home
All Pages
All Files
View Categories
Recent changes
Random page
Edit this menu
Tools
What links here
Related changes
Special pages
Page information