Do ssh local port forward:
/etc/inittab:
toid:3:respawn:/bin/su – oracle -c “screen -S toid -D -m ssh -L 38899:extranet_ldap_server:389 oracle@another_intranet_server”
socat TCP4-LISTEN:38899,bind=localhost_intranet_server_ip,fork TCP4:127.0.0.1:38899 &
Some explanations:
LDAP/389 is running on ‘extranet_ldap_server’. ‘another intranet server’ has access to 389 port of ‘extranet_ldap_server’, and ‘localhost_intranet_server’ does not have that access. Now we are enabling ldap access from ‘localhost_intranet_server’.
ldapbind -h intranet_server_ip -p 38899