Networking Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationNetworking Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 29th, 2004, 10:06 AM
avi s. avi s. is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 avi s. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Connecting From OuTSIDE problem

Hi everybody,

The following is an introduction describing my small workgroup network
setup. After that will come description of the problem.

I have 3 machines. Machine 1 is installed with windows 2000 server
and ms sql 2000 enterprise edition. Machine 2 and 3 are installed
with windows 2000 and XP, resepectively. All the machines are
connected to one another to the through workgorup setup into a router,
ehich in turn, is connected to the cable modem of ISP optimum online.
All the connections seem to work fine and each computer cab access one
another as well as the internet. I run from machine 2 the following
snippte of code :

sub TestWithinWorkGroup()
Dim sqlconn As New ADODB.Connection
Dim rs As ADODB.Recordset
ConnectionString = "Driver={SQL Server};" & _
"Server=192.168.0.2;" & _
"Address=192.168.0.2,1433;" & _
"Network=DBMSSOCN;" & _
"Database=pubs;" & _
"User ID=sa;" & _
"Pwd=******"
sqlconn.Open ConnectionString
Set rs = sqlconn.Execute("select * from authors")
Debug.Print rs("au_fname")
End sub

That code is a test performed SUCCESSFULLY inside the workgroup.
Without getting into the details of the code, I would mention that
Machine 1, where the database is, has a private network ID of
192.168.0.2, which used in the VB code,s connection string, along with
the port number, port 1433. Machine 2, from which the code was
executes has a private network ID of 192.168.0.3. I guess the IP
address(i.e., 192.168.0.2) and the port number(1433) are the only two
so-called arguments that are relevant to the problem at hand, which
can be summarized by the following question : what do I have to do in
order to make this test work when running that snippet of code from a
machine OUTSIDE the workgroup (e.g., some machine on the internet)?

One thing I know for sure is that I need to replace any IP address
occurence of 192.168.0.2 (where the database is) with the IP address
known of the that workgroup as it's lookup upon from the internet. A
small check tells me that my DYNAMIC IP address is 24.191.235.110.
Anything that needs to be done or configured in addition to the
aforementioned replacement is another good guess at best, a question
mark at worst. Since I have tried many things already and nothing
yielded any good result, I can be sure only about the requirement to
replace (inside the vb code snippet) the IP of the private network
related to machine 1 with the public Ip address of the small
workgroup, and foregive me for my bad terminologi if indeed that is
the case.


It is important to note that even though the IP I mentioned above
(e.g., 24.191.235.110) is DYNAMIC, the intended test from a remote
machine can be successful as long as the IP does not change by the ISP
system, which is possible if the cable modem power is not turned off.
But even if it worked only once, I will be happy, since I'm only
testing. And when the test is successful, I'll know excatly what I'am
required to do with respect to the entire WORKGROUP configuration, or
maybe just the configuration of the router or Machine 1.


Let's review all of the above: We know that the internal setup is a
workgroup, connected to the internet with a router. We know that a
successful test worked in the context of a workgroup.

My goal is to perform tha test from a remote machine in which the vb
snippet above, with small adaptation, will be executed in order to
connect and run a query with respect to the database in Machine 1.

If there is anyone out there in this discussion group that can help me
bring about a remote successful test for once and for all, then I will
be greatly appreciative. If you can provode me a step by step
instructions to follow, then it will be all the better.

Thank you in advance

Avi

Reply With Quote
  #2  
Old February 29th, 2004, 10:12 AM
edwinbrains's Avatar
edwinbrains edwinbrains is offline
Retired Moderator
Dev Shed God 4th Plane (6500 - 6999 posts)
 
Join Date: Jan 2004
Location: London, UK
Posts: 6,670 edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)edwinbrains User rank is Second Lieutenant (5000 - 10000 Reputation Level)  Folding Points: 85411 Folding Title: Advanced FolderFolding Points: 85411 Folding Title: Advanced FolderFolding Points: 85411 Folding Title: Advanced FolderFolding Points: 85411 Folding Title: Advanced FolderFolding Points: 85411 Folding Title: Advanced Folder
Time spent in forums: 1 Week 6 Days 23 h 39 m 19 sec
Reputation Power: 92
You say that all your computers are connected to a router. In the web based administration for the router, you need to setup port forwarding, so that all requests for port 1433 are forwarded to the internal server with Ip address 192.168.0.2.

Then you need only modify your code to change 192.168.0.2 to the external address of your router, 24.191.235.110). When you connect with your code, the router will forward your request to the internal server, and hopefully it should work.

You may want to look at a dynamic DNS service, to help overcome the problem of a Dynamic IP. Take a look at:

http://www.dyndns.org/ and

http://www.no-ip.com/

HTH,

Edwin

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationNetworking Help > Connecting From OuTSIDE problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT