A sophisticated firewall management system with stateful packet inspection, DDoS protection, rate limiting, and authentication.
- Rule Management: Block/allow traffic by IP, port, domain, or protocol
- Stateful Firewalling: Track connection states for better security
- DDoS Protection: Specialized defenses against SYN floods and connection floods
- Rate Limiting: Prevent brute force and flood attacks
- Authentication: Secure admin access with password protection
- Logging: Detailed logging of all firewall activities
- Persistence: Save and load firewall rules
- Linux system with root privileges
- iptables installed
- OpenSSL development libraries
- C++17 compatible compiler
You'll need:
- A Linux computer (Ubuntu/CentOS/etc.)
- Administrator access (will ask for password)
- Basic terminal knowledge
git clone https://github.com/ayu-ano/Firewall_Unix_System.git
cd Firewall_Unix_System
cd Firewall_with_DDos_secure
make
sudo make installmake # Build the firewall executable
make clean # Remove build artifacts
make install # Install to /usr/local/bin (requires root)
make uninstall # Remove installed binary
make format # Format code with clang-formatsudo ./firewall- Add Rule (IP/Port/Domain)
- Remove Rule
- List Rules
- Block All Traffic
- Allow All Traffic
- Save Rules
- Load Rules
- Toggle Stateful Mode
- Add Rate Limit
- Remove Rate Limit
- Enable DDoS Protection
- Exit
Choose 1 → Type "ip" → Enter "192.168.1.100" → Type "n"Choose 1 → Type "port" → Enter "80" → Type "n"Choose 1 → Type "domain" → Enter "google.com" → Type "n"Choose 9 → Enter no. of IP → "10" connections → "60" seconds- PBKDF2 password hashing with random salts
- Stateful connection tracking
- iptables hashlimit module for rate limiting
- SYN flood protection
- Logs written to
firewall.logwith rotation support
firewall.cpp- Main implementationfirewall.hpp- Class definitionsMakefile- Build configurationfirewall.log- Default log file.firewall_auth- Credentials storage