Hi,
I am trying to setup Rebex TLS Proxy to allow us to use legacy applications that doesn't support TLS 1.2 to connect to our Azure SQL manged instance that only supports TLS1.2.
When using this config without cert, the connection somehow fails:
tunnels:
- name: sqlserveraddress.database.windows.net:1433
in:
port: 1433
out:
address: sqlserveraddress.database.windows.net
port: 1433
protocol: TLS
tlsVersions: TLS12
idleTimeout: 120
2025-03-21 16:06:01.396 [INF] Tunnel(1)[#0 'server'][O]: Connection secured using cipher: TLS 1.2, RSA with ephemeral ECDH, AES with 256-bit key in GCM mode, AEAD.
2025-03-21 16:06:01.396 [INF] Tunnel(1)[#0 'server'][-]: Established tunnel (127.0.0.1:50058) --'plain'--> (1433) --'TLS12'--> (sqlserveraddress.database.windows.net:1433).
2025-03-21 16:06:01.396 [DBG] Tunnel(1)[#0 'server'][-]: Endpoints: IN=[127.0.0.1:50058; 127.0.0.1:1433], OUT=[10.221.2.8:50059; 10.221.1.201:1433].
2025-03-21 16:06:01.412 [DBG] Tunnel(1)[#0 'server'][I]: Using modern transport layer.
2025-03-21 16:06:01.412 [DBG] Tunnel(1)[#0 'server'][-]: Forwarding 52 bytes (IN ==> OUT).
2025-03-21 16:06:01.412 [DBG] Tunnel(1)[#0 'server'][-]: Forwarding 37 bytes (IN <== OUT).
2025-03-21 16:06:01.412 [DBG] Tunnel(1)[#0 'server'][-]: Forwarding 184 bytes (IN ==> OUT).
2025-03-21 16:06:01.428 [DBG] Tunnel(1)[#0 'server'][-]: Forwarding 196 bytes (IN <== OUT).
2025-03-21 16:06:01.428 [DBG] Tunnel(1)[#0 'server'][O]: TLS socket was closed abruptly.
2025-03-21 16:06:01.428 [DBG] Tunnel(1)[#0 'server'][-]: Forwarding from inbound tunnel finished (IN ==> OUT).
2025-03-21 16:06:01.428 [DBG] Tunnel(1)[#0 'server'][-]: Closing tunnel from 127.0.0.1:50058.
2025-03-21 16:06:01.443 [DBG] Tunnel(1)[#0 'server'][O]: (closing) Rebex.Net.TlsException: Connection was closed by the remote connection end.
2025-03-21 16:06:01.443 [DBG] Tunnel(1)[#0 'server'][-]: (closing) Error while receiving data (IN <== OUT): Rebex.Net.TlsException: Connection was closed by the remote connection end.
2025-03-21 16:06:01.443 [DBG] Tunnel(1)[#0 'server'][-]: Forwarding from outbound tunnel finished (IN <== OUT).
2025-03-21 16:06:01.443 [INF] Tunnel(1)[#0 'server'][-]: Tunnel from 127.0.0.1:50058 closed.
Any clues how I can troubleshoot this?
I thought that perhaps the incoming tunnel would need TLS as well but when trying to add a cert it fails all the time.
tunnels:
- name: sqlserveraddress.database.windows.net:1433
in:
port: 1433
certificate: D:\www.domain.com.cer; key=D:\www.domain.com.pri
protocol: TLS
tlsVersions: TLS10,TLS11,TLS12,TLS13
out:
address: sqlserveraddress.database.windows.net
port: 1433
protocol: TLS
tlsVersions: TLS12
idleTimeout: 120
I can validate the certs with command,
tlsproxy certinfo "D:\www.domain.com.cer; keyD:\www.domain.com.pri"
But the config fails with error
Service "RebexTlsProxy" is starting ERROR Cannot start service
'RebexTlsProxy' on computer '.'. System.InvalidOperationException:
Cannot start service 'RebexTlsProxy' on comput er '.'. --->
System.ComponentModel.Win32Exception (1053): The service did not
respond t o the start or control request in a timely fashion. ---
End of inner exception stack trace --- at
System.ServiceProcess.ServiceController.Start(String[] args) at
System.ServiceProcess.ServiceController.Start() at
irq.<>c.bxr(ServiceController wn) at irq.dul(Action1 wi,
ServiceControllerStatus wj) at irq.dui() at iru.<>c.wgr(irq xu)
at irt.qza[b](String xl, Func
2 xm) at iru.pvd(String xq) at
irs.usx() at Rebex.TlsProxy.Cli.SvcStartCliOptionsBase.Run(irs
handler) at iov.Handle(SvcStartStopCliOptionsBase op) at
System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite
site , T0 arg0, T1 arg1) at iov.uvu(VerbOptionsBase f) at
ioz.Main(String[] args)
Adding nothing to the log file, the event log records
YamlDotNet.Core.YamlException: (Line: 4, Col: 5, Idx: 101) - (Line: 4, Col: 5, Idx: 101): Exception during deserialization ---> System.Runtime.Serialization.SerializationException: Property 'certificate' not found on type 'Rebex.TlsProxy.Config.TlsProxyConfiguration+Endpoint'.
Any clues? :)