I have a set-up with a LDAP-sever (ldapserver
) behind a strict firewall, and a webapplication running on a sever (appserver
) outside that firewall that needs to authenticate using that LDAP-sever.
I have successfully used a third server (tunnelserver
) as in intermediate, setting up a SSH-tunnel between appserver
and ldapserver
by running the following command on tunnelserver
:
ssh username@appserver -R 28420:ldapserver:389
The only issue is that occasionally I get a broken pipe, and lose the SSH-tunnel.
A solution seems autossh, but my limited SSH-knowledge barely managed to get the tunnel working, and seems insufficient to correctly respecify the options for autossh
.
Any tips?