English Forums > Tutorials and FAQs

Help to setup Haproxy firewall rules

(1/1)

sidekick:
Hello everyone
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

Navigation

[0] Message Index

Go to full version