Cloud Server with Windows Server operating system

If the IIS is behind a load balancer, the actual IP of the user is overwritten by the IP of the load balancer. The log file of the IIS web server now only contains the address of the load balancer. To determine the user IP when accessing a web server through a proxy or load balancer, you must evaluate the"X-Forwarded For" header entry in the HTTP protocol. For this purpose, install and activate the IIS extension "Advanced Logging":

Requirements: You have logged on to the server as administrator.

Please note: For technical reasons this manual only works for unencrypted connections!

Step 1

Install the IIS extension Advanced Logging on your web servers.

Step 2

Open the (IIS) manager.

step 3

In the left navigation bar under Connections, select the server or site for which you want to change the logging settings.

Step 4

In the IIS area, double-click Advanced Logging.

Step 5

In the Actions section of the right navigation bar, click Edit Log Fields.

Step 6

Click Add Field.....

The Add Logging Field window appears.

 

Step 7

In the Field ID field, enter Forwarded For.

Step 8

In the Category field, enter Default.

Step 9

In the Source type field, enter Request header.

Step 10

In the Source Name field, enter X-Forwarded-For.

Step 11

Click on OK.

Step 12

Click on OK.

Step 13

Select the protocol definition %COMPUTERNAME% server

Step 14

In the Actions section of the right navigation bar, click Edit Log Definition.

Step 15

In the Selected fields area, click Select fields...

Step 16

Activate the Forwarded For entry.

Step 17

Click on OK.

Step 18

Click Apply in the Actions area of the right navigation bar.

Step 19

Select the appropriate server in the Connections area of the left navigation bar of the (IIS) manager.

Step 20

In the IIS area, double-click Advanced Logging.

Step 21

Click Enable Advanced Logging in the Actions area of the right navigation bar.

Advanced logging is activated.