<?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 How to setup an NGINX-proxy for deployment in Security</title>
    <link>https://community.splunk.com/t5/Security/How-to-setup-an-NGINX-proxy-for-deployment/m-p/456292#M10656</link>
    <description>&lt;P&gt;I am trying to configure an NGINX-proxy that will forward all requests from a Universal Forwarder to the Deploymentserver in my Splunk-cluster. I have tried to follow the examples that are available on the internet as wel as on Splunkbase. However, I run into an error which I can't seem to solve.&lt;/P&gt;

&lt;P&gt;My setup is as follows:&lt;BR /&gt;
A windows machine running the Universal Forwarder (version 7.1.2 x64)&lt;BR /&gt;
A CentOS 7.5 machine running Splunk as a deploymentserver (version 7.2.0)&lt;BR /&gt;
A CentOS 7.5 machine running NGINX (version 1.12.2)&lt;/P&gt;

&lt;P&gt;When I connect the Universal Forwarder directly to the deploymentserver, everything works fine. But when I connect with the NGINX-proxy, the communication breaks down. &lt;BR /&gt;
NGINX reports a '502 Bad Gateway' and the deploymentserver reports &lt;BR /&gt;
'WARN  HttpListener - Socket error from 10.101.0.243:40076 while idling: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number'&lt;/P&gt;

&lt;P&gt;My NGINX config looks as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user nginx nginx;
worker_processes auto;
pid /var/run/nginx.pid;
error_log /var/log/nginx/error.log;
events {
    worker_connections 1024;
    use epoll;
}

http {
    log_format  main_http  '$remote_addr - $remote_user [$time_local] $ssl_protocol/$ssl_cipher "$request" '
                           '$status $body_bytes_sent "$http_referer" '
                           '"$http_user_agent" "$http_x_forwarded_for"';

    upstream splunk_deploymentserver {
        ip_hash;
        server 10.101.0.237:8089;
    }

    server {
        listen 8089 ssl;
        ssl_certificate     ssl/server.pem;
        ssl_certificate_key ssl/server.key;
        access_log  /var/log/nginx/access_splunkdeployment.log  main_http;
        location / {
            proxy_pass http://splunk_deploymentserver;
        }
    }
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The SSL-certificate that is served by NGINX, is a copy of the SSL-certificate of the deployment server.&lt;/P&gt;

&lt;P&gt;Any help on solving this problem is very much appreciated.&lt;/P&gt;

&lt;P&gt;Oscar&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 21:50:56 GMT</pubDate>
    <dc:creator>HumanPrinter</dc:creator>
    <dc:date>2020-09-29T21:50:56Z</dc:date>
    <item>
      <title>How to setup an NGINX-proxy for deployment</title>
      <link>https://community.splunk.com/t5/Security/How-to-setup-an-NGINX-proxy-for-deployment/m-p/456292#M10656</link>
      <description>&lt;P&gt;I am trying to configure an NGINX-proxy that will forward all requests from a Universal Forwarder to the Deploymentserver in my Splunk-cluster. I have tried to follow the examples that are available on the internet as wel as on Splunkbase. However, I run into an error which I can't seem to solve.&lt;/P&gt;

&lt;P&gt;My setup is as follows:&lt;BR /&gt;
A windows machine running the Universal Forwarder (version 7.1.2 x64)&lt;BR /&gt;
A CentOS 7.5 machine running Splunk as a deploymentserver (version 7.2.0)&lt;BR /&gt;
A CentOS 7.5 machine running NGINX (version 1.12.2)&lt;/P&gt;

&lt;P&gt;When I connect the Universal Forwarder directly to the deploymentserver, everything works fine. But when I connect with the NGINX-proxy, the communication breaks down. &lt;BR /&gt;
NGINX reports a '502 Bad Gateway' and the deploymentserver reports &lt;BR /&gt;
'WARN  HttpListener - Socket error from 10.101.0.243:40076 while idling: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number'&lt;/P&gt;

&lt;P&gt;My NGINX config looks as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user nginx nginx;
worker_processes auto;
pid /var/run/nginx.pid;
error_log /var/log/nginx/error.log;
events {
    worker_connections 1024;
    use epoll;
}

http {
    log_format  main_http  '$remote_addr - $remote_user [$time_local] $ssl_protocol/$ssl_cipher "$request" '
                           '$status $body_bytes_sent "$http_referer" '
                           '"$http_user_agent" "$http_x_forwarded_for"';

    upstream splunk_deploymentserver {
        ip_hash;
        server 10.101.0.237:8089;
    }

    server {
        listen 8089 ssl;
        ssl_certificate     ssl/server.pem;
        ssl_certificate_key ssl/server.key;
        access_log  /var/log/nginx/access_splunkdeployment.log  main_http;
        location / {
            proxy_pass http://splunk_deploymentserver;
        }
    }
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The SSL-certificate that is served by NGINX, is a copy of the SSL-certificate of the deployment server.&lt;/P&gt;

&lt;P&gt;Any help on solving this problem is very much appreciated.&lt;/P&gt;

&lt;P&gt;Oscar&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:50:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-to-setup-an-NGINX-proxy-for-deployment/m-p/456292#M10656</guid>
      <dc:creator>HumanPrinter</dc:creator>
      <dc:date>2020-09-29T21:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup an NGINX-proxy for deployment</title>
      <link>https://community.splunk.com/t5/Security/How-to-setup-an-NGINX-proxy-for-deployment/m-p/456293#M10657</link>
      <description>&lt;P&gt;The problem turned out to be very simple and very obvious. I was forwarder to the deployer of http instead of http &lt;STRONG&gt;s&lt;/STRONG&gt;. In other words, changing &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;proxy_pass &lt;A href="http://splunk_deploymentserver" target="test_blank"&gt;http://splunk_deploymentserver&lt;/A&gt;;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;into&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;proxy_pass &lt;A href="https://splunk_deploymentserver" target="test_blank"&gt;https://splunk_deploymentserver&lt;/A&gt;;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;did the trick.&lt;BR /&gt;
(That was one expensive letter &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; )&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 07:06:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-to-setup-an-NGINX-proxy-for-deployment/m-p/456293#M10657</guid>
      <dc:creator>HumanPrinter</dc:creator>
      <dc:date>2018-11-01T07:06:10Z</dc:date>
    </item>
  </channel>
</rss>

