# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. shorewall = { plugin_version = "1.0.1" # Initial creation - 1.0 # 2011-07-18 - 1.0.1 - MSG - Edited info lines. info.1.manufacturer = "GNU" info.1.device = "Shorewall" info.1.version.1 = "" # The name of the log format log.format.format_label = "Shorewall Log Format" log.miscellaneous.log_data_type = "firewall" log.miscellaneous.log_format_type = "firewall" # The log is in this format if any of the first ten lines match this regular expression log.format.autodetect_regular_expression = "^[A-Z][a-z][a-z] [ 0-9][0-9] [0-9 ][0-9]:[0-9][0-9]:[0-9][0-9] \\[kernel\\] Shorewall:" # The format of dates and times in this log log.format.date_format = "mmm dd" log.format.time_format = "hh:mm:ss" statistics.miscellaneous.entry_name = "packets" # All log field parsing will be done using the parsing filters log.format.parse_only_with_filters = "true" # Log fields log.fields = { date = { label = "$lang_stats.field_labels.date" type = "date" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # date time = { label = "$lang_stats.field_labels.time" type = "time" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # time in_interface = { label = "$lang_stats.field_labels.in_interface" type = "flat" index = 0 subindex = 0 } # in_interface out_interface = { label = "$lang_stats.field_labels.out_interface" type = "flat" index = 0 subindex = 0 } # out_interface mac_address = { label = "$lang_stats.field_labels.mac_address" type = "flat" index = 0 subindex = 0 } # mac_address source_ip = { label = "$lang_stats.field_labels.source_ip" type = "host" index = 0 subindex = 0 hierarchy_dividers = "." left_to_right = false leading_divider = "false" } # source_ip destination_ip = { label = "$lang_stats.field_labels.destination_ip" type = "flat" index = 0 subindex = 0 } # destination_ip packet_length = { label = "$lang_stats.field_labels.packet_length" type = "size" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # packet_length service_type = { label = "$lang_stats.field_labels.service_type" type = "flat" index = 0 subindex = 0 } # service_type precedence = { label = "$lang_stats.field_labels.precedence" type = "flat" index = 0 subindex = 0 } # precedence ttl = { label = "$lang_stats.field_labels.ttl" type = "flat" index = 0 subindex = 0 } # ttl packet_id = { label = "$lang_stats.field_labels.packet_id" type = "flat" index = 0 subindex = 0 } # packet_id protocol = { label = "$lang_stats.field_labels.protocol" type = "flat" index = 0 subindex = 0 } # protocol source_port = { label = "$lang_stats.field_labels.source_port" type = "flat" index = 0 subindex = 0 } # source_port destination_port = { label = "$lang_stats.field_labels.destination_port" type = "flat" index = 0 subindex = 0 } # destination_port window = { label = "$lang_stats.field_labels.window" type = "flat" index = 0 subindex = 0 } # window reserved_bits = { label = "$lang_stats.field_labels.reserved_bits" type = "flat" index = 0 subindex = 0 } # reserved_bits urgent_pointer = { label = "$lang_stats.field_labels.urgent_pointer" type = "flat" index = 0 subindex = 0 } # urgent_pointer tcp_flags = { label = "$lang_stats.field_labels.tcp_flags" type = "flat" index = 0 subindex = 0 } # tcp_flags ip_flags = { label = "$lang_stats.field_labels.ip_flags" type = "flat" index = 0 subindex = 0 } # ip_flags } # log.fields # # Log Parsing Filters log.parsing_filters = { # Parse out all the beginning fields 1 = { label = "1" comment = "" value = "collect_fields_using_regexp('^()([A-Z][a-z][a-z] [ 0-9]+) ([0-9][0-9]:[0-9][0-9]:[0-9][0-9]) \\\\[kernel\\\\] Shorewall:[^:]+:[^:]+:[^:]+:', '*KEY*,date,time')" } # 1 # Handle the common fields 2 = { label = "2" comment = "" value = "collect_fields_using_regexp('()IN=([a-z0-9]*) OUT=([a-z0-9]*).*SRC=([0-9.]*) DST=([0-9.]*) LEN=([0-9]*) TOS=([0-9a-fA-Fx]*) PREC=([0-9a-fA-Fx]*) TTL=([0-9]*) ID=([0-9]*).* PROTO=([^ ]*) SPT=([0-9]*) DPT=([0-9]*).* ', '*KEY*,in_interface,out_interface,source_ip,destination_ip,packet_length,service_type,precedence,ttl,packet_id,protocol,source_port,destination_port')" } # 2 # Handle WINDOW, RES, and URGP 3 = { label = "3" comment = "" value = "collect_fields_using_regexp('() WINDOW=([0-9]*) RES=([0-9a-fA-Fx]*).* URGP=([0-9]*)', '*KEY*,window,reserved_bits,urgent_pointer')" } # 3 # Handle the MAC field 4 = { label = "4" comment = "" value = "collect_fields_using_regexp('()MAC=([0-9a-fA-F:]*) ', '*KEY*,mac_address')" } # 4 # Handle the TCP flags field 5 = { label = "5" comment = "" value = "collect_fields_using_regexp('()ID=[0-9]* ([A-Z ]*) FRAG=', '*KEY*,tcp_flags')" } # 5 # Handle the IP flags field 6 = { label = "6" comment = "" value = "collect_fields_using_regexp('()RES=[0-9a-fA-Fx]* ([A-Z ]*) URGP=', '*KEY*,ip_flags')" } # 6 # Accept this log entry 7 = { label = "7" comment = "" value = "accept_collected_entry_using_regexp('() \\\\[kernel\\\\] .*IN=', false)" } # 7 } # log.parsing_filters # Database fields database.fields = { date_time = { label = "$lang_stats.field_labels.date_time" log_field = "date_time" type = "string" suppress_top = 0 suppress_bottom = 3 display_format_type = "date_time" } # date_time day_of_week = { label = "$lang_stats.field_labels.day_of_week" log_field = "day_of_week" type = "string" suppress_top = 0 suppress_bottom = 2 display_format_type = "day_of_week" } # day_of_week hour_of_day = { label = "$lang_stats.field_labels.hour_of_day" log_field = "hour_of_day" type = "string" suppress_top = 0 suppress_bottom = 2 display_format_type = "hour_of_day" } # hour_of_day source_ip = { label = "$lang_stats.field_labels.source_ip" log_field = "source_ip" type = "string" suppress_top = 0 suppress_bottom = 2 } # source_ip source_port = { label = "$lang_stats.field_labels.source_port" log_field = "source_port" type = "string" suppress_top = 0 suppress_bottom = 2 } # source_port destination_ip = { label = "$lang_stats.field_labels.destination_ip" log_field = "destination_ip" type = "string" suppress_top = 0 suppress_bottom = 2 } # destination_ip destination_port = { label = "$lang_stats.field_labels.destination_port" log_field = "destination_port" type = "string" suppress_top = 0 suppress_bottom = 2 } # destination_port in_interface = { label = "$lang_stats.field_labels.in_interface" log_field = "in_interface" type = "string" suppress_top = 0 suppress_bottom = 2 } # in_interface out_interface = { label = "$lang_stats.field_labels.out_interface" log_field = "out_interface" type = "string" suppress_top = 0 suppress_bottom = 2 } # out_interface mac_address = { label = "$lang_stats.field_labels.mac_address" log_field = "mac_address" type = "string" suppress_top = 0 suppress_bottom = 2 } # mac_address protocol = { label = "$lang_stats.field_labels.protocol" log_field = "protocol" type = "string" suppress_top = 0 suppress_bottom = 2 } # protocol service_type = { label = "$lang_stats.field_labels.service_type" log_field = "service_type" type = "string" suppress_top = 0 suppress_bottom = 2 } # service_type tcp_flags = { label = "$lang_stats.field_labels.tcp_flags" log_field = "tcp_flags" type = "string" suppress_top = 0 suppress_bottom = 2 } # tcp_flags ip_flags = { label = "$lang_stats.field_labels.ip_flags" log_field = "ip_flags" type = "string" suppress_top = 0 suppress_bottom = 2 } # ip_flags ttl = { label = "$lang_stats.field_labels.ttl" log_field = "ttl" type = "string" suppress_top = 0 suppress_bottom = 2 } # ttl precedence = { label = "$lang_stats.field_labels.precedence" log_field = "precedence" type = "string" suppress_top = 0 suppress_bottom = 2 } # precedence window = { label = "$lang_stats.field_labels.window" log_field = "window" type = "string" suppress_top = 0 suppress_bottom = 2 } # window } # database.fields database.numerical_fields = { packets = { label = "$lang_stats.field_labels.packets" default = true requires_log_field = false type = "int" display_format_type = "integer" entries_field = true } # packets packet_length = { label = "$lang_stats.field_labels.packet_length" default = false requires_log_field = true log_field = "packet_length" type = "float" display_format_type = "bandwidth" } # packet_length } # database.numerical_fields log.filters = { mark_entry = { label = '$lang_admin.log_filters.mark_entry_label' comment = '$lang_admin.log_filters.mark_entry_comment' value = 'packets = 1;' } # mark_entry } # log.filters create_profile_wizard_options = { date_time_tracking = true host_tracking = true # How the reports should be grouped in the report menu report_groups = { date_time_group = "" source_ip = true source_port = true destination_ip = true destination_port = true in_interface = true out_interface = true mac_address = true protocol = true service_type = true tcp_flags = true ip_flags = true ttl = true precedence = true window = true } # report_groups } # create_profile_wizard_options not_supported = { visitors = true sessions = true pageviews = true } # not_supported } # shorewall