Skip to content

ayu-ano/Firewall_Unix_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Firewall_Unix_System

Firewall Protection C++17 Open Source

A sophisticated firewall management system with stateful packet inspection, DDoS protection, rate limiting, and authentication.

Features

  • 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

Prerequisites

  • Linux system with root privileges
  • iptables installed
  • OpenSSL development libraries
  • C++17 compatible compiler

Before You Begin ⚠️

You'll need:

  • A Linux computer (Ubuntu/CentOS/etc.)
  • Administrator access (will ask for password)
  • Basic terminal knowledge

Installation

git clone https://github.com/ayu-ano/Firewall_Unix_System.git
cd Firewall_Unix_System
cd Firewall_with_DDos_secure
make
sudo make install

Building from Source

make          # 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-format

Usage

Running the Firewall

sudo ./firewall

Command Line Interface Options

  1. Add Rule (IP/Port/Domain)
  2. Remove Rule
  3. List Rules
  4. Block All Traffic
  5. Allow All Traffic
  6. Save Rules
  7. Load Rules
  8. Toggle Stateful Mode
  9. Add Rate Limit
  10. Remove Rate Limit
  11. Enable DDoS Protection
  12. Exit

Example Uses 🛡️

Block a hacker's IP:

Choose 1 → Type "ip" → Enter "192.168.1.100" → Type "n"

Block a port :

Choose 1 → Type "port" → Enter "80" → Type "n"

Block a domain or website :

Choose 1 → Type "domain" → Enter "google.com" → Type "n"

Stop an attacker:

Choose 9 → Enter no. of IP → "10" connections → "60" seconds

Technical Details

Security Features

  • PBKDF2 password hashing with random salts
  • Stateful connection tracking
  • iptables hashlimit module for rate limiting
  • SYN flood protection

Logging

  • Logs written to firewall.log with rotation support

Files

  • firewall.cpp - Main implementation
  • firewall.hpp - Class definitions
  • Makefile - Build configuration
  • firewall.log - Default log file
  • .firewall_auth - Credentials storage

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors