{"id":27000087,"url":"https://github.com/arec1b0/firewall-tester","last_synced_at":"2026-05-04T05:43:25.463Z","repository":{"id":264730674,"uuid":"894232528","full_name":"arec1b0/firewall-tester","owner":"arec1b0","description":"Automates firewall rule validation with traffic simulation, logging, and reporting. Secure and extensible tool for Fedora/Linux systems.","archived":false,"fork":false,"pushed_at":"2024-11-26T20:22:13.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T23:33:58.669Z","etag":null,"topics":["firewall","iptables","linux","open-source","security-tools","traffic-simulation","validation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arec1b0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-26T01:48:18.000Z","updated_at":"2024-11-26T20:22:17.000Z","dependencies_parsed_at":"2025-03-21T16:46:19.110Z","dependency_job_id":null,"html_url":"https://github.com/arec1b0/firewall-tester","commit_stats":null,"previous_names":["dkrizhanovskyi/firewall-tester","arec1b0/firewall-tester"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arec1b0%2Ffirewall-tester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arec1b0%2Ffirewall-tester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arec1b0%2Ffirewall-tester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arec1b0%2Ffirewall-tester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arec1b0","download_url":"https://codeload.github.com/arec1b0/firewall-tester/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247112889,"owners_count":20885628,"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":["firewall","iptables","linux","open-source","security-tools","traffic-simulation","validation"],"created_at":"2025-04-04T03:18:47.298Z","updated_at":"2026-05-04T05:43:20.418Z","avatar_url":"https://github.com/arec1b0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Automated Firewall Rule Tester\n\n## Overview\n\nThe **Automated Firewall Rule Tester** is an open-source tool designed to validate and test firewall configurations. It automates the process of simulating traffic, validating firewall rules, and generating comprehensive reports to ensure your firewall meets security and compliance standards.\n\n### Key Features\n- **Firewall Rule Management**: Apply, reset, and manage rules dynamically using `iptables`.\n- **Traffic Simulation**: Simulate TCP, UDP, and ICMP traffic with `hping3`.\n- **Rule Validation**: Compare expected and observed firewall behavior to detect misconfigurations.\n- **Logging and Reporting**: Centralized logs and HTML reports for easy debugging and analysis.\n- **Unit Testing**: Comprehensive test suite for validating the tool's reliability.\n\n---\n\n## Getting Started\n\nFollow these instructions to set up and use the **Automated Firewall Rule Tester**.\n\n### Prerequisites\n1. **Fedora 40** or similar Linux OS.\n2. Required tools:\n   - `iptables`\n   - `firewalld` (optional)\n   - `hping3`\n   - `tcpdump`\n3. **Python 3.8+** with `pip`.\n\n### Installation\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/dkrizhanovskyi/firewall-tester.git\n   cd firewall-tester\n   ```\n\n2. Set up a Python virtual environment:\n   ```bash\n   python3 -m venv venv\n   source venv/bin/activate\n   ```\n\n3. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. Install required system tools:\n   ```bash\n   sudo dnf install -y iptables firewalld hping3 tcpdump\n   ```\n\n---\n\n## Usage\n\n### 1. Apply Firewall Rules\nApply the rules defined in `rules/sample_rules.json`:\n```bash\npython3 src/main.py --apply-rules\n```\n\n### 2. Reset Firewall Rules\nReset (flush) all active firewall rules:\n```bash\npython3 src/main.py --reset-firewall\n```\n\n### 3. Validate Firewall Rules\nValidate firewall rules and generate a detailed report:\n```bash\npython3 src/main.py --validate-rules\n```\n\n### 4. View Logs and Reports\n- View validation logs:\n  ```bash\n  cat logs/validation.log\n  ```\n- Open the generated HTML report:\n  ```bash\n  firefox reports/validation_report.html\n  ```\n\n---\n\n## Project Structure\n\n```\nfirewall-tester/\n├── LICENSE                     # GNU GPLv3 License\n├── README.md                   # Project documentation\n├── requirements.txt            # Python dependencies\n├── rules/                      # Folder for rule definitions\n│   └── sample_rules.json       # Example JSON file with rules\n├── src/                        # Source code\n│   ├── __init__.py             # Marks src as a Python package\n│   ├── main.py                 # Entry point for the project\n│   ├── firewall_manager.py     # Firewall management logic\n│   ├── traffic_simulator.py    # Traffic simulation logic\n│   ├── rule_validator.py       # Rule validation logic\n│   ├── logger.py               # Centralized logging utility\n│   └── report_generator.py     # HTML report generation logic\n├── tests/                      # Unit test suite\n│   ├── __init__.py             # Marks tests as a Python package\n│   ├── test_firewall_manager.py # Unit tests for firewall_manager\n│   ├── test_rule_validator.py  # Unit tests for rule_validator\n│   └── test_traffic_simulator.py # Unit tests for traffic_simulator\n├── logs/                       # Logs generated at runtime\n├── reports/                    # Reports generated at runtime\n```\n\n---\n\n## Contributions\n\nWe welcome contributions from the community! Here's how you can help:\n\n1. Fork the repository and create a new branch.\n2. Make your changes and add tests for any new functionality.\n3. Submit a pull request with a detailed description of your changes.\n\n---\n\n## License\n\nThis project is licensed under the GNU General Public License v3 (GPLv3).  \nYou are free to use, modify, and distribute this software under the terms of the GPLv3.  \n\nSee the [LICENSE](LICENSE) file for details or visit [GNU GPL website](https://www.gnu.org/licenses/gpl-3.0.html).\n\n---\n\n\n## Acknowledgments\n\n- **`iptables`**: The powerful Linux firewall tool.\n- **`hping3`**: For traffic simulation.\n- **GNU GPLv3**: For fostering open-source collaboration.\n\n---\n\n## Future Enhancements\n\nPlanned features for future releases:\n1. Support for `firewalld` alongside `iptables`.\n2. Extend reporting to include CSV and JSON formats.\n3. Add support for multi-host testing.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farec1b0%2Ffirewall-tester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farec1b0%2Ffirewall-tester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farec1b0%2Ffirewall-tester/lists"}