Dashboards & Visualizations

How to configure IIS to proxy Splunk Javascript JDK requests from outside Splunk Web?


How can I configure IIS to work as a Proxy for connecting to Splunk Web from outside?


PS: I´m trying login_form and login_verify examples.


My Splunk: (In a Virtual Machine with port redirect)

My Chrome console when I submit in login_form.

 POST 404 (Not Found)
login_form.html:84 Login failed:  Object {response: Object, status: 404, data: "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Stric…↵ </fieldset> ↵</div> ↵</div> ↵</body> ↵</html> ↵", error: "Not Found"}

My web.config

<?xml version="1.0" encoding="UTF-8"?>
                <rule name="SplunkOut" preCondition="" stopProcessing="true">
                    <match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script" pattern="(.*)://(.*):(.*)/proxy/(.*)" />
                    <action type="Rewrite" value="{R:1}://{R:2}:8080/proxy/{R:4}" />
                    <preCondition name="ResponseIsHTML">
                        <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
                    <preCondition name="ResponseIsJSON">
                        <add input="{RESPONSE_CONTENT_TYPE}" pattern="^application/json" />
                <rule name="SplunkIn" stopProcessing="true">
                    <match url="(.*)://(.*):(.*)/proxy/(.*)" />
                        <add input="{QUERY_STRING}" pattern="^(https?)://" />
                        <set name="HTTP_ACCEPT_ENCODING" value="" />
                    <action type="Rewrite" url="{R:1}://{R:2}:8089/proxy/{R:4}" logRewrittenUrl="true" />
0 Karma

Path Finder

I have the same issue, did you find out the answer for how to configure IIS to work as a Proxy for connecting to Splunk Web from outside? Can you please share the settings on IIS server

0 Karma

Ultra Champion

@AshChakor - what about the answer provided below? Did that work?

0 Karma

Ultra Champion
0 Karma
.conf21 CFS Extended through 5/20!

Don't miss your chance
to share your Splunk
wisdom in-person or
virtually at .conf21!

Call for Speakers has
been extended through
Thursday, 5/20!