From be2491b093b1f0ca430bede679ecbb670041e483 Mon Sep 17 00:00:00 2001 From: cassio Date: Tue, 2 Jul 2013 09:46:45 +0400 Subject: restructuring of boca's git --- tools/etc/network/if-up.d/boca | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tools/etc/network/if-up.d/boca (limited to 'tools/etc/network/if-up.d') diff --git a/tools/etc/network/if-up.d/boca b/tools/etc/network/if-up.d/boca new file mode 100644 index 0000000..0f31ee0 --- /dev/null +++ b/tools/etc/network/if-up.d/boca @@ -0,0 +1,17 @@ +#!/bin/bash +if [ ! -f /etc/icpc/.isserver ]; then +if [ -x /etc/icpc/bocaserver.sh ]; then + . /etc/icpc/bocaserver.sh +fi +/sbin/iptables -F INPUT +/sbin/iptables -A INPUT -i lo -j ACCEPT +/sbin/iptables -A INPUT -s 143.107.255.15 -j ACCEPT +if [ "$BOCASERVER" != "" ]; then + /sbin/iptables -A INPUT -s $BOCASERVER -j ACCEPT +fi +/sbin/iptables -A INPUT -j REJECT +else + if [ -x /etc/icpc/bocaserver.iptables ]; then + . /etc/icpc/bocaserver.iptables + fi +fi -- cgit v1.2.3