- SQL Server 2008R2 database server in my LAN and under my control (call it LOCALSQL)
- remote SQL Server, on which I have much less control (call it REMOTESQL), for which I only have IP, username, password
- Linux-Apache-PHP server, on my LAN, used to access LOCALSQL (call it PHPSERVER)
Up to now, PHPSERVER accesses LOCALSQL; I can only access REMOTESQL from a test Windows machine with SQL Server Management Studio, with the necessary firewall permission.
Now, I would like to use sp_addlinkedserver to have PHPSERVER execute query involving tables from both servers. What should I do for the firewall? Should I allow connections:
a) between LOCALSQL and REMOTESQL
b) between PHPSERVER and REMOTESQL
c) both of the above