# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. tiny_personal_firewall = { # The name of the log format log.format.format_label = "Tiny Personal Firewall 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 = "^[0-9]*,\\[[0-9][0-9]/[A-Z][a-z][a-z]/[0-9][0-9][0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\\] Rule '[^']*': [^:]*: [^ ]* [^ ]* .*->.*, Owner: " # The format of dates and times in this log log.format.date_format = "dd/mmm/yyyy:hh:mm:ss" log.format.time_format = "dd/mmm/yyyy:hh:mm:ss" # All log field parsing will be done using the parsing filters log.format.parse_only_with_filters = "true" # Log fields log.fields = { date_time = { label = "$lang_stats.field_labels.date_time" type = "date_time" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # date_time rule = { label = "$lang_stats.field_labels.rule" type = "flat" index = 0 subindex = 0 } # rule category = { label = "$lang_stats.field_labels.category" type = "flat" index = 0 subindex = 0 } # category direction = { label = "$lang_stats.field_labels.direction" type = "flat" index = 0 subindex = 0 } # direction transport = { label = "$lang_stats.field_labels.transport" type = "flat" index = 0 subindex = 0 } # transport source_host = { label = "$lang_stats.field_labels.source_host" type = "host" index = 0 subindex = 0 hierarchy_dividers = "." left_to_right = false leading_divider = "false" } # source_host source_ip = { label = "$lang_stats.field_labels.source_ip" type = "flat" index = 0 subindex = 0 } # source_ip source_port = { label = "$lang_stats.field_labels.source_port" type = "flat" index = 0 subindex = 0 } # source_port destination_host = { label = "$lang_stats.field_labels.destination_host" type = "flat" index = 0 subindex = 0 } # destination_host destination_ip = { label = "$lang_stats.field_labels.destination_ip" type = "flat" index = 0 subindex = 0 } # destination_ip destination_port = { label = "$lang_stats.field_labels.destination_port" type = "flat" index = 0 subindex = 0 } # destination_port owner = { label = "$lang_stats.field_labels.owner" type = "flat" index = 0 subindex = 0 } # owner } # log.fields # # Log Parsing Filters log.parsing_filters = { # Parse the date/time, rule, category, direction, and transport 1 = { label = "1" comment = "" value = "collect_fields_using_regexp('^()[0-9]*,\\\\[([0-9][0-9]/[A-Z][a-z][a-z]/[0-9][0-9][0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9])\\\\] Rule \\'([^\\']*)\\': ([^:]*): ([^ ]*) ([^ ,]*)[ ,].* Owner: (.*)$', '*KEY*,date_time,rule,category,direction,transport,owner')" } # 1 # Parse normal source and port 2 = { label = "2" comment = "" value = "if (contains(entire_line, ']->')) then collect_fields_using_regexp('()(UDP|TCP|ICMP \\\\[[0-9]*\\\\] Echo Request),* ([^ ]*) \\\\[([0-9.]*):*([0-9]*)\\\\]->', '*KEY*,transport,source_host,source_ip,source_port') else collect_fields_using_regexp('()(UDP|TCP|ICMP \\\\[[0-9]*\\\\] Echo Request),* ()([^:]*):([0-9]*)->', '*KEY*,transport,source_host,source_ip,source_port')" } # 2 # Parse destination and port 3 = { label = "3" comment = "" value = "if (contains(entire_line, '],')) then collect_fields_using_regexp('->()([^ ]*) \\\\[([0-9.]*):([0-9]*)\\\\], ', '*KEY*,destination_host,destination_ip,destination_port') else collect_fields_using_regexp('->()([^:]*):([0-9]*), ', '*KEY*,destination_host,destination_port')" } # 3 # Accept this log entry 4 = { label = "4" comment = "" value = "accept_collected_entry_using_regexp('^()', false)" } # 4 } # 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 rule = { label = "$lang_stats.field_labels.rule" log_field = "rule" type = "string" suppress_top = 0 suppress_bottom = 2 } # rule category = { label = "$lang_stats.field_labels.category" log_field = "category" type = "string" suppress_top = 0 suppress_bottom = 2 } # category direction = { label = "$lang_stats.field_labels.direction" log_field = "direction" type = "string" suppress_top = 0 suppress_bottom = 2 } # direction transport = { label = "$lang_stats.field_labels.transport" log_field = "transport" type = "string" suppress_top = 0 suppress_bottom = 2 } # transport source_host = { label = "$lang_stats.field_labels.source_host" log_field = "source_host" type = "string" suppress_top = 0 suppress_bottom = 2 } # source_host source_port = { label = "$lang_stats.field_labels.source_port" log_field = "source_port" type = "string" suppress_top = 0 suppress_bottom = 2 } # source_port source_ip = { label = "$lang_stats.field_labels.source_ip" log_field = "source_ip" type = "string" suppress_top = 0 suppress_bottom = 2 } # source_ip destination_host = { label = "$lang_stats.field_labels.destination_host" log_field = "destination_host" type = "string" suppress_top = 0 suppress_bottom = 2 } # destination_host destination_port = { label = "$lang_stats.field_labels.destination_port" log_field = "destination_port" type = "string" suppress_top = 0 suppress_bottom = 2 } # destination_port destination_ip = { label = "$lang_stats.field_labels.destination_ip" log_field = "destination_ip" type = "string" suppress_top = 0 suppress_bottom = 2 } # destination_ip owner = { label = "$lang_stats.field_labels.owner" log_field = "owner" type = "string" suppress_top = 0 suppress_bottom = 2 } # owner } # database.fields database.numerical_fields = { hits = { label = "$lang_stats.field_labels.hits" default = true requires_log_field = false type = "int" display_format_type = "integer" entries_field = true } # hits } # database.numerical_fields log.filters = { mark_entry = { label = '$lang_admin.log_filters.mark_entry_label' comment = '$lang_admin.log_filters.mark_entry_comment' value = 'hits = 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 = "" rule = true category = true direction = true transport = true source_host = true source_port = true source_ip = true destination_host = true destination_port = true destination_ip = true owner = true } # report_groups } # create_profile_wizard_options not_supported = { visitors = true bandwidth = true sessions = true pageviews = true } # not_supported } # tiny_personal_firewall