![Web Application Proxy Overview](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/Web-Application-Proxy-Overview.png?zoom=7.5&resize=602%2C249&ssl=1)
Microsoft Web Application Proxy [WAP] is a new service added in Windows Server 2012 R2 that allows you to access web applications from outside your network. WAP functions as a reverse proxy and an Active Directory Federation Services [AD FS] proxy to pre-authenticate user access.
vBoring Blog Series:
- How to setup Microsoft Active Directory Federation Services [AD FS]
- How to setup Microsoft Web Application Proxy
Requirements:
- The only hard requirement of WAP is having an AD FS server. Refer to step 1 for setting that up.
- WAP cannot be installed on a server that AD FS is installed on. They must be separate servers.
Installing the Web Application Proxy Server Role:
Open Server Manager and click Manage -> Add Roles and Features:![Microsoft Web Application Proxy 1 - Add Roles and Features](https://i2.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/Microsoft-Web-Application-Proxy-1-Add-Roles-and-Features.png?zoom=7.5&resize=237%2C160&ssl=1)
Click Next:
![Microsoft Web Application Proxy 2 - Before you Begin](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/Microsoft-Web-Application-Proxy-2-Before-you-Begin.png?zoom=7.5&resize=791%2C560&ssl=1)
Role-based or feature-based installation should be selected then click Next:
![Microsoft Web Application Proxy 3 - Installation Type](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/Microsoft-Web-Application-Proxy-3-Installation-Type.png?zoom=7.5&resize=792%2C558&ssl=1)
Select the server you want to install this role on to and then click Next:
Note: Web Application Proxy role and AD FS cannot be installed on the same computer.
![Microsoft Web Application Proxy 4 - Server Selection](https://i0.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/Microsoft-Web-Application-Proxy-4-Server-Selection.png?zoom=7.5&resize=792%2C559&ssl=1)
Select Remote Access then click Next:
![Microsoft Web Application Proxy 5 - Server Roles](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/Microsoft-Web-Application-Proxy-5-Server-Roles.png?zoom=7.5&resize=795%2C560&ssl=1)
No additional Features are needed. Click Next:
![Microsoft Web Application Proxy 6 - Features](https://i2.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/Microsoft-Web-Application-Proxy-6-Features.png?zoom=7.5&resize=792%2C559&ssl=1)
Click Next:
![Microsoft Web Application Proxy 7 - Remote Access](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/Microsoft-Web-Application-Proxy-7-Remote-Access.png?zoom=7.5&resize=794%2C559&ssl=1)
Select Web Application Proxy:
![Microsoft Web Application Proxy 8-1 - Role Services](https://i2.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/Microsoft-Web-Application-Proxy-8-1-Role-Services.png?zoom=7.5&resize=788%2C559&ssl=1)
On the pop up click Add Features:
![Microsoft Web Application Proxy 8-2 - Role Services Additional Services](https://i0.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/Microsoft-Web-Application-Proxy-8-2-Role-Services-Additional-Services.png?zoom=7.5&resize=795%2C562&ssl=1)
The Web Application Proxy role does not required a reboot. Click Install:
![Microsoft Web Application Proxy 9 - Confirmation](https://i0.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/Microsoft-Web-Application-Proxy-9-Confirmation.png?zoom=7.5&resize=793%2C561&ssl=1)
Once complete click Close:
![Microsoft Web Application Proxy 10 - Results](https://i0.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/Microsoft-Web-Application-Proxy-10-Results.png?zoom=7.5&resize=792%2C555&ssl=1)
Web Application Proxy is now installed but you need the AD FS certificate to continue.
Export & Import the AD FS Certificate:
You need the certificate from your AD FS server added to your Web Application Proxy server. Login to your AD FS server and open MMC.exe:![WAP Import Certificate 1 - Open MMC](https://i0.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Import-Certificate-1-Open-MMC-1.png?zoom=7.5&resize=305%2C212&ssl=1)
Go to File -> Add/Remove Snap-ins -> select Certificates then click Add:
![WAP Import Certificate 2 - Add Certificate Snapin](https://i0.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Import-Certificate-2-Add-Certificate-Snapin.png?zoom=7.5&resize=706%2C515&ssl=1)
When you click OK you will get the following pop up. Select Computer account then click Next:
![WAP Import Certificate 3 - Use Computer Account](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Import-Certificate-3-Use-Computer-Account.png?zoom=7.5&resize=701%2C514&ssl=1)
On AD FS Server: Drill down to Personal -> Certificates then right click the SSL certificate you used during setup of AD FS. Go to All Tasks -> Export. Save to a location that your Web Application Proxy can access. Ensure you export the Private Key and certificate as a .PFX file.
![WAP Import Certificate 6-1 - Export Certificate](https://i2.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Import-Certificate-6-1-Export-Certificate.png?zoom=7.5&resize=793%2C365&ssl=1)
On Web Application Proxy: Right click on Personal -> Certificates then go to All Tasks -> Import:
![WAP Import Certificate 4 - Import Certificate](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Import-Certificate-4-Import-Certificate.png?zoom=7.5&resize=671%2C373&ssl=1)
This will bring up the Certificate Import Wizard. Click Next:
![WAP Import Certificate 5 - Welcome to Certificate Import Wizard](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Import-Certificate-5-Welcome-to-Certificate-Import-Wizard.png?zoom=7.5&resize=543%2C515&ssl=1)
Browse to the certificate that you exported from your AD FS server and select it. Click Next:
![WAP Import Certificate 6 - File to Import](https://i0.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Import-Certificate-6-File-to-Import.png?zoom=7.5&resize=542%2C519&ssl=1)
Enter the password for the private key and check the box to make the key exportable. Click Next:
![WAP Import Certificate 7 - Private Key Protection](https://i2.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Import-Certificate-7-Private-Key-Protection.png?zoom=7.5&resize=540%2C519&ssl=1)
Leave the default certificate store as Personal. Click Next:
![WAP Import Certificate 8 - Certificate Store](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Import-Certificate-8-Certificate-Store.png?zoom=7.5&resize=540%2C516&ssl=1)
Click Finish:
![WAP Import Certificate 9 - Complete](https://i0.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Import-Certificate-9-Complete.png?zoom=7.5&resize=540%2C521&ssl=1)
You should now see the certificate from your AD FS servers on your Web Application Proxy server.
![WAP Import Certificate 10 - Certificate Imported](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Import-Certificate-10-Certificate-Imported.png?zoom=7.5&resize=834%2C296&ssl=1)
Now we are ready to perform the Post Configuration.
Post-Deployment Configuration:
Back on your Web Application Server open Server Manager then click Notifications then the message Open the Web Application Proxy Wizard:![WAP Configuration 11 - Post-Deployment Configuration](https://i0.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Configuration-11-Post-Deployment-Configuration.png?zoom=7.5&resize=338%2C315&ssl=1)
Click Next:
![WAP Configuration 12 - Welcome](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Configuration-12-Welcome.png?zoom=7.5&resize=800%2C650&ssl=1)
Enter the FQDN of your AD FS name and the Service Account you created during AD FS setup. Click Next:
![WAP Configuration 13 - Federation Server](https://i0.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Configuration-13-Federation-Server.png?zoom=7.5&resize=799%2C651&ssl=1)
On the drop down menu select the certificate you imported from your AD FS server. Click Next:
![WAP Configuration 14 - AD FS Proxy Certificate](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Configuration-14-AD-FS-Proxy-Certificate.png?zoom=7.5&resize=802%2C649&ssl=1)
Click Configure:
![WAP Configuration 15 - Confirmation](https://i0.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Configuration-15-Confirmation.png?zoom=7.5&resize=800%2C651&ssl=1)
Once finished click Close:
![WAP Configuration 16 - Results](https://i2.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Configuration-16-Results.png?zoom=7.5&resize=803%2C650&ssl=1)
Remote Access Management Console should open when you clicked Close. On Operations Status you should see all the objects as green.
![WAP Configuration 17 - Operations Status](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Configuration-17-Operations-Status.png?zoom=7.5&resize=834%2C269.25%2C284&ssl=1)
Publish Web Applications:
Now we are finally ready for the magic. In the Remote Access Management Console click Web Application Proxy then Publish:![WAP Publish 1 - Publish](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Publish-1-Publish.png?zoom=7.5&resize=834%2C516.25%2C545&ssl=1)
Click Next:
![WAP Publish 2 - Welcome](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Publish-2-Welcome.png?zoom=7.5&resize=736%2C596&ssl=1)
Pass-through will let WAP act like a reverse proxy. I will have documentation on setting up AD FS link soon!
Select Pass-through and click Next:
![WAP Publish 3 - Preauthentication](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Publish-3-Preauthentication.png?zoom=7.5&resize=737%2C599&ssl=1)
Name: Enter a display name
External URL: Enter the URL that will be coming in your the WAP server externally
External Certificate: The drop down menu will show certificates that are added on the WAP server. Select the same certificate that you used while setting up your application. In my case I used my wildcard certificate.
Backend server URL: Enter the web URL of the server you want the external URL forwarded
Click Next:
![WAP Publish 4 - Publishing Settings](https://i0.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Publish-4-Publishing-Settings.png?zoom=7.5&resize=736%2C599&ssl=1)
Copy the PowerShell command down and with some minor edits you can easily add additional PassThrough applications with ease.
Click Publish:
![WAP Publish 5 - Confirmation](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Publish-5-Confirmation.png?zoom=7.5&resize=736%2C600&ssl=1)
Click Close to finish:
![WAP Publish 6 - Results](https://i0.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Publish-6-Results.png?zoom=7.5&resize=736%2C598&ssl=1)
You will now see the published web application and ready for testing.
![WAP Publish 7 - Web Address Published](https://i1.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Publish-7-Web-Address-Published.png?zoom=7.5&resize=834%2C520.25%2C548&ssl=1)
You are ready to test the application!
Configure Firewall for 443 Port Forwarding:
Before you can test you need to ensure you have port 443 (HTTPS) being sent to your WAP server. This step does not involve configuration of your WAP environment but on your firewall. Since this can vary greatly I will give you two examples of this step:For pfSense you would create a NAT: Port Forward Rule:
![WAP - pfSense NAT Example](https://i2.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-pfSense-NAT-Example.png?zoom=7.5&resize=834%2C504.25%2C532&ssl=1)
For DD-WRT you would go to NAT / QOS then Port Forwarding:
![WAP - DDWRT Port Forwarding Example](https://i2.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-DDWRT-Port-Forwarding-Example.png?zoom=7.5&resize=820%2C445&ssl=1)
Once added you are ready to test!
From outside your network (like on your phone or a PC elsewhere) try to access your web link. You should get your internal web page through your WAP externally! Success!
![WAP - Confirmation](https://i2.wp.com/www.virtuallyboring.com/wp-content/uploads/2016/03/WAP-Confirmation.png?zoom=7.5&resize=834%2C683.25%2C721&ssl=1)
Coming Soon!! Setting up Microsoft RDS to use AD FS authentication through WAP!
No comments:
Post a Comment