diff options
| author | cassiopc <cassiopc@gmail.com> | 2012-08-31 09:02:27 +0000 |
|---|---|---|
| committer | cassiopc <cassiopc@gmail.com> | 2012-08-31 09:02:27 +0000 |
| commit | 2948fe8d6055f6dfe6289e64bce426b5e0bb552f (patch) | |
| tree | 2cff8a28f2bcf1f21116b952738b5e683e11c193 /boca-1.5.1/tools/etc/network | |
| parent | 37d5a8f2b6ecf585f91c2f7c804145853f0ca1e9 (diff) | |
| download | boca-2948fe8d6055f6dfe6289e64bce426b5e0bb552f.tar.gz boca-2948fe8d6055f6dfe6289e64bce426b5e0bb552f.zip | |
inclusion of dir 1.5.1 for boca
Diffstat (limited to 'boca-1.5.1/tools/etc/network')
| -rw-r--r-- | boca-1.5.1/tools/etc/network/if-pre-up.d/boca | 25 | ||||
| -rw-r--r-- | boca-1.5.1/tools/etc/network/if-up.d/boca | 17 |
2 files changed, 42 insertions, 0 deletions
diff --git a/boca-1.5.1/tools/etc/network/if-pre-up.d/boca b/boca-1.5.1/tools/etc/network/if-pre-up.d/boca new file mode 100644 index 0000000..f65a27f --- /dev/null +++ b/boca-1.5.1/tools/etc/network/if-pre-up.d/boca @@ -0,0 +1,25 @@ +#!/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 + +# just to make things easier, let's allow communication to/from BOCA servers +/sbin/iptables -A INPUT -s 143.107.45.122 -j ACCEPT +/sbin/iptables -A INPUT -s 50.116.19.221 -j ACCEPT + +if [ "$BOCASERVER" != "" ]; then + /sbin/iptables -A INPUT -s $BOCASERVER -j ACCEPT +fi +/sbin/iptables -A INPUT -m udp -p udp -s 0/0 --sport 67:68 --dport 67:68 -j ACCEPT +/sbin/iptables -A INPUT -m udp -p udp -s 0/0 --sport 53 --dport 53 -j ACCEPT +/sbin/iptables -A INPUT -m tcp -p tcp -s 0/0 --sport 53 --dport 53 -j ACCEPT +/sbin/iptables -A INPUT -j REJECT +else + if [ -x /etc/icpc/bocaserver.iptables ]; then + . /etc/icpc/bocaserver.iptables + fi +fi diff --git a/boca-1.5.1/tools/etc/network/if-up.d/boca b/boca-1.5.1/tools/etc/network/if-up.d/boca new file mode 100644 index 0000000..0f31ee0 --- /dev/null +++ b/boca-1.5.1/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 |