LoginSignup
1
1

More than 5 years have passed since last update.

Net-snmpをIPv6に対応させる

Last updated at Posted at 2013-07-05

普通にインストールして起動させるとIPv4しかListenしていない。

# netstat -unlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 0.0.0.0:161             0.0.0.0:*                           32496/snmpd

これをこう

snmpd.conf
agentaddress udp:161
agentaddress udp6:161
com2sec notConfigUser   localhost  public
com2sec6 notConfigUser   localhost  public

上の2行がListenするポートの指定。udp6でもListenさせる。
3行目はもともと設定しているセキュリティ名。
これに6をつけてもうひとつ定義してあげる。
当然だがこれだけだと別の監視サーバからは接続できないので適宜設定しよう。

再起動する

# /etc/init.d/snmpd reload
 * Reloading network management services:
# netstat -unlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 0.0.0.0:161             0.0.0.0:*                           30620/snmpd
udp6       0      0 :::161                  :::*                                30620/snmpd

完。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1