Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Connecting to a database server through a proxy.

Posted on 2009-07-01
6
Medium Priority
?
456 Views
Last Modified: 2013-11-13
I normally connect to a SQL server from a C# or VB app using a connection string such as:
Data Source=<ServerIP,Port>;TRUSTED_CONNECTION=no;Persist Security Info=False;Initial Catalog=DBName;User ID=john;password=1234

This does not work when there is a proxy at the client side that blocks access through to the Internet.

All solutions I have found suggest that the client side IT staff open the proxy firewall for the required ports. In practice, people are often reluctant to open additional ports on the firewall. It is possible to go through the firewall using an HTTP tunnel, however I cannot get this to work to open a SQL connection. There are other methods available, for example Proxifier ( www.proxifier.com ) does this. Does anyone know how to do this in code, as I would prefer to avoid clients having to install an additional application on their machines.

Thanks,
Rob
0
Comment
Question by:RobboRed
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 57

Expert Comment

by:giltjr
ID: 24753398
Unfortunately the bad part of using a proxy is not all IP based applications support using proxy.

proxifier works by "hooking" into the IP stack and intercepting the IP packets and transparently sending them to the proxy server.  Something you really can't do in code.

What I would suggest is that instead of the clients talking directly to the database server, that you write a HTTP front end to your application and have them talk to a web server and have the web server talk to the database.
0
 

Author Comment

by:RobboRed
ID: 24755100
Thanks for your response. A web interface is a possibility, but it is difficult to get the functionality of a Windows application so I'm still hoping there is an alternative solution.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 24756237
Well not really.  If you go back and read by statement, I never said you had to use a web interface.  I said you can use HTTP talking to a web server.

You still have a custom C++ (or whatever language you wish to write in) and it uses HTTP to communicate the requests back to a web server.  In fact it does not even need to be a web server, it can be a custom written server application that processes HTTP, its just a web server based application gets you out of the business of handling some of the more mundane processes of being a HTTP server.

0
Q2 2017 - Latest Malware & Internet Attacks

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out our latest Quarterly Internet Security Report!

 

Author Comment

by:RobboRed
ID: 24756846
I don't really understand where HTTP comes in. Does a connect command to a database use HTTP?
0
 
LVL 57

Accepted Solution

by:
giltjr earned 1500 total points
ID: 24757272
No, you would  use HTTP to communicate the clients request and response to and from the server application.  The server application would then do the query against the database and then return the results to the client.

In one sense it would look like a web based application, the difference is instead of a web browser the client would be your custom program.

This way you don't have to have to have the customer install special software in order to get through their proxy server or for them to install/setup a socks server.

Otherwise they have to configure their firewall to allow direct access to your data base server without going through their proxy.
0
 

Author Comment

by:RobboRed
ID: 24761675
Yes, that would work, thanks.
0

Featured Post

Looking for the Wi-Fi vendor that's right for you?

We know how difficult it can be to evaluate Wi-Fi vendors, so we created this helpful Wi-Fi Buyer's Guide to help you find the Wi-Fi vendor that's right for your business! Download the guide and get started on our checklist today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
Is your computer hacked? learn how to detect and delete malware in your PC
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question