首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >HAProxy IPv6 to IPv4问题

HAProxy IPv6 to IPv4问题
EN

Server Fault用户
提问于 2015-05-15 22:18:49
回答 1查看 5K关注 0票数 3

我已经在Ubuntu14.04上设置了一个HAProxy节点ver1.5.3。Ubuntu服务器有一个nic。nic有一个IPv6地址和一个IPv4地址。IPv6在端口80上侦听传入的incoming连接。IIS服务器安装在具有IPv4地址的同一个VLAN中的单独Windows计算机上。没有防火墙。通过互联网,我可以在80端口连接到IPV6地址,所以这很好。HAPRoxy统计数据显示后端The服务器正常,但我仍然不能通过HAProxy浏览IPv4服务器上的网站。当我打开我的浏览器时,我在IE中得到了一个错误:“HTTP400Bad请求”我重新安装了Ubuntu,没有帮助。我把我的头发拔出来了。谁来帮帮忙。

这是我的配置:

代码语言:javascript
运行
复制
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
EN

回答 1

Server Fault用户

发布于 2019-01-24 10:51:24

尽管这是个超级古老的话题。但也许人们最终会来到这里。

现在,我正在运行一个ha proxy 1.8的实例。*我知道这是一个1.5.3实例。但今天的大多数人可能会使用1.8或更高的。

要使ipv6工作,请绑定您的前端:

代码语言:javascript
运行
复制
bind :80 v4v6
bind :::80 v6only

您还可以使用:

代码语言:javascript
运行
复制
bind :::80 v4v6

但在最后一种情况下,连接到它的客户端的"fowarded“ip将是::ffff:123.123.123.123,而不是123.123.123.123。

票数 2
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/692404

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档