<?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 allow splunk to connect UDP 161 port in Linux? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147018#M29959</link>
    <description>&lt;P&gt;or do &lt;CODE&gt;source /opt/splunk/bin/setSplunkEnv&lt;/CODE&gt; &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The problem here is, that the add-monitor script adds an &lt;CODE&gt;authToken_servername_8089&lt;/CODE&gt; to the normal user home directory, but owned by splunk:splunk,&lt;/P&gt;

&lt;P&gt;So try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sudo ./splunk add monitor /var/log/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It should prompt you for root [sudo] password and then your splunk credentials that were set up. &lt;/P&gt;</description>
    <pubDate>Thu, 11 Jun 2015 20:29:36 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2015-06-11T20:29:36Z</dc:date>
    <item>
      <title>how to allow splunk to connect UDP 161 port in Linux?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147005#M29946</link>
      <description>&lt;P&gt;hi&lt;/P&gt;

&lt;P&gt;i am working on a splunk project and i am using centos as my operating system, i just need help on how to allow only the SNMP monitoring server (SPLUNK) to connect to UDP 161 port in centos using CLI.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2015 02:39:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147005#M29946</guid>
      <dc:creator>cebo_myeza</dc:creator>
      <dc:date>2015-06-10T02:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to allow splunk to connect UDP 161 port in Linux?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147006#M29947</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Add CLI inputs:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;./splunk add udp 161 -sourcetype name_of_your_sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Add inputs via Splunkweb:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.3/Data/SyslogTCP"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.3/Data/SyslogTCP&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;UDP&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[udp://&amp;lt;remote server&amp;gt;:&amp;lt;port&amp;gt;]
&amp;lt;attrbute1&amp;gt; = &amp;lt;val1&amp;gt;
&amp;lt;attrbute2&amp;gt; = &amp;lt;val2&amp;gt;
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This type of input stanza is similar to the TCP type, except that it listens on a UDP port.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Further reference:&lt;/STRONG&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.3/Data/Monitornetworkports"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.3/Data/Monitornetworkports&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.3/Data/SendSNMPeventstoSplunk"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.3/Data/SendSNMPeventstoSplunk&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2015 02:51:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147006#M29947</guid>
      <dc:creator>splunker12er</dc:creator>
      <dc:date>2015-06-10T02:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to allow splunk to connect UDP 161 port in Linux?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147007#M29948</link>
      <description>&lt;P&gt;Hi cebo_myeza,&lt;/P&gt;

&lt;P&gt;If you have Splunk installed with a non-root user on LINUX, you can´t listen to ports below 1024. But....there is a work around:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/usr/sbin/iptables -t nat -A PREROUTING -m udp -p udp --dport 161 -j REDIRECT --to-ports 1161
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The IPTABLES Firewall will route UDP from port 161 to port 1161. &lt;BR /&gt;
It needs to be executed as root and your sys admin should make it boot able, so that this redirect is permanent and gets loaded after a system reboot.&lt;/P&gt;

&lt;P&gt;Afterwards do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME/bin/splunk add udp 1161 -sourcetype snmp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2015 03:04:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147007#M29948</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-06-10T03:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to allow splunk to connect UDP 161 port in Linux?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147008#M29949</link>
      <description>&lt;P&gt;Hi MuS&lt;/P&gt;

&lt;P&gt;Thanks for your time though.&lt;/P&gt;

&lt;P&gt;i am little bit confused about the second part... &lt;STRONG&gt;add udp &lt;EM&gt;1611&lt;/EM&gt; -sourcetype snmp&lt;/STRONG&gt;, what is 1611 for?&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2015 07:49:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147008#M29949</guid>
      <dc:creator>cebo_myeza</dc:creator>
      <dc:date>2015-06-10T07:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to allow splunk to connect UDP 161 port in Linux?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147009#M29950</link>
      <description>&lt;P&gt;This is if splunk service is not running as root, then it cannot open any ports under the 1-1024 range (reserved by root)&lt;BR /&gt;
So a workaround  is to use IPtables to map the port 161 to a port &amp;gt; 1024, like 1611&lt;/P&gt;

&lt;P&gt;The second command is the splunk CLI command to add a new input on the new port.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2015 11:11:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147009#M29950</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2015-06-10T11:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to allow splunk to connect UDP 161 port in Linux?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147010#M29951</link>
      <description>&lt;P&gt;I think it's a typo, should be 1161, the port 161 gets redirected to.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2015 17:36:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147010#M29951</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2015-06-10T17:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to allow splunk to connect UDP 161 port in Linux?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147011#M29952</link>
      <description>&lt;P&gt;HeHe, indeed it is a typo - corrected now. thanks for the hint &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2015 19:46:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147011#M29952</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-06-10T19:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to allow splunk to connect UDP 161 port in Linux?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147012#M29953</link>
      <description>&lt;P&gt;hi&lt;/P&gt;

&lt;P&gt;thanks again for your time.&lt;/P&gt;

&lt;P&gt;is it correct to use this even though i am running my splunk as &lt;STRONG&gt;root&lt;/STRONG&gt;. &lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2015 01:07:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147012#M29953</guid>
      <dc:creator>cebo_myeza</dc:creator>
      <dc:date>2015-06-11T01:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to allow splunk to connect UDP 161 port in Linux?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147013#M29954</link>
      <description>&lt;P&gt;No, running Splunk as root should be fine. But if you cannot assign a port, it could be already open / in use.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2015 01:27:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147013#M29954</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-06-11T01:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to allow splunk to connect UDP 161 port in Linux?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147014#M29955</link>
      <description>&lt;P&gt;hi&lt;BR /&gt;
thanks for your help.&lt;/P&gt;

&lt;P&gt;can you  please explain this part for me&lt;/P&gt;

&lt;P&gt;[udp://:]&lt;BR /&gt;
  = &lt;BR /&gt;
  = &lt;BR /&gt;
 ...&lt;/P&gt;

&lt;P&gt;where should i write this, what is it for?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2015 02:22:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147014#M29955</guid>
      <dc:creator>cebo_myeza</dc:creator>
      <dc:date>2015-06-11T02:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to allow splunk to connect UDP 161 port in Linux?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147015#M29956</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Edit inputs.conf in $SPLUNK_HOME/etc/system/local/, or your own custom application directory in $SPLUNK_HOME/etc/apps/your_app/local&lt;/P&gt;

&lt;P&gt;You can set any number of attributes , (please refer to the link, &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.3/Data/Monitornetworkports" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.3/Data/Monitornetworkports&lt;/A&gt;) and values following an input type. If you do not specify a value for one or more attributes, Splunk uses the defaults that are preset in $SPLUNK_HOME/etc/system/default/ (noted below).&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147015#M29956</guid>
      <dc:creator>splunker12er</dc:creator>
      <dc:date>2020-09-28T20:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to allow splunk to connect UDP 161 port in Linux?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147016#M29957</link>
      <description>&lt;P&gt;hello &lt;BR /&gt;
if i try to add the port i get the following &lt;STRONG&gt;error&lt;/STRONG&gt;:&lt;/P&gt;

&lt;P&gt;[root@localhost bin]# ./splunk add udp 161 -sourcetype snmp&lt;BR /&gt;
Splunk username: admin&lt;BR /&gt;&lt;BR /&gt;
Password:&lt;BR /&gt;
Can't create directory "/root/.splunk": Permission denied&lt;BR /&gt;
[root@localhost bin]# &lt;/P&gt;

&lt;P&gt;please help&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2015 06:57:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147016#M29957</guid>
      <dc:creator>cebo_myeza</dc:creator>
      <dc:date>2015-06-11T06:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to allow splunk to connect UDP 161 port in Linux?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147017#M29958</link>
      <description>&lt;P&gt;To use &lt;CODE&gt;./splunk&lt;/CODE&gt;you should have to set environmental variables.&lt;/P&gt;

&lt;P&gt;if you are using *nix operating systems, try setting up the env. variables.,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;export SPLUNK_HOME=/opt/splunk
export PATH=$SPLUNK_HOME/bin:$PATH
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR else, you should directly add stanzas to inputs.conf something like this, via CLI&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/opt/splunk/bin/splunk add 161 -sourcetype snmp
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Jun 2015 07:56:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147017#M29958</guid>
      <dc:creator>splunker12er</dc:creator>
      <dc:date>2015-06-11T07:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to allow splunk to connect UDP 161 port in Linux?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147018#M29959</link>
      <description>&lt;P&gt;or do &lt;CODE&gt;source /opt/splunk/bin/setSplunkEnv&lt;/CODE&gt; &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The problem here is, that the add-monitor script adds an &lt;CODE&gt;authToken_servername_8089&lt;/CODE&gt; to the normal user home directory, but owned by splunk:splunk,&lt;/P&gt;

&lt;P&gt;So try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sudo ./splunk add monitor /var/log/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It should prompt you for root [sudo] password and then your splunk credentials that were set up. &lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2015 20:29:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-allow-splunk-to-connect-UDP-161-port-in-Linux/m-p/147018#M29959</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-06-11T20:29:36Z</dc:date>
    </item>
  </channel>
</rss>

