<?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: Splunk Search Syntax to show service &amp;amp; dstport in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Search-Syntax-to-show-service-amp-dstport/m-p/559581#M6405</link>
    <description>&lt;P&gt;Try fillnull for the dstport&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="fortinet" "devname=" "xxxxx-xxxxxx" "vd=" "xxx-xxxxx" policyid=5 action=accept
| fillnull value=0 dstport
| stats count by srcip, dstip, dstport, service, action, date, time, policyid
| dedup srcip dstip dstport service consecutive=true
| sort 0 field&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 15 Jul 2021 11:52:35 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-07-15T11:52:35Z</dc:date>
    <item>
      <title>Splunk Search Syntax to show service &amp; dstport</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Search-Syntax-to-show-service-amp-dstport/m-p/559574#M6403</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm running the below syntax on Splunk Enterprise to get traffic logs from Fortigate firewalls:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index="fortinet" "devname=" "xxxxx-xxxxxx" "vd=" "xxx-xxxxx" policyid=5 action=accept&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| stats count by srcip, dstip, dstport, service, action, date, time, policyid&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| dedup srcip dstip dstport service consecutive=true&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| sort 0 field&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This gives me all TCP &amp;amp; UDP traffic, then I can download &amp;amp; filter in a .csv but doesn't pick up ICMP traffic (specifically icmp type 8). I have to run a separate syntax to get just ICMP as below:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index="fortinet" "devname=" "xxxxx-xxxxxx" "vd=" "xxx-xxxxx" policyid=5 action=accept&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| stats count by srcip, dstip, service, action, date, time, policyid&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| dedup srcip dstip service consecutive=true&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| sort 0 field&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It seems that because ICMP has no dstport the syntax needs adjusting.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I need is a syntax that will return all traffic, i.e. TCP, UDP &amp;amp; ICMP.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Please advise?&lt;/P&gt;&lt;P&gt;Naz&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 11:18:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Search-Syntax-to-show-service-amp-dstport/m-p/559574#M6403</guid>
      <dc:creator>Naz_Lightening</dc:creator>
      <dc:date>2021-07-15T11:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search Syntax to show service &amp; dstport</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Search-Syntax-to-show-service-amp-dstport/m-p/559579#M6404</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236439"&gt;@Naz_Lightening&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try this SPL? I hope it works without looking at data its a guess let me know how you go.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="fortinet" "devname=" "xxxxx-xxxxxx" "vd=" "xxx-xxxxx" policyid=5 action=accept 
| eval dstport=if(isnull(dstport),"none", dstport) 
| stats count by srcip, dstip, dstport, service, action, date, time, policyid 
| dedup srcip dstip dstport service consecutive=true 
| search dstport!="none"
| sort 0 field&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; --&lt;/P&gt;&lt;P&gt;An upvote would be appreciated and Accept solution if this reply helps!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 11:40:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Search-Syntax-to-show-service-amp-dstport/m-p/559579#M6404</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-07-15T11:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search Syntax to show service &amp; dstport</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Search-Syntax-to-show-service-amp-dstport/m-p/559581#M6405</link>
      <description>&lt;P&gt;Try fillnull for the dstport&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="fortinet" "devname=" "xxxxx-xxxxxx" "vd=" "xxx-xxxxx" policyid=5 action=accept
| fillnull value=0 dstport
| stats count by srcip, dstip, dstport, service, action, date, time, policyid
| dedup srcip dstip dstport service consecutive=true
| sort 0 field&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 15 Jul 2021 11:52:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Search-Syntax-to-show-service-amp-dstport/m-p/559581#M6405</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-07-15T11:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search Syntax to show service &amp; dstport</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Search-Syntax-to-show-service-amp-dstport/m-p/559591#M6409</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;cheers that's done it nicely!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 13:29:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Search-Syntax-to-show-service-amp-dstport/m-p/559591#M6409</guid>
      <dc:creator>Naz_Lightening</dc:creator>
      <dc:date>2021-07-15T13:29:03Z</dc:date>
    </item>
  </channel>
</rss>

