Configure SNMP daemon to listen to IPv6 interfaces by default
Task Info (Flyspray) | |
---|---|
Opened By | Anderson Medeiros Gomes (amg1127) |
Task ID | 73701 |
Type | Feature Request |
Project | Arch Linux |
Category | Packages: Extra |
Version | None |
OS | All |
Opened | 2022-02-09 18:21:42 UTC |
Status | Assigned |
Assignee | Felix Yan (felixonmars) |
Details
Description:
As viewed from https://github.com/archlinux/svntogit-packages/blob/fa3fdddca283031f4c5ccb68a091f8e25fc7b32f/trunk/snmpd.service , the current version of snmpd.service
defines the below startup directive:
[Service]
ExecStart=/usr/bin/snmpd -p /run/snmpd.pid
This causes snmpd
service to listen to the wildcard IPv4 address only (0.0.0.0:161
), as it is the default snmpd
behavior when no other listening address are specified on its command line.
# ss -puln sport = 161
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
UNCONN 0 0 0.0.0.0:161 0.0.0.0:* users:(("snmpd",pid=1585,fd=7))
For better compatibility with IPv6-enabled hosts, I would like to request a modification on the snmpd.service
unit which would allow snmpd
service to listen to the wildcard IPv6 address ([::]:161
) as well. The startup directive should be defined as below:
[Service]
ExecStart=/usr/bin/snmpd -p /run/snmpd.pid udp: udp6:
# ss -puln sport = 161
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
UNCONN 0 0 0.0.0.0:161 0.0.0.0:* users:(("snmpd",pid=223276,fd=7))
UNCONN 0 0 [::]:161 [::]:* users:(("snmpd",pid=223276,fd=8))
Additional info:
- package version(s) - net-snmp 5.9.1-3
- config and/or log files etc. - (not applicable)
- link to upstream bug report, if any. - (not applicable)
Steps to reproduce:
Install net-snmp
package from extra
repository, and start the snmpd.service
.