Giter Site home page Giter Site logo

wafv2-rules-csv-auto's Introduction

WAFv2-Rules-CSV-Auto

Repository for a code will automate the creation of AWS WAFv2 Rules using CSV as input. This code does not consider authentication, user must decide best suited authentication method.

The code works for WAF(version 2) rules allowing or blocking IPs, it can be ranges or unique IPs. The code will iterate trough a CSV file to get info needed for the creation of IPset and Waf rules like the IPs, the name, the priority of the rule, remember the priorities must be unique values, can't be two or more rules with the same priority number otherwise will fail. In the variable file vars.tfvars we can setup the name and other values we want. For default the variable default_action_type, which controls the default action is setup to allow, so it will allow anything to pass and the rules added will block whatever we define, the behavior, can be changed inverting the value to block, which will block the traffic and permit only what we put into the rules. This code is intended for rules based on IP. After created the web acl can be associated to the resources supporting wafv2 rules.

magic command: terraform apply -var-file=vars.tfvars -auto-approve

More detailed article: https://medium.com/@fabricio.aa.it/automating-dynamic-aws-wafv2-rule-creation-with-terraform-63b04a46a507

wafv2-rules-csv-auto's People

Contributors

fabricioaait avatar

Stargazers

Narayanan Subbiah avatar

Watchers

 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.