<?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: How to ingest Untangle logs (NG Firewall) into Splunk? in Security</title>
    <link>https://community.splunk.com/t5/Security/How-to-ingest-Untangle-logs-NG-Firewall-into-Splunk/m-p/428779#M10097</link>
    <description>&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Getting Splunk and Untangle ready;&lt;/STRONG&gt; &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Pre-reqs (Ubuntu 16.04 - Splunk box) - JRE version 1.8 [&lt;EM&gt;I already had default jre&lt;/EM&gt;]&lt;/P&gt;

&lt;P&gt;sudo apt-get install default-jre [&lt;EM&gt;I would if I were you because these are the exact steps i followed&lt;/EM&gt;]&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html" target="_blank"&gt;http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;tar -xvzf jre-8u172-linux-x64.tar.gz [&lt;EM&gt;change version to fit your needs&lt;/EM&gt;]&lt;/P&gt;

&lt;P&gt;mv jre1.8.0_172/ /usr/lib/jvm/&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Installing the splunk app.&lt;/STRONG&gt; &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Login to splunk base and download the DB connect app. Once you have installed it on the general tab under settings put the full path to your jave jre (/usr/lib/jvm/jre1.8.0_172)&lt;/P&gt;

&lt;P&gt;Then download the driver required by the splunk app; &lt;A href="https://jdbc.postgresql.org/download/postgresql-42.2.2.jar" target="_blank"&gt;https://jdbc.postgresql.org/download/postgresql-42.2.2.jar&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;After you have downloaded the correct driver for your database, copy the .JAR driver file to the &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME/etc/apps/splunk_app_db_connect/drivers
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Once you do this restart splunk &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Configuring untangle;&lt;/STRONG&gt;&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;/etc/init.d/untangle-vm stop&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;/etc/init.d/postgresql stop&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Use fav text editor to edit&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt; /etc/postgresql/9.4/main/pg_hba.conf &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Find this line;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host    all             all             127.0.0.1/0               trust
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;CHANGE It to &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host    all             all             0.0.0.0/0               trust
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This allows all traffic to it. &lt;/P&gt;

&lt;P&gt;For this next part, navigate to&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/etc/postgresql/9.6/main/postgresql.conf
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;UNCOMMENT the listen_address line and add * in the ().  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Configure postgres;&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;psql -U postgres -d uvm&lt;BR /&gt;
CREATE USER $usernamehere WITH ENCRYPTED PASSWORD 'passwordfortheuser';&lt;BR /&gt;
GRANT CONNECT ON DATABASE uvm TO $usernamehere;&lt;BR /&gt;
GRANT USAGE ON SCHEMA reports TO $usernamehere;&lt;BR /&gt;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA reports TO $usernamehere;&lt;BR /&gt;
GRANT SELECT ON ALL TABLES IN SCHEMA reports to $usernamehere;&lt;BR /&gt;
ALTER DEFAULT PRIVILEGES IN SCHEMA reports GRANT SELECT ON TABLES TO $usernamehere;&lt;/P&gt;

&lt;P&gt;IF YOU HAVE UNTANGLE FIREWALL RULES ENSURE THAT YOU ALLOW YOUR HOST ACCESS TO IT!&lt;BR /&gt;
Download this tool to test &lt;A href="https://www.pgadmin.org/download" target="_blank"&gt;https://www.pgadmin.org/download&lt;/A&gt; &lt;BR /&gt;
Follow instructions to connect. &lt;/P&gt;

&lt;P&gt;Tables to pull data from (this is what I did, you can tailor this to your environment); &lt;/P&gt;

&lt;P&gt;[LIST]&lt;BR /&gt;
[&lt;EM&gt;]openvpn_stats &lt;BR /&gt;
[&lt;/EM&gt;]sessions&lt;BR /&gt;
[&lt;EM&gt;]http_query events &lt;BR /&gt;
[&lt;/EM&gt;]http_events&lt;BR /&gt;
[*]intrusion_prevention_events&lt;BR /&gt;
[/LIST]&lt;/P&gt;

&lt;P&gt;For configuring Splunk DB_Connect App and any questions please watch&lt;BR /&gt;
&lt;A href="https://youtu.be/oPB2Lpd9ZAs" target="_blank"&gt;https://youtu.be/oPB2Lpd9ZAs&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Once you have the Splunk DB_Connect App setup:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;You can use these pre-made queries to help get you up and running, the are splunk CIM compliant (except for OpenVPN). &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;OPENVPN;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;SELECT stats.start_time AS session_start_time,&lt;BR /&gt;
         stats.end_time AS session_close_time,&lt;BR /&gt;
         stats.remote_address AS src,&lt;BR /&gt;
         stats.pool_address AS internal_ip,&lt;BR /&gt;
         stats.client_name AS user,&lt;BR /&gt;
         stats.rx_bytes AS bytes_in,&lt;BR /&gt;
         stats.tx_bytes AS bytes_out,&lt;BR /&gt;
         event."type" AS action&lt;BR /&gt;
FROM "uvm"."reports"."openvpn_stats" AS stats&lt;BR /&gt;
INNER JOIN "uvm"."reports"."openvpn_events" AS event&lt;BR /&gt;
    ON (stats.remote_address = event.remote_address)&lt;BR /&gt;
        AND (stats.client_name = event.client_name)&lt;BR /&gt;
        AND (stats.time_stamp &amp;gt;= event.time_stamp - INTERVAL '1' SECOND)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Firewall and SSL;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;SELECT time_stamp AS start_time,&lt;BR /&gt;
         end_time,&lt;BR /&gt;
         bypassed,&lt;BR /&gt;
         session_id,&lt;BR /&gt;
         hostname,&lt;BR /&gt;
         local_addr AS src_ip,&lt;BR /&gt;
         c_client_port AS src_port,&lt;BR /&gt;
         remote_addr AS dest_ip,&lt;BR /&gt;
         c_server_port AS dest_port,&lt;BR /&gt;
         server_country,&lt;BR /&gt;
         server_latitude,&lt;BR /&gt;
         server_longitude,&lt;BR /&gt;
         c2p_bytes AS bytes_out,&lt;BR /&gt;
         s2p_bytes AS bytes_in,&lt;BR /&gt;
         firewall_blocked AS action,&lt;BR /&gt;
         ssl_inspector_ruleid AS ssl_rule,&lt;BR /&gt;
         ssl_inspector_status AS ssl_action,&lt;BR /&gt;
         ssl_inspector_detail AS ssl_url&lt;BR /&gt;
FROM "uvm"."reports"."sessions" &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;IDS;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;SELECT time_stamp AS start_time,&lt;BR /&gt;
         sig_id,&lt;BR /&gt;
         source_addr AS src,&lt;BR /&gt;
         dest_addr AS dest,&lt;BR /&gt;
         dest_port AS dest_port,&lt;BR /&gt;
         blocked AS action,&lt;BR /&gt;
         category || ':' || classtype AS category,&lt;BR /&gt;
         msg AS signature&lt;BR /&gt;
FROM "uvm"."reports"."intrusion_prevention_events"&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Web_Filtering&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;SELECT http_events.time_stamp,&lt;BR /&gt;
         http_events.c_client_addr AS src,&lt;BR /&gt;
         http_events.s_server_addr AS dest,&lt;BR /&gt;
         http_events.host AS site,&lt;BR /&gt;
         http_events.host || http_events.uri AS url,&lt;BR /&gt;
         http_events.domain AS dest_domain,&lt;BR /&gt;
         http_events.hostname AS host,&lt;BR /&gt;
         http_events.method AS http_method,&lt;BR /&gt;
         http_events.s2c_content_type AS http_content_type,&lt;BR /&gt;
         http_events.referer AS http_referrer,&lt;BR /&gt;
         http_events.web_filter_category AS category,&lt;BR /&gt;
         http_query_events.uri AS uri_query,&lt;BR /&gt;
         http_query_events.term AS search_terms&lt;BR /&gt;
FROM "uvm"."reports"."http_events" AS http_events&lt;BR /&gt;
INNER JOIN "uvm"."reports"."http_query_events" AS http_query_events&lt;BR /&gt;
    ON (http_events.request_id = http_query_events.request_id)&lt;BR /&gt;
        AND (http_events.session_id = http_query_events.session_id)&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 20:18:00 GMT</pubDate>
    <dc:creator>bborodach</dc:creator>
    <dc:date>2020-09-29T20:18:00Z</dc:date>
    <item>
      <title>How to ingest Untangle logs (NG Firewall) into Splunk?</title>
      <link>https://community.splunk.com/t5/Security/How-to-ingest-Untangle-logs-NG-Firewall-into-Splunk/m-p/428778#M10096</link>
      <description>&lt;P&gt;Greetings, &lt;/P&gt;

&lt;P&gt;For a long time, I have wanted to ingest untangle logs (Firewall, IDS/IPS, OpenVpn, and Web Filtering) into Splunk to write security rules, etc. I am surprised this wasn't done before however I completed this and it was worth struggle.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jul 2018 21:35:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-to-ingest-Untangle-logs-NG-Firewall-into-Splunk/m-p/428778#M10096</guid>
      <dc:creator>bborodach</dc:creator>
      <dc:date>2018-07-07T21:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to ingest Untangle logs (NG Firewall) into Splunk?</title>
      <link>https://community.splunk.com/t5/Security/How-to-ingest-Untangle-logs-NG-Firewall-into-Splunk/m-p/428779#M10097</link>
      <description>&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Getting Splunk and Untangle ready;&lt;/STRONG&gt; &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Pre-reqs (Ubuntu 16.04 - Splunk box) - JRE version 1.8 [&lt;EM&gt;I already had default jre&lt;/EM&gt;]&lt;/P&gt;

&lt;P&gt;sudo apt-get install default-jre [&lt;EM&gt;I would if I were you because these are the exact steps i followed&lt;/EM&gt;]&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html" target="_blank"&gt;http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;tar -xvzf jre-8u172-linux-x64.tar.gz [&lt;EM&gt;change version to fit your needs&lt;/EM&gt;]&lt;/P&gt;

&lt;P&gt;mv jre1.8.0_172/ /usr/lib/jvm/&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Installing the splunk app.&lt;/STRONG&gt; &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Login to splunk base and download the DB connect app. Once you have installed it on the general tab under settings put the full path to your jave jre (/usr/lib/jvm/jre1.8.0_172)&lt;/P&gt;

&lt;P&gt;Then download the driver required by the splunk app; &lt;A href="https://jdbc.postgresql.org/download/postgresql-42.2.2.jar" target="_blank"&gt;https://jdbc.postgresql.org/download/postgresql-42.2.2.jar&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;After you have downloaded the correct driver for your database, copy the .JAR driver file to the &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME/etc/apps/splunk_app_db_connect/drivers
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Once you do this restart splunk &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Configuring untangle;&lt;/STRONG&gt;&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;/etc/init.d/untangle-vm stop&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;/etc/init.d/postgresql stop&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Use fav text editor to edit&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt; /etc/postgresql/9.4/main/pg_hba.conf &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Find this line;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host    all             all             127.0.0.1/0               trust
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;CHANGE It to &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host    all             all             0.0.0.0/0               trust
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This allows all traffic to it. &lt;/P&gt;

&lt;P&gt;For this next part, navigate to&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/etc/postgresql/9.6/main/postgresql.conf
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;UNCOMMENT the listen_address line and add * in the ().  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Configure postgres;&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;psql -U postgres -d uvm&lt;BR /&gt;
CREATE USER $usernamehere WITH ENCRYPTED PASSWORD 'passwordfortheuser';&lt;BR /&gt;
GRANT CONNECT ON DATABASE uvm TO $usernamehere;&lt;BR /&gt;
GRANT USAGE ON SCHEMA reports TO $usernamehere;&lt;BR /&gt;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA reports TO $usernamehere;&lt;BR /&gt;
GRANT SELECT ON ALL TABLES IN SCHEMA reports to $usernamehere;&lt;BR /&gt;
ALTER DEFAULT PRIVILEGES IN SCHEMA reports GRANT SELECT ON TABLES TO $usernamehere;&lt;/P&gt;

&lt;P&gt;IF YOU HAVE UNTANGLE FIREWALL RULES ENSURE THAT YOU ALLOW YOUR HOST ACCESS TO IT!&lt;BR /&gt;
Download this tool to test &lt;A href="https://www.pgadmin.org/download" target="_blank"&gt;https://www.pgadmin.org/download&lt;/A&gt; &lt;BR /&gt;
Follow instructions to connect. &lt;/P&gt;

&lt;P&gt;Tables to pull data from (this is what I did, you can tailor this to your environment); &lt;/P&gt;

&lt;P&gt;[LIST]&lt;BR /&gt;
[&lt;EM&gt;]openvpn_stats &lt;BR /&gt;
[&lt;/EM&gt;]sessions&lt;BR /&gt;
[&lt;EM&gt;]http_query events &lt;BR /&gt;
[&lt;/EM&gt;]http_events&lt;BR /&gt;
[*]intrusion_prevention_events&lt;BR /&gt;
[/LIST]&lt;/P&gt;

&lt;P&gt;For configuring Splunk DB_Connect App and any questions please watch&lt;BR /&gt;
&lt;A href="https://youtu.be/oPB2Lpd9ZAs" target="_blank"&gt;https://youtu.be/oPB2Lpd9ZAs&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Once you have the Splunk DB_Connect App setup:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;You can use these pre-made queries to help get you up and running, the are splunk CIM compliant (except for OpenVPN). &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;OPENVPN;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;SELECT stats.start_time AS session_start_time,&lt;BR /&gt;
         stats.end_time AS session_close_time,&lt;BR /&gt;
         stats.remote_address AS src,&lt;BR /&gt;
         stats.pool_address AS internal_ip,&lt;BR /&gt;
         stats.client_name AS user,&lt;BR /&gt;
         stats.rx_bytes AS bytes_in,&lt;BR /&gt;
         stats.tx_bytes AS bytes_out,&lt;BR /&gt;
         event."type" AS action&lt;BR /&gt;
FROM "uvm"."reports"."openvpn_stats" AS stats&lt;BR /&gt;
INNER JOIN "uvm"."reports"."openvpn_events" AS event&lt;BR /&gt;
    ON (stats.remote_address = event.remote_address)&lt;BR /&gt;
        AND (stats.client_name = event.client_name)&lt;BR /&gt;
        AND (stats.time_stamp &amp;gt;= event.time_stamp - INTERVAL '1' SECOND)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Firewall and SSL;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;SELECT time_stamp AS start_time,&lt;BR /&gt;
         end_time,&lt;BR /&gt;
         bypassed,&lt;BR /&gt;
         session_id,&lt;BR /&gt;
         hostname,&lt;BR /&gt;
         local_addr AS src_ip,&lt;BR /&gt;
         c_client_port AS src_port,&lt;BR /&gt;
         remote_addr AS dest_ip,&lt;BR /&gt;
         c_server_port AS dest_port,&lt;BR /&gt;
         server_country,&lt;BR /&gt;
         server_latitude,&lt;BR /&gt;
         server_longitude,&lt;BR /&gt;
         c2p_bytes AS bytes_out,&lt;BR /&gt;
         s2p_bytes AS bytes_in,&lt;BR /&gt;
         firewall_blocked AS action,&lt;BR /&gt;
         ssl_inspector_ruleid AS ssl_rule,&lt;BR /&gt;
         ssl_inspector_status AS ssl_action,&lt;BR /&gt;
         ssl_inspector_detail AS ssl_url&lt;BR /&gt;
FROM "uvm"."reports"."sessions" &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;IDS;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;SELECT time_stamp AS start_time,&lt;BR /&gt;
         sig_id,&lt;BR /&gt;
         source_addr AS src,&lt;BR /&gt;
         dest_addr AS dest,&lt;BR /&gt;
         dest_port AS dest_port,&lt;BR /&gt;
         blocked AS action,&lt;BR /&gt;
         category || ':' || classtype AS category,&lt;BR /&gt;
         msg AS signature&lt;BR /&gt;
FROM "uvm"."reports"."intrusion_prevention_events"&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Web_Filtering&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;SELECT http_events.time_stamp,&lt;BR /&gt;
         http_events.c_client_addr AS src,&lt;BR /&gt;
         http_events.s_server_addr AS dest,&lt;BR /&gt;
         http_events.host AS site,&lt;BR /&gt;
         http_events.host || http_events.uri AS url,&lt;BR /&gt;
         http_events.domain AS dest_domain,&lt;BR /&gt;
         http_events.hostname AS host,&lt;BR /&gt;
         http_events.method AS http_method,&lt;BR /&gt;
         http_events.s2c_content_type AS http_content_type,&lt;BR /&gt;
         http_events.referer AS http_referrer,&lt;BR /&gt;
         http_events.web_filter_category AS category,&lt;BR /&gt;
         http_query_events.uri AS uri_query,&lt;BR /&gt;
         http_query_events.term AS search_terms&lt;BR /&gt;
FROM "uvm"."reports"."http_events" AS http_events&lt;BR /&gt;
INNER JOIN "uvm"."reports"."http_query_events" AS http_query_events&lt;BR /&gt;
    ON (http_events.request_id = http_query_events.request_id)&lt;BR /&gt;
        AND (http_events.session_id = http_query_events.session_id)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:18:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-to-ingest-Untangle-logs-NG-Firewall-into-Splunk/m-p/428779#M10097</guid>
      <dc:creator>bborodach</dc:creator>
      <dc:date>2020-09-29T20:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to ingest Untangle logs (NG Firewall) into Splunk?</title>
      <link>https://community.splunk.com/t5/Security/How-to-ingest-Untangle-logs-NG-Firewall-into-Splunk/m-p/596277#M16072</link>
      <description>&lt;P&gt;Im really new to splunk but I am trying to follow what you listed here for bringing in untangle. Would you be able to assist me a little more with getting my firewall integrated properly?&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 17:02:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-to-ingest-Untangle-logs-NG-Firewall-into-Splunk/m-p/596277#M16072</guid>
      <dc:creator>morganalton</dc:creator>
      <dc:date>2022-05-03T17:02:34Z</dc:date>
    </item>
  </channel>
</rss>

