guoyu07 / ipt-php Goto Github PK
View Code? Open in Web Editor NEWPHP Class for management iptables with mysql e iptables-xml
PHP Class for management iptables with mysql e iptables-xml
/**************************************************************************************** * Class : firewall * Ver. : 1.0 * Author : Andrea Salvatore Crisafulli a.k.a. Xanio <[email protected]> * Date : 201206 * License : GPL License * */ Gestione iptables tramite interfaccia web PHP con aiuto di una base dati MySQL. Per l'integrazione in php è stata creata una classe che permette la creazione, modifica e cancellazione di rules: - NAT 1:1 - Port Forwarding - Masquarade - Input/Output/Forward - Log Affinche il sistema funzioni è essenziale installare sudo e fare in modo che i comandi per la gestione iptables siano gestibili dall'utente web. Attualmente i comandi da abilitare sono: - iptables-save -> Permette il save delle rules - iptables-restore -> Permette il restore delle rules Per la gestione basta installare sudo ed editare con visudo il contenuti aggiungendo ## START ADD SUDOERS Cmnd_Alias IPTABLES = /sbin/iptables-restore, /sbin/iptables-save www-data ALL=NOPASSWD : IPTABLES ## END ADD SUDOERS Il funzionamento è molto basilare, la gestione da web permette la creazione di un file di script come se fosse generato da iptables-save, questo script viene caricato on-fly tramite l'esecuzione del comando iptables-restore.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.