summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-includes/etc/network
diff options
context:
space:
mode:
Diffstat (limited to 'config/chroot_local-includes/etc/network')
-rwxr-xr-xconfig/chroot_local-includes/etc/network/if-up.d/000firewall12
-rwxr-xr-xconfig/chroot_local-includes/etc/network/if-up.d/600tor4
2 files changed, 16 insertions, 0 deletions
diff --git a/config/chroot_local-includes/etc/network/if-up.d/000firewall b/config/chroot_local-includes/etc/network/if-up.d/000firewall
new file mode 100755
index 0000000..f57681e
--- /dev/null
+++ b/config/chroot_local-includes/etc/network/if-up.d/000firewall
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# Exit if lo interface
+[ "$METHOD" = "loopback" ] && exit 0
+
+IPTABLES_RULES=/etc/firewall.conf
+
+[ -x /sbin/iptables-restore ] || exit 2
+[ -n "$IPTABLES_RULES" ] || exit 3
+[ -r "$IPTABLES_RULES" ] || exit 4
+
+/sbin/iptables-restore < "$IPTABLES_RULES"
diff --git a/config/chroot_local-includes/etc/network/if-up.d/600tor b/config/chroot_local-includes/etc/network/if-up.d/600tor
new file mode 100755
index 0000000..6f1341f
--- /dev/null
+++ b/config/chroot_local-includes/etc/network/if-up.d/600tor
@@ -0,0 +1,4 @@
+#! /bin/sh
+
+/etc/init.d/tor restart
+