Debug SNMPv3 trap type of situation, CentOS 7, RHEL 7

Firewall:
iptables -L
SELinux:
getenforce
Stop service:
systemctl stop snmptrapd
Make sure it is down (the output must be empty):
ps auxww | grep "[s]nmptrapd"
Launch in the foreground with strace:
strace -s 1024 -o /tmp/snmptrapd.strace.log snmptrapd -f -C -Le -Dusm -c /etc/snmp/snmptrapd.conf
How many interfaces:
ip a
Port is listening:
netstat -tulpn|grep 162
Or:
ss --udp --numeric --listen --process | grep 162
  • See SELinux status:
    getenforce
  • OS version:
    cat /etc/*release*
  • Restart snmptrapd:
    systemctl restart snmptrapd
  • See the status:
    systemctl status snmptrapd
  • The
  • Build in firewall rules (wrapper level):
    firewall-cmd --list-all
  • Send trap:
    snmptrap -v 3 -n "" -a SHA -A testtest -x AES -X testtest -l authPriv -u snmpuser -e 0x80000634b210008894719abe08 127.0.0.1 0 linkUp.0
  • Check log:
    grep snmptrapd /var/log/messages
  • Take a note of running process:
    ps aux | grep "[s]nmptrapd" | awk '{print $2}'
  • Record strace:
    strace -T -ttt -s 1024 -p $(ps aux | grep "[s]nmptrapd" | awk '{print $2}') -o /tmp/snmptrapd.strace.log

No comments: