LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-09-2015, 11:14 PM   #1
cebo_myeza
LQ Newbie
 
Registered: Apr 2015
Posts: 3

Rep: Reputation: Disabled
how to open UDP 161 port to allow only the SNMP monitoring server


hi

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.And my monitoring host is 192.168.1.2/24

i have been using CLI command below but i am getting an error of bash: -A: command not found

-A INPUT -s 192.168.1.2/24 -p udp -m udp --sport 1024:65535 --dport 161 -m state --state NEW,ESTABLISHED -j ACCEPT

please help
 
Old 06-10-2015, 06:00 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
You need to add that as a rule to the /etc/sysconfig/iptables file by editing it.
It's not a cmd...
 
Old 06-10-2015, 06:27 AM   #3
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 1,441

Rep: Reputation: 193Reputation: 193
If you want to add the rule on the fly (eg for testing purposes), you could do
Code:
iptables -A INPUT -s 192.168.1.2/24 -p udp -m udp --sport 1024:65535 --dport 161 -m state --state NEW,ESTABLISHED -j ACCEPT
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help with Port Open UDP colonel-top Linux - Newbie 1 02-02-2014 12:00 PM
iptables port 161 UDP/TCP aocferreira Linux - Networking 7 03-18-2011 05:08 PM
UDP Port 161 kopper27 Linux - Newbie 8 06-09-2010 03:57 PM
How to open a UDP port thiagarn Linux - Newbie 20 05-29-2008 10:00 AM
How do I open up a UDP port? Dirt Linux - Networking 9 06-06-2003 06:50 PM


All times are GMT -5. The time now is 08:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration