Published by We Got Served Ltd. Copyright 2014 by Christopher Courtney. All rights reserved. No part of this book may be reproduced in any form or by any electronic or mechanical means including information storage and retrieval systems, without permission in writing from the author. The only exception is by a reviewer, who may quote short excerpts in a review. All trademarks mentioned in this ebook are the property of their respective owners. We Got Served Ltd. is not associated with any product or vendor mentioned in this book. First Published: January 2014 Limit of Liability/Disclaimer of Warranty: The publisher and author make no representations or warranties with respect to the accuracy or completeness of this content of this work and specifically disclaim all waranties, including without limitation warranties of fitness for a particular purpose. Although the author and publisher have made every effort to ensure that the information in this book was correct at press time, the author and publisher do not assume and hereby disclaim any liability to any party for any loss, damage, or disruption caused by errors or omissions, whether such errors or omissions result from negligence, accident, or any other cause. The advice outlined in this book may not be suitable for every situation. This work is sold with the understanding that the publisher and author are not engaged in providing professional services. If professional assistance is required, the services of a competent professional should be sought. Neither the publisher, not the author shall be liable for damages arising herefrom. The fact that an organisation, service provider or website is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organisation, service provider or website may provide.
About the Author Christopher Courtney Christopher Courtney is a frequent contributor and lead forum moderator at We Got Served, a popular home server destination for hundreds of thousands of readers every month. While he may not be in an IT job, computers have always been his passion. Indeed, when he discovered Windows Home Server in 2007, he already had a Windows XP computer set up to do a very similar thing. But after trying Windows Home Server, that XP computer was soon retired. Christopher s expertise and community support for Windows Home Server and its users has been recognised multiple times by Microsoft via the Most Valuable Professional award, a coveted honour granted to the best and brightest technology experts around the world. About We Got Served We Got Served (http://www.wegotserved.com) is a popular technology news and community site which was founded in February 2007. It is written, edited and moderated by a dedicated and knowledgeable team of technology enthusiasts across the world who are focused on bringing you the latest news, reviews, tutorials and support for the products you re using today and tomorrow. We created We Got Served as a place to learn about new technology, help readers make the most of the products and services they use, and most importantly to create a community where readers can learn, discuss and share their experiences and knowledge with others in need of support. However you use the site, we hope you enjoy it. Enhance Remote Access With a Reverse Proxy About the Author 3
Revision History v1.0 January 2014 Initial release Enhance Remote Access With a Reverse Proxy Revision History 4
Please Register This Book Whilst the concept of registering a book may sound a little strange, I heartily invite you to do so! Registering your email with us allows us to inform you of updates and amendments to the book, and let you know about new ebooks we re writing as well as some offers on our other titles. Hey, if that s not enough, you know us so we d like to know you too! So head over to http://eepurl.com/kzuch and spend 23.2 seconds signing up! Did You Purchase This ebook From Amazon or Apple? Many of our readers prefer to purchase our ebooks for their Kindle or ipad via Amazon or Apple. If you have purchased this ebook through one of those stores then note that the image quality of screenshots illustrating the walkthroughs will be heavily compressed. Unfortunately, Amazon and Apple place strict limits on the format of ebooks they allow to be sold through their stores. In Amazon s case, the maximum file size for an ebook is just 50 MB - fine for a text-only work of fiction, but terrible for an illustrated guide such as this. So, firstly, apologies if you experience poor quality graphics from your purchase at Amazon or Apple - that is unfortunately out of our control. However, don t despair - we can get you set up with full quality epub, PDF and Mobi files that will work on a host of devices, and will look great. Here s how: 1. Please register your purchase at http://eepurl.com/kzuch 2. Please contact us at http://www.wegotserved.com/contact-us/ explaining that you purchased this title at Amazon or Apple. Attach an image of your receipt as proof of purchase. 3. We ll set up new download links for you to grab full quality versions of the ebook, which you can simply drag and drop to your favourite mobile device from a PC or Mac via a USB cable. Alternatively, view the PDF directly on a coputer. 4. Please purchase your ebooks directly from us at http://store.wegotserved.com to avoid future issues (you may get a little money off in the future too!) Enhance Remote Access With a Reverse Proxy Registration 5
Enhance Remote Access With a Reverse Proxy A We Got Served How To Project Contents About the Author 3 About We Got Served 3 Revision History 4 Before You Begin: A Caveat 9 Install Components for Reverse Proxying 9 Configuring IIS for Reverse Proxying 15 Enhance Remote Access With a Reverse Proxy Contents 6
x The Project Enhance Remote Access With a Reverse Proxy
Enhance Remote Access With a Reverse Proxy If you are anything like me, then you may want to run a number of different programs on your server, each of which may have their own web interface. That s fine when you re at home, on your local network. But to be able to access that content remotely would require opening additional ports on your router. Not only do I not like doing that, but what happens if something happens to your router and you to set up all those ports again? You d have to remember each and every single one of the ports you had open, and configure them all over again. Those of you that are more familiar with web servers might realize that you could probably just set up a web server to forward requests to those other websites and display the content. This is usually referred to as Reverse Proxying, and fortunately for us, Windows Server 2012 Essentials has a web server capable of doing that - with a little bit of installation and configuration of the proper components, of course. If you re not familiar with web servers, you may be wondering why you would want to do this. Well, it pretty much eliminates clutter on your network, and ensures you don t need to worry about forwarding specific ports on your router, or allowing programs through your server s firewall. If you have turned on the Anywhere Access feature of Windows Server 2012 Essentials, then you already have an Internet domain name set up, to access your server remotely and already have a SSL Certificate installed. By using a Reverse Proxy, you can access many more web services and applications remotely via the secure website, with all data encrypted. That sounds like a great idea to me! Enhance Remote Access With a Reverse Proxy Project 8
Before You Begin: A Caveat Before we get started though, there is one caveat I must mention. These other websites/applications must have their own directory on the respective webserver. By that, I mean they have to be reachable at an address like http://localhost:8080/directory/. Many services can be easily changed (like Tomcat or Sickbeard), but some are hard coded (like utorrent). As long as the service is reachable by a directory, they ll be fine. But if the web address does not, or cannot be structured with a directory, for example http://localhost:8080/, then it won t work, or at least, not without a significantly more complicated setup. Install Components for Reverse Proxying The first thing we must do,is to access the server, and load up Administrative Tools. This option should appear pinned to the Windows Server 2012 Essentials Start Screen by default, for easy access. If it s not there, either search for it via the Charms bar, or open the Control Panel, and navigate to System and Settings. You should find Administrative Tools listed towards the bottom. Administrative Tools is located in the Start screen. Enhance Remote Access With a Reverse Proxy Project 9
Once Administrative Tools is open (and you re switched to the classic Desktop), find the Internet Information Services Manager. Make sure you open the generic looking one and not the 6.0 one. Windows Server 2012 Essentials has both installed by default, so make sure you get the right one. It should be the lower entry. We need the standard IIS Manager for this walkthrough. Once IIS Manager has loaded, select your server s name from the bar on the left hand side. Once you do that, it will open the icon view, and immediately launch a prompt telling you to install the Microsoft Web Platform. That is exactly what we want to do. If this dialog box doesn t appear, then there should be a link on the right side bar to download the Web Platform Components. Enhance Remote Access With a Reverse Proxy Project 10