Search code examples
vbscriptproxyactive-directorysocks

ADSI INTERFACE to connect Active Directory services through SOCKS (Proxy server)


I had a VBScript to manipulate the Active Directory users by using the ADSI interface. The script works well. This is our current scenario

a Machine ----------------------------> Active Directory server (with VB script)

However, we faced 1 problem when running the same script through the SOCKs (Proxy server). The scenario is that:

a Machine --------------> SOCKs (Proxy server) ----------> Active Directory server (with VB script)

We found out that with second case, a vb script doesn't try to connect to SOCKs server first but connecting to the Active Directory server directly. That's why it FAILED.

Please help me with the second scenario, how to get the ADSI interface or methods to go through the SOCKs server first.

Thanks a lot


Solution

  • Do you try to change your LDAP string :

    set obj = GetObject ("LDAP://SocksIPAddr:389/dc=dom,dc=fr, "societe\administrateur", "test.2011")
    

    Edited (2011-11-01)

    On the client machine, you can also modify C:\Windows\System32\drivers\etc\hosts file in order to add :

    SocksIPAddr dom.fr