#!/bin/sh # Add an entry to the hosts file so that any request to ldap2.cl.uni-heidelberg.de will be redirected # to localhost, and then use SSH to forward any requests to localhost (port 636) to ldap2.cl.uni-heidelberg.de. # # Expected usage is within the container: # # sudo docker compose -f docker-compose.dev.yml up # sudo docker exec -it portal-app-1 bash # ./proxy_ldap.sh mustermann # # Replace "mustermann" with your ICL username. echo "127.0.0.1 ldap2.cl.uni-heidelberg.de" >> /etc/hosts ssh "$1@last.cl.uni-heidelberg.de" -L 636:ldap2:636