Web-based graphical interface to manage nftables firewall rules easily π₯
nftables-gui is a web interface that allows you to configure Linux nftables firewall rules in a simple and visual way.
Instead of writing complex firewall commands, you can:
- Create rules visually π§©
- Manage existing rules π
- Deploy firewall configurations safely π
- π Web-based interface
- π§ Simple rule creation system
- π₯ Integration with nftables backend
- βοΈ Supports rule execution via parser
- π§ͺ Testing with pytest + coverage support
- π§ Designed for Linux systems
Example:
[ Add Rule ] [ Delete Rule ]
IP: 192.168.1.1
Port: 80
Action: ALLOW
Make sure you have:
- Python 3.x
- python3-nftables
- python3-hug
- virtualenv
- Linux system (required for nftables)
# Clone the repository
git clone https://github.com/alegarsan11/nftables-gui.git
cd nftables-gui# Create virtual environment
python3 -m venv venv
source venv/bin/activate# Install dependencies
pip install -r requirements.txtsudo chmod +x run.sh
sudo ./run.shThe default user credentials are as follows:
- Username: default
- Password: defaultpassword
sudo chmod +x build.sh
sudo ./build.shServer runs on: http://localhost:8080
sudo apt install gunicorn gevent
# Backend
cd nftables-frontend
gunicorn -w 4 -b 0.0.0.0:4000 --worker-class gevent app:app
# Parser
cd ../nftables-parser
sudo hug -f main.pypytest
pytest --cov
pytest --cov --cov-report=htmlnftables-gui/
βββ nftables-frontend/ # Web interface
βββ nftables-parser/ # Backend logic
βββ run.sh
βββ build.sh
βββ README.md
We welcome contributions!
- Fix bugs π
- Improve UI π¨
- Add features β¨
- Improve documentation π
π See CONTRIBUTING.md for details.
This project interacts directly with system firewall rules.
- Use with caution
- Requires sudo privileges
- Do not expose to public networks without proper security
Built with β€οΈ for Linux networking and firewall management.