centos8 安裝snmp

dnf install net-snmp

systemctl enable snmpd

systemctl start snmpd

dnf install net-snmp-utils

改設定檔

vi /etc/snmp/snmpd.conf

增加這些

com2sec AllUser default ajinsystem

group AllGroup v2c AllUser

access AllGroup “” any noauth exact AllView none none

view AllView included .1 80

存檔後重啟

systemctl restart snmpd

防火牆

firewall-cmd –permanent –add-rich-rule=’rule family=”ipv4″ source address=”10.40.96.0/20″ port protocol=”udp” port=”161″ accept’

firewall-cmd –reload

分類: C#