Results 1 to 4 of 4

Thread: How to connect to SQL Server via proxy ?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    517

    How to connect to SQL Server via proxy ?

    Suppose I have 2 network layers: network layer A and network layer C, network layer A is the internal network layer without using the internet, network layer C uses the internet, in network layer C I use management software sales with SQL Server connection over the Internet, with following chain connection:
    Code:
    public static string sConnectionString = @ "Server = IP WAN, Port 1433; Database = MyData; User Id = sa; password = xxx";
    The question is, I am at network layer A, intranet layer, how do I want to use sales management software to connect SQL Server via proxy? If I use a proxy connection, how should I fix it?
    Code:
    public static string sConnectionString = ??? // via proxy ???

  2. #2
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: How to connect to SQL Server via proxy ?

    The IP should be the IP of the proxy server, along with the appropriate port designated on the proxy server for SQL Server. I've got an interesting situation where my own machine is my proxy, so all my connections are to localhost... the vpn tunnel then does port forwarding to the AWS serves as needed. It's all based on the server name/IP address and the port

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    517

    Re: How to connect to SQL Server via proxy ?

    Your case presentation is not the same as mine. the server is not using a proxy, the server is WAN IP, port 1433, user = sa, pass = xxx. The question I ask from the client that connects to the server uses a proxy because the client has 2 layers: the network layer A is the non-internet internal network layer, the network layer C is the network layer that has internet, if I run the business software In network layer C the program runs normally, in contrast, I run in network layer A the program can't run so I need a proxy to run the program.

  4. #4
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,120

    Re: How to connect to SQL Server via proxy ?

    Can network "layer" A connect to network "layer" C?

    You can then install/setup a proxy server in network "layer" C and change connect string from "Server = WAN IP" to "Server = Network_Layer_C_Proxy IP"

    On the proxy server in network "layer" C you can try running netsh to config 1433/tcp port forwarding like this

    c:> netsh interface ipv6 install
    c:> netsh interface portproxy add v4tov4 listenport=1433 listenaddress=0.0.0.0 connectport=1433 connectaddress=WAN IP
    Might need allowing inbound traffic on port 1433/tcp in local Windows Firewall too.

    cheers,
    </wqw>

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