@@ -1,12 +1,26 @@
# blocksshd startup & stop configuration
+function bsshd_startup {
+ sleep 2
+ iptables -A INPUT -j `grep chain /etc/blocksshd.conf | awk -F\' '{print $2}'`
+}
+
+function bsshd_shutdown {
+ iptables -P INPUT ACCEPT
+ iptables -P FORWARD ACCEPT
+ iptables -P OUTPUT ACCEPT
+ iptables -F
+ iptables -X
+}
+
# startup
# e.g. iptables -A INPUT -j blocksshd
-# STARTCMD="sleep 1 ; /usr/sbin/iptables -A INPUT -j `grep chain /etc/blocksshd.conf | awk -F\' '{print $2}'`"
+# STARTCMD="bsshd_startup"
STARTCMD=""
+
# stop
# set all chains to accept, flush chains , remove extra chains
-# STOPCMD="/usr/sbin/iptables -P INPUT ACCEPT ; /usr/sbin/iptables -P FORWARD ACCEPT ; /usr/sbin/iptables -P OUTPUT ACCEPT ; /usr/sbin/iptables -F ; /usr/sbin/iptables -X"
+# STOPCMD="bsshd_shutdown"
STOPCMD=""
|