{"id":17870124,"url":"https://github.com/pouriyajamshidi/fwmonitor","last_synced_at":"2026-04-17T08:03:54.576Z","repository":{"id":103423941,"uuid":"342372079","full_name":"pouriyajamshidi/fwmonitor","owner":"pouriyajamshidi","description":"for network traffic analysis, displays your iptables, UFW, or any application that logs in the same format, in a pleasant way.","archived":false,"fork":false,"pushed_at":"2023-05-10T16:50:15.000Z","size":403,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-08T13:16:46.636Z","etag":null,"topics":["forensics-tools","iptables","linux","network","security","security-tools"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/fwmonitor/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pouriyajamshidi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["pouriyajamshidi"]}},"created_at":"2021-02-25T20:35:39.000Z","updated_at":"2022-09-26T20:36:35.000Z","dependencies_parsed_at":"2023-10-16T21:37:44.991Z","dependency_job_id":null,"html_url":"https://github.com/pouriyajamshidi/fwmonitor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouriyajamshidi%2Ffwmonitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouriyajamshidi%2Ffwmonitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouriyajamshidi%2Ffwmonitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouriyajamshidi%2Ffwmonitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pouriyajamshidi","download_url":"https://codeload.github.com/pouriyajamshidi/fwmonitor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246905831,"owners_count":20852818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["forensics-tools","iptables","linux","network","security","security-tools"],"created_at":"2024-10-28T10:12:14.952Z","updated_at":"2026-04-17T08:03:54.514Z","avatar_url":"https://github.com/pouriyajamshidi.png","language":"Python","funding_links":["https://github.com/sponsors/pouriyajamshidi"],"categories":[],"sub_categories":[],"readme":"# FWMonitor\n\n`fwmonitor` can be used to grok `IPTABLES`, `UFW` or any program that logs similar to `IPTABLES`, logs from your `syslog` (_active_) or a gathered log/text file (_passive_) in a comprehensive format in order to conduct network traffic analysis and security audit of your servers.\n\n[![Downloads](https://static.pepy.tech/badge/fwmonitor)](https://pepy.tech/project/fwmonitor)\n\n## Demo\n\n![fwmonitor](https://github.com/pouriyajamshidi/fwmonitor/raw/master/images/fwmonitor.gif)\n\n## Usage\n\nInstall from `PIP`:\n\n```bash\npip3 install fwmonitor\n```\n\nOr clone this repository:\n\n```bash\ngit clone https://github.com/pouriyajamshidi/fwmonitor.git\n```\n\nMake the script executable:\n\n```bash\nchmod +x fwmonitor.py\n```\n\nFor your convenience, you can place the program in your system PATH, like `/bin/` or `/usr/local/bin/` for instance:\n\n```bash\nsudo cp fwmonitor.py /usr/local/bin/fwmonitor\n```\n\n---\n\n## Flags\n\nThis script takes 4 optional arguments. These arguments are:\n\n**`--file`**: Location of log file to be scanned. Default location is **/var/log/syslog**\n\n**`--key`** : Keyword that `IPTABLES` uses to log events. Make sure of case-sensitivity and specific keyword in your log file. Default value for keyword is **\"UFW BLOCK\"**\n\n**`--interval`**: Interval to read the log file from scratch, this is useful for analyzing a live system. If you pass `0` here, it'll scan the log file once and exits. Default value for interval is **60 seconds**\n\n**`--ipv6`**: Display `IPv6` logs. Default is **IPv4**\n\n**`--version`**: Display version and exit\n\n_By running the script without providing any arguments, the default values as mentioned below above be used._\n\n## Examples\n\nTo analyze a log file that you have gathered:\n\n```python\nfwmonitor --file mytraffic.log --key \"IPTABLES_BLOCK\" --interval 0\n# OR\npython3 fwmonitor.py --file mytraffic.log --key \"IPTABLES_BLOCK\" --interval 0\n```\n\nAudit a live server:\n\n```python\nfwmonitor --file /var/log/syslog --key \"IPTABLES_BLOCK\"\n# OR\npython3 fwmonitor.py --file /var/log/syslog --key \"IPTABLES_BLOCK\"\n```\n\nAdditionally, there is a `sample.log` in this repository that you can utilize to see how this script works without actually having a log file yourself. Use it like:\n\n```bash\nfwmonitor --file sample.log --key \"UFW BLOCK\" --interval 0\n# OR\npython3 fwmonitor.py --file sample.log --key \"UFW BLOCK\" --interval 0\n```\n\n## Tested on\n\nUbuntu.\n\n_It can be used on `Windows` and `Mac OS` as well to analyze the gathered log file(s)._\n\n## TODO\n\n- [ ] Implement smart spacing for rows.\n\n## Contributing\n\nPull requests are welcome.\n\n## License\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouriyajamshidi%2Ffwmonitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpouriyajamshidi%2Ffwmonitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouriyajamshidi%2Ffwmonitor/lists"}