2017-10-07 159 views
0

任何人都與haproxy 1.7 ejabberd + ssl終止成功?與haproxy ssl終止Ejabberd

frontend ejabberd 
bind *:4000 ssl crt /etc/haproxy/certs/my-domain.com.pem 
mode tcp 
timeout client 3h 

option tcplog 

option clitcpka 

default_backend ejabberd 

backend ejabberd 
mode tcp 

timeout server 60m 

option redispatch 

option srvtcpka 

option independent-streams 

balance leastconn 

default-server inter 5s rise 3 fall 3 on-marked-down shutdown-sessions 

server ejabberd localhost:5222 check slowstart 120s 

它工作正常,沒有ssl crt。我嫌客戶給了我一個No response received within reply timeout. Timeout was 5000ms (~5s). While waiting for establishing TLS.

我也試圖通過或者不通過ejabberd的conf TTLS

回答

0

我能有確切的配置工作,你需要:

  1. 關閉TLS在ejabberd中,因爲HAProxy正在執行ssl卸載並且ejabberd在同一臺機器上:

    • 評論certfil e行
    • 評論的STARTTLS線
  2. 正確配置客戶端,我用洋涇浜,但你應該能夠做同樣的咂嘴:

    • 配置正確解決和端口(4000這裏)
    • 確保您使用「舊樣式TLS」而不是STARTTLS,後者將不適用於HAProxy。

否則,如果您希望客戶端使用STARTTLS配置,那麼你必須HAProxy的配置爲代理XMPP加密流量(除去「SSL CRT ..」)

+0

不能配置HAProxy的到塊啓動權?將smack和xmppframework一起配置是一種痛苦 – Jan

+0

這不是關於阻塞starttls,而是關於選擇HAProxy應該處理的TLS機制。 XMPP客戶端使用starttls,然後您必須刪除「ssl crt ..」或客戶端使用舊式TLS,然後您可以在HAProxy中保留「ssl crt ..」,並禁用ejabberd中的TLS – MoEmEn