SecureNetX is a modern, JavaFX-based Linux firewall manager that provides a user-friendly GUI to control iptables rules, block/unblock IPs, and monitor real-time network services.
Ideal for cybersecurity learners, system administrators, or anyone who wants a graphical way to control Linux firewalls.
-
📡 Service Scanner
Lists all currently active TCP/UDP services with IP, port, and process name usingss -tulnp. -
🔥 Firewall Rule Management
- Add or remove rules using protocol, IP address, port, and action (
ACCEPT/DROP). - Logs feedback and errors in real time.
- Extensible to support INPUT / OUTPUT direction (currently INPUT by default).
- Add or remove rules using protocol, IP address, port, and action (
-
🚫 Block/Unblock IPs
Block or unblock any external IP usingiptables -A OUTPUT -d IP -j DROP(and delete to unblock). -
📋 Live Logging
Real-time visual log inside the application, showing rule actions, scanned services, IP blocks, and more. -
❌ Exit Button
Gracefully close the application with one click.
A great way to test the app is by blocking a known public IP like Facebook.
-
Use
nslookuporpingto find Facebook’s public IP:nslookup facebook.com
Example IP: 157.240.1.35
Enter 157.240.1.35 into the “Block IP” field in the app and click Block IP.
Test the block:
ping 157.240.1.35 # Should fail
curl https://facebook.com # May time out
Click Unblock IP to reverse it.
⚠️ Note: Facebook uses many dynamic IPs and CDNs. Blocking one IP may not fully block the website.
🧰 Requirements
Java 17+
JavaFX SDK (e.g., javafx-sdk-21)
Linux OS with:
iptables
ss command
Run with sudo/root to allow iptables modifications
🚀 Getting Started
- Clone the Repository
git clone https://github.com/blackXmask/SecureNetX.git cd SecureNetX-Firewall
- Compile & Run (Manual)
javac --module-path /path/to/javafx/lib --add-modules javafx.controls,javafx.fxml application/*.java sudo java --module-path /path/to/javafx/lib --add-modules javafx.controls,javafx.fxml application.Main
🛑 Important: Always run with sudo so the application can apply firewall rules.
-
Open in IDE
Open the project in Eclipse / IntelliJ.
Set VM Options to include JavaFX:
--module-path /path/to/javafx/lib --add-modules javafx.controls,javafx.fxml
This tool uses and modifies iptables firewall rules. Misuse may result in loss of network access. Use responsibly and preferably in a controlled/test environment before applying to production systems.
📄 License
MIT License © 2025 blackXmask Feel free to modify, contribute, or share under the terms of the license.
Let me know if you'd like:
.jarbuild instructions.debpackage guide for Debian-based systems- or README in another language (e.g., Urdu, Spanish)


