4

I have text files with lists of IP addresses that I want to use to help determine to right actions to take with HAProxy.

So if HAProxy loads whitelists like this.

acl whitelist src -f /path/to/ips.list

If ips.list were to be modified would HAProxy automatically reload it - So I can modify the IP lists on the fly?

slm
  • 7,615
  • 16
  • 56
  • 76
Michael
  • 41
  • 1
  • 2

2 Answers2

2

Haproxy will only read its config, including such files, during startup and when explicitly told to reload its config. If you installed haproxy via a package then the init.d script should have a reload target for this. Otherwise a quick search of serverfault for "haproxy reload" will show numerous examples how to do it. A reload will not interrupt any existing sessions so is very unobtrusive.

wurtel
  • 3,864
  • 12
  • 15
2

HAProxy Enterprise has recently added this feature via the lb-update module:

https://www.haproxy.com/documentation/hapee/1-8r1/traffic-management/lb-update/

If you don't have HAProxy Enterprise, then it's up to you to recognize that the files have changed and issue the appropriate reload command.