diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-09-13 22:17:24 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-09-13 22:17:24 -0300 |
commit | 156dd397756e11b2065c518e8c15af480898208d (patch) | |
tree | cfc853e2886eae5e73a1d6796b7dbe4633143000 /manifests | |
parent | 476194837ef4340905f4e87fadafd205206cb3aa (diff) | |
download | puppet-nodo-156dd397756e11b2065c518e8c15af480898208d.tar.gz puppet-nodo-156dd397756e11b2065c518e8c15af480898208d.tar.bz2 |
Adding firewall::openvpn
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 1 | ||||
-rw-r--r-- | manifests/subsystems/firewall/openvpn.pp | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index ba00db9..f96b5ee 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -86,6 +86,7 @@ import "subsystems/firewall/torrent.pp" import "subsystems/firewall/ups.pp" import "subsystems/firewall/wifi.pp" import "subsystems/firewall/local.pp" +import "subsystems/firewall/openvpn.pp" # Import nodo classes import "nodo.pp" diff --git a/manifests/subsystems/firewall/openvpn.pp b/manifests/subsystems/firewall/openvpn.pp new file mode 100644 index 0000000..51b31fe --- /dev/null +++ b/manifests/subsystems/firewall/openvpn.pp @@ -0,0 +1,29 @@ +class firewall::openvpn { + shorewall::zone { 'vpn': + type => 'ipv4', + order => '4', + } + + shorewall::interface { 'tun0': + zone => 'vpn', + } + + shorewall::policy { 'loc-vpn': + sourcezone => 'loc', + destinationzone => 'vpn', + policy => 'ACCEPT', + order => '1', + } + + shorewall::policy { 'vpn-loc': + sourcezone => 'vpn', + destinationzone => 'loc', + policy => 'ACCEPT', + order => '1', + } + + shorewall::tunnel { 'openvpn': + tunnel_type => 'openvpn', + zone => 'net', + } +} |