Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing to a DB behind a firewall

Status
Not open for further replies.

glyns

Programmer
Dec 15, 2008
125
0
0
GB
Is it possible (and if so how) to connect and write data to a SQL server DB on a PC behind a firewall from a site on the internet in VB.Net?

I know how to connect to a DB that is externally linked to the net, say from my site to the PC at 152.541.55.97, but can I get to a PC on the internal network behind this server, say at 192.168.0.5?

So going a little something like this

T'interweb ====> 152.541.55.97 ====> 192.168.0.5

Thanks
 
Hi. I would suggest you change the port number of the sql server straight away. So your connection string would use something like 152.541.55.97,1887. Being 1887 the new port. DO NOT USE the default 1443.
This would then direct any incoming traffic to that application via the port.
You must also open the port on the router (port forward) and also on the firewall.
You would then be able to use 152.541.55.97,1887 on your local SQL Server Management studio and connected directly to the data aswell as using the connection string 152.541.55.97,1887 on your application to link to the data.
Persist Security Info=True;Data Source=152.541.55.97,1887;Initial Catalog=YourDataBase;User ID=TestUser;Password=TestUser88888888
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top