<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: port forwarding for web interface in Security</title>
    <link>https://community.splunk.com/t5/Security/port-forwarding-for-web-interface/m-p/79789#M2651</link>
    <description>&lt;P&gt;easy way, setup apache and put a web page on the &lt;A href="http://." target="test_blank"&gt;http://.&lt;/A&gt;. that tells the users to click to https://&lt;BR /&gt;
or setup a .htaccess redirector to make it automatic.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Jan 2013 17:00:30 GMT</pubDate>
    <dc:creator>yannK</dc:creator>
    <dc:date>2013-01-07T17:00:30Z</dc:date>
    <item>
      <title>port forwarding for web interface</title>
      <link>https://community.splunk.com/t5/Security/port-forwarding-for-web-interface/m-p/79784#M2646</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;This is not really a splunk question but maybe someone has an useful hint for me to solve my problem.&lt;BR /&gt;
We run a Redhat Splunk AllInOne server with SSL Webaccess on Port 8999 &lt;BR /&gt;
&lt;A href="https://server1.comp.my:8999"&gt;https://server1.comp.my:8999&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Now I got a DNS alias for splunk.comp.my which resolves to serve1.comp.my.&lt;/P&gt;

&lt;P&gt;If I now enter splunk.comp.my in InternetExplorer, it should take me to my server but not on port 8999.&lt;/P&gt;

&lt;P&gt;Is there a possibility in splunk to redirect incomming requests from http:port80 to https:8999?&lt;/P&gt;

&lt;P&gt;Or can I use any redhat specific tools to to so?&lt;/P&gt;

&lt;P&gt;Thanks for your help&lt;/P&gt;

&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jan 2013 14:20:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/port-forwarding-for-web-interface/m-p/79784#M2646</guid>
      <dc:creator>RobertRi</dc:creator>
      <dc:date>2013-01-07T14:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: port forwarding for web interface</title>
      <link>https://community.splunk.com/t5/Security/port-forwarding-for-web-interface/m-p/79785#M2647</link>
      <description>&lt;P&gt;You can do it with IPTables, a quick Google threw up this;&lt;BR /&gt;
&lt;A href="http://forum.slicehost.com/index.php?p=/discussion/2497/iptables-redirect-port-80-to-port-8080/p1"&gt;http://forum.slicehost.com/index.php?p=/discussion/2497/iptables-redirect-port-80-to-port-8080/p1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Looks like the command you need &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jan 2013 14:28:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/port-forwarding-for-web-interface/m-p/79785#M2647</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2013-01-07T14:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: port forwarding for web interface</title>
      <link>https://community.splunk.com/t5/Security/port-forwarding-for-web-interface/m-p/79786#M2648</link>
      <description>&lt;P&gt;Thanks, I found a similar answer after googling before, but at this moment I'm not really firm with that tool.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jan 2013 14:32:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/port-forwarding-for-web-interface/m-p/79786#M2648</guid>
      <dc:creator>RobertRi</dc:creator>
      <dc:date>2013-01-07T14:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: port forwarding for web interface</title>
      <link>https://community.splunk.com/t5/Security/port-forwarding-for-web-interface/m-p/79787#M2649</link>
      <description>&lt;P&gt;Another thing is if I only redirect the port from 80 to 8999, what about the http to https ?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jan 2013 14:39:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/port-forwarding-for-web-interface/m-p/79787#M2649</guid>
      <dc:creator>RobertRi</dc:creator>
      <dc:date>2013-01-07T14:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: port forwarding for web interface</title>
      <link>https://community.splunk.com/t5/Security/port-forwarding-for-web-interface/m-p/79788#M2650</link>
      <description>&lt;P&gt;Ah, I missed that. It becomes a little more complex when you want to do that, from memory I believe the only way is to run a separate apache server with a certain module enabled. Someone with experience of this might post a better answer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jan 2013 15:34:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/port-forwarding-for-web-interface/m-p/79788#M2650</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2013-01-07T15:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: port forwarding for web interface</title>
      <link>https://community.splunk.com/t5/Security/port-forwarding-for-web-interface/m-p/79789#M2651</link>
      <description>&lt;P&gt;easy way, setup apache and put a web page on the &lt;A href="http://." target="test_blank"&gt;http://.&lt;/A&gt;. that tells the users to click to https://&lt;BR /&gt;
or setup a .htaccess redirector to make it automatic.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jan 2013 17:00:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/port-forwarding-for-web-interface/m-p/79789#M2651</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-01-07T17:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: port forwarding for web interface</title>
      <link>https://community.splunk.com/t5/Security/port-forwarding-for-web-interface/m-p/79790#M2652</link>
      <description>&lt;P&gt;I just got done setting this up, so I'll post my full SSL setup.  It might be a little more than needed, but this is the first Google result I saw for multiple Splunk SSL searches.  So, use as much or as little as you like, and lets hope it helps some other poor schlub like myself.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;This was done on a Red Hat system. Since linux considers ports under 1024 sacred, you need to use a higher port when running as a non-root user.  Otherwise, you have to run Splunk as root, which is a &lt;STRONG&gt;NO NO&lt;/STRONG&gt;.  In order to fix that, I used iptables and redirected from 8443 to 443.  So, some commands are Red Hat specific, but usually it's pretty easy to Google the distro specific method.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;&lt;STRONG&gt;Setup Splunk to run using SSL with Apache redirects&lt;/STRONG&gt;&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;

&lt;P&gt;1) Transfer your cert and private key files to &lt;STRONG&gt;${SPLUNK_HOME}/etc/auth/splunkweb/&lt;/STRONG&gt;.  They have to be in PEM format. Make note of the file names for the next step.&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;2) Edit &lt;STRONG&gt;/opt/splunk/etc/system/local/web.conf&lt;/STRONG&gt; replace any lines with the ones below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[settings]
enableSplunkWebSSL = 1
httpport = 8443
privKeyPath = etc/auth/splunkweb/${splunkPrivateKeyFile}
caCertPath = etc/auth/splunkweb/${splunkCertificateFile}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Obviously, you can use whatever SSL port you want. Don't forget to substitute the key and cert filenames too.  Finally, that's not a typo, the paths are relative to ${SPLUNK_HOME}.&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;3) Use IP tables to redirect port 8443 to 443&lt;/P&gt;

&lt;P&gt;I think the method to permanently save your iptables lines differs for other distros.  So, do some googling if you're not using Red Hat.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;iptables -t nat -I PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443
/sbin/service iptables save
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;BR /&gt;4) Setup an Apache redirect for common ports&lt;/P&gt;

&lt;P&gt;This might be overkill, but I started my two Splunk servers on the default port (8000).  So, having a bunch of people thinking Splunk is down, or having to help them update bookmarks sounded like a drag.  So, since an Apache redirect is so easy, I just took anyone going to port 8000 and shot them over to port 443.  I also included port 80 just because I could.  If you have something running on port 80, just remove that VirtualHost.&lt;/P&gt;

&lt;P&gt;Make a new conf file in your apache dir, I called mine: &lt;STRONG&gt;/etc/httpd/conf.d/splunkRedirect.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Put this in that file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;NameVirtualHost *:80
&amp;lt;VirtualHost *:80&amp;gt;
ServerName splunk.integral7.com
RewriteEngine On
RewriteCond %{SERVER_PORT} ^80$
RewriteRule .* &lt;A href="https://%{SERVER_NAME}%{REQUEST_URI}" target="test_blank"&gt;https://%{SERVER_NAME}%{REQUEST_URI}&lt;/A&gt; [R,L]
&amp;lt;/VirtualHost&amp;gt;

Listen 8000
NameVirtualHost *:8000
&amp;lt;VirtualHost *:8000&amp;gt;
ServerName splunk.integral7.com
RewriteEngine On
RewriteCond %{SERVER_PORT} ^8000$
RewriteRule .* &lt;A href="https://%{SERVER_NAME}%{REQUEST_URI}" target="test_blank"&gt;https://%{SERVER_NAME}%{REQUEST_URI}&lt;/A&gt; [R,L]
&amp;lt;/VirtualHost&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;5) Restart Splunk, then Apache&lt;/P&gt;

&lt;P&gt;The order is important here, you need Splunk to let go of port 8000 so Apache can grab it for the redirect.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;service splunk restart
service httpd restart
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
And, you're done!  Since the redirect is done using mod_rewrite, any bookmarked pages should work the same, but use HTTPS instead of HTTP.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2014 21:58:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/port-forwarding-for-web-interface/m-p/79790#M2652</guid>
      <dc:creator>tpederson</dc:creator>
      <dc:date>2014-03-10T21:58:26Z</dc:date>
    </item>
  </channel>
</rss>

