Connection issue between SQL Servers (using Public IP)

I want to configure replication between my office and hosting company, where we hosted our application with its databases.

We are able to replicate from my office to hosting company server, by allowing hosting company IP address in our firewall.

When we want to do the same, from hosting company server to my office, it is not able to connect to my server. Note that we have a public IP address, through which connection should be established. But this IP address is not a server / machine, just an IP. Also inside our office there are many SQL Server instances and we want to connect to one of them.

Independent of replication, I am able to connect to hosting company SQL Server using SSMS in my Office Server. But when I do the same using remote desktop connection of hosting company server to connect to SQL Server in my office, I failed.

Please suggest.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Zaheer IqbalTechnical Assurance & ImplementationCommented:
Have the hosting company opened there firewall etc to access your server?
Zaheer IqbalTechnical Assurance & ImplementationCommented:
Standard Security
Server=myServerAddress;Database=myDataBase;User Id=myUsername; Password=myPassword;

Trusted Connection

Connect via an IP address
Data Source=,1433;Network Library=DBMSSOCN; Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
DBMSSOCN=TCP/IP is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server
batchakamalAuthor Commented:
Dear 1stITMAN, Thanks for your immediate reply.

Have the hosting company opened there firewall etc to access your server?

We have our own network inside our office, and there are many servers inside LAN. We have a public IP through which hosting company can enter into our network. Hosting company can also access this IP. But how can I connect to one of the SQL Server inside my LAN from hosting company.
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Zaheer IqbalTechnical Assurance & ImplementationCommented:
Do you have TMG ?
batchakamalAuthor Commented:
Zaheer IqbalTechnical Assurance & ImplementationCommented:
OK setup a rule to redirect from your TMG to the SQL Server then
batchakamalAuthor Commented:
Ok I will tell network team to do this.
Once they complete that step, can I mention the SQL instance name in my network directly?
I have to connect using public IP, which will redirect to SQL Server. In this case I may have more than one instance to connect to.
Zaheer IqbalTechnical Assurance & ImplementationCommented:
you will need to connect via IP unless you setup an A record on your domain. Say or something like that...

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
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
Microsoft SQL Server 2008

From novice to tech pro — start learning today.