Commit 459afc93 by Heiko Kokemoor

Kleine Verbesserungen

1 parent 6cf3dd2e
Showing with 11 additions and 5 deletions
......@@ -31,7 +31,7 @@ check_rule_start()
{
CLIENT_IP=$(echo $SSH_CLIENT | awk '{ print $1}')
$IPTABLES -L|grep "tcp dpt:$PROXPORT"
$IPTABLES -L -n|grep "tcp dpt:$PROXPORT"|grep $CLIENT_IP
}
accept_proxmox()
......@@ -86,11 +86,14 @@ i=$1
case $i in
start)
# check_rule_start
# if [ $? = 1 ]
# then
check_rule_start
if [ $? = 1 ]
then
accept_proxmox
# fi
else
echo "IP $CLIENT_IP already unblocked"
fi
;;
stop)
......@@ -99,6 +102,9 @@ case $i in
stop-all)
stop_all
;;
check)
check_rule_start
;;
*)
echo $(basename $0) '[start|stop|stop-all] - opens a port for the Proxmox Webinterface'
;;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!