Logoj0ke.net Open Build Service > Projects > internetx > blocksshd > blocksshd.sysconfig
Sign Up | Log In

File blocksshd.sysconfig of Package blocksshd

x
 
1
# blocksshd startup & stop configuration
2
#
3
function bsshd_startup {
4
    sleep 2
5
    iptables -N `grep chain /etc/blocksshd.conf | awk -F\' '{print $2}'`
6
    iptables -A INPUT -j `grep chain /etc/blocksshd.conf | awk -F\' '{print $2}'`
7
}
8
#
9
function bsshd_shutdown {
10
    iptables -P INPUT ACCEPT
11
    iptables -P FORWARD ACCEPT
12
    iptables -P OUTPUT ACCEPT
13
    iptables -F
14
    iptables -X
15
}
16
#
17
# startup
18
# e.g. iptables -A INPUT -j blocksshd
19
# STARTCMD="bsshd_startup"
20
#
21
STARTCMD="bsshd_startup"
22
#
23
# stop 
24
# set all chains to accept, flush chains , remove extra chains
25
# STOPCMD="bsshd_shutdown"
26
#
27
STOPCMD="bsshd_shutdown"
28
29