1 |
jpp |
1.1 |
diff -Nur smeserver-xt_geoip-1.0.1.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustXt_Geoip smeserver-xt_geoip-1.0.1/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustXt_Geoip |
2 |
|
|
--- smeserver-xt_geoip-1.0.1.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustXt_Geoip 2019-07-21 16:55:39.613514533 +0200 |
3 |
|
|
+++ smeserver-xt_geoip-1.0.1/root/etc/e-smith/templates/etc/rc.d/init.d/masq/90adjustXt_Geoip 2019-07-21 18:41:43.000338969 +0200 |
4 |
|
|
@@ -11,6 +11,19 @@ |
5 |
|
|
my $servStatus; |
6 |
|
|
my $locBC; |
7 |
|
|
|
8 |
|
|
+ # to allow reload without locking just after initial install |
9 |
|
|
+ $OUT .=<<'EOF'; |
10 |
|
|
+ iptables -n --list XTGeoIP >/dev/null 2>&1 |
11 |
|
|
+ test=$? |
12 |
|
|
+ if [[ $test -eq 1 ]] ; then |
13 |
|
|
+ # A blacklist chain for xtables-addons GEOIP |
14 |
|
|
+ /sbin/iptables --new-chain XTGeoIP |
15 |
|
|
+ /sbin/iptables --new-chain XTGeoIP_1 |
16 |
|
|
+ /sbin/iptables --append XTGeoIP -j XTGeoIP_1 |
17 |
|
|
+ /sbin/iptables --insert INPUT 1 \ |
18 |
|
|
+ -j XTGeoIP |
19 |
|
|
+ fi |
20 |
|
|
+EOF |
21 |
|
|
|
22 |
|
|
# Find the current XTGeoIP_$$ chain, and create a new one. |
23 |
|
|
$OUT .=<<'EOF'; |