From cf0f8bb58178df4b7ce54abab3684a2240c43855 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 4 Dec 2012 15:20:13 -0500 Subject: Stop shipping the default shorewall.conf file, instead we should let the operatingsystem package install its default config (this lets us stop having to keep this file updated), and instead tell people to configure their shorewall.conf file using the augeas method. It is possible still to distribute a shorewall.conf from a site-shorewall directory, however if the file is distributed, then it is not possible to use the augeas method. https://labs.riseup.net/code/issues/2738 --- README | 26 +++++ files/shorewall.conf | 192 ------------------------------- files/shorewall.conf.CentOS.6 | 217 ------------------------------------ files/shorewall.conf.Debian | 193 -------------------------------- files/shorewall.conf.Debian.etch | 180 ------------------------------ files/shorewall.conf.Debian.squeeze | 217 ------------------------------------ files/shorewall.conf.Debian.wheezy | 216 ----------------------------------- files/shorewall.conf.Gentoo | 180 ------------------------------ files/shorewall.conf.Ubuntu.karmic | 193 -------------------------------- manifests/base.pp | 4 - 10 files changed, 26 insertions(+), 1592 deletions(-) delete mode 100644 files/shorewall.conf delete mode 100644 files/shorewall.conf.CentOS.6 delete mode 100644 files/shorewall.conf.Debian delete mode 100644 files/shorewall.conf.Debian.etch delete mode 100644 files/shorewall.conf.Debian.squeeze delete mode 100644 files/shorewall.conf.Debian.wheezy delete mode 100644 files/shorewall.conf.Gentoo delete mode 100644 files/shorewall.conf.Ubuntu.karmic diff --git a/README b/README index 0010450..50a2bb9 100644 --- a/README +++ b/README @@ -35,6 +35,32 @@ installed instead: $shorewall_ensure_version = "4.0.15-1" +The main shorewall.conf is not managed by this module, rather the default one +that your operatingsystem provides is used, and any modifications you wish to do +to it should be configured with augeas, for example, to set IP_FORWARDING=Yes in +shorewall.conf, simply do this: + + augeas { 'enable_ip_forwarding': + changes => 'set /files/etc/shorewall/shorewall.conf/IP_FORWARDING Yes', + lens => 'Shellvars.lns', + incl => '/etc/shorewall/shorewall.conf', + notify => Service[shorewall]; + } + +NOTE: this requires the augeas ruby bindings newer than 0.7.3. + +If you need to, you can provide an entire shorewall.conf by placing it in one of +the following locations: + + "puppet:///modules/site-shorewall/${fqdn}/shorewall.conf.$operatingsystem", + "puppet:///modules/site-shorewall/${fqdn}/shorewall.conf", + "puppet:///modules/site-shorewall/shorewall.conf.$operatingsystem.$lsbdistcodename", + "puppet:///modules/site-shorewall/shorewall.conf.$operatingsystem", + "puppet:///modules/site-shorewall/shorewall.conf" + +NOTE: if you distribute a file, you cannot also use augeas, puppet and augeas +will fight forever + Documentation ------------- diff --git a/files/shorewall.conf b/files/shorewall.conf deleted file mode 100644 index 614e062..0000000 --- a/files/shorewall.conf +++ /dev/null @@ -1,192 +0,0 @@ -#### -#### Managed by puppet, modify only on the puppetmaster -#### -###################O############################################################ -# /etc/shorewall/shorewall.conf V4.0 - Change the following variables to -# match your setup -# -# This program is under GPL -# [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] -# -# This file should be placed in /etc/shorewall -# -# (c) 1999,2000,2001,2002,2003,2004,2005, -# 2006,2007 - Tom Eastep (teastep@shorewall.net) -# -# For information about the settings in this file, type "man shorewall.conf" -# -# Additional information is available at -# http://www.shorewall.net/Documentation.htm#Conf -############################################################################### -# S T A R T U P E N A B L E D -############################################################################### - -STARTUP_ENABLED=Yes - -############################################################################### -# V E R B O S I T Y -############################################################################### - -VERBOSITY=1 - -############################################################################### -# C O M P I L E R -# (setting this to 'perl' requires installation of Shorewall-perl) -############################################################################### - -SHOREWALL_COMPILER= - -############################################################################### -# L O G G I N G -############################################################################### - -LOGFILE=/var/log/messages - -LOGFORMAT="Shorewall:%s:%s:" - -LOGTAGONLY=No - -LOGRATE= - -LOGBURST= - -LOGALLNEW= - -BLACKLIST_LOGLEVEL= - -MACLIST_LOG_LEVEL=info - -TCP_FLAGS_LOG_LEVEL=info - -RFC1918_LOG_LEVEL=info - -SMURF_LOG_LEVEL=info - -LOG_MARTIANS=No - -############################################################################### -# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S -############################################################################### - -IPTABLES= - -PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin - -SHOREWALL_SHELL=/bin/sh - -SUBSYSLOCK=/var/lock/subsys/shorewall - -MODULESDIR= - -CONFIG_PATH=/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall - -RESTOREFILE= - -IPSECFILE=zones - -LOCKFILE= - -############################################################################### -# D E F A U L T A C T I O N S / M A C R O S -############################################################################### - -DROP_DEFAULT="Drop" -REJECT_DEFAULT="Reject" -ACCEPT_DEFAULT="none" -QUEUE_DEFAULT="none" -NFQUEUE_DEFAULT="none" - -############################################################################### -# R S H / R C P C O M M A N D S -############################################################################### - -RSH_COMMAND='ssh ${root}@${system} ${command}' -RCP_COMMAND='scp ${files} ${root}@${system}:${destination}' - -############################################################################### -# F I R E W A L L O P T I O N S -############################################################################### - -IP_FORWARDING=On - -ADD_IP_ALIASES=No - -ADD_SNAT_ALIASES=No - -RETAIN_ALIASES=No - -TC_ENABLED=Internal - -TC_EXPERT=No - -CLEAR_TC=Yes - -MARK_IN_FORWARD_CHAIN=Yes - -CLAMPMSS=No - -ROUTE_FILTER=No - -DETECT_DNAT_IPADDRS=Yes - -MUTEX_TIMEOUT=60 - -ADMINISABSENTMINDED=Yes - -BLACKLISTNEWONLY=Yes - -DELAYBLACKLISTLOAD=No - -MODULE_SUFFIX= - -DISABLE_IPV6=Yes - -BRIDGING=No - -DYNAMIC_ZONES=No - -PKTTYPE=No - -RFC1918_STRICT=No - -MACLIST_TABLE=mangle - -MACLIST_TTL= - -SAVE_IPSETS=No - -MAPOLDACTIONS=No - -FASTACCEPT=No - -IMPLICIT_CONTINUE=Yes - -HIGH_ROUTE_MARKS=No - -USE_ACTIONS=Yes - -OPTIMIZE=0 - -EXPORTPARAMS=Yes - -EXPAND_POLICIES=Yes - -KEEP_RT_TABLES=No - -DELETE_THEN_ADD=Yes - -MULTICAST=No - -DONT_LOAD= - -############################################################################### -# P A C K E T D I S P O S I T I O N -############################################################################### - -BLACKLIST_DISPOSITION=DROP - -MACLIST_DISPOSITION=DROP - -TCP_FLAGS_DISPOSITION=DROP - -#LAST LINE -- DO NOT REMOVE diff --git a/files/shorewall.conf.CentOS.6 b/files/shorewall.conf.CentOS.6 deleted file mode 100644 index 0d7a9be..0000000 --- a/files/shorewall.conf.CentOS.6 +++ /dev/null @@ -1,217 +0,0 @@ -#### -#### Managed by puppet, modify only on the puppetmaster -#### -############################################################################### -# -# Shorewall Version 4 -- /etc/shorewall/shorewall.conf -# -# For information about the settings in this file, type "man shorewall.conf" -# -# Manpage also online at http://www.shorewall.net/manpages/shorewall.conf.html -############################################################################### -# S T A R T U P E N A B L E D -############################################################################### - -STARTUP_ENABLED=Yes - -############################################################################### -# V E R B O S I T Y -############################################################################### - -VERBOSITY=1 - -############################################################################### -# L O G G I N G -############################################################################### - -BLACKLIST_LOGLEVEL= - -LOG_MARTIANS=No - -LOG_VERBOSITY=2 - -LOGALLNEW= - -LOGFILE=/var/log/messages - -LOGFORMAT="Shorewall:%s:%s:" - -LOGTAGONLY=No - -LOGLIMIT= - -MACLIST_LOG_LEVEL=info - -SFILTER_LOG_LEVEL=info - -SMURF_LOG_LEVEL=info - -STARTUP_LOG=/var/log/shorewall-init.log - -TCP_FLAGS_LOG_LEVEL=info - -############################################################################### -# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S -############################################################################### - -CONFIG_PATH="/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall" - -IPTABLES= - -IP= - -IPSET= - -MODULESDIR= - -PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin" - -PERL=/usr/bin/perl - -RESTOREFILE=restore - -SHOREWALL_SHELL=/bin/sh - -SUBSYSLOCK=/var/lock/subsys/shorewall - -TC= - -############################################################################### -# D E F A U L T A C T I O N S / M A C R O S -############################################################################### - -ACCEPT_DEFAULT=none -DROP_DEFAULT=Drop -NFQUEUE_DEFAULT=none -QUEUE_DEFAULT=none -REJECT_DEFAULT=Reject - -############################################################################### -# R S H / R C P C O M M A N D S -############################################################################### - -RCP_COMMAND='scp ${files} ${root}@${system}:${destination}' -RSH_COMMAND='ssh ${root}@${system} ${command}' - -############################################################################### -# F I R E W A L L O P T I O N S -############################################################################### - -ACCOUNTING=Yes - -ACCOUNTING_TABLE=filter - -ADD_IP_ALIASES=No - -ADD_SNAT_ALIASES=No - -ADMINISABSENTMINDED=Yes - -AUTO_COMMENT=Yes - -AUTOMAKE=No - -BLACKLISTNEWONLY=Yes - -CLAMPMSS=No - -CLEAR_TC=Yes - -COMPLETE=No - -DELETE_THEN_ADD=Yes - -DETECT_DNAT_IPADDRS=YES - -DISABLE_IPV6=Yes - -DONT_LOAD= - -DYNAMIC_BLACKLIST=Yes - -EXPAND_POLICIES=Yes - -EXPORTMODULES=Yes - -FASTACCEPT=No - -FORWARD_CLEAR_MARK= - -IMPLICIT_CONTINUE=Yes - -HIGH_ROUTE_MARKS=No - -IP_FORWARDING=On - -KEEP_RT_TABLES=No - -LEGACY_FASTSTART=Yes - -LOAD_HELPERS_ONLY=No - -MACLIST_TABLE=mangle - -MACLIST_TTL= - -MANGLE_ENABLED=Yes - -MAPOLDACTIONS=No - -MARK_IN_FORWARD_CHAIN=Yes - -MODULE_SUFFIX=ko - -MULTICAST=No - -MUTEX_TIMEOUT=60 - -NULL_ROUTE_RFC1918=No - -OPTIMIZE=0 - -OPTIMIZE_ACCOUNTING=No - -REQUIRE_INTERFACE=No - -RESTORE_DEFAULT_ROUTE=Yes - -RETAIN_ALIASES=No - -ROUTE_FILTER=No - -SAVE_IPSETS=No - -TC_ENABLED=Internal - -TC_EXPERT=No - -TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2" - -TRACK_PROVIDERS=No - -USE_DEFAULT_RT=No - -WIDE_TC_MARKS=No - -ZONE2ZONE=2 - -############################################################################### -# P A C K E T D I S P O S I T I O N -############################################################################### - -BLACKLIST_DISPOSITION=DROP - -MACLIST_DISPOSITION=DROP - -SMURF_DISPOSITION=DROP - -SFILTER_DISPOSITION=DROP - -TCP_FLAGS_DISPOSITION=DROP - -################################################################################ -# L E G A C Y O P T I O N -# D O N O T D E L E T E O R A L T E R -################################################################################ - -IPSECFILE=zones diff --git a/files/shorewall.conf.Debian b/files/shorewall.conf.Debian deleted file mode 100644 index 4d9b255..0000000 --- a/files/shorewall.conf.Debian +++ /dev/null @@ -1,193 +0,0 @@ -#### -#### Managed by puppet, modify only on the puppetmaster -#### -############################################################################### -# /etc/shorewall/shorewall.conf V4.0 - Change the following variables to -# match your setup -# -# This program is under GPL -# -# This file should be placed in /etc/shorewall -# -# (c) 1999,2000,2001,2002,2003,2004,2005, -# 2006,2007 - Tom Eastep (teastep@shorewall.net) -# -# -# For information about the settings in this file, type "man shorewall.conf" -# -# Additional information is available at -# http://www.shorewall.net/Documentation.htm#Conf -############################################################################### -# S T A R T U P E N A B L E D -############################################################################### - -STARTUP_ENABLED=Yes - -############################################################################### -# V E R B O S I T Y -############################################################################### - -VERBOSITY=1 - -############################################################################### -# C O M P I L E R -# (setting this to 'perl' requires installation of Shorewall-perl) -############################################################################### - -SHOREWALL_COMPILER=shell - -############################################################################### -# L O G G I N G -############################################################################### - -LOGFILE=/var/log/messages - -LOGFORMAT="Shorewall:%s:%s:" - -LOGTAGONLY=No - -LOGRATE= - -LOGBURST= - -LOGALLNEW= - -BLACKLIST_LOGLEVEL= - -MACLIST_LOG_LEVEL=info - -TCP_FLAGS_LOG_LEVEL=info - -RFC1918_LOG_LEVEL=info - -SMURF_LOG_LEVEL=info - -LOG_MARTIANS=No - -############################################################################### -# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S -############################################################################### - -IPTABLES= - -PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin - -SHOREWALL_SHELL=/bin/sh - -SUBSYSLOCK="" - -MODULESDIR= - -# add puppet delivered files in front -CONFIG_PATH=/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall - -RESTOREFILE= - -IPSECFILE=zones - -LOCKFILE= - -############################################################################### -# D E F A U L T A C T I O N S / M A C R O S -############################################################################### - -DROP_DEFAULT="Drop" -REJECT_DEFAULT="Reject" -ACCEPT_DEFAULT="none" -QUEUE_DEFAULT="none" -NFQUEUE_DEFAULT="none" - -############################################################################### -# R S H / R C P C O M M A N D S -############################################################################### - -RSH_COMMAND='ssh ${root}@${system} ${command}' -RCP_COMMAND='scp ${files} ${root}@${system}:${destination}' - -############################################################################### -# F I R E W A L L O P T I O N S -############################################################################### - -IP_FORWARDING=Keep - -ADD_IP_ALIASES=Yes - -ADD_SNAT_ALIASES=No - -RETAIN_ALIASES=No - -TC_ENABLED=Internal - -TC_EXPERT=No - -CLEAR_TC=Yes - -MARK_IN_FORWARD_CHAIN=No - -CLAMPMSS=No - -ROUTE_FILTER=Yes - -DETECT_DNAT_IPADDRS=No - -MUTEX_TIMEOUT=60 - -ADMINISABSENTMINDED=Yes - -BLACKLISTNEWONLY=Yes - -DELAYBLACKLISTLOAD=No - -MODULE_SUFFIX= - -DISABLE_IPV6=Yes - -BRIDGING=No - -DYNAMIC_ZONES=No - -PKTTYPE=Yes - -RFC1918_STRICT=No - -MACLIST_TABLE=filter - -MACLIST_TTL= - -SAVE_IPSETS=No - -MAPOLDACTIONS=No - -FASTACCEPT=No - -IMPLICIT_CONTINUE=Yes - -HIGH_ROUTE_MARKS=No - -USE_ACTIONS=Yes - -OPTIMIZE=0 - -EXPORTPARAMS=Yes - -EXPAND_POLICIES=Yes - -KEEP_RT_TABLES=No - -DELETE_THEN_ADD=Yes - -MULTICAST=No - -DONT_LOAD= - -############################################################################### -# P A C K E T D I S P O S I T I O N -############################################################################### - -BLACKLIST_DISPOSITION=DROP - -MACLIST_DISPOSITION=REJECT - -TCP_FLAGS_DISPOSITION=DROP - -#LAST LINE -- DO NOT REMOVE diff --git a/files/shorewall.conf.Debian.etch b/files/shorewall.conf.Debian.etch deleted file mode 100644 index 5907945..0000000 --- a/files/shorewall.conf.Debian.etch +++ /dev/null @@ -1,180 +0,0 @@ -#### -#### Managed by puppet, modify only on the puppetmaster -#### -############################################################################### -# /etc/shorewall/shorewall.conf V3.4 - Change the following variables to -# match your setup -# -# This program is under GPL [http://www.gnu.org/copyleft/gpl.htm] -# -# This file should be placed in /etc/shorewall -# -# (c) 1999,2000,2001,2002,2003,2004,2005 - Tom Eastep (teastep@shorewall.net) -# -# For information about the settings in this file, type "man shorewall.conf" -# -# Additional information is available at -# http://www.shorewall.net/Documentation.htm#Conf -############################################################################### -# S T A R T U P E N A B L E D -############################################################################### - -STARTUP_ENABLED=Yes - -############################################################################### -# V E R B O S I T Y -############################################################################### - -VERBOSITY=1 - -############################################################################### -# C O M P I L E R -# (setting this to 'perl' requires installation of Shorewall-perl) -############################################################################### - -SHOREWALL_COMPILER=shell - -############################################################################### -# L O G G I N G -############################################################################### - -LOGFILE=/var/log/messages - -LOGFORMAT="Shorewall:%s:%s:" - -LOGTAGONLY=No - -LOGRATE= - -LOGBURST= - -LOGALLNEW= - -BLACKLIST_LOGLEVEL= - -MACLIST_LOG_LEVEL=info - -TCP_FLAGS_LOG_LEVEL=info - -RFC1918_LOG_LEVEL=info - -SMURF_LOG_LEVEL=info - -LOG_MARTIANS=No - -############################################################################### -# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S -############################################################################### - -IPTABLES= - -PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin - -SHOREWALL_SHELL=/bin/sh - -SUBSYSLOCK="" - -MODULESDIR= - -# add puppet delivered files in front -CONFIG_PATH=/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall - -RESTOREFILE= - -IPSECFILE=zones - -LOCKFILE= - -############################################################################### -# D E F A U L T A C T I O N S / M A C R O S -############################################################################### - -DROP_DEFAULT="Drop" -REJECT_DEFAULT="Reject" -ACCEPT_DEFAULT="none" -QUEUE_DEFAULT="none" - -############################################################################### -# R S H / R C P C O M M A N D S -############################################################################### - -RSH_COMMAND='ssh ${root}@${system} ${command}' -RCP_COMMAND='scp ${files} ${root}@${system}:${destination}' - -############################################################################### -# F I R E W A L L O P T I O N S -############################################################################### - -IP_FORWARDING=Keep - -ADD_IP_ALIASES=Yes - -ADD_SNAT_ALIASES=No - -RETAIN_ALIASES=No - -TC_ENABLED=Internal - -TC_EXPERT=No - -CLEAR_TC=Yes - -MARK_IN_FORWARD_CHAIN=No - -CLAMPMSS=No - -ROUTE_FILTER=Yes - -DETECT_DNAT_IPADDRS=No - -MUTEX_TIMEOUT=60 - -ADMINISABSENTMINDED=Yes - -BLACKLISTNEWONLY=Yes - -DELAYBLACKLISTLOAD=No - -MODULE_SUFFIX= - -DISABLE_IPV6=Yes - -BRIDGING=No - -DYNAMIC_ZONES=No - -PKTTYPE=Yes - -RFC1918_STRICT=No - -MACLIST_TABLE=filter - -MACLIST_TTL= - -SAVE_IPSETS=No - -MAPOLDACTIONS=No - -FASTACCEPT=No - -IMPLICIT_CONTINUE=Yes - -HIGH_ROUTE_MARKS=No - -USE_ACTIONS=Yes - -OPTIMIZE=0 - -EXPORTPARAMS=Yes - -############################################################################### -# P A C K E T D I S P O S I T I O N -############################################################################### - -BLACKLIST_DISPOSITION=DROP - -MACLIST_DISPOSITION=REJECT - -TCP_FLAGS_DISPOSITION=DROP - -#LAST LINE -- DO NOT REMOVE diff --git a/files/shorewall.conf.Debian.squeeze b/files/shorewall.conf.Debian.squeeze deleted file mode 100644 index 63b7350..0000000 --- a/files/shorewall.conf.Debian.squeeze +++ /dev/null @@ -1,217 +0,0 @@ -#### -#### Managed by puppet, modify only on the puppetmaster -### -############################################################################### -# -# Shorewall Version 4 -- /etc/shorewall/shorewall.conf -# -# For information about the settings in this file, type "man shorewall.conf" -# -# Manpage also online at http://www.shorewall.net/manpages/shorewall.conf.html -############################################################################### -# S T A R T U P E N A B L E D -############################################################################### - -STARTUP_ENABLED=Yes - -############################################################################### -# V E R B O S I T Y -############################################################################### - -VERBOSITY=1 - -############################################################################### -# L O G G I N G -############################################################################### - -LOGFILE=/var/log/messages - -STARTUP_LOG=/var/log/shorewall-init.log - -LOG_VERBOSITY=2 - -LOGFORMAT="Shorewall:%s:%s:" - -LOGTAGONLY=No - -LOGRATE= - -LOGBURST= - -LOGALLNEW= - -BLACKLIST_LOGLEVEL= - -MACLIST_LOG_LEVEL=info - -TCP_FLAGS_LOG_LEVEL=info - -SMURF_LOG_LEVEL=info - -LOG_MARTIANS=No - -############################################################################### -# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S -############################################################################### - -IPTABLES= - -IP= - -TC= - -IPSET= - -PERL=/usr/bin/perl - -PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin - -SHOREWALL_SHELL=/bin/sh - -SUBSYSLOCK="" - -MODULESDIR= - -CONFIG_PATH="/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall" - -RESTOREFILE= - -IPSECFILE=zones - -LOCKFILE= - -############################################################################### -# D E F A U L T A C T I O N S / M A C R O S -############################################################################### - -DROP_DEFAULT="Drop" -REJECT_DEFAULT="Reject" -ACCEPT_DEFAULT="none" -QUEUE_DEFAULT="none" -NFQUEUE_DEFAULT="none" - -############################################################################### -# R S H / R C P C O M M A N D S -############################################################################### - -RSH_COMMAND='ssh ${root}@${system} ${command}' -RCP_COMMAND='scp ${files} ${root}@${system}:${destination}' - -############################################################################### -# F I R E W A L L O P T I O N S -############################################################################### - -IP_FORWARDING=On - -ADD_IP_ALIASES=No - -ADD_SNAT_ALIASES=No - -RETAIN_ALIASES=No - -TC_ENABLED=Internal - -TC_EXPERT=No - -TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2" - -CLEAR_TC=Yes - -MARK_IN_FORWARD_CHAIN=Yes - -CLAMPMSS=No - -ROUTE_FILTER=No - -DETECT_DNAT_IPADDRS=YES - -MUTEX_TIMEOUT=60 - -ADMINISABSENTMINDED=Yes - -BLACKLISTNEWONLY=Yes - -DELAYBLACKLISTLOAD=No - -MODULE_SUFFIX=ko - -DISABLE_IPV6=Yes - -BRIDGING=No - -DYNAMIC_ZONES=No - -PKTTYPE=Yes - -NULL_ROUTE_RFC1918=No - -MACLIST_TABLE=mangle - -MACLIST_TTL= - -SAVE_IPSETS=No - -MAPOLDACTIONS=No - -FASTACCEPT=No - -IMPLICIT_CONTINUE=Yes - -HIGH_ROUTE_MARKS=No - -USE_ACTIONS=Yes - -OPTIMIZE=0 - -EXPORTPARAMS=Yes - -EXPAND_POLICIES=Yes - -KEEP_RT_TABLES=No - -DELETE_THEN_ADD=Yes - -MULTICAST=No - -DONT_LOAD= - -AUTO_COMMENT=Yes - -MANGLE_ENABLED=Yes - -USE_DEFAULT_RT=No - -RESTORE_DEFAULT_ROUTE=Yes - -AUTOMAKE=No - -WIDE_TC_MARKS=No - -TRACK_PROVIDERS=No - -ZONE2ZONE=2 - -ACCOUNTING=Yes - -DYNAMIC_BLACKLIST=Yes - -OPTIMIZE_ACCOUNTING=No - -LOAD_HELPERS_ONLY=No - -REQUIRE_INTERFACE=No - -FORWARD_CLEAR_MARK=Yes - -############################################################################### -# P A C K E T D I S P O S I T I O N -############################################################################### - -BLACKLIST_DISPOSITION=DROP - -MACLIST_DISPOSITION=DROP - -TCP_FLAGS_DISPOSITION=DROP - -#LAST LINE -- DO NOT REMOVE - diff --git a/files/shorewall.conf.Debian.wheezy b/files/shorewall.conf.Debian.wheezy deleted file mode 100644 index b5084c6..0000000 --- a/files/shorewall.conf.Debian.wheezy +++ /dev/null @@ -1,216 +0,0 @@ -#### -#### Managed by puppet, modify only on the puppetmaster -#### - -############################################################################### -# -# Shorewall Version 4 -- /etc/shorewall/shorewall.conf -# -# For information about the settings in this file, type "man shorewall.conf" -# -# Manpage also online at http://www.shorewall.net/manpages/shorewall.conf.html -############################################################################### -# S T A R T U P E N A B L E D -############################################################################### - -STARTUP_ENABLED=Yes - -############################################################################### -# V E R B O S I T Y -############################################################################### - -VERBOSITY=1 - -############################################################################### -# L O G G I N G -############################################################################### - -LOGFILE=/var/log/messages - -STARTUP_LOG=/var/log/shorewall-init.log - -LOG_VERBOSITY=2 - -LOGFORMAT="Shorewall:%s:%s:" - -LOGTAGONLY=No - -LOGLIMIT= - -LOGALLNEW= - -BLACKLIST_LOGLEVEL= - -MACLIST_LOG_LEVEL=info - -TCP_FLAGS_LOG_LEVEL=info - -SMURF_LOG_LEVEL=info - -LOG_MARTIANS=Yes - -############################################################################### -# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S -############################################################################### - -IPTABLES= - -IP= - -TC= - -IPSET= - -PERL=/usr/bin/perl - -PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin - -SHOREWALL_SHELL=/bin/sh - -SUBSYSLOCK="" - -MODULESDIR= - -# add puppet delivered files in front -CONFIG_PATH=/var/lib/puppet/modules/shorewall:/etc/shorewall:/usr/share/shorewall - -RESTOREFILE= - -IPSECFILE=zones - -LOCKFILE= - -############################################################################### -# D E F A U L T A C T I O N S / M A C R O S -############################################################################### - -DROP_DEFAULT="Drop" -REJECT_DEFAULT="Reject" -ACCEPT_DEFAULT="none" -QUEUE_DEFAULT="none" -NFQUEUE_DEFAULT="none" - -############################################################################### -# R S H / R C P C O M M A N D S -############################################################################### - -RSH_COMMAND='ssh ${root}@${system} ${command}' -RCP_COMMAND='scp ${files} ${root}@${system}:${destination}' - -############################################################################### -# F I R E W A L L O P T I O N S -############################################################################### - -IP_FORWARDING=Keep - -ADD_IP_ALIASES=No - -ADD_SNAT_ALIASES=No - -RETAIN_ALIASES=No - -TC_ENABLED=Internal - -TC_EXPERT=No - -TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2" - -CLEAR_TC=Yes - -MARK_IN_FORWARD_CHAIN=No - -CLAMPMSS=No - -ROUTE_FILTER=Yes - -DETECT_DNAT_IPADDRS=No - -MUTEX_TIMEOUT=60 - -ADMINISABSENTMINDED=Yes - -BLACKLISTNEWONLY=Yes - -MODULE_SUFFIX=ko - -DISABLE_IPV6=No - -DYNAMIC_ZONES=No - -PKTTYPE=Yes - -NULL_ROUTE_RFC1918=No - -MACLIST_TABLE=filter - -MACLIST_TTL= - -SAVE_IPSETS=No - -MAPOLDACTIONS=No - -FASTACCEPT=No - -IMPLICIT_CONTINUE=No - -HIGH_ROUTE_MARKS=No - -USE_ACTIONS=Yes - -OPTIMIZE=0 - -EXPORTPARAMS=Yes - -EXPAND_POLICIES=Yes - -KEEP_RT_TABLES=No - -DELETE_THEN_ADD=Yes - -MULTICAST=No - -DONT_LOAD= - -AUTO_COMMENT=Yes - -MANGLE_ENABLED=Yes - -USE_DEFAULT_RT=No - -RESTORE_DEFAULT_ROUTE=Yes - -AUTOMAKE=No - -WIDE_TC_MARKS=No - -TRACK_PROVIDERS=No - -ZONE2ZONE=2 - -ACCOUNTING=Yes - -DYNAMIC_BLACKLIST=Yes - -OPTIMIZE_ACCOUNTING=No - -LOAD_HELPERS_ONLY=No - -REQUIRE_INTERFACE=No - -FORWARD_CLEAR_MARK= - -COMPLETE=No - -EXPORTMODULES=Yes - -############################################################################### -# P A C K E T D I S P O S I T I O N -############################################################################### - -BLACKLIST_DISPOSITION=DROP - -MACLIST_DISPOSITION=REJECT - -TCP_FLAGS_DISPOSITION=DROP - -#LAST LINE -- DO NOT REMOVE diff --git a/files/shorewall.conf.Gentoo b/files/shorewall.conf.Gentoo deleted file mode 100644 index b99f50c..0000000 --- a/files/shorewall.conf.Gentoo +++ /dev/null @@ -1,180 +0,0 @@ -#### -#### Managed by puppet, modify only on the puppetmaster -#### -############################################################################### -# /etc/shorewall/shorewall.conf V3.4 - Change the following variables to -# match your setup -# -# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] -# -# This file should be placed in /etc/shorewall -# -# (c) 1999,2000,2001,2002,2003,2004,2005 - Tom Eastep (teastep@shorewall.net) -# -# For information about the settings in this file, type "man shorewall.conf" -# -# Additional information is available at -# http://www.shorewall.net/3.0/Documentation.htm#Conf -############################################################################### -# S T A R T U P E N A B L E D -############################################################################### - -STARTUP_ENABLED=Yes - -############################################################################### -# V E R B O S I T Y -############################################################################### - -VERBOSITY=1 - -############################################################################### -# C O M P I L E R -# (setting this to 'perl' requires installation of Shorewall-perl) -############################################################################### - -SHOREWALL_COMPILER=shell - -############################################################################### -# L O G G I N G -############################################################################### - -LOGFILE=/var/log/messages - -LOGFORMAT="Shorewall:%s:%s:" - -LOGTAGONLY=No - -LOGRATE= - -LOGBURST= - -LOGALLNEW= - -BLACKLIST_LOGLEVEL= - -MACLIST_LOG_LEVEL=info - -TCP_FLAGS_LOG_LEVEL=info - -RFC1918_LOG_LEVEL=info - -SMURF_LOG_LEVEL=info - -LOG_MARTIANS=No - -############################################################################### -# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S -############################################################################### - -IPTABLES= - -PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin - -SHOREWALL_SHELL=/bin/sh - -SUBSYSLOCK="/var/lock/subsys/shorewall" - -MODULESDIR= - -# add puppet delivered files in front -CONFIG_PATH=/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall - -RESTOREFILE= - -IPSECFILE=zones - -LOCKFILE= - -############################################################################### -# D E F A U L T A C T I O N S / M A C R O S -############################################################################### - -DROP_DEFAULT="Drop" -REJECT_DEFAULT="Reject" -ACCEPT_DEFAULT="none" -QUEUE_DEFAULT="none" - -############################################################################### -# R S H / R C P C O M M A N D S -############################################################################### - -RSH_COMMAND='ssh ${root}@${system} ${command}' -RCP_COMMAND='scp ${files} ${root}@${system}:${destination}' - -############################################################################### -# F I R E W A L L O P T I O N S -############################################################################### - -IP_FORWARDING=On - -ADD_IP_ALIASES=No - -ADD_SNAT_ALIASES=No - -RETAIN_ALIASES=No - -TC_ENABLED=Internal - -TC_EXPERT=No - -CLEAR_TC=Yes - -MARK_IN_FORWARD_CHAIN=Yes - -CLAMPMSS=No - -ROUTE_FILTER=No - -DETECT_DNAT_IPADDRS=Yes - -MUTEX_TIMEOUT=60 - -ADMINISABSENTMINDED=Yes - -BLACKLISTNEWONLY=Yes - -DELAYBLACKLISTLOAD=No - -MODULE_SUFFIX= - -DISABLE_IPV6=Yes - -BRIDGING=No - -DYNAMIC_ZONES=No - -PKTTYPE=No - -RFC1918_STRICT=No - -MACLIST_TABLE=mangle - -MACLIST_TTL= - -SAVE_IPSETS=No - -MAPOLDACTIONS=No - -FASTACCEPT=Yes - -IMPLICIT_CONTINUE=Yes - -HIGH_ROUTE_MARKS=No - -USE_ACTIONS=Yes - -OPTIMIZE=0 - -EXPORTPARAMS=Yes - -############################################################################### -# P A C K E T D I S P O S I T I O N -############################################################################### - -BLACKLIST_DISPOSITION=DROP - -MACLIST_DISPOSITION=DROP - -TCP_FLAGS_DISPOSITION=DROP - -#LAST LINE -- DO NOT REMOVE diff --git a/files/shorewall.conf.Ubuntu.karmic b/files/shorewall.conf.Ubuntu.karmic deleted file mode 100644 index 4d9b255..0000000 --- a/files/shorewall.conf.Ubuntu.karmic +++ /dev/null @@ -1,193 +0,0 @@ -#### -#### Managed by puppet, modify only on the puppetmaster -#### -############################################################################### -# /etc/shorewall/shorewall.conf V4.0 - Change the following variables to -# match your setup -# -# This program is under GPL -# -# This file should be placed in /etc/shorewall -# -# (c) 1999,2000,2001,2002,2003,2004,2005, -# 2006,2007 - Tom Eastep (teastep@shorewall.net) -# -# -# For information about the settings in this file, type "man shorewall.conf" -# -# Additional information is available at -# http://www.shorewall.net/Documentation.htm#Conf -############################################################################### -# S T A R T U P E N A B L E D -############################################################################### - -STARTUP_ENABLED=Yes - -############################################################################### -# V E R B O S I T Y -############################################################################### - -VERBOSITY=1 - -############################################################################### -# C O M P I L E R -# (setting this to 'perl' requires installation of Shorewall-perl) -############################################################################### - -SHOREWALL_COMPILER=shell - -############################################################################### -# L O G G I N G -############################################################################### - -LOGFILE=/var/log/messages - -LOGFORMAT="Shorewall:%s:%s:" - -LOGTAGONLY=No - -LOGRATE= - -LOGBURST= - -LOGALLNEW= - -BLACKLIST_LOGLEVEL= - -MACLIST_LOG_LEVEL=info - -TCP_FLAGS_LOG_LEVEL=info - -RFC1918_LOG_LEVEL=info - -SMURF_LOG_LEVEL=info - -LOG_MARTIANS=No - -############################################################################### -# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S -############################################################################### - -IPTABLES= - -PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin - -SHOREWALL_SHELL=/bin/sh - -SUBSYSLOCK="" - -MODULESDIR= - -# add puppet delivered files in front -CONFIG_PATH=/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall - -RESTOREFILE= - -IPSECFILE=zones - -LOCKFILE= - -############################################################################### -# D E F A U L T A C T I O N S / M A C R O S -############################################################################### - -DROP_DEFAULT="Drop" -REJECT_DEFAULT="Reject" -ACCEPT_DEFAULT="none" -QUEUE_DEFAULT="none" -NFQUEUE_DEFAULT="none" - -############################################################################### -# R S H / R C P C O M M A N D S -############################################################################### - -RSH_COMMAND='ssh ${root}@${system} ${command}' -RCP_COMMAND='scp ${files} ${root}@${system}:${destination}' - -############################################################################### -# F I R E W A L L O P T I O N S -############################################################################### - -IP_FORWARDING=Keep - -ADD_IP_ALIASES=Yes - -ADD_SNAT_ALIASES=No - -RETAIN_ALIASES=No - -TC_ENABLED=Internal - -TC_EXPERT=No - -CLEAR_TC=Yes - -MARK_IN_FORWARD_CHAIN=No - -CLAMPMSS=No - -ROUTE_FILTER=Yes - -DETECT_DNAT_IPADDRS=No - -MUTEX_TIMEOUT=60 - -ADMINISABSENTMINDED=Yes - -BLACKLISTNEWONLY=Yes - -DELAYBLACKLISTLOAD=No - -MODULE_SUFFIX= - -DISABLE_IPV6=Yes - -BRIDGING=No - -DYNAMIC_ZONES=No - -PKTTYPE=Yes - -RFC1918_STRICT=No - -MACLIST_TABLE=filter - -MACLIST_TTL= - -SAVE_IPSETS=No - -MAPOLDACTIONS=No - -FASTACCEPT=No - -IMPLICIT_CONTINUE=Yes - -HIGH_ROUTE_MARKS=No - -USE_ACTIONS=Yes - -OPTIMIZE=0 - -EXPORTPARAMS=Yes - -EXPAND_POLICIES=Yes - -KEEP_RT_TABLES=No - -DELETE_THEN_ADD=Yes - -MULTICAST=No - -DONT_LOAD= - -############################################################################### -# P A C K E T D I S P O S I T I O N -############################################################################### - -BLACKLIST_DISPOSITION=DROP - -MACLIST_DISPOSITION=REJECT - -TCP_FLAGS_DISPOSITION=DROP - -#LAST LINE -- DO NOT REMOVE diff --git a/manifests/base.pp b/manifests/base.pp index 937b83b..0007e40 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -13,10 +13,6 @@ class shorewall::base { "puppet:///modules/site_shorewall/shorewall.conf.${::operatingsystem}.${::lsbdistcodename}", "puppet:///modules/site_shorewall/shorewall.conf.${::operatingsystem}", "puppet:///modules/site_shorewall/shorewall.conf", - "puppet:///modules/shorewall/shorewall.conf.${::operatingsystem}.${::lsbdistcodename}", - "puppet:///modules/shorewall/shorewall.conf.${::operatingsystem}.${::lsbmajdistrelease}", - "puppet:///modules/shorewall/shorewall.conf.${::operatingsystem}", - "puppet:///modules/shorewall/shorewall.conf" ], require => Package[shorewall], notify => Service[shorewall], -- cgit v1.2.3 From 29e80fe61983821dc50ea54a05013c351206d5bd Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 4 Dec 2012 15:39:15 -0500 Subject: actually it is not possible to provide the site-shorewall sources for shorewall.conf, because if they do not exist, you will get a puppet error. this commit removes them, and updates the README to provide instructions for how you can do it the old way, if you want --- README | 17 +++++++++-------- manifests/base.pp | 8 -------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/README b/README index 50a2bb9..2487f20 100644 --- a/README +++ b/README @@ -49,14 +49,15 @@ shorewall.conf, simply do this: NOTE: this requires the augeas ruby bindings newer than 0.7.3. -If you need to, you can provide an entire shorewall.conf by placing it in one of -the following locations: - - "puppet:///modules/site-shorewall/${fqdn}/shorewall.conf.$operatingsystem", - "puppet:///modules/site-shorewall/${fqdn}/shorewall.conf", - "puppet:///modules/site-shorewall/shorewall.conf.$operatingsystem.$lsbdistcodename", - "puppet:///modules/site-shorewall/shorewall.conf.$operatingsystem", - "puppet:///modules/site-shorewall/shorewall.conf" +If you need to, you can provide an entire shorewall.conf by overriding the file +resource, for example: + +class site_shorewall::config inherits shorewall::base { + + File["/etc/shorewall/shorewall.conf"] { + source => "puppet:///modules/site_shorewall/${::fqdn}/shorewall.conf.${::operatingsystem}", + } +} NOTE: if you distribute a file, you cannot also use augeas, puppet and augeas will fight forever diff --git a/manifests/base.pp b/manifests/base.pp index 0007e40..7dd025f 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -6,14 +6,6 @@ class shorewall::base { # This file has to be managed in place, so shorewall can find it file { '/etc/shorewall/shorewall.conf': - # use OS specific defaults, but use Default if no other is found - source => [ - "puppet:///modules/site_shorewall/${::fqdn}/shorewall.conf.${::operatingsystem}", - "puppet:///modules/site_shorewall/${::fqdn}/shorewall.conf", - "puppet:///modules/site_shorewall/shorewall.conf.${::operatingsystem}.${::lsbdistcodename}", - "puppet:///modules/site_shorewall/shorewall.conf.${::operatingsystem}", - "puppet:///modules/site_shorewall/shorewall.conf", - ], require => Package[shorewall], notify => Service[shorewall], owner => root, group => 0, mode => 0644; -- cgit v1.2.3 From e511291a111db7a7d88a8820c5423aa5b92304e0 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 11 Dec 2012 18:42:15 -0500 Subject: Because the puppet shorewall module uses concat::fragment assembly to put the final results in /etc/shorewall/puppet, we have to make sure the shorewall.conf is pointing to that directory to get those configurations. This commit fixes that. --- README | 6 +++++- manifests/base.pp | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README b/README index 2487f20..29fd84d 100644 --- a/README +++ b/README @@ -60,7 +60,11 @@ class site_shorewall::config inherits shorewall::base { } NOTE: if you distribute a file, you cannot also use augeas, puppet and augeas -will fight forever +will fight forever. Secondly, you will *need* to make sure that if you are shipping your own +shorewall.conf that you have the following value set in your shorewall.conf otherwise this +module will not work: + + CONFIG_PATH="/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall" Documentation ------------- diff --git a/manifests/base.pp b/manifests/base.pp index 7dd025f..537c2a6 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -15,6 +15,13 @@ class shorewall::base { owner => root, group => 0, mode => 0644; } + augeas { 'shorewall_module_config_path': + changes => 'set /files/etc/shorewall/shorewall.conf/CONFIG_PATH \'"/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall"\'', + lens => 'Shellvars.lns', + incl => '/etc/shorewall/shorewall.conf', + notify => Service[shorewall]; + } + service{shorewall: ensure => running, enable => true, -- cgit v1.2.3