<?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 configure a Log4j2 Socket Appender with a TCP-SSL Appender? in Security</title>
    <link>https://community.splunk.com/t5/Security/How-to-configure-a-Log4j2-Socket-Appender-with-a-TCP-SSL/m-p/375866#M9274</link>
    <description>&lt;P&gt;I am planning to configure a Log4j2 Socket Appender with a TCP-SSL Appender.&lt;/P&gt;

&lt;P&gt;Here is the configuration I see in Log4j2 website.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;Configuration status="warn" name="MyApp" packages=""&amp;gt;
  &amp;lt;Appenders&amp;gt;
    &amp;lt;Socket name="socket" host="localhost" port="9500"&amp;gt;
      &amp;lt;JsonLayout properties="true"/&amp;gt;
      &amp;lt;SSL&amp;gt;
        &amp;lt;KeyStore location="log4j2-keystore.jks" password="guessme!"/&amp;gt;
        &amp;lt;TrustStore location="truststore.jks" password="guessme!"/&amp;gt;
      &amp;lt;/SSL&amp;gt;
    &amp;lt;/Socket&amp;gt;
  &amp;lt;/Appenders&amp;gt;
  &amp;lt;Loggers&amp;gt;
    &amp;lt;Root level="error"&amp;gt;
      &amp;lt;AppenderRef ref="socket"/&amp;gt;
    &amp;lt;/Root&amp;gt;
  &amp;lt;/Loggers&amp;gt;
&amp;lt;/Configuration&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this config, what do the Keystore and TrustStore files contain? I don't have these files.&lt;/P&gt;

&lt;P&gt;I want to send my logs to Splunk TCP port.&lt;/P&gt;

&lt;P&gt;Do I need to create truststore.jks with SSL certs from my Splunk server so that my server trusts Splunk?&lt;/P&gt;

&lt;P&gt;What is log4j2-keystore.jks, and where can I download it? Do I need a KeyStore file? What should go in it? Does Splunk need a corresponding public key or trusted certs?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Sanjay&lt;/P&gt;</description>
    <pubDate>Mon, 07 May 2018 11:33:08 GMT</pubDate>
    <dc:creator>apigeek</dc:creator>
    <dc:date>2018-05-07T11:33:08Z</dc:date>
    <item>
      <title>How to configure a Log4j2 Socket Appender with a TCP-SSL Appender?</title>
      <link>https://community.splunk.com/t5/Security/How-to-configure-a-Log4j2-Socket-Appender-with-a-TCP-SSL/m-p/375866#M9274</link>
      <description>&lt;P&gt;I am planning to configure a Log4j2 Socket Appender with a TCP-SSL Appender.&lt;/P&gt;

&lt;P&gt;Here is the configuration I see in Log4j2 website.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;Configuration status="warn" name="MyApp" packages=""&amp;gt;
  &amp;lt;Appenders&amp;gt;
    &amp;lt;Socket name="socket" host="localhost" port="9500"&amp;gt;
      &amp;lt;JsonLayout properties="true"/&amp;gt;
      &amp;lt;SSL&amp;gt;
        &amp;lt;KeyStore location="log4j2-keystore.jks" password="guessme!"/&amp;gt;
        &amp;lt;TrustStore location="truststore.jks" password="guessme!"/&amp;gt;
      &amp;lt;/SSL&amp;gt;
    &amp;lt;/Socket&amp;gt;
  &amp;lt;/Appenders&amp;gt;
  &amp;lt;Loggers&amp;gt;
    &amp;lt;Root level="error"&amp;gt;
      &amp;lt;AppenderRef ref="socket"/&amp;gt;
    &amp;lt;/Root&amp;gt;
  &amp;lt;/Loggers&amp;gt;
&amp;lt;/Configuration&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this config, what do the Keystore and TrustStore files contain? I don't have these files.&lt;/P&gt;

&lt;P&gt;I want to send my logs to Splunk TCP port.&lt;/P&gt;

&lt;P&gt;Do I need to create truststore.jks with SSL certs from my Splunk server so that my server trusts Splunk?&lt;/P&gt;

&lt;P&gt;What is log4j2-keystore.jks, and where can I download it? Do I need a KeyStore file? What should go in it? Does Splunk need a corresponding public key or trusted certs?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Sanjay&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 11:33:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-to-configure-a-Log4j2-Socket-Appender-with-a-TCP-SSL/m-p/375866#M9274</guid>
      <dc:creator>apigeek</dc:creator>
      <dc:date>2018-05-07T11:33:08Z</dc:date>
    </item>
  </channel>
</rss>

