Coder Social home page Coder Social logo

puppet-shorewall6's Introduction

Disclaimer
----------

This is luxflux's IPv6 fork of the puppet-shorewall project.
I needed to reimport it into a free github project to have
puppet-shorewall and puppet-shorewall6 at the same time in my
organisation.


Puppet Module for Shorewall
---------------------------
This module manages the configuration of Shorewall (http://www.shorewall.net/)

Versions
--------
- forked from http://git.puppet.immerda.ch/?p=module-shorewall.git;a=summary

Todo
----
- check if shorewall compiles without errors, otherwise fail !

Documentation
-------------

see also: http://reductivelabs.com/trac/puppet/wiki/Recipes/AqueosShorewall
 
Example
-------

Example from node.pp:

node xy {
	$shorewall_startup="0"  # create shorewall ruleset but don't startup
	include config::site-shorewall
	shorewall6::rule {
		'incoming-ssh': source => 'all', destination => '$FW',  action  => 'SSH/ACCEPT', order => 200;
		'incoming-puppetmaster': source => 'all', destination => '$FW',  action  => 'Puppetmaster/ACCEPT', order => 300;
		'incoming-imap': source => 'all', destination => '$FW',  action  => 'IMAP/ACCEPT', order => 300;
		'incoming-smtp': source => 'all', destination => '$FW',  action  => 'SMTP/ACCEPT', order => 300;
	}
}


class config::site-shorewall {
        include shorewall

	# If you want logging:
        #shorewall6::params {
        #       'LOG':            value => 'debug';
        #	'MAILSERVER':     value => $shorewall_mailserver;
        #}

        shorewall6::zone {'net':
                type => 'ipv4';
        }

        shorewall6::rule_section { 'NEW':
                order => 100;
        }

        case $shorewall_rfc1918_maineth {
                '': {$shorewall_rfc1918_maineth = true }
        }

        case $shorewall_main_interface {
                '': { $shorewall_main_interface = 'eth0' }
        }

        shorewall6::interface {"$shorewall_main_interface":
                zone    => 'net',
                rfc1918  => $shorewall_rfc1918_maineth,
                options => 'tcpflags,blacklist,nosmurfs';
        }

        shorewall6::policy {
                'fw-to-fw':
                  sourcezone              =>      '$FW',
                  destinationzone         =>      '$FW',
                  policy                  =>      'ACCEPT',
                  order                   =>      100;
                'fw-to-net':
                sourcezone              =>      '$FW',
                destinationzone         =>      'net',
                policy                  =>      'ACCEPT',
                shloglevel              =>      '$LOG',
                order                   =>      110;
                'net-to-fw':
                sourcezone              =>      'net',
                destinationzone         =>      '$FW',
                policy                  =>      'DROP',
                shloglevel              =>      '$LOG',
                order                   =>      120;
        }       

        
        # default Rules : ICMP 
        shorewall6::rule { 'allicmp-to-host': source => 'all', destination => '$FW', order  => 200, action  => 'AllowICMPs/ACCEPT';
        }
 
}


puppet-shorewall6's People

Contributors

groulot avatar

Watchers

Philippe Lafoucrière avatar Olivier Gonzalez avatar  avatar 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.