• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How to use LDAP server via Proxy?

 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I have a LDAP server which needs to be accessed by a proxy. How can I access it via a proxy? If it were Http server then I can use System.setProperty("http.proxyHost","1.1.1.1") sort of settings for host and port but I don't know if my LDAP server requires proxy then how do I do it?
Do we have anything like- ldap.proxyHost or something?
I tried with socksProxyHost, socksProxyPort but I don't know what to give in as socksProxyHost? I know my http/ftp/ssl proxy server's IP address and the socksProxyPort should be 1080 though.
Any help would be great.
Regards
Maulin
 
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess I'm not understanding the problem... if the proxy server is operating correctly, then it shouldn't matter how you access the LDAP server. The proxy should be transparent to your LDAP client.
Have you tried using JNDI (javax.naming.ldap package) instead of using the lower level socks approach?
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Phillip
Thanks for your response.
Well, I am using JNDI and the ldap package you mentioned. I will try to re-explain my concern,
1. I have a ldap server X
2. I have a development server Y
3. Y is internal machine to my network which is not allowed to make connection to X directly
4. I have a proxy P that is used to access other servers. e.g. to do telnet, to access html page on those servers via setting browser proxy etc
Now, I know that to do a telnet to some external machine which is not allowing direct telnet to my internal machine, I have to first login to the proxy server (via ssh or telnet) and then do telnet to the external machine. Similarly, if I want to make URLConnection from a code residing on my internal machine to the external server then I use,
System.setProperty("http.proxy","myproxy");
System.setProperty("http.port","myproxyport");
But what if I have to make LDAP connection via JNDI to the external ldap machine which doesn't allow my internal machine to connect to itself directly? I guess, setting above same properties doesn't help me because they are for HTTP proxy , right?
I hope I am able to explain my problem.
Regards
Maulin
 
Philip Shanks
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I understand the issue now. I think that the proxy server must be set up to work with the port/protocol that you want to use. I doubt there is a way around that.
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Philip
Well, its not really a big issue for me. It was just that I was curious to know if there is a way. Its not hard-and-fast requirement but I have a GUI that can list schema of a given LDAP server and that GUI is on my PC and the LDAP is outside the reach of my PC as I mentioned, so I am little stuck.
Anyways, I also thought that there has to be some support for the protocol via which proxy can work for LDAP connections like http and ftp. May be this could be a start point of some open source development
Regards
Maulin
 
It's a tiny ad. At least, that's what she said.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic