-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a new x-pack module to parse iptables logs from a file. The module understands additional fields added by Ubiquiti firewalls. Example iptables event: ``` "iptables": { "ether_type": 2048, "input_device": "eth0", "output_device": "wan1", "tcp": { "reserved_bits": 0, "flags": "ACK", "window": 128 }, "precedence_bits": 0, "length": 123, "tos": 0, "output_device": "lo", "id": 12345, "ttl": 255 }, ``` For Ubiquiti logs, it parses the Ubiquiti tag before iptables logs. Format: RuleSet-RuleNumber-Action It's a common pattern to format the RuleSet as "InputDevice-OutputDevice". Action can be A for allow and D for Deny. RuleNumber can be a number or "default". For [source-dest-42-D]: ``` "iptables.ubiquiti.input_zone": "source", "iptables.ubiquiti.output_zone": "dest", "iptables.ubiquiti.rule_number": "42", "iptables.ubiquiti.rule_set": "source-dest", "event.outcome": "deny", ``` The following ECS fields are populated: ``` "destination.ip": "10.4.0.5", "destination.mac": "90:10:20:76:8d:20", "destination.port": 443, "ecs.version": "1.0.0-beta2", "event.dataset": "iptables.log", "event.module": "iptables", "event.outcome": "deny", (only when Ubiquiti extension found) "fileset.name": "log", "network.transport": "tcp", "network.type": "ipv4", "source.geo.city_name": "Bellaterra", "source.geo.continent_name": "Europe", "source.geo.country_iso_code": "ES", "source.geo.location.lat": 41.5026, "source.geo.location.lon": 2.0875, "source.geo.region_iso_code": "ES-B", "source.geo.region_name": "Barcelona", "source.ip": "158.109.0.1", "source.mac": "90:10:65:29:b6:2a", "source.port": 38842 ``` Closes #8781 Co-Authored-by: James Spiteri <james.spiteri@elastic.co>
- Loading branch information
Showing
31 changed files
with
3,490 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.