From 5c0d817778b57b253c7443145fa928547f48e9f5 Mon Sep 17 00:00:00 2001 From: varac Date: Sat, 9 Feb 2013 15:05:16 +0100 Subject: site_shorewall::monitor: allow port 80 + 443 --- puppet/modules/site_shorewall/manifests/monitor.pp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 puppet/modules/site_shorewall/manifests/monitor.pp (limited to 'puppet/modules/site_shorewall/manifests') diff --git a/puppet/modules/site_shorewall/manifests/monitor.pp b/puppet/modules/site_shorewall/manifests/monitor.pp new file mode 100644 index 00000000..af9f8bfe --- /dev/null +++ b/puppet/modules/site_shorewall/manifests/monitor.pp @@ -0,0 +1,18 @@ +class site_shorewall::monitor { + + include site_shorewall::defaults + + shorewall::rule { + 'net2fw-https': + source => 'net', + destination => '$FW', + action => 'HTTPS(ACCEPT)', + order => 200; + 'net2fw-http': + source => 'net', + destination => '$FW', + action => 'HTTP(ACCEPT)', + order => 200; + } + +} -- cgit v1.2.3 From b754c9f3412441c58e90fa57dc236fab74cee167 Mon Sep 17 00:00:00 2001 From: varac Date: Mon, 11 Feb 2013 15:20:05 +0100 Subject: duplicate shortwall service definitions now inclduded from services/* --- puppet/modules/site_shorewall/manifests/monitor.pp | 14 ++------------ puppet/modules/site_shorewall/manifests/service/http.pp | 13 +++++++++++++ puppet/modules/site_shorewall/manifests/service/https.pp | 12 ++++++++++++ puppet/modules/site_shorewall/manifests/tor.pp | 6 +----- puppet/modules/site_shorewall/manifests/webapp.pp | 10 +--------- 5 files changed, 29 insertions(+), 26 deletions(-) create mode 100644 puppet/modules/site_shorewall/manifests/service/http.pp create mode 100644 puppet/modules/site_shorewall/manifests/service/https.pp (limited to 'puppet/modules/site_shorewall/manifests') diff --git a/puppet/modules/site_shorewall/manifests/monitor.pp b/puppet/modules/site_shorewall/manifests/monitor.pp index af9f8bfe..f4ed4f7c 100644 --- a/puppet/modules/site_shorewall/manifests/monitor.pp +++ b/puppet/modules/site_shorewall/manifests/monitor.pp @@ -1,18 +1,8 @@ class site_shorewall::monitor { include site_shorewall::defaults + include site_shorewall::service::http + include site_shorewall::service::https - shorewall::rule { - 'net2fw-https': - source => 'net', - destination => '$FW', - action => 'HTTPS(ACCEPT)', - order => 200; - 'net2fw-http': - source => 'net', - destination => '$FW', - action => 'HTTP(ACCEPT)', - order => 200; - } } diff --git a/puppet/modules/site_shorewall/manifests/service/http.pp b/puppet/modules/site_shorewall/manifests/service/http.pp new file mode 100644 index 00000000..74b874d5 --- /dev/null +++ b/puppet/modules/site_shorewall/manifests/service/http.pp @@ -0,0 +1,13 @@ +class site_shorewall::service::http { + + include site_shorewall::defaults + + shorewall::rule { + 'net2fw-http': + source => 'net', + destination => '$FW', + action => 'HTTP(ACCEPT)', + order => 200; + } + +} diff --git a/puppet/modules/site_shorewall/manifests/service/https.pp b/puppet/modules/site_shorewall/manifests/service/https.pp new file mode 100644 index 00000000..4a8b119c --- /dev/null +++ b/puppet/modules/site_shorewall/manifests/service/https.pp @@ -0,0 +1,12 @@ +class site_shorewall::service::https { + + include site_shorewall::defaults + + shorewall::rule { + 'net2fw-https': + source => 'net', + destination => '$FW', + action => 'HTTPS(ACCEPT)', + order => 200; + } +} diff --git a/puppet/modules/site_shorewall/manifests/tor.pp b/puppet/modules/site_shorewall/manifests/tor.pp index a72d9dfc..8fe21ee6 100644 --- a/puppet/modules/site_shorewall/manifests/tor.pp +++ b/puppet/modules/site_shorewall/manifests/tor.pp @@ -18,11 +18,7 @@ class site_shorewall::tor { destination => '$FW', action => 'leap_tor(ACCEPT)', order => 200; - 'net2fw-http': - source => 'net', - destination => '$FW', - action => 'HTTP(ACCEPT)', - order => 200; } + include site_shorewall::service::http } diff --git a/puppet/modules/site_shorewall/manifests/webapp.pp b/puppet/modules/site_shorewall/manifests/webapp.pp index ff9b7646..31a65b1b 100644 --- a/puppet/modules/site_shorewall/manifests/webapp.pp +++ b/puppet/modules/site_shorewall/manifests/webapp.pp @@ -1,13 +1,5 @@ class site_shorewall::webapp { include site_shorewall::defaults - - shorewall::rule { - 'net2fw-https': - source => 'net', - destination => '$FW', - action => 'HTTPS(ACCEPT)', - order => 200; - } - + include site_shorewall::service::https } -- cgit v1.2.3 From 102af94df02decef888bac09748dbac6773dedd6 Mon Sep 17 00:00:00 2001 From: varac Date: Tue, 12 Feb 2013 13:26:42 +0100 Subject: fixed shorewall is blocking api port (Bug #1735) --- .../site_shorewall/manifests/service/webapp_api.pp | 21 +++++++++++++++++++++ puppet/modules/site_shorewall/manifests/webapp.pp | 1 + 2 files changed, 22 insertions(+) create mode 100644 puppet/modules/site_shorewall/manifests/service/webapp_api.pp (limited to 'puppet/modules/site_shorewall/manifests') diff --git a/puppet/modules/site_shorewall/manifests/service/webapp_api.pp b/puppet/modules/site_shorewall/manifests/service/webapp_api.pp new file mode 100644 index 00000000..9d4296e5 --- /dev/null +++ b/puppet/modules/site_shorewall/manifests/service/webapp_api.pp @@ -0,0 +1,21 @@ +class site_shorewall::service::webapp_api { + + $api = hiera('api') + $api_port = $api['port'] + + # define macro for incoming services + file { '/etc/shorewall/macro.leap_webapp_api': + content => "PARAM - - tcp $api_port ", + notify => Service['shorewall'] + } + + + shorewall::rule { + 'net2fw-webapp_api': + source => 'net', + destination => '$FW', + action => 'leap_webapp_api(ACCEPT)', + order => 200; + } + +} diff --git a/puppet/modules/site_shorewall/manifests/webapp.pp b/puppet/modules/site_shorewall/manifests/webapp.pp index 31a65b1b..d12bbc8f 100644 --- a/puppet/modules/site_shorewall/manifests/webapp.pp +++ b/puppet/modules/site_shorewall/manifests/webapp.pp @@ -2,4 +2,5 @@ class site_shorewall::webapp { include site_shorewall::defaults include site_shorewall::service::https + include site_shorewall::service::webapp_api } -- cgit v1.2.3