Hi,
I’m trying to whitelist client hostnames. I’m getting an error(see below) when client hostname is not on our network and haproxy service is not starting. Is there a way to ignore/skip the hostnames when they are not in our network or is there an option available in haproxy configuration to handle this issue. I cannot whitelist using IP address because the IP addresses are dynamic and will not assign to the same client hostname. I’m a newbie to haproxy any help is appreciated.
frontend usertraffic
bind *:443
mode http
option httplog
maxconn 4096
use_backend appservers if { src -f /etc/haproxy/whitelist.lst }
Starting haproxy: [ALERT] 003/034045 (25299) : parsing [/etc/haproxy/haproxy.cfg:33] : error detected while parsing switching rule : 'Client Hostname ’ is not a valid IPv4 or IPv6 address at line 3 of file ‘/etc/haproxy/whitelist.lst’.
[ALERT] 003/034045 (25299) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
[ALERT] 003/034045 (25299) : Fatal errors found in configuration.
[FAILED]