Results 1 to 3 of 3

Thread: Connecting to a remote db using winsock

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2007
    Posts
    5

    Connecting to a remote db using winsock

    I am developing a client server app. The client needs to connect and retrieve data from the db, my question is how can i do the connection in a secure and stable way. I have succesfully created the connection via winsock, which connects to the server app but i dont know if this is convinient when there are a lot of simultaneous connections. The client should be able to connect to the server from any location, not only from an internal network.
    Thanks

  2. #2
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Connecting to a remote db using winsock

    I think I see two different questions there:
    • How can I do this securely?
    • How can I make sure it scales well?

    What is "a lot" of connections? Also, though it may not seem like an obvious question, how quickly will new connection requests arrive?


    For security you'll want some form of encrypted tunnel and a firewall that restricts outside access to just the necessary port (or ports) involved. You might even want to supplement this with some form of IP address or address range "whitelisting" at the firewall or your tunnel server or your application.

    The easiest "fix" might be to stop using the Winsock control and substitute a 3rd party component that supports an SSL/TLS encrypted TCP connection. I'm not aware of any free ones.

    Another might be to run an SSH server in front of your server application, and have your client program fire up PLink.exe to tunnel your application port. You'll need to distribute server keys with your client program though.

    A third option might be a VPN.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2007
    Posts
    5

    Re: Connecting to a remote db using winsock

    Well, by a lot of connections I mean like 1000 at the same time. I'm not familiar using SSH, if I stop using winsock will the data transfer methods work the same? By that I mean for example the comands i use to communicate client-server etc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width