From ad62cfdad04c8f8ed9d6454f716c92e850ac53ba Mon Sep 17 00:00:00 2001 From: elijah Date: Sun, 17 Mar 2013 13:15:51 -0700 Subject: added support for "limited" service levels (although vpn is not yet actually rate limited). --- puppet/modules/site_openvpn/templates/add_gateway_ips.sh.erb | 11 +++++++++++ .../modules/site_openvpn/templates/leap_add_second_ip.sh.erb | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 puppet/modules/site_openvpn/templates/add_gateway_ips.sh.erb delete mode 100644 puppet/modules/site_openvpn/templates/leap_add_second_ip.sh.erb (limited to 'puppet/modules/site_openvpn/templates') diff --git a/puppet/modules/site_openvpn/templates/add_gateway_ips.sh.erb b/puppet/modules/site_openvpn/templates/add_gateway_ips.sh.erb new file mode 100644 index 00000000..ed06a95e --- /dev/null +++ b/puppet/modules/site_openvpn/templates/add_gateway_ips.sh.erb @@ -0,0 +1,11 @@ +#!/bin/sh + +ip addr show dev <%= @interface %> | grep -q <%= @openvpn_gateway_address %>/24 || + ip addr add <%= @openvpn_gateway_address %>/24 dev <%= @interface %> + +<% if @openvpn_second_gateway_address %> +ip addr show dev <%= @interface %> | grep -q <%= @openvpn_second_gateway_address %>/24 || + ip addr add <%= @openvpn_second_gateway_address %>/24 dev <%= @interface %> +<% end %> + +/bin/echo 1 > /proc/sys/net/ipv4/ip_forward diff --git a/puppet/modules/site_openvpn/templates/leap_add_second_ip.sh.erb b/puppet/modules/site_openvpn/templates/leap_add_second_ip.sh.erb deleted file mode 100644 index 40866116..00000000 --- a/puppet/modules/site_openvpn/templates/leap_add_second_ip.sh.erb +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -ip addr show dev <%= @interface %> | grep -q <%= @openvpn_gateway_address %>/24 || - ip addr add <%= @openvpn_gateway_address %>/24 dev <%= @interface %> - -<% if @openvpn_allow_free %> -ip addr show dev <%= @interface %> | grep -q <%= @openvpn_free_gateway_address %>/24 || - ip addr add <%= @openvpn_free_gateway_address %>/24 dev <%= @interface %> -<% end %> - -/bin/echo 1 > /proc/sys/net/ipv4/ip_forward -- cgit v1.2.3