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 |
You need to add that as a rule to the /etc/sysconfig/iptables file by editing it.
It's not a cmd... |
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 |
All times are GMT -5. The time now is 04:09 PM. |