X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/faf8ae12e85eabb050b0f5eceb2cb67ad1de5261..7f5c025954a0868b7ac2aea8722089e75c39668e:/cookbooks/networking/templates/default/shorewall.conf.erb?ds=inline diff --git a/cookbooks/networking/templates/default/shorewall.conf.erb b/cookbooks/networking/templates/default/shorewall.conf.erb index 14e0779db..290c73fb6 100644 --- a/cookbooks/networking/templates/default/shorewall.conf.erb +++ b/cookbooks/networking/templates/default/shorewall.conf.erb @@ -12,172 +12,263 @@ STARTUP_ENABLED=Yes VERBOSITY=1 +############################################################################### +# P A G E R +############################################################################### + +PAGER= + +############################################################################### +# F I R E W A L L +############################################################################### + +FIREWALL= + ############################################################################### # L O G G I N G ############################################################################### -LOGFILE=/var/log/messages +<% if node[:networking][:firewall][:log] -%> +LOG_LEVEL="info" +<% else -%> +LOG_LEVEL="none" +<% end -%> -STARTUP_LOG=/var/log/shorewall-init.log +BLACKLIST_LOG_LEVEL= + +INVALID_LOG_LEVEL= + +LOG_BACKEND= + +LOG_MARTIANS=Yes LOG_VERBOSITY=2 -LOGFORMAT="Shorewall:%s:%s:" +LOGALLNEW= + +LOGFILE=/var/log/messages + +LOGFORMAT="%s %s " LOGTAGONLY=No -LOGRATE= +LOGLIMIT="s:1/sec:10" -LOGBURST= +MACLIST_LOG_LEVEL="$LOG_LEVEL" -LOGALLNEW= +RELATED_LOG_LEVEL= -BLACKLIST_LOGLEVEL= +RPFILTER_LOG_LEVEL="$LOG_LEVEL" -MACLIST_LOG_LEVEL=info +SFILTER_LOG_LEVEL="$LOG_LEVEL" -TCP_FLAGS_LOG_LEVEL=info +SMURF_LOG_LEVEL="$LOG_LEVEL" -SMURF_LOG_LEVEL=info +STARTUP_LOG=/var/log/shorewall-init.log -LOG_MARTIANS=Yes +TCP_FLAGS_LOG_LEVEL="$LOG_LEVEL" + +UNTRACKED_LOG_LEVEL= ############################################################################### # 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 ############################################################################### +ARPTABLES= + +CONFIG_PATH=":${CONFDIR}/shorewall:${SHAREDIR}/shorewall" + +GEOIPDIR=/usr/share/xt_geoip/LE + IPTABLES= IP= -TC= - IPSET= -PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin +LOCKFILE= -SHOREWALL_SHELL=/bin/sh +MODULESDIR= -SUBSYSLOCK="" +NFACCT= -MODULESDIR= +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin -CONFIG_PATH=/etc/shorewall:/usr/share/shorewall +PERL=/usr/bin/perl -RESTOREFILE= +RESTOREFILE=restore -IPSECFILE=zones +SHOREWALL_SHELL=/bin/sh -LOCKFILE= +SUBSYSLOCK="" + +TC= ############################################################################### # 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" +BLACKLIST_DEFAULT="Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL" +DROP_DEFAULT="Broadcast(DROP),Multicast(DROP)" NFQUEUE_DEFAULT="none" +QUEUE_DEFAULT="none" +REJECT_DEFAULT="Broadcast(DROP),Multicast(DROP)" ############################################################################### # 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}' +RSH_COMMAND='ssh ${root}@${system} ${command}' ############################################################################### # F I R E W A L L O P T I O N S ############################################################################### -IP_FORWARDING=Keep +ACCOUNTING=Yes + +ACCOUNTING_TABLE=filter -ADD_IP_ALIASES=Yes +ADD_IP_ALIASES=No ADD_SNAT_ALIASES=No -RETAIN_ALIASES=No +ADMINISABSENTMINDED=Yes -TC_ENABLED=Internal +AUTOCOMMENT=Yes -TC_EXPERT=No +AUTOHELPERS=Yes -CLEAR_TC=Yes +AUTOMAKE=Yes -MARK_IN_FORWARD_CHAIN=No +BALANCE_PROVIDERS=No + +BASIC_FILTERS=No + +<% if node[:networking][:firewall][:raw] -%> +BLACKLIST="NEW,INVALID,UNTRACKED" +<% else -%> +BLACKLIST="NEW,INVALID" +<% end -%> CLAMPMSS=No -ROUTE_FILTER=Yes +CLEAR_TC=Yes + +COMPLETE=No + +DEFER_DNS_RESOLUTION=Yes + +DELETE_THEN_ADD=Yes DETECT_DNAT_IPADDRS=No -MUTEX_TIMEOUT=60 +DISABLE_IPV6=No -ADMINISABSENTMINDED=Yes +DOCKER=No -BLACKLISTNEWONLY=Yes +DONT_LOAD= -DELAYBLACKLISTLOAD=No +DYNAMIC_BLACKLIST=Yes -MODULE_SUFFIX=ko +EXPAND_POLICIES=Yes -DISABLE_IPV6=No +EXPORTMODULES=Yes -BRIDGING=No +FASTACCEPT=No -DYNAMIC_ZONES=No +FORWARD_CLEAR_MARK= -PKTTYPE=Yes +HELPERS= -NULL_ROUTE_RFC1918=No +IGNOREUNKNOWNVARIABLES=No + +IMPLICIT_CONTINUE=No + +INLINE_MATCHES=No + +IPSET_WARNINGS=Yes + +IP_FORWARDING=Keep + +KEEP_RT_TABLES=No + +LOAD_HELPERS_ONLY=Yes MACLIST_TABLE=filter MACLIST_TTL= -SAVE_IPSETS=No +MANGLE_ENABLED=Yes MAPOLDACTIONS=No -FASTACCEPT=No +MARK_IN_FORWARD_CHAIN=No -IMPLICIT_CONTINUE=Yes +MINIUPNPD=No -HIGH_ROUTE_MARKS=No +MULTICAST=No -USE_ACTIONS=Yes +MUTEX_TIMEOUT=60 -OPTIMIZE=1 +NULL_ROUTE_RFC1918=No -EXPORTPARAMS=Yes +OPTIMIZE=All -EXPAND_POLICIES=Yes +OPTIMIZE_ACCOUNTING=No -KEEP_RT_TABLES=No +PERL_HASH_SEED=0 -DELETE_THEN_ADD=Yes +REJECT_ACTION= -MULTICAST=No +REQUIRE_INTERFACE=No -DONT_LOAD= +RESTART=restart -AUTO_COMMENT=Yes +RESTORE_DEFAULT_ROUTE=Yes -MANGLE_ENABLED=Yes +RESTORE_ROUTEMARKS=Yes + +RETAIN_ALIASES=No + +ROUTE_FILTER=Yes + +SAVE_ARPTABLES=No + +SAVE_IPSETS=No + +<% if node[:networking][:firewall][:mangle] -%> +TC_ENABLED=Internal +<% else -%> +TC_ENABLED=No +<% end -%> + +TC_EXPERT=No + +TC_PRIOMAP="2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2" + +TRACK_PROVIDERS=Yes + +TRACK_RULES=No USE_DEFAULT_RT=No -RESTORE_DEFAULT_ROUTE=Yes +USE_NFLOG_SIZE=No -AUTOMAKE=No +USE_PHYSICAL_NAMES=No -WIDE_TC_MARKS=No +USE_RT_NAMES=No -TRACK_PROVIDERS=No +VERBOSE_MESSAGES=Yes -ZONE2ZONE=2 +WARNOLDCAPVERSION=Yes + +WORKAROUNDS=No + +ZERO_MARKS=No + +ZONE2ZONE=- ############################################################################### # P A C K E T D I S P O S I T I O N @@ -185,8 +276,32 @@ ZONE2ZONE=2 BLACKLIST_DISPOSITION=DROP +INVALID_DISPOSITION=CONTINUE + MACLIST_DISPOSITION=REJECT +RELATED_DISPOSITION=ACCEPT + +RPFILTER_DISPOSITION=DROP + +SMURF_DISPOSITION=DROP + +SFILTER_DISPOSITION=DROP + TCP_FLAGS_DISPOSITION=DROP -#LAST LINE -- DO NOT REMOVE +UNTRACKED_DISPOSITION=CONTINUE + +################################################################################ +# P A C K E T M A R K L A Y O U T +################################################################################ + +TC_BITS= + +PROVIDER_BITS= + +PROVIDER_OFFSET= + +MASK_BITS= + +ZONE_BITS=0