Coder Social home page Coder Social logo

ipt-php's Introduction

/****************************************************************************************
*   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.

ipt-php's People

Contributors

xanio avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.