
DST: IP address of the packet destination (should be your machine’s IP address).SRC: IP address where the packet came from.MAC: combination of source and destination mac addresses.
OUT: If contains a value, it indicates an outgoing event. IN: If contains a value, it indicates that the network interface that the packet arrived on. Additionally, the subsequent fields represent: The initial value indicates the date, time, and hostname of the system. UFW allows passing log as parameter to capture all new connections matching the defined rule and log-all parameter to capture all packets matching the rule.įor example, with the above command, we allow ufw to log all new ssh connections. When the parameters of a packet match a defined rule, by default, no logging is performed. Note: Log levels beyond medium tend to generate high volumes of log statements as the output which may result in high disk space utilization on the system. We can change the level of log through the command: sudo ufw logging full: logs all packets without rate limit.īy default, the low level is set as low. high: logs all medium level logs without rate limiting and all packages with rate limit. medium: In addition to logs supported by low level, medium level logs contain logs for all new connections, invalid packets, allowed packets not matching the defined policy. low: logs all packets matching logged rules and blocked packets which does not match the defined policies.
UFW supports the following 5 different logging levels: Grep -i ufw /var/log/kern.log ufw logging level Another alternative to reading ufw logs is though grep command: grep -i ufw /var/log/syslog