SNMPD for allowing only to single host

General support questions
Post Reply
yunushaikh
Posts: 7
Joined: 2015/07/08 12:49:20

SNMPD for allowing only to single host

Post by yunushaikh » 2015/08/26 12:10:23

Hello Experts,

I need snmpv3 to allow query with only one server.
Is there any parameter in snmpd.conf which I can configure to provide snmp data to that host only and none other hosts on network.

Thanks for your help

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: SNMPD for allowing only to single host

Post by aks » 2015/08/26 16:15:59

According to http://sourceforge.net/p/net-snmp/mailm ... /27227181/ not in the same way as you can with snmpv1/v2c.
They suggest you use tcp-wrappers for this (/etc/hosts.allow and /etc/hosts.deny).

keddie
Posts: 5
Joined: 2009/02/18 15:00:16
Contact:

Re: SNMPD for allowing only to single host

Post by keddie » 2015/09/04 11:49:06

Or you can allow/deny snmp traffic on firewall:
iptables -A INPUT -s allowed_host_ip -p tcp --dport 161 -j ACCEPT
iptables -A INPUT -s allowed_host_ip -p udp --dport 161 -j ACCEPT
iptables -A INPUT -s allowed_host_ip -p tcp --dport 162 -j ACCEPT
iptables -A INPUT -s allowed_host_ip -p udp --dport 162 -j ACCEPT
and optionally if your default rule is not DROP then
iptables -A INPUT -p tcp --dport 161 -j DROP
iptables -A INPUT -p udp --dport 161 -j DROP
iptables -A INPUT -p tcp --dport 162 -j DROP
iptables -A INPUT -p udp --dport 162 -j DROP

yunushaikh
Posts: 7
Joined: 2015/07/08 12:49:20

Re: SNMPD for allowing only to single host

Post by yunushaikh » 2015/09/10 14:23:54

ok thanks for your help
I thought that there will be some option in snmpd.conf for doing this settings

Post Reply