Setting up secure access to the monitoring server via Windows IIS Reverse Proxy with SSL certificate
A reverse proxy protects applications against cybercriminals and malicious software. It also allows limiting access to applications based on username, IP, domain, or geographical location.
This article describes how to ensure secure remote access to NetCrunch Server, using Windows IIS Reverse Proxy with an SSL certificate.
Configuration of Windows IIS Reverse Proxy
Preconditions
Before configuring Windows IIS Reverse Proxy, you should do the following:
- Hard your Windows Server - before you start configuring the IIS Server, remember to protect your Windows Server against external attacks (set appropriate Rules on Firewall)
- Install Microsoft Application Request Routing 3.0 source:
https://www.microsoft.com/en-us/download/details.aspx?id=47333
- Install Microsoft URL Rewrite Module 2.0 for IIS (x64)
https://www.microsoft.com/en-us/download/details.aspx?id=47337
Adding new IIS role to Windows Server
- In Server Manager Manage Add Role and Remove Features
- Select
Role-Based or feature-based installation
option - Add
Web Server (IIS)
role
Installing Server Certificate (if needed)
If you already have a certificate and you are using it on other Windows Server, you need to export it. To do it:
- Use Windows + r shortcut and enter
certlm.msc
- Select Personal Certificates
- Select your certificate
- Open the Context Menu All Tasks Export...
- In
Certificate Export Wizard
markexport the private key
option, enter the password and select the path
Now you can Import certificate
- Open IIS Manager
- Select the main tree node (server name) and double click Server Certificates icon
- Open Context menu and select Import...
- Enter the path and password and click OK button
Enabling Windows IIS Server to function as a Reverse Proxy
- Select the main tree node (server name) Application Request Routing Cache Server Proxy Settings
- Check the
Enable proxy
box. - Set the HTTP version to Pass through.
- Check the Reverse rewrite host in response headers box.
- Click Apply
Creating and configuring new Web Site to Windows IIS Server
- On the
Sites
tab please open Context Menu and selectAdd Website
- Enter a name for this website
- Set the Physical path to the Web Site
- Select binding
HTTP
orHTTPS
Setup Reverse Proxy rules for the Website created in the previous step
- Click on newly added website URL Rewrite Add Rule(s)... Reverse Proxy
- Enter the server name or IP address to NetCrunch Server
-
Check
Rewrite the domain names of the links in HTTP responses
checkbox and fillFrom
andTo
fields as follows:From: <NetCrunch server IP> or <DNS name> To: www.<your_public_domain_address>.com
Setup the following rules for Javascript encoded response:
First rule:
- Click on new added website URL Rewrite Add Rule(s)... Outbound rules Blank Rule
-
Fill the fields as follows:
Name: RewriteOutboundJavascriptEncodedATags Precondition: Create new Precondition...
- In
Add Precondition
window enter theName
, fromUsing
dropdown selectRegular Expressions
, and click Add... button -
In
Add Condition
window field fields as follows:Condition input: {RESPONSE_CONTENT_TYPE} Check if input string: Matches the pattern Pattern: ^text/(.+)
-
After saving settings, in
IIS Manager
window, please fill fields in Match section as follows:Matching scope: Response Content: Matches the Pattern Using: Regular Expressions Pattern: href=(.\*?)http://<internal.ip.or.domain.name.of.NetCrunch.Server>/(.\*?)\s
-
Fill fields in Action section:
Action type: Rewrite Value: href={R:1}https://<external.domain>/{R:2}
Second rule:
-
Click on new added website URL Rewrite Add Rule(s)... Outbound rules Blank Rule
Name: RewriteOutboundJavascriptEncodedFormAtt Precondition: (choose created above): ResponseIsTextStar
-
In Match section fill fields as follows:
Matching scope: Response Content: Matches the Pattern Using: Regular Expressions Pattern: action=(.\*?)http://<internal.ip.or.domain.name.of.NetCrunch.Server>/(.\*?)\\
-
Fill fields in Action section:
Action type: Rewrite Value: action={R:1}https://<public.domain>/{R:2}\
Setup inbound rule for disabling ACCEPT_ENCODING (to deal with compressed responses):
- Click on new added website URL Rewrite View Server Variables... Add
-
Add two variables:
HTTP_ACCEPT_ENCODING HTTP_X_ORIGINAL_ACCEPT_ENCODING
- Edit
ReverseProxyInboundRule1
added previously: URL Rewrite Select ReverseProxyInboundRule1 Edit... -
Add two Server Variables:
Server variable name: HTTP_X_ORIGINAL_ACCEPT_ENCODING Value: {HTTP_ACCEPT_ENCODING} Server variable name: HTTP_ACCEPT_ENCODING Value: false
Setup outbound rule for restoring ACCEPT_ENCODING:
- Click on the newly added website URL Rewrite Add Rule(s)... Outbound rules Blank Rule
- Select
Create New Preconditions...
from Preconditions dropdown -
Fill
Name
,Using
,Logical grouping
fields:Name: NeedsRestoringAcceptEncoding Using: Regex Logical grouping: Match All
- Click on Add... button
-
Fill
Condition input
,Check if input string
andPattern
field as follows:Condition input: {HTTP_X_ORIGINAL_ACCEPT_ENCODING} Check if input string: Matches the pattern Pattern: .+
-
Fill fields in
Match
section as follows:Matching scope: Server Variable Variable name: HTTP_ACCEPT_ENCODING Variable value: Matches the Pattern Using: Regular Expressions Pattern ^(.*)
-
Fill fields in
Action
section as follows:Action type: Rewrite Value: {HTTP_X_ORIGINAL_ACCEPT_ENCODING}
Configuration of NetCrunch
Configuration of the NetCrunch does not require any major changes. All remote access users defined in NetCrunch will from now on use connection to NetCrunch Server via reverse proxy defined above. If you have not created any web console user access in NetCrunch yet, all you have to do is to add a user in NetCrunch. To do it:
- Open Top Menu Tools User & Access Profiles...
- From the left pane select NetCrunch Users tab
- Click on the Add button on the bottom
- Provide Username, Access Profile, and Password
- Click OK button
From now, you will be able to open Web Console of your NetCrunch from anywhere in the world in a secure way.
Once you have created the appropriate user, enable your Web Browser, enter the appropriate address, and log in using the previously created user and password.
- [02.07.2020] How to set up secure remote access to monitoring server using a NginX Reverse Proxy with SSL certificate
A reverse proxy protects applications against cybercriminals and malicious software. It also allows limiting access to applications based on username, IP, domain, or geographical location.
- [05.05.2020]Monitoring Windows tasks
Monitoring Windows tasks can be a challenge as there is no easy way of retrieving information about them. Starting from version 10.9 NetCrunch introduced dedicated sensor and system view to view and monitor Windows tasks
- [26.03.2020]Enabling SNMP on a Windows machine
Despite the fact, that Microsoft depreciated SNMP for the Windows Server 2012 onwards, it is sometimes necessary to enable SNMP in this system. Below you will find a simple walkthrough how to do it.
- [15.03.2020]Windows VPN Monitoring
Remote work is growing and sometimes indispensable. There is a number of different VPN services that can be used to provide secure access to company networks for remote workers or those traveling away from the office. This article will describe how to set up VPN Monitoring in NetCrunch on the example of Windows VPN
- [30.01.2020] Monitoring of Windows Shared Cluster
Monitoring Windows Shared Clusters can be achieved in many different ways. This article demonstrates the power of NetCrunch scripts combined with data parsers to show you how easy and fast it is to setup NetCrunch to collect data about free and used space on clusters
- [26.09.2019] Advanced SSL Certificate monitoring
Nowadays secure connections are common, sites/servers without certificates are flagged as 'unsafe' and people tend to avoid such places on the web. This article will demonstrate how you can easily monitor not only if certificates are about to expire or expired but several other properties included in it.
- [20.01.2019] Monitoring operating systems - Windows System Views
System views is a powerful tool to see the status of various aspects of the given system in real time. This article will focus on System Views on Windows-based machines
- [12.11.2018] Windows Server Monitoring
Use NetCrunch to monitor Windows Server resources, services, and metrics. Gain control and insight of your Windows Server infrastructure health with full monitoring and trend data collection from the entire Windows Common Information Model (CIM).
- [12.09.2018]Monitoring SSL Certificate expiration date with NetCrunch
Learn how easy you can monitor an SSL certificate with NetCrunch. Use it to be informed about SSL certificate expiration time and the properties of such certificate.
- [06.07.2018]Analyze Windows failed login events with a custom log view
Use NetCrunch to monitor and display failed logon activity on all Windows machines in your network by monitoring Windows Event Log.
- [28.05.2018]Monitoring Windows Event Logs for Warnings and Errors.
Learn how to monitor Windows Event Log to receive alerts and notifications when event with specified id appears.
- [12.04.2018]Generate NetCrunch SSL certificate with Microsoft Certificate Authority server
Learn how to use certificates generated by Microsoft Certificate Authority to secure Web Access connection to the NetCrunch server.
- [12.02.2018]Process Monitoring with NetCrunch WMI Sensors.
Learn how to configure a node-specific WMI Object sensor to monitor a specific Windows process and generate an event when the process is restarted. This sensor-based monitoring strategy leverages the uniqueness of PID, against the generic name of a process.
- [15.09.2017] 7 proactive ways of monitoring your network in order to stay compliant with GDPR
The General Data Protection Regulation (GDPR) is about to come in-effect on May 25th, 2018 in the European Union. In a nutshell, it’s the first law of its kind which will define what is third-party personal data and how this data should be protected. Moreover, the law stipulates hefty fines on individuals and businesses alike, in case personal data is leaked into the wrong hands and the IT administrator (or business owner) does not handle the situation accordingly.
- [05.04.2017] Using NetCrunch to track Port Security status of Cisco switches.
Cisco port security is a great feature to make your network safer. Learn how to configure NetCrunch to display the status of Cisco Port Security on the switch interfaces.
- [24.05.2016] Correct Monitoring of Windows Processes on multi-core machines
This article will explain how NetCrunch monitors Windows processes and why these values are wrong in perfmon.