GoSNMPServer icon indicating copy to clipboard operation
GoSNMPServer copied to clipboard

SNMPv3 AES192 AES256 not work

Open efancier-cn opened this issue 5 years ago • 1 comments

I am using SnmpB(windows exe application) and Pysnmp with Python3, I created an usm as following:

master := GoSNMPServer.MasterAgent{
	Logger: GoSNMPServer.NewDefaultLogger(),
	SecurityConfig: GoSNMPServer.SecurityConfig{
		AuthoritativeEngineBoots: 0,
		Users: []gosnmp.UsmSecurityParameters{
			{
				UserName:                 "admin", //c.String("v3Username"),
				AuthenticationProtocol:   gosnmp.MD5,
				PrivacyProtocol:          gosnmp.AES,
				AuthenticationPassphrase: "12345678", //c.String("v3AuthenticationPassphrase"),
				PrivacyPassphrase:        "12345678", //c.String("v3PrivacyPassphrase"),
			},
		},
	},
	SubAgents: []*GoSNMPServer.SubAgent{
		{
			//CommunityIDs: []string{c.String("community")},
			CommunityIDs: []string{"public"},
			OIDs:         mibImps.All(),
		},
	},
}

the snmp agent work well, while if change priv protocol to AES192 or AES256, SnmpB and Pysnmp can not get correct data, wireshark shows malf package. Tried AES192C and AES256C the result is the same.

efancier-cn avatar Mar 25 '21 22:03 efancier-cn

Did a little search and found related problem - GoSNMPServer refer to the slayercat/gosnmp module ( v 1.24), which forked from gosnmp/gosnmp ( v1.30.0 as last release) - Can we update the gosnmp module used by GoSNMPServer ?

efancier-cn avatar Mar 26 '21 17:03 efancier-cn

It's not so hard to embed new version. I did so.

adenis78 avatar May 12 '23 14:05 adenis78

I believe that with the release of the new version, this issue has been resolved. Your feedback is welcome. If the problem persists, please feel free to reopen this issue or create a new one.

slayercat avatar Mar 27 '24 11:03 slayercat