Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Help to setup Haproxy firewall rules
« previous
next »
Print
Pages: [
1
]
Author
Topic: Help to setup Haproxy firewall rules (Read 746 times)
sidekick
Newbie
Posts: 5
Karma: 0
Help to setup Haproxy firewall rules
«
on:
April 13, 2023, 12:57:56 pm »
Hello everyone
Sorry I accidentally had this in Tutorials/FAQ forum.
I've been searching for days to find a solution, and I have tried many examples I encountered, but none have worked for me so far. I think its the firewall rules that are giving me hell. So I hope I will get some help on this forum.
Here is my plan: Run docker swarm on its own network via Opnsense/Haproxy. No ssl/tls/https/443, just http on port 80. I let traefik and docker handle https on the backend.
So far I have haproxy running, but haproxy stats page shows my backend servers as always down. Here is my haproxy auto-generated cofig file:
# Frontend: public (public)
frontend public
bind 0.0.0.0:80
mode http
option http-keep-alive
default_backend swarm
# logging options
# Backend: swarm (Docker swarm managers)
backend swarm
# health check: health
option httpchk
http-check send meth OPTIONS uri / ver HTTP/1.1 hdr Host localhost
mode http
balance source
# stickiness
stick-table type ip size 50k expire 30m
stick on src
http-reuse safe
server mngr21 192.168.81.21:80 check inter 2s port 80 proto h2
server mngr22 192.168.81.22:80 check inter 2s port 80 proto h2
server mngr23 192.168.81.23:80 check inter 2s port 80 proto h2
What firewall rules do I need for this to work?
Any help or links to documentation would be greatly appreciated.
Thank you
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Help to setup Haproxy firewall rules