From 3d1cf84f39fece3f2a9f8b7247a792212eb81177 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 8 Jan 2022 15:50:26 -0300 Subject: Feat: major refactor --- manifests/implementations/shorewall/openvpn.pp | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 manifests/implementations/shorewall/openvpn.pp (limited to 'manifests/implementations/shorewall/openvpn.pp') diff --git a/manifests/implementations/shorewall/openvpn.pp b/manifests/implementations/shorewall/openvpn.pp new file mode 100644 index 0000000..c137946 --- /dev/null +++ b/manifests/implementations/shorewall/openvpn.pp @@ -0,0 +1,36 @@ +class firewall::implementations::shorewall::openvpn { + shorewall::zone { 'vpn': + type => 'ipv4', + order => 4, + } + + shorewall::interface { 'tun0': + zone => 'vpn', + } + + shorewall::policy { 'loc-vpn': + sourcezone => 'loc', + destinationzone => 'vpn', + policy => 'ACCEPT', + order => 20, + } + + shorewall::policy { 'vpn-loc': + sourcezone => 'vpn', + destinationzone => 'loc', + policy => 'ACCEPT', + order => 21, + } + + shorewall::policy { 'fw-vpn': + sourcezone => '$FW', + destinationzone => 'vpn', + policy => 'ACCEPT', + order => 22, + } + + shorewall::tunnel { 'openvpn': + tunnel_type => 'openvpnclient', + zone => 'net', + } +} -- cgit v1.2.3