diff options
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', + } +} |