Internet Information Services - reverse proxy


(Mariusz Brzeski) #1

Hi,

I’m trying to set reverse proxy on IIS for graylog but I’m getting error while connect via domain name:

We are experiencing problems connecting to the Graylog server running on http://192.168.1.113:9000/api/. Please verify that the server is healthy and working correctly

I didn’t find any description how proxy header like ’ X-Forwarded-For’ should be set on IIS. Is anyone know how IIS should be set ?

My web.config is:

<configuration>
<system.webServer>
    <rewrite>
        <rules>
            <rule name="ReverseProxyInboundRule1" stopProcessing="false">
                <match url="(.*)" />
                <action type="Rewrite" url="http://192.168.1.113:9000/{R:1}"  />
            </rule>
        </rules>
    </rewrite>
</system.webServer>

(Jafar Aliev) #2

Maybe it’s interesting for somebody - this is my working configuration:
Graylog-2.2.3

rest_listen_uri = http://<internal_graylog_server_ip>:9000/api/
#rest_transport_uri =  <NOT SET>
web_listen_uri = http://<internal_graylog_server_ip>:9000/
web_endpoint_uri = http://<iis_server>/api/

IIS 8.5 ( made from standard “reverse proxy” rule )

<configuration>
	<system.webServer>
		<rewrite>				
			<rules>
				<rule name="ReverseProxyInboundRule1" stopProcessing="true">
					<match url="(.*)" />
					<conditions>
						<add input="{CACHE_URL}" pattern="^(https?)://" />
					</conditions>
					<action type="Rewrite" url="{C:1}://<internal_graylog_server_ip>:9000/{R:1}" />
				</rule>
			</rules>
		</rewrite>
	</system.webServer>
</configuration>