1 |
unnilennium |
1.1 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-s2s-0.1/createlinks mezzanine_patched_smeserver-openvpn-s2s-0.1/createlinks |
2 |
|
|
--- smeserver-openvpn-s2s-0.1/createlinks 2010-10-17 01:03:57.000000000 +0200 |
3 |
|
|
+++ mezzanine_patched_smeserver-openvpn-s2s-0.1/createlinks 2010-10-17 01:03:29.000000000 +0200 |
4 |
|
|
@@ -3,6 +3,7 @@ |
5 |
|
|
use esmith::Build::CreateLinks qw(:all); |
6 |
|
|
|
7 |
|
|
safe_symlink("restart", "root/etc/e-smith/events/openvpn-s2s-update/services2adjust/openvpn-s2s"); |
8 |
|
|
+safe_symlink("adjust", "root/etc/e-smith/events/openvpn-s2s-update/services2adjust/masq"); |
9 |
|
|
|
10 |
|
|
service_link_enhanced("openvpn-s2s", "S80", "7"); |
11 |
|
|
service_link_enhanced("openvpn-s2s", "K25", "6"); |
12 |
|
|
@@ -12,5 +13,7 @@ |
13 |
|
|
event_link("openvpn-s2s-genconf", "openvpn-s2s-update", "20"); |
14 |
|
|
event_link("openvpn-s2s-genconf", "bootstrap-console-save", "80"); |
15 |
|
|
|
16 |
|
|
+templates2events("/etc/rc.d/init.d/masq", qw/openvpn-s2s-update/); |
17 |
|
|
+ |
18 |
|
|
panel_link("openvpns2s", 'manager'); |
19 |
|
|
|
20 |
|
|
diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-s2s-0.1/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90local_chk49vpn_networks mezzanine_patched_smeserver-openvpn-s2s-0.1/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90local_chk49vpn_networks |
21 |
|
|
--- smeserver-openvpn-s2s-0.1/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90local_chk49vpn_networks 1970-01-01 01:00:00.000000000 +0100 |
22 |
|
|
+++ mezzanine_patched_smeserver-openvpn-s2s-0.1/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90local_chk49vpn_networks 2010-10-17 01:01:38.000000000 +0200 |
23 |
|
|
@@ -0,0 +1,10 @@ |
24 |
|
|
+{ |
25 |
|
|
+my $ovpndb = esmith::ConfigDB->open_ro('openvpn-s2s'); |
26 |
|
|
+ |
27 |
|
|
+foreach my $vpn ($ovpndb->get_all_by_prop(type=>('client')), |
28 |
|
|
+ $ovpndb->get_all_by_prop(type=>('server'))){ |
29 |
|
|
+ $OUT .= "/sbin/iptables -A \$NEW_local_chk --in-interface tun" . $vpn->key . |
30 |
|
|
+ " -j DROP\n" if (($vpn->prop('AllowInbound') || 'yes') eq 'no'); |
31 |
|
|
+} |
32 |
|
|
+ |
33 |
|
|
+ |