
最小限の設定でDebian10コンピュータにSNMPクライアントを設定しましたが、SNMPサーバーはクライアントからSNMPを受信できません。
クライアントからsnmpd.conf
:
com2sec my-sec default abc123
group my-grp v2c prtg-sec
view my-view included .1
access my-grp "" any noauth exact prtg-view none none
クライアントの iptables が空で、クライアントの fall2ban がサーバー IP をブロックしません。
走るsnmpwalkローカルIPを使用するクライアントでは正常に機能しますが、サーバー()では機能せずタイムアウトエラーが発生snmpwalk -v2c client_ip -c abc123
し、クライアントのTCPDUMPにも次のメッセージが表示されます。
tcpdump: listening on ens18, link-type EN10MB (Ethernet), capture size 262144 bytes
13:30:02.776848 IP (tos 0x0, ttl 63, id 3288, offset 0, flags [DF], proto UDP (17), length 72)
snmp_server.60035 > snmp_client.snmp: [udp sum ok] { SNMPv2c C="abc123" { GetNextRequest(25) R=404279833 } }
13:30:03.778174 IP (tos 0x0, ttl 63, id 3435, offset 0, flags [DF], proto UDP (17), length 72)
snmp_server.60035 > snmp_client.snmp: [udp sum ok] { SNMPv2c C="abc123" { GetNextRequest(25) R=404279833 } }
13:30:04.779138 IP (tos 0x0, ttl 63, id 3619, offset 0, flags [DF], proto UDP (17), length 72)
snmp_server.60035 > snmp_client.snmp: [udp sum ok] { SNMPv2c C="abc123" { GetNextRequest(25) R=404279833 } }
13:30:05.780377 IP (tos 0x0, ttl 63, id 3811, offset 0, flags [DF], proto UDP (17), length 72)
snmp_server.60035 > snmp_client.snmp: [udp sum ok] { SNMPv2c C="abc123" { GetNextRequest(25) R=404279833 } }
13:30:06.781420 IP (tos 0x0, ttl 63, id 3817, offset 0, flags [DF], proto UDP (17), length 72)
snmp_server.60035 > snmp_client.snmp: [udp sum ok] { SNMPv2c C="abc123" { GetNextRequest(25) R=404279833 } }
13:30:07.782405 IP (tos 0x0, ttl 63, id 4065, offset 0, flags [DF], proto UDP (17), length 72)
snmp_server.60035 > snmp_client.snmp: [udp sum ok] { SNMPv2c C="abc123" { GetNextRequest(25) R=404279833 } }
UDP161は完全に開いており、サーバーもこのポートに接続できます。
クライアントにパッケージ化されインストールされます。
# dpkg -l|grep snmp
ii libsnmp-base 5.7.3+dfsg-5+deb10u2 all SNMP configuration script, MIBs and documentation
ii libsnmp30:amd64 5.7.3+dfsg-5+deb10u2 amd64 SNMP (Simple Network Management Protocol) library
ii snmp 5.7.3+dfsg-5+deb10u2 amd64 SNMP (Simple Network Management Protocol) applications
ii snmpd 5.7.3+dfsg-5+deb10u2 amd64 SNMP (Simple Network Management Protocol) agents
答え1
Debian 10 は実際に iptables の代わりに最新の Netfilter を使用できます。nft list ruleset
空のフィルターチェーンに加えて他のものが報告されていますか?
snmpdに適用される/etc/hosts.deny
制限は定義されていますか?/etc/hosts.allow