Giter Club home page Giter Club logo

larawall-iptables-handler's Introduction

LaraWall Iptables Handler

Version License

LaraWall rule handler for Iptables. Receives data from the LaraWall instance via API and manages Linux netfilter firewall rules using the Iptables utility.

Disclamer!

The handler is currently only tested on Linux distributions based on Debian!

This handler is fully functional, but because it is designed only as an example of handling rules from a LaraWall instance on a target server, it may have architectural flaws. For example, to import rules from API, it is preferable to use DTO.

System Requirements

The handler script needs to be run by a user with root privileges.

The system must have the iptables and ipset utilities installed.

For the firewall rules to work (restrict/allow access to server service ports) created by the handler, the default Iptables policy for the INPUT chain must be DROP.

Installation

$ composer create-project icemont/larawall-iptables-handler

After installation, set the handler settings in config/config.php

Note: if you installed the handler manually, you will need to copy the config/config.php file manually from the config/config.sample.php file.

Run the handler as root user and make sure there are no errors. Then add the script to the crontab task scheduler (as root):

* * * * * php /path-to-your-project/handler.php >> /dev/null 2>&1

Contact

Open an issue on GitHub if you have any problems or suggestions.

License

The contents of this repository is released under the MIT license.

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.