LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-09-2021, 11:27 AM   #1
AlanRaczek
LQ Newbie
 
Registered: Mar 2019
Posts: 9

Rep: Reputation: Disabled
SNMP in Ubuntu times out with snmpwalk


I am trying to set up SNMP v3 network monitoring for Ubuntu either 18.04 or 20.04. I have loaded all the SNMP modules and configured a user and set up the firewall to allow 161 and 162. 'sudo ufw status verbose' shows ALLOW IN for ports 161 & 162. From this machine to a CentOS machine I can do an SNMP walk just fine. But from the CentOS machine to the Ubuntu machine it times out. I have used the exact same credentials on both machines. I even disabled AppArmor but no go.

Is there something I am missing? I am trying to use OpManager to monitor this and the tool gives errors as if I never configured SNMP.

...AR
 
Old 07-09-2021, 11:38 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,754

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by AlanRaczek View Post
I am trying to set up SNMP v3 network monitoring for Ubuntu either 18.04 or 20.04. I have loaded all the SNMP modules and configured a user and set up the firewall to allow 161 and 162. 'sudo ufw status verbose' shows ALLOW IN for ports 161 & 162. From this machine to a CentOS machine I can do an SNMP walk just fine. But from the CentOS machine to the Ubuntu machine it times out. I have used the exact same credentials on both machines. I even disabled AppArmor but no go.

Is there something I am missing? I am trying to use OpManager to monitor this and the tool gives errors as if I never configured SNMP.
Sorry to start with something very basic...but you say you loaded the SNMP modules, and configured SNMPD. But did you start the service?
Code:
service snmpd start  (or "status" to check it)
Test to make sure you can at least query the box locally with snmpwalk. Also, did you open the ports for UDP or TCP (SNMP uses UDP)?

A little tutorial here: https://techexpert.tips/ubuntu/insta...nmpv3-service/
...which covers SNMP V3, keys, etc., with a sample config.
 
Old 07-09-2021, 12:17 PM   #3
AlanRaczek
LQ Newbie
 
Registered: Mar 2019
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Sorry to start with something very basic...but you say you loaded the SNMP modules, and configured SNMPD. But did you start the service?
Code:
service snmpd start  (or "status" to check it)
Test to make sure you can at least query the box locally with snmpwalk. Also, did you open the ports for UDP or TCP (SNMP uses UDP)?

A little tutorial here: https://techexpert.tips/ubuntu/insta...nmpv3-service/
...which covers SNMP V3, keys, etc., with a sample config.

Yes the daemon is running and I can snmpwalk localhost just fine.
 
Old 07-09-2021, 12:32 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,754

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by AlanRaczek View Post
Yes the daemon is running and I can snmpwalk localhost just fine.
Ok...and UDP is open, not TCP, right? Typically, if you can walk the localhost but not over the network, that obviously means a network issue. Are those ports open on the other systems for return traffic? Anything in between the two??
 
Old 07-09-2021, 12:46 PM   #5
AlanRaczek
LQ Newbie
 
Registered: Mar 2019
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Ok...and UDP is open, not TCP, right? Typically, if you can walk the localhost but not over the network, that obviously means a network issue. Are those ports open on the other systems for return traffic? Anything in between the two??
All firewalls are configured for 161 and 162 UDP and the other CentOS machine can be monitored just fine from my NMS. Both machines are in the same subnet on the same VLAN.
 
Old 07-13-2021, 08:31 AM   #6
AlanRaczek
LQ Newbie
 
Registered: Mar 2019
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AlanRaczek View Post
I am trying to set up SNMP v3 network monitoring for Ubuntu either 18.04 or 20.04. I have loaded all the SNMP modules and configured a user and set up the firewall to allow 161 and 162. 'sudo ufw status verbose' shows ALLOW IN for ports 161 & 162. From this machine to a CentOS machine I can do an SNMP walk just fine. But from the CentOS machine to the Ubuntu machine it times out. I have used the exact same credentials on both machines. I even disabled AppArmor but no go.

Is there something I am missing? I am trying to use OpManager to monitor this and the tool gives errors as if I never configured SNMP.

...AR
I FINALLY figured this out. Ubuntu "out of the box" only allows local SNMP queries, it's restricted to 127.0.0.1. You need to modify the snmpd.conf at /etc/snmp and there will be a value called agentAddress. It will have a couple lines, one for local access and one for all access. Comment out the local access line and uncomment the line allowing all access and restart the snmpd daemon.

...ar
 
  


Reply



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
SNMP Configuration problem - able to snmp outbound, unable to snmp inbound. sumncguy Linux - Desktop 2 04-28-2015 09:26 AM
snmp problem, regarding snmpwalk, please help wooonix Linux - Networking 1 06-24-2009 07:16 AM
SNMP: snmpwalk giving dissimilar results jaredboyd Linux - Networking 0 09-23-2008 12:26 PM
snmpwalk times out using a AMD machine da_kidd_er Linux - Software 1 12-08-2004 12:45 AM
snmp (ucd-snmp, net-snmp) markus1982 Linux - Software 1 11-21-2002 10:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:04 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
Open Source Consulting | Domain Registration