04-17-2019 06:02 AM
Hi,
Is there such a thing as being able to use an access list for snmp v3 ?
I am using SNMPv3 on our 3850 switches and want to restrict snmp traffic to be allowed from 1x IP - our Cisco Prime box. I had used this command: snmp-server host <ip address> version 3 priv <username> is this the correct way of doing it or should/could I used an ACL to permit just this IP ?
Thanks in advance.
04-17-2019 06:19 AM
04-17-2019 06:36 AM
I had used the following commands originally:
snmp-server group <name of snmp group> v3 priv
snmp-server user <username> <snmp group> v3 auth sha <AUTH_PASSWORD> priv aes 128 <PRIVACY_PASSWORD>
Then I thought this command would restrict but perhaps i'm wrong then:
snmp-server host <ip address of my prime box> version 3 auth <username>
So are you saying I could do away with this command snmp-server host <ip address of my prime box> version 3 auth <username> and perhaps use an ACL? Thanks for your help.
04-17-2019 06:43 AM
Hi
Yes , you dont actually need the snmp server host in snmpv3 host what i provided is all i use , then the ACL contains your host machines
04-17-2019 06:22 AM
Hi,
You can create an access list and apply it this way:
example:
snmp-server group test v3 auth access 10
HTH
04-17-2019 06:42 AM
ive seen this example here:
Router(config)#access-list 99 permit 172.25.1.0 0.0.0.255
Router(config)#access-list 99 permit host 10.1.1.1
Router(config)#access-list 99 deny any
Router(config)#snmp-server group COOKRO v1 access 99
Router(config)#snmp-server user TESTRO1 COOKRO v1
Router(config)#end
do I take it that the IP 172.25.1.0 0.0.0.255 is the IP address of my switch (in this example)? and the permit permit host 10.1.1.1 (in this example) is the IP of my Prime box? also what does this bit do: access-list 99 deny any ?
04-17-2019 07:16 AM - edited 04-17-2019 07:17 AM
@Jay_F hello,
i had a simple exemple running on my network;
snmp-server user TESTUSER TESTEGROUP v3 encrypted auth md5 TESTPASSWD priv des TESTPASSWD
snmp-server group TESTGROUP v3 priv write TESTPASSWD
snmp-server host 172.20.14.215 version 3 priv TESTUSER access 5
04-17-2019 08:02 AM
i'm not able to assign the access list like you have here:
snmp-server host 172.20.14.215 version 3 priv TESTUSER access 5
there is no option access ?
04-17-2019 08:16 AM
04-17-2019 08:31 AM
Sorry,
snmp-server user TESTUSER TESTEGROUP v3 encrypted auth md5 TESTPASSWD priv des TESTPASSWD access 5 << this is here
snmp-server group TESTGROUP v3 priv write TESTPASSWD
snmp-server host 172.20.14.215 version 3 priv TESTUSER
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide