0

I have HAProxy setup to listen on a public IPv4 address (1.2.3.4), it is supposed to proxy all requests to my b_http backend. The back-end has a source line that makes it connect to the server/site with an IPv6 address. With the config below, I am able to restart HAProxy and see that it is listening on 80 and 443. However, when I connect to 1.2.3.4, I am getting a error 503. When I connect to the said server without the proxy, it is ok. I am trying to figure out what I am not doing correctly.

global
    daemon
    maxconn 256000
    user haproxy
    group haproxy
    pidfile /var/run/haproxy.pid
    spread-checks 5

defaults
    maxconn 256000
    log global
    option redispatch
    option allbackups
    option abortonclose
    option http-server-close
    timeout connect  5000
    timeout client   5000
    timeout server   5000
    timeout queue    5000
    timeout check    5000
    retries 2   

# Front-end HTTP Rules
frontend f_http
    bind *:80
    mode http
    default_backend b_http

# Frontend HTTPS Rules
frontend f_https
    bind *:443
    mode tcp
    default_backend b_https

backend b_http
    mode http
    option accept-invalid-http-response
    balance roundrobin
    source ipv6@2606:a740:70:b::1000:80
    server www.mywebsite.com www.mywebsite.com:80 maxconn 100000 check inter 2s fastinter 2s downinter 2s

backend b_https
    mode tcp
    balance roundrobin
    source ipv6@2606:a740:70:b::1000:80
    server www.mywebsite.com www.mywebsite.com:443 maxconn 100000 check inter 2s fastinter 2s downinter 2s
Kladskull
  • 1,255
  • 5
  • 15
  • 32
  • What does the stats page say about the health of your servers and backends? – GregL Feb 23 '16 at 21:21
  • It says: Layer4 connection problem: Can't bind to source address. I did create/attach an ipv6 to eth0 with the ip command. The IPv4 & IPv6 addresses are both attached to eth0 – Kladskull Feb 24 '16 at 13:41
  • if it says that it can't bind to the source IP, it means something else is using it. Use `netstat -lnp` to find out what and go from there. – GregL Mar 09 '16 at 16:47

0 Answers0