Results 1 to 6 of 6

Thread: How to Install and Configure snmpd Service in Ubuntu

  1. #1
    Join Date
    Feb 2010
    Posts
    184

    How to Install and Configure snmpd Service in Ubuntu

    Hi all,

    I am using Ubuntu linux. Simple Network Management Protocol is a protocol used for network management. I want to know that how do I install SNMP server under Ubuntu Linux to configure various monitoring service? Please suggest. Thanks in advance.

  2. #2
    Dr. V Guest

    How to Install and Configure snmpd Service in Ubuntu

    Ubuntu Linux provides a number of package management tools. Snmpd is also the management tools. First you need to type command
    Code:
    apt-get update && apt-get install snmpd
    Under the root. Check that and reply if you found any issue. Best of luck.

  3. #3
    Join Date
    May 2008
    Posts
    2,680

    Re: How to Install and Configure snmpd Service in Ubuntu

    The default configuration for snmpd is somewhat suspicious for security reasons. You need to Edit /etc/snmp/snmpd.conf or run snmpconf to permit greater access. You can independently manage whether or not snmpd and snmpdtrap are run by editing /etc/default/snmpd. You can configure SNMPD by Edit /etc/snmp/snmpd.conf, You need to enter:
    Code:
     vi /etc/snmp/snmpd.conf

  4. #4
    Join Date
    Nov 2005
    Posts
    3,026

    Re: How to Install and Configure snmpd Service in Ubuntu

    You need to also update the snmpd.conf(5) main page for details.

    Code:
    # This file controls the activity of snmpd and snmptrapd
     
    # MIB directories.  /usr/share/snmp/mibs is the default, but
    # including it here avoids some strange problems.
    export MIBDIRS=/usr/share/snmp/mibs
     
    # snmpd control (yes means start daemon).
    SNMPDRUN=yes
     
    # snmpd options (use syslog, close stdin/out/err).
    # replace 204.x.y.z with your public IP
    SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1 204.x.y.z'
     
    # snmptrapd control (yes means start daemon).  As of net-snmp version
    # 5.0, master agentx support must be enabled in snmpd before snmptrapd
    # can be run.  See snmpd.conf(5) for how to do this.
    TRAPDRUN=no
     
    # snmptrapd options (use syslog).
    TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'
     
    # create symlink on Debian legacy location to official RFC path
    SNMPDCOMPAT=yes

  5. #5
    Join Date
    Apr 2008
    Posts
    3,295

    How to Install and Configure snmpd Service in Ubuntu

    You need to change the Firewall Configuration by edit firewall config file:
    Code:
    #!/bin/sh
     
    # set shell vars
    PUB_IF="eth0"
    SNMPD_CLIENT="85.x.y.z"
    SNMPD_SERVER="203.a.b.c"
     
    IPT="/sbin/iptables"
    LO_IF="lo0"
     
    # DROP and close everything all incoming traffic
    $IPT -P INPUT DROP
    $IPT -P OUTPUT DROP
    $IPT -P FORWARD DROP
     
    # Allow Full Outgoing connection but no incoming stuff by default
    $IPT -A INPUT -i ${PUB_IF} -m state --state ESTABLISHED,RELATED -j ACCEPT
    $IPT -A OUTPUT -o ${PUB_IF} -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
     
    # Unlimited lo access
    $IPT -A INPUT -i ${LO_IF} -j ACCEPT
    $IPT -A OUTPUT -o ${LO_IF} -j ACCEPT
     
    ### Open port 161 ###
    $IPT -A INPUT -i ${PUB_IF} -s ${SNMPD_CLIENT} -d ${SNMPD_SERVER} -p udp --dport 161 -j ACCEPT
     
    ### rest of iptables goes here ###

  6. #6
    Join Date
    Apr 2008
    Posts
    3,522

    How to Install and Configure snmpd Service in Ubuntu

    You can also test the snmpd service is working or not by from local or remote system type the following command:
    Code:
    snmpwalk -v 1 -c mrtg 204.x.y.z IP-MIB::ipAdEntIfIndex
    The output will be like this. Best of luck.

    Code:
    IP-MIB::ipAdEntIfIndex.10.20.110.2 = INTEGER: 2
    IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
    IP-MIB::ipAdEntIfIndex.204.xx.yy.zz = INTEGER: 3

Similar Threads

  1. How to Install and Configure DHCP Server in Ubuntu Server
    By Anirvinya in forum Operating Systems
    Replies: 5
    Last Post: 10-02-2010, 04:29 AM
  2. How to configure two monitors on Ubuntu 9.10
    By Paisley007 in forum Customize Desktop
    Replies: 4
    Last Post: 29-01-2010, 12:51 AM
  3. Configure network in ubuntu
    By Felix46 in forum Networking & Security
    Replies: 5
    Last Post: 07-01-2010, 04:55 AM
  4. How to configure Static IP in Ubuntu 8.10?
    By Jack Gowen in forum Operating Systems
    Replies: 4
    Last Post: 21-01-2009, 11:55 AM
  5. Need to configure headphone in Ubuntu
    By Bassus in forum Operating Systems
    Replies: 5
    Last Post: 29-12-2008, 12:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,046,954.58986 seconds with 17 queries