currently working on an ftp proxy with ProFTPD.
Our setup is pretty much still the same as in this issue.
However, we struggle to make use of the username. As we want to hide/transport the target server in the username we do an rewrite on the username to get it cleaned up.
So far so good, we can use the clean username. To do an LDAP authentication.
However we are still in need of the targetserver string that was in the username before the rewrite.
Any information on how to:
- save the original username to a environment variable before it is rewritten (and prevent the env variable to be rewritten as well)
- use the ProFTPD notes (read about it but somehow failed to find and docs on it)
- access the original username (not the rewritten one)
- any other information how to accomplish hiding username and targetserver in the connection and using it
are very welcome.
Maybe there is some kind of technique that we do use in the wrong way or a technique that we failed to use so far.
Edit:
Regarding @Castaglia
Was said we do have 2 infos in the original username. ADuser@RemoteServer.
Withe the ADuser we want to establish an LDAP authentication. With the RemoteServer info we want to connect to a remote server with credentials we queried from MySQL.
What we struggle with right now is making use of both infos. With the rewrite we get a clean user but loose the server.
So what we are looking for is some sort of option to save the original string to a var. And rewrite it 2 times. One time into a userstring to authenticate ans one time into a server name to know which server the user wants to connect to.