LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-29-2010, 01:25 PM   #1
cnelson
LQ Newbie
 
Registered: Aug 2010
Posts: 14

Rep: Reputation: 0
Opening up SNMP


I have several Ubuntu(10.04), and centos (4.x and 5.x) servers that I am setting up snmp monitoring on. But setting the iptables doesn't always seam to work, the only for sure way has been disabling the firewall.

The following IP tables commands is what I have been using
Quote:
iptables -A INPUT -m state --state NEW -m udp -p udp --dport 161 -j ACCEPT
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 161 -j ACCEPT
iptables -A INPUT -m state --state NEW -m udp -p udp --dport 162 -j ACCEPT
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 162 -j ACCEPT
What will work? Does anythign else need to be ran to save it so it comes up next reboot?

Also is there a way to lock down snmp? right now the conf file is 3 lines long . . . .

THanks guys!
 
Old 09-30-2010, 08:25 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,685

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by cnelson View Post
I have several Ubuntu(10.04), and centos (4.x and 5.x) servers that I am setting up snmp monitoring on. But setting the iptables doesn't always seam to work, the only for sure way has been disabling the firewall.

The following IP tables commands is what I have been using
What will work?
First, for your firewall. Don't know if you're using UFW or not, but this page has tips that might help:
http://serverfault.com/questions/397...wall-on-ubuntu

Obviously, instead of "ufw allow http", you'd put "ufw allow snmp".
Quote:
Does anythign else need to be ran to save it so it comes up next reboot?
Well, DOES it come up after reboot?? Have you tried it, or are you assuming it won't? Can't address a problem if you don't know you have it. CentOS can be done with "chkconfig snmp on", which will start SNMP at boot time. Ubuntu, go to "System->Administration->Services", and check SNMP to start at boot.
Quote:
Also is there a way to lock down snmp? right now the conf file is 3 lines long . . . .
Sort of. Make sure you set good passwords for your public/private SNMP queries. Otherwise, ANYONE can just sniff that box, and get all the necessary info to make hacking it much easier. the private (set) string is most important. Missing password there?? That means that ANYONE could just decide to reboot the box, etc.....
 
  


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
Integrate Mod-Apache-Snmp with Net-SNMP source kirukan Linux - Server 2 05-11-2011 01:48 AM
Net-SNMP writing a Subagent - snmp.conf Unknown token: master AustinMarton Programming 0 12-16-2008 07:34 PM
SNMP master & SNMP client Script for system monitoring ratul_11 Programming 1 12-24-2007 05:32 AM
How to configure ucd-snmp and net-snmp? Tazzmanian Linux - Networking 1 05-27-2005 08:09 AM
snmp (ucd-snmp, net-snmp) markus1982 Linux - Software 1 11-21-2002 10:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:29 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