首页 文章

如何禁用ssl证书并仅用于转发Nginx中端口443上的流量?

提问于
浏览
1

主机A具有https服务 serviceA ,并提供两个IP以实现高可用性 .

例如Bose [ip1:443]和[ip2:443]被路由到serviceA .

主机B(没有ssl_certificate和ssl_certificate_key)使用Nginx代理模块代理对实际 serviceA 的请求 . 如何在没有ssl验证的情况下简单地将443端口流量转发到 serviceA ?这是我的配置:

http {
  upstream backend {
    server [ip1]:443;
    server [ip2]:443;
  }

  server {
    listen       443;
    listen       [::]:443;

    location / {
        proxy_pass  https://backend;
    }

  }
}

2 回答

  • 2
  • 1

    尝试:

    ip6tables -t nat -A PREROUTING -d 2002:xxxx:9a21::1/128 -i sit6to4vip -p tcp --dport 443 -m statistic --mode random --probability .5 -j DNAT --to-destination 2002:xxxx:f6ea::1
    ip6tables -t nat -A PREROUTING -d 2002:xxxx:9a21::1/128 -i sit6to4vip -p tcp --dport 443 -m statistic --mode random --probability .5 -j DNAT --to-destination 2002:xxxx:f6e9::1
    
    ip6tables -t nat -A POSTROUTING -d 2002:xxxx:f6ea::1/128 -o sit6to4vip -p tcp --dport 443 -j SNAT --to-source 2002:xxxx:9a21::1
    ip6tables -t nat -A POSTROUTING -d 2002:xxxx:f6e9::1/128 -o sit6to4vip -p tcp --dport 443 -j SNAT --to-source 2002:xxxx:9a21::1
    

    它不起作用

相关问题