This section provides an example on how to enable the FW to communicate with an NMS using SNMPv1 and to send trap messages to the NMS.
As shown in Figure 1, the FW connects to the NMS. Because of the small network scale and high security requirement, the administrator hopes that the NMS uses SNMPv1 to manage the FW to meet the following requirements:
The configuration roadmap is as follows:
Set IP addresses for interfaces on the FW, assign the interfaces to security zones, and configure the interface access management function to allow the SNMP protocol to pass.
If the interface access management function is not used, you need to configure related security policies. Before disabling interface access management, configure security policies for remote management protocols to prevent the failure to remotely manage the FW.
# Set an IP address for interface GE0/0/0 and configure interface access management.
<FW> system-view [FW] interface GigabitEthernet 0/0/0 [FW-GigabitEthernet0/0/0] ip address 1.1.1.2 24 [FW-GigabitEthernet0/0/0] service-manage snmp permit [FW-GigabitEthernet0/0/0] quit
# Add interface GE0/0/0 to a security zone.
[FW] firewall zone dmz [FW-zone-dmz] add interface GigabitEthernet 0/0/0 [FW-zone-dmz] quit
# Configure a security policy.
[FW] security-policy [FW-policy-security] rule name local_dmz [FW-policy-security-rule-local_dmz] source-zone local [FW-policy-security-rule-local_dmz] destination-zone dmz [FW-policy-security-rule-local_dmz] source-address 1.1.1.2 24 [FW-policy-security-rule-local_dmz] service snmptrap [FW-policy-security-rule-local_dmz] action permit [FW-policy-security-rule-local_dmz] quit [FW-policy-security] quit
[FW] snmp-agent sys-info version v1
Warning: SNMPv1/SNMPv2c is not secure, and it is recommended to use SNMPv3.
[FW] snmp-agent community write cipher private@123
[FW] snmp-agent target-host trap address udp-domain 1.1.1.1 params securityname private@123 v1 [FW] snmp-agent trap enable Warning: All switches of SNMP trap/notification will be open. Continue? [Y/N]:y
[FW] snmp-agent sys-info contact call Operator at 010-12345678
You need to refer to the configuration guide of the NMS that is deployed. The NMS authentication parameters must be consistent with those on the FW. Otherwise, the NMS may fail to manage the FW.
# interface GigabitEthernet0/0/0 ip address 1.1.1.2 255.255.255.0 service-manage snmp permit # firewall zone dmz set priority 50 add interface GigabitEthernet0/0/0 # security-policy rule name local_dmz source-zone local destination-zone dmz source-address 1.1.1.2 24 service snmptrap action permit # snmp-agent snmp-agent local-engineid 800007DB03DCD2FC2616AE snmp-agent community write cipher %^%#bge!SaO<d)7.R;B)NaMHp&ZD9S,OUF@"v^-YoEo+9m9n"-v4qD&wg:2&#)9LmNLt132fqVleQvCqUaRS%^%# snmp-agent sys-info contact call Operator at 010-12345678 snmp-agent sys-info version v1 v3 snmp-agent target-host trap address udp-domain 1.1.1.1 params securityname cipher %^%#YwU|MS4tjR_Da)F_ump/fV06Xs6w>R[pS^GC.*gX%^%# snmp-agent trap enable # return