3

I have setup a HAProxy node ver 1.5.3 on Ubuntu 14.04. The Ubuntu server has 1 nic. The nic has an IPv6 address and an IPv4 address. The IPv6 listens on port 80 for incoming internetconnections. The Webserver is installed on a separate Windows IIS machine in the same VLAN with an IPv4 Address. No firewall. From the internet I can connect on port 80 to the IPV6 address so thats good. The HAProxy stats show that the the backend webserver is ok But still I cannot browse the website on the IPv4 server through the HAPRoxy. When I open my webbrowser I get an error in IE: "HTTP 400 Bad Request" I reinstalled Ubuntu, did not help. Im pulling my hair out on this. Someone please help.

Here's my config:

global
        log /dev/log    local0
        log /dev/log    local1 notice
        chroot /var/lib/haproxy
        stats socket /run/haproxy/admin.sock mode 660 level admin
        stats timeout 30s
        user haproxy
        group haproxy
        daemon

        # Default SSL material locations
        ca-base /etc/ssl/certs
        crt-base /etc/ssl/private

        # Default ciphers to use on SSL-enabled listening sockets.
        # For more information, see ciphers(1SSL).
       #  ssl-default-bind-ciphers kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL

defaults
        log     global
        mode    http
        option  httplog
        option  dontlognull
        timeout connect 5000
        timeout client  50000
        timeout server  50000
        errorfile 400 /etc/haproxy/errors/400.http
        errorfile 403 /etc/haproxy/errors/403.http
        errorfile 408 /etc/haproxy/errors/408.http
        errorfile 500 /etc/haproxy/errors/500.http
        errorfile 502 /etc/haproxy/errors/502.http
        errorfile 503 /etc/haproxy/errors/503.http
        errorfile 504 /etc/haproxy/errors/504.http

frontend localnodes
    bind 0::0:80
    mode http
    default_backend nodes

backend nodes
    mode http
    balance roundrobin
    # option forwardfor
    # http-request set-header X-Forwarded-Port %[dst_port]
    # http-request add-header X-Forwarded-Proto https if { ssl_fc }
    # option httpchk HEAD / HTTP/1.1\r\nHost:localhost
    server web01 192.168.40.100:80 check

listen stats *:1936
    stats enable
    stats uri /
    stats hide-version
    stats auth someuser:password
1

1 Answer 1

3

Eventhough this is a super old topic. But maybe people will end up here.

Right now i am running an instance of ha proxy 1.8.* I know this is about a 1.5.3 instance. But propably most people today will use 1.8 or higher.

To make ipv6 work bind your frontend to:

bind :80 v4v6
bind :::80 v6only

You can also use:

bind :::80 v4v6

But in this last case the "fowarded" ip of the client connecting to it will be ::ffff:123.123.123.123 instead of 123.123.123.123

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .