Score:0

snmp server not receives data

cn flag

enter code hereI have a problem when using the snmp and the server receives data, The service is running correctly and the port is listening

I do a snmpwalk -v 2c -c mycommunity 192.168.1.82 (which is the same) and it answers me and a snmpwalk -v 2c -c mycommunity localhost and also, that is, the service is working but it does not respond from any machine other than her same a sudo netstat -tulpn | grep snmp sudo netstat -tulpn | grep snmp udp 0 0 0.0.0.0:161 0.0.0.0:* 15014/snmpd

something similar happened to someone?

J.M. Robles avatar
cn flag
Have you checked that there is no firewall avoiding external connections?,
cn flag
in iptables I do not see anything strange and the ping if it arrives
J.M. Robles avatar
cn flag
Could you share the output of iptables -L and nft list tables?
cn flag
it has many iptables rules and it won't let me put so much text here
cn flag
I put the output in the post
Score:0
cn flag

If firewalls are not involved, probably your configuration of the SNMPD service only accepts queries from local addresses.

Please, change the configuration of agentadress in /etc/snmp/snmpd.conf to

agentaddress udp:161

EDIT

If I am not wrong, your iptables configuration is establishing the DROP policy (anyway, the last rule is REJECT), so, you must allow explicitly all the traffic you want to reach your processes. In this case, the incoming traffic to port 161

iptables -A INPUT -p udp --dport 161 -j ACCEPT

If that works, you shuld make the rule persistent. Please find where the iptables rules are saved (/etc/iptables/rules.v4 ?) and edit to add the rule

cn flag
I already have that line like this in the configuration file
Score:0
cn flag

finally it was an iptables issue that in its last line of input had a REJECT all the only thing I had to do was insert the rule above the REJECT with a:

iptables -I INPUT 23 -p udp --dport 161 -j ACCEPT

I put it here in case someone cares

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.