Skip to main content
jmhalegre
New Member
March 31, 2025
Solved

Fortiswitch/Fortilink, config snmpv3 Read and Read/Write user

  • March 31, 2025
  • 1 reply
  • 1284 views

Hi Team,

 

I have several Fortiswitches managed via Fortilink, and I need to configure snmpv3 with one Read and one Read/Write user.

 

This configuration must be done from Fortigate?

 

Can you provide me the steps to follow to perform this configuration.

 

Thanks and best regards,

Juanmi

Best answer by vasilisgogos

Hi,

1- Configure custom commands:

config switch-controller custom-command
edit "snmp_access"
set command "config system interface %0a edit internal %0a set allowaccess https ssh ping snmp %0a end %0a"
next
edit "snmpv3"
set command "config system snmp user %0a edit SNMPV3_USER %0a set notify-hosts SNMP_Server_IP %0a set queries enable %0a set query-port 161 %0a set queries enable %0a set query-port 161 %0a set security-level auth-priv %0a set auth-proto sha1 %0a set auth-pwd Auth_Password %0a set priv-proto aes128 %0a set priv-pwd Priv_Password %0a end %0a"
next
edit "snmp_location"
set command "config system snmp sysinfo %0a set location Location %0a set status enable %0a end %0a"
next
next
end

 

 

2- Push commands to managed FSW

config switch-controller managed-switch
edit "FSXXXXXXXXXXXXX"

config custom-command
edit "0"
set command-name "snmp_location"
next
edit "1"
set command-name "snmp_access"
next
edit "2"
set command-name "snmpv3"
next

end

 

3- Repeat the second step for all FSW

 

Vasilis

1 reply

vasilisgogos
New Member
March 31, 2025

Hi,

1- Configure custom commands:

config switch-controller custom-command
edit "snmp_access"
set command "config system interface %0a edit internal %0a set allowaccess https ssh ping snmp %0a end %0a"
next
edit "snmpv3"
set command "config system snmp user %0a edit SNMPV3_USER %0a set notify-hosts SNMP_Server_IP %0a set queries enable %0a set query-port 161 %0a set queries enable %0a set query-port 161 %0a set security-level auth-priv %0a set auth-proto sha1 %0a set auth-pwd Auth_Password %0a set priv-proto aes128 %0a set priv-pwd Priv_Password %0a end %0a"
next
edit "snmp_location"
set command "config system snmp sysinfo %0a set location Location %0a set status enable %0a end %0a"
next
next
end

 

 

2- Push commands to managed FSW

config switch-controller managed-switch
edit "FSXXXXXXXXXXXXX"

config custom-command
edit "0"
set command-name "snmp_location"
next
edit "1"
set command-name "snmp_access"
next
edit "2"
set command-name "snmpv3"
next

end

 

3- Repeat the second step for all FSW

 

Vasilis