accessing a pc in a network using a thompson ST536 modom/router

I need to access a sqlserver on a pc on a office network
i have my thompson router IP address at 61.xxx.xxx.78  and have my local pc Ip address at 10.0.0.2 from running IP config.
I have set up my UpnP interface
but do not exactly understand what I need to do

In the end I need to open a port, I need to use PHP code below running on a web site to access data on the office net work. Not quite sure of the sequence of events required to get it going.I have set up a static IP for the network site but am not sure what should go into $myServer to gain access through my router to the PC and retrieve the data from sqlserver

<?php
$myServer = "xxx.xxx.xxx.xxx";
$myUser = "sa";
$myPass = "";

any help would be apprecited I think I am close

<?php
$myServer = "xxx.xxx.xxx.xxx";
$myUser = "sa";
$myPass = "";
$myDB = "pubs";

$s = mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");

mssql_select_db($myDB, $s)
or die("Couldn't open database $myDB");

$proc = mssql_init("sp_GetBooksByPrice", $s);
sydneyguyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

giltjrCommented:
If you are  not going through a VPN connection, then you need to know the public IP address of the SQL server.

The firewall at the SQL Server's location needs to be configured to allow inbound access to the SQL server.

There should be no changes need at your home, since you are initiating the connection.

However, opening up your SQL server for inbound connections from the Internet is a security risk.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pjcooleCommented:
I am amusing that the web server you are running the PHP on is at your home and trying to access the SQL server located in your office over the internet?  In order to access the SQL server there are 2 options.  1 make the SQL server available to the internet this can be done by putting in in the DMZ if your office has a DMZ zone and making to appropriate rules on the Firewall to allow traffic to come into the SQL Server.  This option has a lot of security concerns but is the simplest the setup. If you do this I recommend making sure the firewall rule only allows the IPs that need to access the SQL server in rather than completely open to the internet.

The second option is to setup a VPN connection between the Office network and home network this will allow for a secure connection for you to access all the resources of the office network including the SQL server.
0
sydneyguyAuthor Commented:
the web server is on my office network, and the site that requires the information would by my web site abc.com which will access the office network were I would allow access from that IP to be abel to access the data
So would the best way be to set up a VPN to that location,
So would I set up a VPNconnection to the site and leave it open this is what I am not sure about.
1) if my site is as 74.xx.xx.xx I still need to access the site that is on that server in the US
2) or would I some were on either my router or PC allow this loc 74.xx.xx.xx to access my office PC would that be through some form of port fowarding
at present I have i have my thompson router IP address at 61.xxx.xxx.78  and have my local pc Ip address at 10.0.0.2 from how would I set this up and were to all the site to have access
thanks for your help as well
0
Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

sydneyguyAuthor Commented:
Have gone back to my router thompson ST536  and set up port fowarding I think probably wrong but its a start

my site that i require is the below one but do I add the port on the end eg. $myServer = "61.68.xx.xx:25";
or is this wrong

this is how i set it up in the router
A game or application is made of one or more TCP/UDP port ranges. Each incoming port range can be translated into a different internal (local network) port range. Port ranges can be statically assigned to devices or dynamically assigned using an outgoing trigger.

Protocol      Port Range      Translate To ...      Trigger Protocol      Trigger Port      

Any         24 - 25                 24 - 25                                   -                             -

<?php
echo 'here';
$myServer = "61.68.xx.xx:25";
$myUser = "sa";
$myPass = "";
$myDB = "pubs";
$s = mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");

?>
0
giltjrCommented:
Configuring your router will only help if the SQL server is going to initiate a connection to you, that is inbound traffic to your home.

In order to get to the SQL server, the firewall at the SQL server's location will need to be configured to allow inbound traffic to the SQL server.  Inbound to the SQL server is outbound from you.

I doubt very much that your SQL server is listening on port 25.  Port 25 is normally used for SMTP traffic, which is for receiving e-mail.

The session initiation flow should be:

     Your Computer ---> ST536 --> Internet --> Work Firewall --> SQL server

Your ST536 will allow ANY and ALL traffic out, but your work firewall will be blocking it.
0
sydneyguyAuthor Commented:
the session should be  websiteserver----> no fire wall at present-------> ST536------> my PC -----> ms-sql server

at present I am just trying to get access to the pc from the server so am running putty an just trying to open a connection to the PC just to get a connection working. will try and do it in stages and get one thing out of the way at a time.
telnet> o 61.xx.xx.47 25
i have tried to just go through one of the games port access, not sure if this is right but please let me know if i am on the right track

The table below shows the games and applications that are allowed to be initiated from the Internet.
You need to configure such games or applications if you like to act as a game server or share a server located on your local network with other people.
If you are simply a player or simply accessing the Internet, you don't need to configure games or applications.
Game or Application      Device      Log      
aaaa                              xplap      Off
Age of Mythology             xplap              On
atest                              xplap      On

the below is whats set for Age of Mythology      
Protocol      Port Range      Translate To ...      Trigger Protocol      Trigger Port      
UDP        2300 - 2300      2300 - 2300

so i am going
telnet>o telnet> o 61.xx.xx.47 2300

and its throwing up connection refused
unable to connect to remote host: connection refused

AM i doing this right or am I missing something here????
is this how you set it up and test it
can you even test a games port this way??
0
pjcooleCommented:
The default port for SQL Server TCP 1433 not 25.   You can verify this on the sql server by looking in SQL Server Configuration Manager.
0
giltjrCommented:
O.K., the access is backwards from what I was thinking you were doing.

On the ST536 you need to port forward TCP 1433 (or whatever port you have configured SQL server to listen on) to the inside IP address of your SQL server.  On the Web server you need to use the public IP address (61.xx.xx.47).
0
sydneyguyAuthor Commented:
thanks for the input sorry for the delay was out of network coverage for several weeks

thanks for the info, i have had to place this aside for a few weeks and will revist and repost the question when i get back to it thanks for the help. and now have more info to approch the problem
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.