Trying to understand log format of syslog.
Anyone have any pointer where I can find docs on format.(my google skills isn’t good enough here)
Is it the letter in the end of the chain which says if package has been dropped or accepted?
example a dropped package:
Oct 31 20:00:43 vyos kernel: [ 2633.695358] [INPUT_DROP-default-D]…
example accepted package.
Oct 31 20:00:08 vyos kernel: [ 2598.778684] [VyOS_MANAGEMENT-21-A]…
I want to send only firewall logs to a remote host. Is it enough to only export facility 0?(kernel messages)
Every firewall log line is prepended with a prefix. The contents of this prefix are the firewall “name”, the rule number (either an actual number or default for the default rule), and a letter telling you the action taken.
For example, I run a zone-based firewall. I have these rules in MANAGEMENT_TO_INTERNET (for traffic destined to internet originated in the management network):
08:21 vyos@gw 1.4-rolling-202304120317 /home/vyos
✎ edit » show | commands | match 'MANAGEMENT_TO_INTERNET'
set firewall zone INTERNET from MANAGEMENT firewall name 'MANAGEMENT_TO_INTERNET'
set firewall name MANAGEMENT_TO_INTERNET default-action 'accept'
<...snip...>
set firewall name MANAGEMENT_TO_INTERNET rule 25 action 'drop'
set firewall name MANAGEMENT_TO_INTERNET rule 25 destination address '1.2.3.4'
set firewall name MANAGEMENT_TO_INTERNET rule 25 log 'enable'
set firewall name MANAGEMENT_TO_INTERNET rule 25 protocol 'icmp'
Rule 25 is there to demonstrate the logging to you. You need to have log enable to get a log of course. If I try to ping 1.2.3.4, you can see the following in the logs: