There are a couple of options for setting up TFS for distributed environments, allowing team members to gain access from the Internet. VPN is great for any environment that already has such infrastructure in place for the location/network where TFS is deployed to. But sometimes for simpler environments, like a remote site/office that is just connected to the Internet via basic ISP plans and merely a broadband router, direct port forwarding is a faster more straightforward configuration.
Remember that TFS is a conglomerate product basically formed by the following services:
- App-tier web services
- SQL Server Reporting Services
- Sharepoint site
Some configuration at the Internet-facing router and the one of the TFS database has to be carried out in order for seamless access by clients from the outside.
App-tier Web service
The App-tier web services represent the core functionality clients interface with to obtain TFS services. In the internal network, that is accessed via a typical URL of http://APPTIERSERVER:8080
The router should be configured to forward incoming network traffic destined for port 8080 to the app-tier server. Naturally, the public DNS hostname, say foundation.mycompany.net, for the app-tier server should resolve to the public IP address of the router. Once this forwarding rule is in place, Visual Studio/Team Explorer may then connect to TFS by specifying foundation.mycompany.net:8080 as their Team Foundation Server.
However, note that this is for the web services only. This configuration alone may allow Team Explorer to connect, but note that the Documents and Reports nodes may be disabled with a red cross. This happens because typical installations of TFS specified only internal hostnames thus those nodes are based on URLs like http://APPTIERSERVER/Reports and http://APPTIERSERVER/Sites/TeamProject ; they are naturally unresolvable from public Internet clients.
Correcting this problem requires some tinkering of the database discussed in the following threads:
http://social.msdn.microsoft.com/forums/en-US/tfssetup/thread/bc9410a6-4776-4eed-8941-cd55e54ba312/
http://social.msdn.microsoft.com/forums/en-US/tfssetup/thread/a5dcdfbe-0cd3-4ac0-8fed-4301c71e1282/
the basic steps are summarised in the sections below.
SQL Server Reporting Services
The SSRS site URL passed on to Visual Studio is specified in the tbl_service_interface table of the TfsIntegration database. Alter the following rows
SharePoint site
The WSS site URL passed on to Visual Studio is specified in the tbl_service_interface table of the TfsIntegration database. Alter the following rows
Restart the TFS app-tier after the changes, and any remote Team Explorer clients.