TS Gateway – the poor man’s GotoMyPC
Want to connect into your business network, but don’t want to spend the $$$ paying for multiple GoToMyPC accounts? Well, if you have control over your firewall, a static IP, Windows Server 2008 or later on your business server, and enough technical expertise, you can likely use Terminal Services Gateway service (TS Gateway) to connect into your computer (or any modern Windows OS computer on your LAN), for free!
- Start by reading the official Microsoft TS Gateway step-by-step guide. Be aware even for me, a tech geek, that contains a pretty heavy duty dose of tech-babble.
- Configure your Windows 2008 server by reading these directions
- Configure each remote client (like your laptop) by reading this
Rather than re-hash all the above content, I will point out a few areas in which you may experience problems configuring TS Gateway.
- Configure a DNS record for your domain and point it at the office IP address, such as tsgateway.yourdomain.com point to your office IP. If you don’t know your office IP, look at your firewall. You will need a static IP or the capability to use a Dynamic IP address tracking service. If you don’t know what I am talking about already, this is not for you- use GoToMyPC!
- While setting up the server, just create a “self signed” SSL certificate, and make sure you use the domain name you configured above to generate the self signed SSL, such as tsgateway.yourdomain.com
- You will need to install this self-signed SSL into BOTH the server and client Trusted Root Certification Authorities store (the above links detail this process).
- After the TS Gateway setup is complete, go check the IIS server BINDINGS for your default site and make sure the SSL certificate from above is properly installed onto your site.
- These self-signed SSL certs expire after 6 months, so every 6 months you’ll need to generate a new one using the TS Gateway manager, or you can obtain a low cost SSL from GoDaddy or somewhere else that you can use as well. My advice is to just use the free self-signed ones. If you are using self-signed ones just setup an Outlook recurring calendar event to remind you a week before each 6 month period.
- Firewall configuration. This is the most important part of the whole setup. If the traffic can’t even get into your network, none of the above will work.
- In general this is a two part process.
- First, configure your NAT mappings, to map inbound port 443 TCP to your internal server IP address.
- Second, add a rule to permit HTTPS traffic from anywhere to your internal server IP and HTTPS port 443
- If you have properly configured your firewall, and imported in both the client and server SSL cert, go to an outside connection with your laptop (like a coffee shop) and go to https://tsgateway.yourdomain.com and see if you get the IIS 7.0 server multi-language single page splash screen. If yes, then your TS Gateway setup is one step closer to working.
- In general this is a two part process.
- Enable all logging via the AUDITING tab. These events will log to the Event Viewer in the area below. This is extemely handy for troubleshooting things.
TS Gateway getting knocked offline due to IIS Restart
If you restart your IIS server at anytime, your TS Gateway service will get knocked offline. As of June 27, 2010 this is a documented issue with Windows Server 2008 and later.
If you see an error in the TS Gateway event log that looks like this:
The TS Gateway service is shutting down. To diagnose possible causes for this problem, verify whether the following services are installed and started: (1) World Wide Web Publishing Service (2) Internet Authentication Service (IAS) (3) RPC/HTTP Load Balancing Service. Also, check Event Viewer for Network Policy Server (NPS) and IIS events that might indicate problems with NPS or IIS.
or if your client computer (laptop) that is trying to connect from the outside, gets an error like this
Remote Desktop Disconnected ---------------------------------------------- This computer can't connect to the remote computer.Try connecting again. If the problem continues, contact the owner of the remote computer or your network administrator.
You need to go to the service manager and make sure the following services are started:
- Terminal Services Gateway
- RPC/HTTP Load Balancing Service