Author Topic: setup snmpd for Centos 8 , Centos7 to listen snmpd server  (Read 232 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2075
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
setup snmpd for Centos 8 , Centos7 to listen snmpd server
« on: เมษายน 02, 2021, 08:09:47 PM »
==== setup snmpd for Centos 8 , Centos7
https://kifarunix.com/install-and-configure-snmp-ubuntu-18-04-and-centos-7/

===Let request point snmpd server to 103.131.22.33
Community name: packetlovehaha

==Client
103.119.22.10:199 tcp
103.119.22.11:199 tcp
103.119.22.12:199 tcp

##Install by
yum install net-snmp net-snmp-utils
systemctl enable snmpd
systemctl restart snmpd

vi /etc/snmp/snmpd.conf
rocommunity packetlovehaha 103.131.22.33
systemctl restart snmpd

===configure listen interface all for snmpd tcp 199
cd /lib/systemd/system
cp /lib/systemd/system/snmpd.service /lib/systemd/system/snmpd.service.bak
==change with vi snmpd.service
ExecStart=/usr/sbin/snmpd $OPTIONS -f tcp:127.0.0.1:199 tcp:103.119.22.10.199

===reload and restart snmpd
systemctl daemon-reload
systemctl restart snmpd

==Check Will show listen 199 on
netstat -tnlp
127.0.0.1:199
103.119.22.10.199