diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-09-22 17:49:07 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-09-22 17:49:07 -0300 |
commit | e079852d8dd6c965ed55ad660b03a452fb624fc3 (patch) | |
tree | a7f4e6abe296592d2729fb5b894367bb951c37a2 | |
parent | 0d3bd204c75b2393495a5023ba7292a0a580dfc5 (diff) | |
download | puppet-firewall-e079852d8dd6c965ed55ad660b03a452fb624fc3.tar.gz puppet-firewall-e079852d8dd6c965ed55ad660b03a452fb624fc3.tar.bz2 |
Parameters on firewall:ppp
-rw-r--r-- | manifests/ppp.pp | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/manifests/ppp.pp b/manifests/ppp.pp index 3082e92..e9ce789 100644 --- a/manifests/ppp.pp +++ b/manifests/ppp.pp @@ -1,31 +1,36 @@ -class firewall::ppp { - shorewall::zone { 'ppp': - type => 'ipv4', - order => 4, +class firewall::ppp( + $interface = 'ppp0', + $zone = 'ppp' +) { + shorewall::interface { $interface: + zone => $zone, } - shorewall::interface { 'ppp0': - zone => 'ppp', - } + if $zone == 'ppp' { + shorewall::zone { 'ppp': + type => 'ipv4', + order => 4, + } - shorewall::policy { 'loc-ppp': - sourcezone => 'loc', - destinationzone => 'ppp', - policy => 'ACCEPT', - order => 30, - } + shorewall::policy { 'loc-ppp': + sourcezone => 'loc', + destinationzone => $zone, + policy => 'ACCEPT', + order => 30, + } - shorewall::policy { 'ppp-loc': - sourcezone => 'ppp', - destinationzone => 'loc', - policy => 'ACCEPT', - order => 31, - } + shorewall::policy { 'ppp-loc': + sourcezone => 'ppp', + destinationzone => $zone, + policy => 'ACCEPT', + order => 31, + } - shorewall::policy { 'fw-ppp': - sourcezone => '$FW', - destinationzone => 'ppp', - policy => 'ACCEPT', - order => 32, + shorewall::policy { 'fw-ppp': + sourcezone => '$FW', + destinationzone => $zone, + policy => 'ACCEPT', + order => 32, + } } } |