Giter Club home page Giter Club logo

attachmentgenie-ufw's Introduction

Build Status

Puppet UFW Module

Module for configuring UFW (Uncomplicated Firewall).

Tested on Debian GNU/Linux 6.0 Squeeze and Ubuntu 12.04 LTS with Puppet 2.7. Patches for other operating systems are welcome.

Usage

If you include the ufw class the package will be installed, the service will be enabled, and all incomming connections will be denied:

include ufw

You can change the forward policy, which defaults to DROP:

class { 'ufw':
  forward => 'ACCEPT',
}

You can then allow certain connections:

ufw::allow { "allow-ssh-from-all":
  port => 22,
}

ufw::allow { "allow-all-from-trusted":
  from => "10.0.0.145",
}

ufw::allow { "allow-http-on-specific-interface":
  port => 80,
  ip => "10.0.0.20",
}

ufw::allow { "allow-dns-over-udp":
  port => 53,
  proto => "udp",
}

Ranges are created via

ufw::allow { 'all http ports'
  port  => '8000:8999',
  proto => 'tcp'.
}

n.b.: ranges require the protocol to be tcp or udp. It cannot be any.

You can also rate limit certain ports (the IP is blocked if it initiates 6 or more connections within 30 seconds):

ufw::limit { 22: }

You can also adjust the ufw logging settings

ufw::logging { "prevent-logging":
    level => 'off',
}

To delete a single rule, add ensure => absent to the allow.

ufw::allow { "allow-ssh-from-all":
  ensure => absent,
  port   => 22,
}

Like most Puppet resources, allow this to successfully run on all your machines at least once before removing it, in order to assure that the rule is gone.

Known Limitations

Currently it is not possible to purge unmanaged rules and remove defined rules this will need to be done manually. (see #21 )

attachmentgenie-ufw's People

Contributors

adregner avatar andyleejordan avatar attachmentgenie avatar christianberg avatar deedoubledub avatar fredrikt avatar huandu avatar igalic avatar mattmcmanus avatar mcasper avatar netson avatar nickstenning avatar philandstuff avatar rjw1 avatar thanodnl avatar uggedal avatar vpetersson avatar

Watchers

 avatar  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.