Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tasdikrahman/e65c36f8156eeef855c5fc24196655bb to your computer and use it in GitHub Desktop.
Save tasdikrahman/e65c36f8156eeef855c5fc24196655bb to your computer and use it in GitHub Desktop.
HAproxy config (/etc/haproxy/haproxy.cfg) for kingsly to allow only whitelisted IP's for a backend.
frontend kingsly-frontend
...
...
acl ALLOW_SRC src -f /etc/haproxy/include/allow-ips.lst
http-request deny if !ALLOW_SRC
...
...
default_backend kingsly
backend kingsly
...
...
server kingsly-kube <private-ip>:80 check port 80 inter 5000 fastinter 1000 fall 1 weight 1
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment