(Optional) Configuring NAT Log Output
Context
NAT logs are generated when the industrial switch router performs address translation. The logs record the original source IP addresses, source ports, destination IP addresses, destination ports, and translated source IP addresses and source ports, as well as user actions and time stamps. You can view NAT logs to learn about information about users have accessed a network using NAT.
The industrial switch router can send NAT logs to a specified log host, as shown in Figure 5-16.
Procedure
- Run system-view
The system view is displayed.
- Run firewall log session enable
The firewall log function is enabled.
- Run firewall log session nat enable
The NAT session log function is enabled.
- (Optional) Run nat log-format elog
Sets the NAT log format to eLog. The logs are generated in the format specified by the eLog server.
- Run the following command to output logs to the information center log host or session log host:
Output logs to the information center log host
Run info-center enable
The information center is enabled.
Run info-center loghost ip-address [ channel { channel-number | channel-name } | facility local-number | | { vpn-instance vpn-instance-name | public-net } ] *
The channel through which logs are output to the log host is configured.
The industrial switch router supports a maximum of eight log hosts to implement backup among log hosts.
For details on how to configure the industrial switch router to send logs to a log host, see "Example for Outputting Log Information to a Log Host" in "Information Center Configuration" of the Huawei AR Series V200R010 Configuration Guide - Device Management.
Output logs to the session log host
Run firewall log binary-log host host-ip-address host-port source source-ip-address source-port [ vpn-instance vpn-instance-name ]
A session log host is configured.
By default, no session log host is configured.