aboutsummaryrefslogtreecommitdiff
path: root/tools/etc/network/if-up.d/boca
blob: 0f31ee0b507051f60ceac42c47d9a43cee87489e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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